Workspaces
Private caves, shared folders, grants that expire
Workspaces = real folders on disk. User sees folder names. Never raw paths. Twig indexes them. Files still boss.
Kinds
| Kind | Owner | Who opens |
|---|---|---|
home | One agent | Only that agent |
user | You | Agents you grant |
Home: agents/<agentId>/. User: workspaces/<workspaceId>/.
Each workspace has .twig/ bookkeeping. Hidden from normal listing:
manifest.json— name, kind, ownerjournal.ndjson— mutation log (append only)versions/— old file versions by hash
Grants
Share is soft. Always expires. Expiry checked on every open, not only by sweeper. Late sweep cannot keep dead grant alive.
| Mode | Meaning |
|---|---|
read | Look and search. No write. |
write | Create, change, delete. Still sandboxed. |
Durations: hour, day, week. Then gone.
Sandbox
Path enters workspace → normalize or die:
- No absolute paths
- No
.. - No backslashes, no NUL
.twig/ readable for peek. Agents never write it directly. Journal machinery owns that.
Why folders not cloud blob soup
Backup = zip the Twig root. Reindex = rebuild DB from files. Laptop mirror = same tree over USB. DB corrupt? Drop. Reindex. File wrong? Journal + versions help reconcile. Files win. Always.