80b3b6d917
Review findings applied across the group: - storage hub: stale disposers no longer remove a successor registration; the package now default-exports the Storage service class per the service-package export shape. - json backend: failed publishes roll back the authoritative memory state (a rejected write can no longer resurface via get() or ride the next publish); close() drains in-flight writes and blocks in-flight opens; double-open rejects as a plain caller error instead of malformed-medium. - sqlite backend: loadAll builds records on a null prototype (__proto__ keys round-trip instead of polluting), user_version is stamped only after the schema is fully created, and corrupt record JSON rejects as malformed-medium instead of a bare SyntaxError. - domain form: writes persist before mutating authoritative memory or emitting; DomainChanged is a put/deleted discriminated union. - workspace: attach/detach idempotence decided on the write chain (stale snapshots no longer short-circuit), create() requires a directory, and startup fails loud on duplicate stored paths. Eleven regression tests pin the fixed behaviors.
@deepseek-ai/dsh-domain
Domain data form for the DeepSeek Harness storage hub: mounts ctx.storage.domain, opening schema-validated KV domains over configured storage backends. A domain is declared once with defineDomain (zod record schemas, z.infer-derived types), opened through DomainFacility.open, and served from authoritative in-memory state — reads are synchronous, writes serialize on one per-domain chain, land durably on the routed backend, then emit domain/changed.
Design rationale, open semantics, and the storage/domain layer split live in the Agent Note.
Configuration
| key | meaning |
|---|---|
backend |
Default backend name for every domain (required; no universally correct medium exists). |
routes |
Per-domain overrides: domain name → backend name. |
Model Experience
No model-visible surface: the package registers no tools, injects no prompts, and emits no context. Token and KV-cache cost are zero.
Known Limitations and Deferred Work
- Single-process only:
domain/changedis an in-process event; cross-process observation (GUI reconnect) is deferred to the revision pattern noted in the Agent Note's non-goals. - No cross-table transactions, secondary indexes, or multi-segment keys; triggers and rework points are tabled in the Agent Note.