code wiki / _hdl_build / nx_vizsla_doc.nx
nx_vizsla_doc.nx
buildroot/runtime/_hdl_build/nx_vizsla_doc.nx
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
imports: nx_syscalls.nxnx_canon_cid.nxnx_seg_store.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
| 21 | const K_MAGIC_1970: i64 = 1970 |
| 22 | const K_MAGIC_146097: i64 = 146097 |
| 23 | const K_MAGIC_719468: i64 = 719468 |
| 24 | const K_MAGIC_524288: i64 = 524288 |
| 25 | const K_MAGIC_4096: i64 = 4096 |
| 26 | const K_MAGIC_1024: i64 = 1024 |
| 27 | const K_MAGIC_65536: i64 = 65536 |
functions
| 29 | func vd_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 30 | func vd_p(s: *u8) -> i64 { sys_write(1, s, vd_slen(s)); return 0 } |
| 32 | func vd_eq(a: *u8, b: *u8) -> i64 |
| 43 | func vd_dup(s: *u8) -> *u8 |
| 51 | func vd_atoi(s: *u8) -> i64 called by 1: vd_cmd_put |
| 62 | func vd_cat(dst: *u8, off: i64, s: *u8) -> i64 |
| 68 | func vd_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 81 | func vd_kmemeq(b: *u8, off: i64, n: i64, s: *u8) -> i64 |
| 92 | func vd_field_span(rec: *u8, rl: i64, want: *u8, offp: *i64, lenp: *i64) -> i64 |
| 114 | func vd_field(rec: *u8, rl: i64, want: *u8, out: *u8, cap: i64) -> i64 |
| 128 | func vd_iskind(b: *u8, koff: i64, kl: i64, pfx: *u8) -> i64 |
| 133 | func vd_datedays(s: *u8) -> i64 |
| 174 | func vd_find(list: *i64, n: i64, s: *u8) -> i64 |
| 186 | func vd_cmd_put(argc: i64, argv: *i64) -> i64 |
| 302 | func vd_gather(prefix: *u8, st: *i64) -> i64 called by 3: vd_cmd_getvd_cmd_historyvd_cmd_list calls 10: sys_mmapss_manifestvd_catss_readallss_r32vd_iskind+4 |
| 378 | func vd_alloc_state() -> *i64 |
| 394 | func vd_latest(st: *i64, docid: *u8) -> i64 |
| 411 | func vd_cmd_get(argc: i64, argv: *i64) -> i64 |
| 448 | func vd_cmd_history(argc: i64, argv: *i64) -> i64 |
| 491 | func vd_cmd_list(argc: i64, argv: *i64) -> i64 |
| 545 | func main(argc: i64, argv: *i64) -> i64 |