code wiki / _hdl_build / nx_vizsla_contact.nx

nx_vizsla_contact.nx

buildroot/runtime/_hdl_build/nx_vizsla_contact.nx

16482 B393 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind tooltopic vizsla
docsdependenciesstructsconstsfunctions

about

nx_vizsla_contact.nx -- NISHI VIZSLA: the RICH CONTACT MODEL (PRM/CRM depth foundation). Operator 2026-06-23: the engine must have "the depth of real system". A real contact is not id/name/tier/bday -- it has company, role, multiple emails/phones, location, tags, custom fields. This stores arbitrary key->value fields per contact as ADDITIVE CID records on the sovereign seg_store plane (latest-by-date wins per (contact,key); history kept, tamper-evident, idempotent). Layered OVER the basic CONTACT roster -- the relate/health engines still use the roster; this adds the rich profile. Search-by-field (`find`) is the foundation for segment + reporting. Computed locally; no cloud, no enrichment-by-data-sale. load <fieldfile> <prefix> [segid] FIELD <date> <contact> <key> <value> -> "fld:" records profile <prefix> <contact> all CURRENT fields of one contact (latest value per key) find <prefix> <key> <value> contacts whose current <key> == <value> (search/segment) Determinism: stdout has no clocks. Loud-fail: bad date, missing field, missing args. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_canon_cid.nx nx_seg_store.nx nx_vizsla_contact.nx

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

main vk_p sys_write vk_slen vk_eq vk_cmd_load vk_p ↻ vk_atoi sys_now_us sys_mmap sys_clock_gettime_mono sys_mmap ↻ ss_readall sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ss_begin ss_begin_cap sys_mmap ↻ vk_tok vk_isws vk_eq ↻ vk_datedays sys_mmap ↻ vk_put sys_mmap ↻ canon_encode sys_mmap ↻ cc_cmp cc_w32 cc_len sys_munmap cid_of sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻

structs

none

consts

15const K_MAGIC_1970: i64 = 1970
16const K_MAGIC_146097: i64 = 146097
17const K_MAGIC_719468: i64 = 719468
18const K_MAGIC_2048: i64 = 2048
19const K_MAGIC_4096: i64 = 4096
20const K_MAGIC_65536: i64 = 65536
21const K_MAGIC_1024: i64 = 1024

functions

23func vk_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
24func vk_p(s: *u8) -> i64 { sys_write(1, s, vk_slen(s)); return 0 }
26func vk_eq(a: *u8, b: *u8) -> i64
33func vk_dup(s: *u8) -> *u8
called by 2: vk_putvk_collect calls 2: vk_slensys_mmap
41func vk_atoi(s: *u8) -> i64
called by 1: vk_cmd_load
48func vk_isws(c: i64) -> i64 { if c == 32 { return 1 } if c == 13 { return 1 } if c == 9 { return 1 } return 0 }
called by 1: vk_tok
50func vk_tok(b: *u8, off: i64, lend: i64, dst: *u8, cap: i64) -> i64
called by 1: vk_cmd_load calls 1: vk_isws
65func vk_cat(dst: *u8, off: i64, s: *u8) -> i64
71func vk_catn(dst: *u8, off: i64, v: i64) -> i64
84func vk_kmemeq(b: *u8, off: i64, n: i64, s: *u8) -> i64
called by 2: vk_iskindvk_field calls 1: vk_slen
91func vk_iskind(b: *u8, koff: i64, kl: i64, pfx: *u8) -> i64
called by 1: vk_collect calls 2: vk_slenvk_kmemeq
97func vk_field(rec: *u8, rl: i64, want: *u8, out: *u8, cap: i64) -> i64
called by 1: vk_collect calls 2: ss_r32vk_kmemeq
121func vk_datedays(s: *u8) -> i64
called by 2: vk_cmd_loadvk_collect calls 1: sys_mmap
156func vk_put(keys: *i64, vals: *i64, nf: i64, kp: *u8, st: *i64) -> i64
179func vk_cmd_load(argc: i64, argv: *i64) -> i64
242func vk_collect(prefix: *u8, rct: *i64, rkey: *i64, rval: *i64, rdate: *i64) -> i64
285func vk_latest(rct: *i64, rkey: *i64, rval: *i64, rdate: *i64, n: i64, contact: *u8, key: *u8, out: *u8, cap: i64) -> i64
called by 2: vk_cmd_profilevk_cmd_find calls 1: vk_eq
304func vk_cmd_profile(argc: i64, argv: *i64) -> i64
343func vk_cmd_find(argc: i64, argv: *i64) -> i64
385func main(argc: i64, argv: *i64) -> i64