Files
deepseek-harness/packages/storage
imccyu 2e986ee1e3 style(storage,workspace): satisfy the repository lint gate
eslint --fix formatting sweep plus the manual residue: sync method
bodies drop async behind Promise-returning signatures (the sqlite unit
routes primitives through a settle() guard preserving the never-throws-
synchronously contract), catch callbacks type their reason as unknown,
loadAll's global slot is plain unknown (null semantics stay in JSDoc),
a non-null assertion becomes a narrowing, and unsafe any assignments in
tests gain explicit types. One justified eslint-disable for
prefer-promise-reject-errors follows the core/session precedent —
wrapping would discard the original StorageError code.
2026-07-25 11:08:04 +08:00
..

storage/ — non-session storage family

The storage family persists everything that is not a session event log: a hub where named backends and typed data forms meet. Design record: domain KV storage Agent Note.

Package Role ctx key
storage/ The hub: named backend registry + merge-extensible data-form mounts, backend facet vocabulary, shared conformance suite ctx.storage
storage-json/ JSON backend: one human-readable file per unit, atomic whole-file rewrite registers backend json
storage-sqlite/ SQLite backend: one database hosting all routed units, document-per-row registers backend sqlite
domain/ Domain data form: zod-validated records, per-domain write chain, domain/changed events, backend routing by configuration mounts ctx.storage.domain

Backends own one medium each and expose data-shape facets (kv today; an append-log facet is reserved for the future session-backend migration). Consumers never touch backends directly — they open declared domains through the domain form.