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 orphan librarytopic 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)

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
41func vk_atoi(s: *u8) -> i64
48func vk_isws(c: i64) -> i64 { if c == 32 { return 1 } if c == 13 { return 1 } if c == 9 { return 1 } return 0 }
50func vk_tok(b: *u8, off: i64, lend: i64, dst: *u8, cap: i64) -> i64
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
91func vk_iskind(b: *u8, koff: i64, kl: i64, pfx: *u8) -> i64
97func vk_field(rec: *u8, rl: i64, want: *u8, out: *u8, cap: i64) -> i64
121func vk_datedays(s: *u8) -> i64
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
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