code wiki / _hdl_build / nx_vizsla_notes.nx

nx_vizsla_notes.nx

buildroot/runtime/_hdl_build/nx_vizsla_notes.nx

42816 B1088 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind tooltopic vizsla
docsdependenciesstructsconstsfunctions

about

nx_vizsla_notes.nx -- NISHI VIZSLA V4b: the event-anchored timed MEANINGFUL NOTE engine (the meaningfulnotes.com product core). Operator directive 2026-06-14: "make the thank you personalized -- capturing signatures or notes and letting it SIT till a timed event ... beyond thank you notes to meaningfulnotes.com where it can be PRIOR, ON, or AFTER a significant event to SIGNAL something." A NOTE is personalized (a captured signature / handwritten note / voice / text reference) and ANCHORED to an EVENT with a timing relation BEFORE | ON | AFTER (+ an offset in days). It SITS (state=WAITING) until its release window opens, then surfaces DUE (send it now), then LATE if the moment passed unsent. A thank-you is just the AFTER case -- this generalizes it. Inherits the CID / seg_store / civil-date substrate from V4 (nx_vizsla_relate); a captured-artifact reference is a string here (binary capture/storage = a boundary asset rung). Commands (argv[1]): load <notes_log> <prefix> [segid] EVENT/NOTE/SENT rows -> canonical records -> CID keys "note:nxc1-..." on seg_store (additive, idempotent by construction). schedule <prefix> <conf> <today> every NOTE: release+deadline from its event & relation; WAITING / DUE / LATE / SENT. today via argv = deterministic. due <prefix> <conf> <today> only the notes READY TO SEND now (DUE). File formats (line records, # comments): notes_log: EVENT <event-id> <date> <contact> <kind> <title> NOTE <note-id> <event-id> <relation BEFORE|ON|AFTER> <offset_days> <channel> <personalization> SENT <note-id> <date> (closes that note) conf: CONF window_days <n> # grace window after release (ON/AFTER) before LATE CONF soon_days <n> # (reserved: "coming up" horizon) (date YYYY-MM-DD; title/kind/channel/personalization = single hyphenated tokens; personalization e.g. signature:img-0427 | handwritten:scan-0427 | voice:vm-0427 | text:congrats) release/deadline by relation (window = CONF window_days): BEFORE off : release = event - off ; deadline = event (send in the run-up) ON : release = event ; deadline = event + window (the day-of + grace) AFTER off : release = event + off ; deadline = release + window (the follow-up) state(today): today<release WAITING | release<=today<=deadline DUE | else LATE | SENT closes.

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_canon_cid.nx nx_seg_store.nx nx_vizsla_notes.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 nv_p sys_write nv_slen nv_eq nv_cmd_load nv_p ↻ nv_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 ↻ nv_tok nv_isws nv_eq ↻ nv_datedays 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 ↻ sha256_k sha256_update

structs

none

consts

55const K_MAGIC_1970: i64 = 1970
56const K_MAGIC_146097: i64 = 146097
57const K_MAGIC_719468: i64 = 719468
58const K_MAGIC_1460: i64 = 1460
59const K_MAGIC_36524: i64 = 36524
60const K_MAGIC_146096: i64 = 146096
61const K_MAGIC_4096: i64 = 4096
62const K_MAGIC_2048: i64 = 2048
63const K_MAGIC_131072: i64 = 131072
64const K_MAGIC_16384: i64 = 16384
65const K_MAGIC_65536: i64 = 65536

functions

67func nv_slen(s: *u8) -> i64
called by 3: nv_pnv_dupnv_kmemeq
73func nv_p(s: *u8) -> i64
78func nv_eq(a: *u8, b: *u8) -> i64
89func nv_dup(s: *u8) -> *u8
97func nv_atoi(s: *u8) -> i64
108func nv_isws(c: i64) -> i64
called by 2: nv_toknv_rest
115func nv_tok(b: *u8, off: i64, lend: i64, dst: *u8, cap: i64) -> i64
137func nv_cat(dst: *u8, off: i64, s: *u8) -> i64
143func nv_catn(dst: *u8, off: i64, v: i64) -> i64
157func nv_cat2(dst: *u8, off: i64, v: i64) -> i64
called by 1: nv_daystr calls 1: nv_catn
163func nv_find(list: *i64, n: i64, s: *u8) -> i64
172func nv_kmemeq(b: *u8, off: i64, n: i64, s: *u8) -> i64
called by 2: nv_fieldnv_isnote calls 1: nv_slen
182func nv_field(rec: *u8, rl: i64, want: *u8, out: *u8, cap: i64) -> i64
called by 1: nv_collect calls 2: ss_r32nv_kmemeq
209func nv_isnote(b: *u8, koff: i64, kl: i64) -> i64
called by 1: nv_collect calls 1: nv_kmemeq
215func nv_datedays(s: *u8) -> i64
257func nv_daystr(days: i64, out: *u8) -> i64
called by 2: nv_emitnv_draft_one calls 2: nv_catnnv_cat2
279func nv_log(lpath: *u8, tag: *u8, rep: *u8, o: i64) -> i64
295func nv_prefixlog(prefix: *u8, out: *u8) -> i64
306func nv_load_conf(cpath: *u8) -> *i64
358func nv_occ_idx(c: *i64, kind: *u8) -> i64
called by 2: nv_occ_windownv_cmd_suggest calls 1: nv_eq
370func nv_occ_window(c: *i64, kind: *u8) -> i64
called by 2: nv_emitnv_cmd_draftdue calls 1: nv_occ_idx
378func nv_cmd_load(argc: i64, argv: *i64) -> i64
513func nv_collect(prefix: *u8) -> *i64
602func nv_emit(g: *i64, today: i64, c: *i64, due_only: i64, rep: *u8, counts: *i64) -> i64
676func nv_cmd_schedule(argc: i64, argv: *i64) -> i64
709func nv_cmd_due(argc: i64, argv: *i64) -> i64
735func nv_rest(b: *u8, off: i64, lend: i64, dst: *u8, cap: i64) -> i64
called by 1: nv_load_templates calls 1: nv_isws
772func nv_fill(body: *u8, names: *i64, vals: *i64, nslots: i64, out: *u8) -> i64
called by 1: nv_draft_one calls 3: sys_mmapnv_findnv_cat
810func nv_load_templates(tpath: *u8) -> *i64
847func nv_find_tmpl(tm: *i64, kind: *u8, rel: *u8) -> i64
called by 1: nv_draft_one calls 1: nv_eq
860func nv_draft_one(g: *i64, ni: i64, tm: *i64, names: *i64, rep: *u8, o: i64, err: *i64) -> i64
912func nv_slotnames(names: *i64) -> i64
924func nv_cmd_draft(argc: i64, argv: *i64) -> i64
949func nv_cmd_draftdue(argc: i64, argv: *i64) -> i64
1014func nv_cmd_occasions(argc: i64, argv: *i64) -> i64
1048func nv_cmd_suggest(argc: i64, argv: *i64) -> i64
1076func main(argc: i64, argv: *i64) -> i64