You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
omc-kernel: store any content (omc_fn, json, prose, blob)
Generalize the kernel from code-only to substrate-keyed storage
of arbitrary content. New `put` subcommand:
omc-kernel put FILE [--kind KIND]
KIND selects the canonicalizer:
omc_fn — alpha-rename-invariant OMC canonical form (default of ingest)
json — recursive key-sort + re-serialize (semantic-equal JSON
objects collapse to same hash regardless of key order)
prose — raw fnv1a over bytes (exact-text dedup, no canonicalization)
blob — alias for prose
Stdout = canonical hash (hex) so put output pipes into fetch/stat.
Sidecar metadata now carries kind + addressing description so `stat`
explains how the hash was derived.
End-to-end test (in this commit):
$ echo '{"b":2,"a":1}' | omc-kernel put /dev/stdin --kind json
20ebc03bdc71de7b
$ echo '{ "a":1, "b":2 }' | omc-kernel put /dev/stdin --kind json
20ebc03bdc71de7b # same hash — JSON canonicalization collapses key order
$ echo "hello world" | omc-kernel put /dev/stdin --kind prose
<hash>
$ echo "hello world" | omc-kernel put /dev/stdin --kind prose
<same hash> # raw-byte dedup
This is goal 1 of the four-item kernel-as-content-DAG plan: the
substrate-keyed persistent memory layer now stores any
canonicalizable content, not just OMC code. The address scheme is
identical so kernel + codec + sign/verify all extend naturally.
Existing ingest behavior unchanged (defaults to omc_fn kind in
sidecar metadata for clarity).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments