description: "Storage hub (ctx.storage) for compositions and maintainers choosing, mounting, or debugging named storage backends and data-form facilities."
English | 中文
Use dsh-storage to keep typed application data durable without adding it to session history. Mount it with a supported storage medium and domain configuration, then callers can access records through the public ctx.storageDomain API. Choose it for workspace records, session sidecars, or other application state that must survive restarts without becoming session events. It is available only to host code and has no model-visible effect; compositions that do not need such data can omit it.
Use this package to give a composition durable, non-session storage: mount it together with backend and domain-form packages, and host-side packages read and write validated records through ctx.storageDomain. The hub itself adds nothing observable — it is the meeting point that makes the family work, and everything below is what a composition gets from it.
Mount the hub whenever any package in the composition persists data that is not a session event log — workspace records, session sidecars. It is required by the domain form and both shipped backends, so the storage rows of a composition are storage plus a backend plus storage-domain. Skip the whole group when nothing stores such data; the agent loop never needs it.
- name: '@deepseek-ai/dsh-storage'
- name: '@deepseek-ai/dsh-storage-json'
config:
root: /var/lib/dsh/data
- name: '@deepseek-ai/dsh-storage-domain'
config:
backend: json
With these rows, the json backend registers itself and the domain data form mounts; a consumer such as dsh-workspace then opens its domain over the routed backend and reads and writes records through ctx.storageDomain. Several backends can stay mounted side by side; which backend serves which domain is the domain form's configuration, never a hub-wide choice.
ctx.storage.<form>; the domain form is additionally served directly as ctx.storageDomain.StorageError code instead of silently deferring: an unknown backend name, a form read before its owner mounts, or a duplicate registration all throw.backend-not-found — the domain form routes to a backend that is not mounted; add the backend package. The form waits for every configured backend to register, so row order is not a failure mode.form-not-mounted — a consumer reads ctx.storage.domain before dsh-storage-domain loads; mount the domain row before the consumer.duplicate-backend / duplicate-mount — the same name or form registers twice; that is a composition bug and fails loud.Read these pages when the hub's view is not enough: the subsystem reference is the authoritative contract, and the Agent Note records the family design and its deferred work.
Nothing. ctx.storage is a host-side registration table: the hub registers no tools, injects no prompts, and writes no session events, so no request field ever carries this package's data.
Zero direct tokens on every request.
Independent of live requests: the hub never touches a request prefix, so it cannot invalidate provider cache reuse.
These limits define what the hub cannot do. They are current package constraints, not a task backlog.
kv is the only data shape — a backend implements one facet; the log facet for session event logs is deferred to the session-backend migration (Agent Note).ctx.storage.domain before the domain plugin mounts throws form-not-mounted; assemblies order plugins accordingly rather than silently deferring.