From b242164d0f8377ceb1a6b5866cfbde3fe4d2b63f Mon Sep 17 00:00:00 2001 From: Yuto Nishida Date: Wed, 12 Aug 2026 21:46:01 -0700 Subject: [PATCH] [papyrus] Adopt silverwood's `workstream ` CLI paths Update the silverwood wrapper's get/archive/rename to the new nested argv (`workstream show|archive|rename`); `checkout` already used this shape. Refresh now-stale `silverwood show`/`silverwood rename` references in a NewSessionModal code comment and DESIGN.md. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01DY9N9STx6HMGtSEJauX1KG --- experimental/papyrus/DESIGN.md | 2 +- .../papyrus/client/src/components/NewSessionModal.tsx | 4 ++-- experimental/papyrus/server/services/silverwood.ts | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/experimental/papyrus/DESIGN.md b/experimental/papyrus/DESIGN.md index 0ef4f46..d34c6f0 100644 --- a/experimental/papyrus/DESIGN.md +++ b/experimental/papyrus/DESIGN.md @@ -58,7 +58,7 @@ no private state of its own: - **Canvas coordinate / color / notes** → the workstream's KV under papyrus's namespace `app.andref.papyrus` (values are JSON strings). The coordinate is deliberately stored in silverwood too — that is the whole point. -- **Display name** → the workstream `name` (edited via `silverwood rename`). +- **Display name** → the workstream `name` (edited via `silverwood workstream rename`). - **Working directory** → silverwood's per-forest checkout location. - **Session tabs** → silverwood sessions (themselves KV, under `app.andref.silverwood.session`). A tab is one session record: a `claude-code` agent session (papyrus mints its id and records diff --git a/experimental/papyrus/client/src/components/NewSessionModal.tsx b/experimental/papyrus/client/src/components/NewSessionModal.tsx index 1ec05cd..b46262a 100644 --- a/experimental/papyrus/client/src/components/NewSessionModal.tsx +++ b/experimental/papyrus/client/src/components/NewSessionModal.tsx @@ -78,7 +78,7 @@ export function NewSessionModal({ open, onClose }: NewSessionModalProps) { // Existing workstreams for the "APFS workstream" source picker. Presentation only — // the reconcile loop keeps this live; the authoritative checkout path is resolved - // server-side (`silverwood show`) at submit, so nothing here is trusted as the value. + // server-side (`silverwood workstream show`) at submit, so nothing here is trusted. const sessions = useStore((s) => s.sessions); const workstreams = [...sessions.values()] .map((w) => ({ id: w.id, name: w.customName || w.id, cwd: w.cwd, state: w.checkoutState })) @@ -141,7 +141,7 @@ export function NewSessionModal({ open, onClose }: NewSessionModalProps) { const position = viewportCenter(); const args = inputs.map(({ key }) => (argValues[key] ?? "").trim()); // For an "APFS workstream" source, send the picked workstream id + which arg slot it - // fills; the server resolves it to a checkout path via `silverwood show` and + // fills; the server resolves it to a checkout path via `silverwood workstream show` and // substitutes it into `args`. The slot's text value (if any) is ignored. const idx = sourceArgIndex(inputs); const useWorkstream = source.kind === "workstream" && idx !== null && !!source.workstreamId; diff --git a/experimental/papyrus/server/services/silverwood.ts b/experimental/papyrus/server/services/silverwood.ts index 1e67ec0..1143224 100644 --- a/experimental/papyrus/server/services/silverwood.ts +++ b/experimental/papyrus/server/services/silverwood.ts @@ -109,7 +109,7 @@ export function list(includeArchived = false): Promise { } export function get(id: string): Promise { - return run(["show", id]); + return run(["workstream", id, "show"]); } /// The `new` command tree the modal drives creation from (pure metadata, no forest). @@ -168,11 +168,11 @@ export function checkout(id: string): Promise { } export function archive(id: string): Promise { - return serialize(id, () => run(["archive", id])); + return serialize(id, () => run(["workstream", id, "archive"])); } export function rename(id: string, name: string): Promise { - return serialize(id, () => run(["rename", id, name])); + return serialize(id, () => run(["workstream", id, "rename", name])); } /// Set a papyrus presentation key. `value` is a JS value; stored JSON-encoded -- 2.51.2