nx_mvault.nx
buildroot/runtime/nx_mvault.nx
about
nx_mvault.nx -- the vault CLI + MCP tool. Exposes the gate-proven vault
bricks as a callable capability (classify / tag / measure) so it registers
as an MCP tool + /api endpoint + is drivable by agents.
nx_mvault classify <path> <gen|real> <source> <ext>
-> {"cid","class","type","mls","dsm_path"} (JSON)
nx_mvault tag <namespace> <value> -> ns:value
nx_mvault measure <axis> <value> <leg> <conf> -> axis=value@leg#conf
Composes nx_mvault_{ingest,context,layout,tag,measure} + nx_canon_cid +
nx_media_sniff. license_tier: ORIGINAL
dependencies 14 imports · 0 importers
diagram shows first 10 each side; +4 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_canon_cid.nxnx_media_pool.nxnx_media_sniff.nxnx_mvault_ingest.nxnx_mvault_context.nxnx_mvault_layout.nxnx_mvault_tag.nxnx_mvault_measure.nxnx_mvault_record.nxnx_mvault_coll.nxnx_mvault_fetch.nxnx_https_fetch_lib.nxnx_registry.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 27 | const K_MAGIC_65536: i64 = 65536 |
| 28 | const K_MAGIC_1024: i64 = 1024 |
| 29 | const K_MAGIC_2048: i64 = 2048 |
| 30 | const K_MAGIC_4096: i64 = 4096 |
| 31 | const K_MAGIC_4194304: i64 = 4194304 |
| 33 | const MV_HDR: i64 = 8192 |
| 34 | const MV_SEEK_END: i64 = 2 |
| 238 | const MV_FLDCAP: i64 = 1024 |
| 239 | const MV_BATCH: i64 = 16777216 // 16 MiB per commit batch; flushed, never truncated |
functions
| 36 | func argp(argv: *i64, i: i64) -> *u8 { return (argv[i]) as *u8 } |
| 39 | func mv_file_size(path: *u8) -> i64 |
| 50 | func mv_read_head(path: *u8, buf: *u8, cap: i64) -> i64 |
| 68 | func mv_strlen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 70 | func seq(a: *u8, b: *u8) -> i64 |
| 80 | func p_ch(dst: *u8, off: i64, c: i64) -> i64 { dst[off] = c as u8; return off + 1 } |
| 81 | func p_cat(dst: *u8, off: i64, s: *u8) -> i64 |
| 87 | func p_kv(dst: *u8, off: i64, key: *u8, val: *u8, first: i64) -> i64 |
| 96 | func mv_leg_parse(s: *u8) -> i64 |
| 108 | func mv_atoi(s: *u8) -> i64 |
| 122 | func mv_ctx_from(b: *u8, n: i64, ext: *u8) -> i64 |
| 141 | func mv_type_of_path(path: *u8, ext: *u8, out_size: *i64) -> i64 called by 3: do_sniffdo_classifydo_record calls 7: sys_mmapmv_read_headmv_file_sizenx_sniff_fullmv_strlenmv_context_type+1 |
| 155 | func do_sniff(argv: *i64) -> i64 |
| 184 | func do_classify(argv: *i64) -> i64 |
| 241 | func mv_fld_eq(p: *u8, n: i64, s: *u8) -> i64 called by 1: do_retype |
| 252 | func mv_fld_cpy(dst: *u8, p: *u8, n: i64, cap: i64) -> i64 called by 1: do_retype |
| 261 | func do_retype(argv: *i64) -> i64 |
| 409 | func do_record(argv: *i64) -> i64 |
| 451 | func do_fetch(argc: i64, argv: *i64) -> i64 |
| 499 | func do_coll(argc: i64, argv: *i64) -> i64 |
| 580 | func do_stats(argv: *i64) -> i64 |
| 613 | func main(argc: i64, argv: *i64) -> i64 |