code wiki / _hdl_build / nx_vizsla_doc.nx

nx_vizsla_doc.nx

buildroot/runtime/_hdl_build/nx_vizsla_doc.nx

19499 B554 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind orphan librarytopic vizsla
docsdependenciesstructsconstsfunctions

about

nx_vizsla_doc.nx -- NISHI VIZSLA DOCUMENT MANAGEMENT: never-lose documents on the additive plane. Operator 2026-07-08: "mcp level apis along with document management". Documents (venue contracts, invite letters, mail-merge output, plans) live as CID records on the SAME tamper-evident seg_store plane as everything else: ADDITIVE-ONLY (law 13 -- a new upload of the same docid = a NEW VERSION, old bytes never destroyed), content-addressed (identical re-put dedups = idempotent law 10), byte-exact round-trip (binary-safe: values are length-prefixed, not NUL-terminated). Docs link to the coordination entities via rel (venue:lakeday / plan:summer / event:launch / -). Commands: put <prefix> <docid> <file> <doctype> <rel> <date YYYY-MM-DD> [segid] get <prefix> <docid> <out> latest version bytes -> out (byte-exact) history <prefix> <docid> every version: date + bytes + doctype + rel list <prefix> <rel|-> latest version per docid (rel-filtered or all) Loud-fail: missing file, bad date, unknown docid, oversize (> DOC_MAX -- honest cap, chunking = a later rung), empty store on list. DOC_MAX = 524288 bytes (contracts/letters/exports; large media belongs to the gallery plane). spec: knowledge/research/2026-06-22-vizsla-sclass-roadmap.md license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_canon_cid.nx nx_seg_store.nx nx_vizsla_doc.nx

imports: nx_syscalls.nxnx_canon_cid.nxnx_seg_store.nx

imported by: nobody (leaf or entry point)

structs

none

consts

21const K_MAGIC_1970: i64 = 1970
22const K_MAGIC_146097: i64 = 146097
23const K_MAGIC_719468: i64 = 719468
24const K_MAGIC_524288: i64 = 524288
25const K_MAGIC_4096: i64 = 4096
26const K_MAGIC_1024: i64 = 1024
27const K_MAGIC_65536: i64 = 65536

functions

29func vd_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
30func vd_p(s: *u8) -> i64 { sys_write(1, s, vd_slen(s)); return 0 }
32func vd_eq(a: *u8, b: *u8) -> i64
43func vd_dup(s: *u8) -> *u8
51func vd_atoi(s: *u8) -> i64
62func vd_cat(dst: *u8, off: i64, s: *u8) -> i64
68func vd_catn(dst: *u8, off: i64, v: i64) -> i64
81func vd_kmemeq(b: *u8, off: i64, n: i64, s: *u8) -> i64
92func vd_field_span(rec: *u8, rl: i64, want: *u8, offp: *i64, lenp: *i64) -> i64
114func vd_field(rec: *u8, rl: i64, want: *u8, out: *u8, cap: i64) -> i64
128func vd_iskind(b: *u8, koff: i64, kl: i64, pfx: *u8) -> i64
133func vd_datedays(s: *u8) -> i64
174func vd_find(list: *i64, n: i64, s: *u8) -> i64
186func vd_cmd_put(argc: i64, argv: *i64) -> i64
302func vd_gather(prefix: *u8, st: *i64) -> i64
378func vd_alloc_state() -> *i64
394func vd_latest(st: *i64, docid: *u8) -> i64
411func vd_cmd_get(argc: i64, argv: *i64) -> i64
448func vd_cmd_history(argc: i64, argv: *i64) -> i64
491func vd_cmd_list(argc: i64, argv: *i64) -> i64
545func main(argc: i64, argv: *i64) -> i64