Scopes & Privacy
Understanding the three-tier privacy system that controls who can access your snapshots.
What are Scopes?
Scopes define the visibility and access level of your snapshots. Every snapshot has exactly one scope that determines who can read, search, and interact with it.
The Three Scopes
privateOnly you can see it
workspaceAnyone with access to the workspace can see it
globalPublic - anyone can see it (rarely used)
Private Scope
Private Scope
Your personal knowledge, eyes only
Who Can Access
- ✓You: Full read, search, and delete access
- ✗Team members: Cannot see or search private snapshots
- ✗Workspace admins: Cannot see private snapshots (even in their workspace)
Best Used For
- • Personal notes and reminders
- • Private experiments and drafts
- • Sensitive information (passwords, API keys)
- • Work-in-progress before sharing
- • Personal learning and research
- • Ideas you're not ready to share
How to Create Private Snapshots
snapshot-conversation({
content: "My personal notes about the project...",
private: true // ← This makes it private
})Default is false (workspace scope), so you must explicitly set private: true
Workspace Scope
Workspace Scope
Shared team knowledge
Who Can Access
- ✓You: Full read, search, and delete access
- ✓Workspace members: Can read and search these snapshots
- ✓Workspace admins: Can read, search, and delete
- ✗Other users: Cannot see snapshots from workspaces they're not in
Best Used For
- • Team decisions and discussions
- • Shared technical knowledge
- • Project documentation and history
- • Bug investigations worth sharing
- • Design rationale and context
- • Onboarding materials
How to Create Workspace Snapshots
snapshot-conversation({
content: "Team discussion about API design...",
// private is false by default (workspace scope)
})
// Or explicitly:
snapshot-conversation({
content: "Team discussion about API design...",
private: false // ← Workspace scope
})Workspace scope is the default - best for team collaboration
Global Scope
Global Scope
Public knowledge for everyone
Who Can Access
- ✓Everyone: All Spaces users can read and search
- ⚠Creator: Can delete their own global snapshots
- ⚠System admins: Can moderate and delete any global snapshot
⚠️ Use With Caution
Global snapshots are publicly accessible to all Spaces users. Only use this scope for:
- • Open source knowledge sharing
- • Public tutorials or guides
- • Community resources
- • Non-sensitive general knowledge
Never use global scope for: Proprietary code, company secrets, personal information, or anything you wouldn't post publicly.
How to Create Global Snapshots
Global scope must be explicitly set via custom metadata:
snapshot-conversation({
content: "Public tutorial on React hooks...",
metadata: {
custom: {
scope: "global" // ← Makes it public
}
}
})Note: Global scope is not commonly used. Most users stick to private and workspace scopes.
Scope Comparison
| Feature | Private | Workspace | Global |
|---|---|---|---|
| Visible to creator | ✓ | ✓ | ✓ |
| Visible to workspace team | ✗ | ✓ | ✓ |
| Visible to all users | ✗ | ✗ | ✓ |
| Searchable by team | ✗ | ✓ | ✓ |
| Can be deleted by admins | ✗ | ✓ | ✓ |
| Use for sensitive data | ✓ | ⚠ | ✗ |
| Default scope | ✗ | ✓ | ✗ |
Row Level Security (RLS)
Spaces uses Supabase Row Level Security to enforce scope permissions at the database level. This means your data is protected even if there's a bug in the application code.
How RLS Works
Every database query includes your user ID from the JWT token
PostgreSQL checks RLS policies before returning any row
Private snapshots are filtered to only show yours
Workspace snapshots are filtered based on membership
Global snapshots are visible to everyone
Security guarantee: It's impossible to access snapshots you don't have permission for - even with direct API calls or SQL injection attempts.
Changing Scope
Snapshot scopes can be changed after creation (with limitations):
✓ Allowed Transitions
- Private → Workspace: Share your personal notes with the team
- Private → Global: Make personal knowledge public (rare)
- Workspace → Global: Make team knowledge public
✗ Restricted Transitions
- Workspace → Private: Not allowed (team members may have already seen it)
- Global → Private/Workspace: Not allowed (others may have already accessed it)
Reason: Once shared, you can't "unshare" knowledge that others may have already accessed or saved.
Best Practices
- ✓Default to workspace scope: Collaboration is most valuable when knowledge is shared
- ✓Use private for sensitive info: API keys, passwords, personal notes should be private
- ✓Think before going global: Very few snapshots should be public
- ✓Be intentional: Choose scope based on who needs access, not convenience
- ✓Review periodically: Audit private snapshots - some may be worth sharing
- ✓Trust RLS: The system enforces permissions correctly - you can't accidentally leak data