whitelonng/dshcode--packages-api-workspace-controller ↗★ 715

@deepseek-ai/dsh-api-workspace-controller

工作区远程命令与可重连的状态传输。 适合需要远程控制工作区导航并跟随其投影的开发者。

套件
@deepseek-ai/dsh-api-workspace-controller
相容性
待驗證
Harness 依賴範圍
workspace:^
Cordis 依賴範圍
workspace:^
版本
0.1.2-alpha.4
授權
MIT
最近更新
2026年9月13日

同名套件的其他儲存庫

安裝

此插件尚未提供可驗證的 bundle,或相容性檢查未通過。請先閱讀倉庫說明。 閱讀完整 README ↗


description: "Host and Client workspace control: mutate workspace navigation and follow its complete projection." kind: "package-reference"

Workspace Controller

English | 中文

Archive listing reads persisted headers and prefers live or identity-checked cached title projections, including cached untitled Sessions. Only missing projections fall back to session-query; seeded cold Sessions also require exact log folding because their inherited prefix is not known from a header. Cold titles can reflect the last durable checkpoint, matching the sidebar. Empty archives perform no persistence reads; title failures retain the row.

Summary

@deepseek-ai/dsh-api-workspace-controller owns the Host ctx.workspaceController service and the generated Client ctx.remote.workspace namespace. Its Remote methods create, rename, remove, and reorder Workspaces, reorder Sessions within a Workspace, archive Sessions from Workspace navigation, list the archive set with best-effort titles, restore or permanently delete archived Sessions, and follow the complete Workspace projection. Use it through API Gateway when a Client must change or follow Workspace navigation. The package also owns ctx.directoryPickerController and the generated ctx.remote.directoryPicker namespace, because the directory-picking seam it carries is abstract and never a Loader entry of its own.

Table of Contents


Use this package

The Host controller serializes mutations whose correctness depends on current registry state and throws RemoteError with a stable workspace/* or directory-picker/* code for expected failures. Its follow() stream synchronously attaches to durable Workspace changes, emits one complete baseline first, then emits ordered upsert, remove, order, and archived increments. A reconnect starts another generation with a replacement baseline, so consumers do not depend on receiving every increment while disconnected.

The Client entry provides ClientWorkspaceModel and createWorkspaceStateStream(). The model owns Workspace rows, registry order, archived Session ids, unary mutation echoes, and stream/unary race resolution. A newer Host row wins by updatedAt; a committed stream order outranks an older unary response; a removed Workspace id cannot be resurrected by delayed data. The package exposes framework-neutral snapshots and subscriptions, leaving navigation policy and React hooks to the UI owner.


Model Experience

None, as Workspace organization is browser and Host control state and registers no prompt, tool, or session event.

KV Cache effect

No direct effect; Workspace mutations do not alter model requests.

Known Limitations and Deferred Work

  • follow() replaces the whole projection after reconnect and has no durable cursor or incremental catch-up protocol.
  • Process-local deletion markers prevent delayed data from reviving a removed Workspace only for the lifetime of the Client model.

Dev Note

Working context for maintainers — click to expand

None.

Runtime invariant: No companion is published. Workspace Registry owns persistence; every stream generation is a full projection.