code wiki / (root) / nx_treatment.nx

nx_treatment.nx

buildroot/runtime/nx_treatment.nx

6949 B141 linesdepth 5pulls 11 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_treatment.nx -- CLI over nx_treatment_lib: does this board declare the three-step treatment (mcp, api, primitive, workflow, agent) per rung, and does each declaration verify against the estate? nx_treatment <domain> per treat row a line with its five field states, the rungs with no row, the census, verdict LAST exit: 0 TREATED | 1 PARTIAL (a declared row unmet: the hard fail) | 2 usage | 3 NO-TREATMENT or NO-PLAN Evidence: tool_allowlist.conf (the MCP and API surfaces), the source tree through ep_src_path (the primitive), the plan_run plane manifest knowledge/store/plan-<id>-manifest.txt (the workflow), the clock DESIRED plane loaded through nx_store_seed_lib and knowledge/gateroster.conf (the agent). Paths resolve from either cwd through nx_estate_path, so the seat and the ranker read the same evidence. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_estate_path.nx nx_barfresh_lib.nx nx_store_seed_lib.nx nx_treatment_lib.nx nx_treatment.nx

imports: nx_syscalls.nxnx_estate_path.nxnx_barfresh_lib.nxnx_store_seed_lib.nxnx_treatment_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main tc_w sys_write trt_slen sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ bf_read_plan sys_mmap ↻ ct_build_path ct_cat sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close ct_first_published ct_second_published tc_read_estate sys_mmap ↻ ep_artifact_path sys_openat_rd ↻ sys_close ↻ ep_join sys_read_file ↻ sts_load

structs

none

consts

16const TC_ARG_DOMAIN: i64 = 1
17const TC_EXIT_USAGE: i64 = 2
18const TC_EXIT_NOPLAN: i64 = 3
19const TC_STDOUT: i64 = 1
20const TC_NUM_CAP: i64 = 24
21const TC_PATH_CAP: i64 = 1024
22const TC_ALLOW: *u8 = "tool_allowlist.conf"
23const TC_ROSTER: *u8 = "knowledge/gateroster.conf"
24const TC_CLOCK_PLANE: *u8 = "knowledge/store/clockjobs-"
25const TC_PLANE_CAP: i64 = 1048576 // the clock DESIRED plane read: 188 rows on 2026-09-16; a fill is announced UNPROVEN
26const TC_WF_PFX: *u8 = "knowledge/store/plan-"
27const TC_WF_SFX: *u8 = "-manifest.txt"
28const TC_MISS_CAP: i64 = 256

functions

30func tc_w(s: *u8) -> i64 { return sys_write(TC_STDOUT, s, trt_slen(s)) }
called by 2: tc_wnmain calls 2: sys_writetrt_slen
31func tc_wn(v: i64) -> i64
called by 1: main calls 2: sys_mmaptc_w
44func tc_wspan(buf: *u8, off: i64, len: i64) -> i64
called by 1: main calls 1: sys_write
48func tc_span_copy(buf: *u8, off: i64, len: i64) -> *u8
called by 1: main calls 1: sys_mmap
57func tc_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; var oo: i64 = o; while s[i] != (0 as u8) { d[oo] = s[i]; oo = oo + 1; i = i + 1 } d[oo] = 0 as u8; return oo }
called by 1: main
60func tc_read_estate(rel: *u8, outp: *i64) -> i64
70func main(argc: i64, argv: *i64) -> i64