description: "Build-static first-party Session format codec and adjacent migration assembly for persistence readers."
English | 中文
dsh-session-format-catalog gives persistence one deterministic Session format reader without consulting mounted plugins. It assembles the frozen v0, v1, and v2 codecs with the adjacent v0-to-v1 and v1-to-v2 edges, checks the complete gap-free chain at module initialization, and exposes physical dispatch, header-only classification, migration, and current encoding through sessionFormatCatalog.
Import this library from persistence and test-support readers that need the complete first-party released-format inventory before any feature plugin mounts. Feature compositions do not register or reorder its entries. No runtime invariant companion is published because construction rejects an invalid static inventory and each read validates its complete result; the catalog retains no independently mutable runtime relationship.
const descriptor = sessionFormatCatalog.readHeader(physicalHeader)
const current = sessionFormatCatalog.migrate(sessionFormatCatalog.decodeArtifact(physicalHeader, rows))
Import sessionFormatCatalog from the package root. JSONL readers pass parsed header and row JSON values to decodeArtifact() or decodeRecoverableArtifact(), migrate the logical result with migrate(), and serialize only the validated current artifact with encodeCurrent(). Listing calls readHeader() and never opens event bodies. Header reads validate every adjacent target and then restore the final header through the installed current Session package.
The catalog contains all supported historical readers directly. A profile cannot add, remove, or reorder an edge by mounting a feature plugin. Its peer dependency on dsh-session supplies the installed current event vocabulary and current restoration rules, while historical edge validators remain frozen.
Nothing directly. The catalog only restores the SessionEvent history consumed by request reconstruction.
Zero direct tokens.
No direct effect; restored history determines cache identity in its consumer.