From eef60bcd644ae4d734c8ea4c4a0c9cfc84c1ffdf Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Wed, 5 Aug 2026 18:55:54 -0400 Subject: [PATCH] docs: add workspaces.get metadata read --- specs/v2/workspaces.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/specs/v2/workspaces.md b/specs/v2/workspaces.md index 2b05d57329a..85593ac6f5c 100644 --- a/specs/v2/workspaces.md +++ b/specs/v2/workspaces.md @@ -21,8 +21,15 @@ const session = await sessions.create({ }) ``` +Consumers persist the Workspace ID as their durable handle and re-derive everything else: + +```typescript +const workspace = await workspaces.get(id) // { id, provider, root } — table read, never contacts a provider +``` + - `provider` is required for now. A config default (`workspace.provider`) can be added later without breaking anything; skipping it keeps config untouched. - `root` is an absolute POSIX path in the provider filesystem. +- `get` fails with typed `WorkspaceNotFound` — also the existence check. No `getOrCreate`: the consumer owns its "which Workspace is mine" mapping, and provider-level get-or-create can silently replace resources (Vercel tracer finding). ## Domain Model