code wiki / (root) / nx_mvault.nx

nx_mvault.nx

buildroot/runtime/nx_mvault.nx

26881 B670 linesdepth 22pulls 154 transitivereach 0 importersview sourcekind tooltopic mvault
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_canon_cid.nx nx_media_pool.nx nx_media_sniff.nx nx_mvault_ingest.nx nx_mvault_context.nx nx_mvault_layout.nx nx_mvault_tag.nx nx_mvault_measure.nx nx_mvault_record.nx nx_mvault.nx

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

main sys_write argp seq do_classify argp ↻ sys_mmap mv_type_of_path sys_mmap ↻ mv_read_head sys_openat_rd sys_read sys_close mv_file_size sys_openat_rd ↻ sys_lseek sys_close ↻ nx_sniff_full nx_sniff_bytes_strict nx_sniff_is_epub nx_sniff_at nx_sniff_is_pdf nx_sniff_at ↻ nx_sniff_is_mobi nx_sniff_at ↻ nx_sniff_is_djvu nx_sniff_at ↻ nx_sniff_is_chm nx_sniff_at ↻ nx_sniff_is_warc nx_sniff_at ↻ nx_sniff_is_png nx_sniff_load_u8 nx_sniff_is_jpeg nx_sniff_load_u8 ↻ nx_sniff_is_webp nx_sniff_load_u8 ↻ nx_sniff_is_gif nx_sniff_load_u8 ↻ nx_sniff_is_tiff

structs

none

consts

27const K_MAGIC_65536: i64 = 65536
28const K_MAGIC_1024: i64 = 1024
29const K_MAGIC_2048: i64 = 2048
30const K_MAGIC_4096: i64 = 4096
31const K_MAGIC_4194304: i64 = 4194304
33const MV_HDR: i64 = 8192
34const MV_SEEK_END: i64 = 2
238const MV_FLDCAP: i64 = 1024
239const MV_BATCH: i64 = 16777216 // 16 MiB per commit batch; flushed, never truncated

functions

36func argp(argv: *i64, i: i64) -> *u8 { return (argv[i]) as *u8 }
39func mv_file_size(path: *u8) -> i64
50func mv_read_head(path: *u8, buf: *u8, cap: i64) -> i64
68func mv_strlen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
70func seq(a: *u8, b: *u8) -> i64
80func p_ch(dst: *u8, off: i64, c: i64) -> i64 { dst[off] = c as u8; return off + 1 }
81func p_cat(dst: *u8, off: i64, s: *u8) -> i64
87func p_kv(dst: *u8, off: i64, key: *u8, val: *u8, first: i64) -> i64
96func mv_leg_parse(s: *u8) -> i64
called by 1: main calls 1: seq
108func mv_atoi(s: *u8) -> i64
called by 2: do_retypemain
122func mv_ctx_from(b: *u8, n: i64, ext: *u8) -> i64
141func mv_type_of_path(path: *u8, ext: *u8, out_size: *i64) -> i64
155func do_sniff(argv: *i64) -> i64
184func do_classify(argv: *i64) -> i64
241func mv_fld_eq(p: *u8, n: i64, s: *u8) -> i64
called by 1: do_retype
252func mv_fld_cpy(dst: *u8, p: *u8, n: i64, cap: i64) -> i64
called by 1: do_retype
261func do_retype(argv: *i64) -> i64
409func do_record(argv: *i64) -> i64
451func do_fetch(argc: i64, argv: *i64) -> i64
499func do_coll(argc: i64, argv: *i64) -> i64
580func do_stats(argv: *i64) -> i64
613func main(argc: i64, argv: *i64) -> i64