mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-01 04:00:45 +00:00
The json backend now serves two layouts. single (the default) keeps the whole unit as one document at <root>/<name>.json; per-record keeps one version-stamped document per record at <root>/<name>/<table>/<key>.json (plus global.json), so one write rewrites one record instead of the whole unit. The per-record unit is stateless — the directory is the state, loadAll re-reads the tree, and every write is a single durable file operation — while single keeps its authoritative in-memory state and whole-file publish. Records keys must be path-safe ([a-zA-Z0-9_-]+); an unsafe key rejects. A record document that is malformed or stamped with another version reads as an absent record: one bad or stale file never bricks the unit, and a version bump discards stale records instead of migrating them. DomainSpec and KvUnitDescriptor gain the optional layout field (defineDomain validates it, descriptorOf projects it).
storage/ — non-session storage family
English | 中文
This family persists application data other than session event logs through named backends and typed data forms.
| Package | Role | ctx key |
|---|---|---|
storage/ |
Connects registered backends with typed data forms | ctx.storage |
storage-json/ |
Stores data in JSON files | registers backend json |
storage-sqlite/ |
Stores data in SQLite | registers backend sqlite |
storage-domain/ |
Provides validated domain-record storage | ctx.storageDomain |
Consumers use a data form rather than accessing a backend directly. The domain storage decision records the family design.
The subsystem reference — the backend contract, StorageForms, DomainSpec/Domain, domain/changed — is docs/subsystems/storage.md.