4ba3a00de9
Implements `ocas export` / `ocas import` for shipping a self-contained closure of CAS nodes, variables and tags between stores, plus a read-only `--store <bundle.tar>` flag for inspecting bundles without extracting them. - core: computeClosure walks refs + schema chains and gathers vars/tags - core: exportBundle / importBundle / loadBundleStore use a custom POSIX/ustar tar (no external deps); content-addressed dedup on import, optional --scope remap of non-@ocas variable names - core: new @ocas/output/export and @ocas/output/import builtin schemas - cli: new export and import commands, --store read-only mode, write commands rejected with a clear error when --store is set Closes #83
812 B
812 B
@ocas/core, @ocas/cli
| @ocas/core | @ocas/cli |
|---|---|
| minor | minor |
Add CAS closure export/import (ocas export / ocas import):
@ocas/core: NewcomputeClosure(store, roots)traverses references and schema chains to gather a complete CAS closure. NewexportBundle()/importBundle()/loadBundleStore()produce and consume self-contained POSIX-tar bundles (cas/*.binCBOR payloads,vars.jsonl,tags.jsonl). Added@ocas/output/exportand@ocas/output/importbuiltin output schemas.@ocas/cli: Newocas export <root> [<root> ...] -o <bundle.tar>andocas import <bundle.tar> [--scope @new]commands. New global--store <bundle.tar>flag opens a bundle as a read-only store for inspection commands (get,walk,refs,var list, …). Write commands reject--storewith a clear error.