@khoralabs/memories-spec
v0.7.6
Published
Smithy wire model for memories persistence.
Readme
@khoralabs/memories-spec
Smithy model for the memories logical persistence + public API contract. Describes operation sets, row shapes, and capability modules that @khoralabs/memories-node implements in TypeScript.
This package is not the HTTP wire model for @khoralabs/memories-service (lifecycle, ontology registry, and JSON field renames live in ../service/spec.md). Spec tracks the in-process TS surfaces; keep them in sync when either side changes.
Layout
| Path | Contents |
|------|----------|
| model/persistence.smithy | MemoriesPersistenceService and capability modules (MemoriesPersistenceCore, MemoriesPersistenceVector, …) |
| model/shapes.smithy | Shared shapes (rows, search/merge, provenance events, capabilities) |
| model/public.smithy | Public service surface (MergeMemory, Search, DeleteMemory) |
| smithy-build.json | Smithy build config |
Capability modules
Use modules to see what a minimal backend can omit; use the aggregate MemoriesPersistenceService for a full adapter contract:
| Smithy service | Approximate TypeScript |
|----------------|------------------------|
| MemoriesPersistenceCore | Lexical mutation + catalog + lexical search + provenance |
| MemoriesPersistenceVector | Vector features + vector search |
| MemoriesPersistenceNeighbors | MemoriesNeighborIndex |
| MemoriesPersistenceLabelProps | syncLabelPropsSearchFeatures |
| MemoriesPersistenceReads | Prefetch / export reads |
Operational semantics: ../node/src/persistence/IMPLEMENTORS.md.
Validation
Requires the Smithy CLI:
cd packages/spec
smithy validate model
smithy buildOr: bun run validate from this package (runs both commands).
