Docs > Factory
Permissions, spaces, and sharing
# Permissions, spaces, and sharing Factory enforces server-side authorization on every read, preview, commit, move, and history lookup. **Personal directories (`users/<you>/`) are always private** and cannot be shared; **workspace directories (`workspace/`)** use path-prefix access grants (`factory_shares`). Factory roles govern **definition files and resource administration**—they never grant access to another user's OAuth accounts, MCP tokens, personal memory, or restricted knowledge graph records. ## Factory roles and capabilities Grants assign one of three ordered roles (`read < write < admin`) to a `file` or `directory` path prefix under `workspace/`: | Capability | Viewer (`read`) | Editor (`write`) | Admin (`admin`) | | --- | --- | --- | --- | | Read files, diffs, and filtered commit history for that path | Yes | Yes | Yes | | Adopt/link a shared skill or join a shared agent | Yes | Yes | Yes | | Read and write `team/` notes on a joined shared agent | Yes | Yes | Yes | | Edit and push changes to files under that path | No | Yes | Yes | | Manage sharing grants (`dex factory share`) | No | No | Yes | | Manage shared agent members, pause/resume, set coordinator, trigger full team run | No | No | Yes | | Review other members' pending action cards (when `pendingActionVisibility: admins`) | No | No | Yes | Only individual user principals can hold the `admin` role. Moving a file or folder in Factory is checked server-side (`assertFactoryMoveAccess`) so a move can never silently widen who can read or edit a resource. ## Sharing principals and Spaces You can grant `read` or `write` access on a workspace path to three kinds of recipients: - **A person** — By workspace member email (for example, `sam@acme.com`) or `me`. - **A Space (`org_spaces`)** — A team group managed at `/nexus/settings/spaces` and synced with your WorkOS groups (for example, `Revenue Ops` or `Enterprise AE`). - **The entire workspace (`workspace`)** — Every member of the organization. Manage grants from the **Workspace files** access dialog (`/nexus/settings/factory`) or with the CLI: ```bash # Inspect current grants on a file or folder dex factory access factories/*/workspace/skills/<res-id> # Grant read or write access to a person, Space, or workspace dex factory share factories/*/workspace/skills/<res-id> "Revenue Ops" --role read dex factory share factories/*/workspace/knowledge/playbooks workspace --role read dex factory share factories/*/workspace/agents/<res-id> priya@acme.com --role write # Revoke a recipient's grant dex factory share factories/*/workspace/skills/<res-id> sam@acme.com --role none ``` For shared agents, `dex agents share <id> <email> --role read|write` is a convenient shorthand for sharing that agent's folder. ## Sharing vs. linking (adoption) In Factory layout v3, **sharing** and **installing/adopting** are separate steps: 1. **Sharing** grants visibility (`read`, `write`, or `admin`) on a workspace resource path. Sharing a skill or agent does **not** automatically turn it on for teammates. 2. **Linking (adoption)** activates the shared resource in a teammate's personal scope by writing a lightweight link descriptor (`mode: linked`) pointing at the canonical workspace resource ID—never a duplicate copy: - **Shared skills** (`users/<you>/shared-skills/<res-id>/SKILL.md`) activate immediately (`enabled: true`). - **Shared agents** (`users/<you>/shared-agents/<res-id>/AGENT.md`) start `enabled: false` until the teammate completes setup, satisfies `requires`, and turns the agent on. Because links point to the canonical `workspace/` definition, every linked teammate automatically gets improvements when an Editor pushes a new commit. For older copied resources (or forked templates), `/nexus/templates/[kind]/[id]` provides a three-way update preview comparing local edits against upstream changes before applying an update. ## Filtered commit history and diffs Factory stores shared and personal scopes in one organization Git repository, while strictly isolating visibility: - Local and sandbox checkouts (`dex factory pull`) materialize **only** files the caller is authorized to read. - Commit history and commit diffs (`/nexus/settings/factory` history view) filter every commit's file list through the caller's read permissions and synthesize commit display messages so private sibling files in the same commit never leak. ## Related pages - [Factory definition as code](/factory/workspace-structure/) - Directory layout and link descriptor formats - [Shared agents](/agents/shared-agents/) - Member onboarding, Admin pause, and coordinator permissions - [Skills](/agents/skills/) - Sharing workspace skills and adoption precedence - [Sources and data scopes](/context/sources-and-scopes/) - Separate permission model for knowledge graph recordsControl who can view, edit, and administer Factory files with path-prefix roles, WorkOS-backed Spaces, and link-based resource adoption.
Factory enforces server-side authorization on every read, preview, commit, move, and history lookup. Personal directories (users/<you>/) are always private and cannot be shared; workspace directories (workspace/) use path-prefix access grants (factory_shares).
Factory roles govern definition files and resource administration—they never grant access to another user’s OAuth accounts, MCP tokens, personal memory, or restricted knowledge graph records.
Factory roles and capabilities
Section titled “Factory roles and capabilities”Grants assign one of three ordered roles (read < write < admin) to a file or directory path prefix under workspace/:
| Capability | Viewer (read) | Editor (write) | Admin (admin) |
|---|---|---|---|
| Read files, diffs, and filtered commit history for that path | Yes | Yes | Yes |
| Adopt/link a shared skill or join a shared agent | Yes | Yes | Yes |
Read and write team/ notes on a joined shared agent | Yes | Yes | Yes |
| Edit and push changes to files under that path | No | Yes | Yes |
Manage sharing grants (dex factory share) | No | No | Yes |
| Manage shared agent members, pause/resume, set coordinator, trigger full team run | No | No | Yes |
Review other members’ pending action cards (when pendingActionVisibility: admins) | No | No | Yes |
Only individual user principals can hold the admin role. Moving a file or folder in Factory is checked server-side (assertFactoryMoveAccess) so a move can never silently widen who can read or edit a resource.
Sharing principals and Spaces
Section titled “Sharing principals and Spaces”You can grant read or write access on a workspace path to three kinds of recipients:
- A person — By workspace member email (for example,
sam@acme.com) orme. - A Space (
org_spaces) — A team group managed at/nexus/settings/spacesand synced with your WorkOS groups (for example,Revenue OpsorEnterprise AE). - The entire workspace (
workspace) — Every member of the organization.
Manage grants from the Workspace files access dialog (/nexus/settings/factory) or with the CLI:
# Inspect current grants on a file or folderdex factory access factories/*/workspace/skills/<res-id>
# Grant read or write access to a person, Space, or workspacedex factory share factories/*/workspace/skills/<res-id> "Revenue Ops" --role readdex factory share factories/*/workspace/knowledge/playbooks workspace --role readdex factory share factories/*/workspace/agents/<res-id> priya@acme.com --role write
# Revoke a recipient's grantdex factory share factories/*/workspace/skills/<res-id> sam@acme.com --role noneFor shared agents, dex agents share <id> <email> --role read|write is a convenient shorthand for sharing that agent’s folder.
Sharing vs. linking (adoption)
Section titled “Sharing vs. linking (adoption)”In Factory layout v3, sharing and installing/adopting are separate steps:
- Sharing grants visibility (
read,write, oradmin) on a workspace resource path. Sharing a skill or agent does not automatically turn it on for teammates. - Linking (adoption) activates the shared resource in a teammate’s personal scope by writing a lightweight link descriptor (
mode: linked) pointing at the canonical workspace resource ID—never a duplicate copy:- Shared skills (
users/<you>/shared-skills/<res-id>/SKILL.md) activate immediately (enabled: true). - Shared agents (
users/<you>/shared-agents/<res-id>/AGENT.md) startenabled: falseuntil the teammate completes setup, satisfiesrequires, and turns the agent on.
- Shared skills (
Because links point to the canonical workspace/ definition, every linked teammate automatically gets improvements when an Editor pushes a new commit.
For older copied resources (or forked templates), /nexus/templates/[kind]/[id] provides a three-way update preview comparing local edits against upstream changes before applying an update.
Filtered commit history and diffs
Section titled “Filtered commit history and diffs”Factory stores shared and personal scopes in one organization Git repository, while strictly isolating visibility:
- Local and sandbox checkouts (
dex factory pull) materialize only files the caller is authorized to read. - Commit history and commit diffs (
/nexus/settings/factoryhistory view) filter every commit’s file list through the caller’s read permissions and synthesize commit display messages so private sibling files in the same commit never leak.
Related pages
Section titled “Related pages”- Factory definition as code - Directory layout and link descriptor formats
- Shared agents - Member onboarding, Admin pause, and coordinator permissions
- Skills - Sharing workspace skills and adoption precedence
- Sources and data scopes - Separate permission model for knowledge graph records