feat: add list-meta and list-schema commands with persistent meta index #91

Merged
xiaoju merged 2 commits from fix/90-list-meta-schema into main 2026-06-01 05:48:07 +00:00

2 Commits

Author SHA1 Message Date
xiaoju 8bfcdfef25 test: add E4 regression for list-schema vs list --type
Adds the missing E4 regression scenario from the test spec:
demonstrates that with multiple meta-schema versions, list-schema
returns schemas typed by older metas while list --type @schema
(resolving to the newest meta) does not.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-01 05:21:35 +00:00
xiaoju 55144d0e4a feat: add list-meta and list-schema commands with persistent meta index
Adds Store.listMeta() and Store.listSchemas() to expose meta-schema
discovery, backed by an in-memory metaSet (memory store) and a
persistent _index/_meta file (FS store). Surfaces both via new
json-cas list-meta and list-schema CLI commands wrapped in
@output/list-meta and @output/list-schema envelope schemas.

The FS store migrates from existing nodes when _meta is absent
(scanning self-referencing nodes) and preserves _meta on subsequent
opens. delete() removes affected hashes from the meta index and
persists the change.

Closes #90

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-01 05:10:25 +00:00