code wiki / _hdl_build / nx_vizsla_digest_register.nx
nx_vizsla_digest_register.nx source
↩ module page · 45 lines · 3697 B
1// nx_vizsla_digest_register.nx -- registers VIZSLA V5 (the proactive daily
2// DIGEST) via the Librarian. ENGINEER evidence = the V5 gate re-run from its
3// DURABLE home (6 KAT rows; missing-instrument tamper RED proven).
4// NOTE: build ONCE -- the smoke-run self-registers; do not re-run (LM lesson).
5// license_tier: ORIGINAL
6import "nx_cap_register.nx"
7import "nx_capreg_librarian.nx"
8import "nx_syscalls.nx"
9
10func vdreg_run(path: *u8, a1: *u8) -> i64 {
11 let pid: i64 = sys_fork()
12 if pid == 0 {
13 let dn: i64 = sys_openat_wr("/dev/null" as *u8, 0x1a4)
14 if dn >= 0 { sys_dup3(dn, 1, 0); sys_dup3(dn, 2, 0) }
15 let argv: *i64 = sys_mmap(32) as *i64
16 argv[0] = path as i64
17 var i: i64 = 1
18 if (a1 as i64) != 0 { argv[i] = a1 as i64; i = i + 1 }
19 argv[i] = 0
20 let envp: *i64 = sys_mmap(16) as *i64; envp[0] = 0
21 sys_execve(path, argv, envp); sys_exit(127)
22 }
23 let st: *i64 = sys_mmap(16) as *i64
24 sys_wait4(pid, st, 0)
25 return st[0]
26}
27
28func main() -> i64 {
29 var allok: i64 = 1
30 if vdreg_run("_offc/nx_vizsla_digest_gate.elf" as *u8, "_offc/nx_vizsla_digest.elf" as *u8) != 0 { allok = 0 }
31 cr_w(1, "ENGINEER: vizsla V5 daily-digest gate (6 KAT rows) pass=" as *u8); cr_wn(1, allok); cr_w(1, "\n" as *u8)
32 let eng: i64 = ig_engineer(1, 1, 1, allok)
33 let dec: i64 = ig_decision(eng, ig_council(eng, 1, 1, 2), 1)
34 if dec != IG_INGEST { cr_w(1, "HELD\n" as *u8); sys_exit(1) }
35 if cr_can_register(5, 2, 6, dec) != 1 { cr_w(1, "REFUSED\n" as *u8); sys_exit(1) }
36 let lp: *u8 = "/tmp/nishi_cap_registry.log" as *u8
37 let jp: *u8 = "knowledge/status/cap_registry_durable.log" as *u8
38 let idx: i64 = cl_next_idx(lp, jp)
39 let ok: i64 = cl_register_dual(lp, jp, idx, 5,
40 2, "GEN NISHI-VIZSLA-V5 PROACTIVE-DAILY-DIGEST (arc=VIZSLA rung V5; operator directive 2026-06-14: make the assistant PROACTIVE -- it tells you what to do today before you ask). nx_vizsla_digest COMPOSES (rule 22, does not re-implement) the already-gated organs into one daily report: 1) RELATIONSHIPS to tend -> _offc/nx_vizsla_relate.elf brief; 2) NOTES to send (drafted) -> _offc/nx_vizsla_notes.elf draftdue. digest <digest.conf> <today>: digest.conf names RELATE_PREFIX/RELATE_CONTACTS/NOTES_PREFIX/NOTES_CONF/NOTES_TEMPLATES; the organ forks the blessed organs over that data, embeds both sections, and emits VIZSLA-DIGEST-VERDICT followups/birthdays/thankyous/obligations/notes_drafted EXTRACTED from the sub-reports (a missing sub-report shows -1, never hidden). today via argv = deterministic; logs knowledge/status/vizsla_digest.log. GATE nx_vizsla_digest_gate 6/6=1000 GREEN sovereign first-compile (loud-fail missing-conf + missing-key; digest-relationships FOLLOWUP+BIRTHDAY present; digest-notes-drafts wedding prose present; digest-verdict-aggregates 3/1/2/2 + notes_drafted=2 pulled live from the two organs; determinism) + missing-instrument tamper 0/6 RED + re-gated GREEN durable _offc. LIVE: knowledge/vizsla/digest.conf + seeded relate-/notes- stores -> one-command daily brief. HONEST SCOPE: the digest PRODUCES + logs the day's report; the actual PUSH (email/phone notification) is an outward-facing boundary step; automatic-each-day = this organ on a pulse/cron. Catalog product_catalog.tsv personal-assistant VIZSLA-V5; genealogy lineage.tsv nx_vizsla_digest. Blessed _offc/nx_vizsla_digest{,_gate}.elf; spec knowledge/specs/2026-06-10-nishi-vizsla-ladder.md" as *u8)
41 if ok != 1 { cr_w(1, "DUAL-WRITE FAILED\n" as *u8); sys_exit(1) }
42 cr_w(1, "CAPREG idx=" as *u8); cr_wn(1, idx); cr_w(1, " REGISTERED (NISHI VIZSLA V5 proactive daily digest)\n" as *u8)
43 sys_exit(0)
44 return 0
45}