You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Team mode M6: Workspace roots and audience-contained grants #4145
Each member has an account space (spaces/<humanId>), which is their personal Workspace root. Admins create audience-scoped shared spaces (for example shared/team, shared/finance) and grant them to roles or members.
A personal root can be granted only to its owner's private Bots. A shared root can be granted only to Bots whose audience it covers.
Grants into another member's root, any Bot's Memory repository or the Host data directory are refused for everyone, including holders of grant-workspace.
Acceptance
A regression proves that Alice's Bot cannot read Bob's root, through every path-addressed tool and through symlink escapes.
Refusals are coded and shown in the UI and the CLI.
Merged M2 stores member Tob and private Bot Memory under the Host's managed Bot root. Moving that Memory into spaces/<humanId>/bots/<slug>/memory needs a migration that moves existing member Memory and rewrites the Memory ownership proofs (persona_bot_memory_ownership). Take the next free migration generation at implementation time; do not reuse a number reserved by in-flight slices.
M9's transfer and purge cover spaces/<humanId> and the shared spaces (files and Bot Memory), in addition to Channels, private Bots, Tob and Memory.
M6 wire contract (agreed before parallel work; Claude = UI, Codex = logic)
Based on main after M2 (#4166), M9 (#4167); M4 (#4169) and M10 are landing in parallel — whichever lands later reconciles migrations (next free generation, never hard-coded) and member-methods.ts.
Spaces
Each active member has an account space spaces/<humanId> (their personal Workspace root), created on member creation / first sign-in and for existing members by migration. The Owner has one too.
Shared spaces shared/<slug> with an audience { kind: 'roles', roleIds } | { kind: 'members', humanIds } | { kind: 'everyone' } (Host Role IDs from M3/M4).
spaces → [{ spaceId, kind: 'account' | 'shared', name, ownerHumanId?, audience?, canManage }] — the caller sees their own account space and every shared space whose audience includes them; holders of workspaces.manageShared see all shared spaces. No other member's account space is listed.
A grant into an account space is allowed only to its owner's private Bots; into a shared space only to Bots whose audience is covered by the space audience (M7 refines Bot audience; until then a private Bot's audience is its owner, a Host Bot's audience is the Owner).
Refused for everyone, including grant-workspace holders: another member's account space (grant-foreign-space), any Bot's Memory repository (grant-protected-path), the Host data directory (grant-protected-path), and a shared space whose audience does not cover the Bot (grant-outside-audience). details.path and details.spaceId when known.
Path-addressed tools resolve real paths (symlinks, .., hard links where detectable) before checking roots; escapes are refused with the same codes.
Memory move: migration moves existing member Tob/private Bot Memory to spaces/<humanId>/bots/<slug>/memory and rewrites persona_bot_memory_ownership; new member Bots are created there.
M9 integration: transfer moves a member's account-space files and Bot Memory to the target's account space (preview lists them); purge removes the account space; shared spaces are untouched by purge except files the member alone owns per Content Purge rules.
CLI: spaces list | create --name --audience roles:<id,…>|members:<u,…>|everyone | update <spaceId> … | delete <spaceId> --confirm; --as for all.
Client (Claude): Settings › Team › Shared spaces (list, create with audience picker, edit, delete) for workspaces.manageShared; "Your space" row under My account; workspace pickers show account/shared spaces; grant refusal codes mapped to plain messages; en + zh.
Tests: Alice's Bot cannot read Bob's account space through every path-addressed tool and symlink escape; grant refusals for each code; Memory move migration with ownership proofs; transfer/purge of spaces; CLI --as parity.
Owner keeps single-user behaviour: the Owner's Bots can be granted any folder on the computer (with the usual approval card). Members are limited to their own folder and shared folders whose audience covers the Bot.
A member's new private Bot is automatically granted read/write on the member's own files/ (revocable, or narrowed to read-only); shared folders need an explicit grant. Its Memory lives at spaces/<humanId>/bots/<slug>/memory and never moves outside the member's folder.
No file browser for now: files move through Channels.
Activity
DoodleBears commentedon Nov 14, 2026
Agent work claim
claude/local/74a5ee4a-f6fe-4aab-870f-5e465b0b8474(not a DSH Session)claude/4145-…(frommain; Codex sub-branchcodex/4145-logic)M6 wire contract (agreed before parallel work; Claude = UI, Codex = logic)
Based on
mainafter M2 (#4166), M9 (#4167); M4 (#4169) and M10 are landing in parallel — whichever lands later reconciles migrations (next free generation, never hard-coded) andmember-methods.ts.Spaces
spaces/<humanId>(their personal Workspace root), created on member creation / first sign-in and for existing members by migration. The Owner has one too.shared/<slug>with an audience{ kind: 'roles', roleIds } | { kind: 'members', humanIds } | { kind: 'everyone' }(Host Role IDs from M3/M4).spaces→[{ spaceId, kind: 'account' | 'shared', name, ownerHumanId?, audience?, canManage }]— the caller sees their own account space and every shared space whose audience includes them; holders ofworkspaces.manageSharedsee all shared spaces. No other member's account space is listed.spaceCreate { name, audience },spaceUpdate { spaceId, name?, audience? },spaceDelete { spaceId, confirm: true }— shared only; needworkspaces.manageShared. Refusals:permission-required(details.permission),space-name-taken,space-not-empty(delete refuses while files or Bot Memory remain),space-not-found,role-not-found,member-not-found.Grants (extends ADR-0067 grants)
grant-workspaceholders: another member's account space (grant-foreign-space), any Bot's Memory repository (grant-protected-path), the Host data directory (grant-protected-path), and a shared space whose audience does not cover the Bot (grant-outside-audience).details.pathanddetails.spaceIdwhen known..., hard links where detectable) before checking roots; escapes are refused with the same codes.currentRoots(session, kind)for M12 (Team mode M12: Bot execution confinement on Linux Hosts #4183).Memory move: migration moves existing member Tob/private Bot Memory to
spaces/<humanId>/bots/<slug>/memoryand rewritespersona_bot_memory_ownership; new member Bots are created there.M9 integration: transfer moves a member's account-space files and Bot Memory to the target's account space (preview lists them); purge removes the account space; shared spaces are untouched by purge except files the member alone owns per Content Purge rules.
CLI:
spaces list | create --name --audience roles:<id,…>|members:<u,…>|everyone | update <spaceId> … | delete <spaceId> --confirm;--asfor all.Client (Claude): Settings › Team › Shared spaces (list, create with audience picker, edit, delete) for
workspaces.manageShared; "Your space" row under My account; workspace pickers show account/shared spaces; grant refusal codes mapped to plain messages; en + zh.Tests: Alice's Bot cannot read Bob's account space through every path-addressed tool and symlink escape; grant refusals for each code; Memory move migration with ownership proofs; transfer/purge of spaces; CLI
--asparity.DoodleBears commentedon Nov 14, 2026
Human decisions (Vain, 2026-11-15):
spaces.files/(revocable, or narrowed to read-only); shared folders need an explicit grant. Its Memory lives atspaces/<humanId>/bots/<slug>/memoryand never moves outside the member's folder.fix(core): preserve native Workspace and account Memory authority
fix(core): preserve Owner grants and initialize member file access
fix(core): preserve Memory through Team mode switches and upgrades
fix(core): harden space lifecycle and expose minimal audience directory
feat(client): let folder managers pick roles and people from the audi…
test(e2e): accept built-in role kind in the audience directory smoke …
chore(verification): re-audit the PersonaBot create smoke after the d…
fix(client): keep stored folder audience entries visible so editors c…
fix(core): preserve Tob links and contain Owner shared grants
fix(client): rename shared folders without resending an unchanged aud…
fix(core): recover Memory transfers and preserve raced folder deletes
fix(core): journal Memory rollback removal before cleanup