nx_sov.nx
buildroot/runtime/nx_sov.nx
about
nx_sov.nx -- THE STANDARD SOVEREIGN DATA CLI (operator 2026-07-16: "this happens a lot -- make
writing nishi ecosystem formats THE STANDARD, integrated into our mcp/apis, interoperable with
3rd party"). Root cause of the recurring no-TSV violations: nx_sov_ledger is a LIBRARY (needs an
organ authored) while `cat > x.tsv` is one command -- so sessions under pressure take the flat
path. THIS organ makes the sovereign path the one-command path:
put <prefix> <key> <value> write a string value (latest-wins)
put-file <prefix> <key> <file> write a file's bytes as the value (binary-safe, <=1MiB)
get <prefix> <key> print the latest value
has <prefix> <key> exit 0 present / 1 absent
import <prefix> <tsvfile> INTEROP IN: key<TAB>value rows -> sovereign store, and
writes the __ids__ index (newline-joined keys) so
nx_memory `index` / export can enumerate
export <prefix> <outfile> INTEROP OUT: __ids__ index -> key<TAB>value TSV at the
BOUNDARY (a DERIVED VIEW for 3rd parties, never the store)
The MCP surface: nx_memory (sibling, S17) already serves READS (stores/get/history/index) over
MCP; its put/tombstone write-cap increment will front THIS same store -- one substrate, CLI +
MCP two doors. Store = seg_store via nx_sov_ledger (sov_put/sov_get/sov_has). license_tier: ORIGINAL
dependencies 2 imports · 1 importers
imports: nx_sov_ledger.nxnx_lib_std.nx
imported by: nx_sov_gate.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 21 | const NXSOV_CAP: i64 = 1048576 |
functions
| 23 | func nxsov_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 44 | func nxsov_import(prefix: *u8, tsvfile: *u8) -> i64 |
| 102 | func nxsov_export(prefix: *u8, outfile: *u8) -> i64 |
| 152 | func nxsov_fsck(prefix: *u8) -> i64 |
| 221 | func main(argc: i64, argv: *i64) -> i64 |