code wiki / _hdl_build / nx_cap_harvest.nx

nx_cap_harvest.nx

buildroot/runtime/_hdl_build/nx_cap_harvest.nx

3839 B94 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind tooltopic cap
docsdependenciesstructsconstsfunctions

about

nx_cap_harvest.nx -- SCALE (F310b): auto-harvest a BROAD capability catalog from the live tool registry (tool_allowlist.conf) -> knowledge/store/ecocap- so nx_recombine works ACROSS THE ENTERPRISE at scale, NOT on hand-seeded catalogs. Each registry row -> capability (col0=name, col6=keywords = name with '_' -> ' '). Reusable. Reads via sys_read_file (raw slurp). Manual tab writes (no hex escapes). nx_cap_harvest [registry-file] [out-prefix] defaults: tool_allowlist.conf knowledge/store/ecocap- license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 4 imports · 0 importers

nx_store_seed_lib.nx nx_seg_store.nx nx_syscalls.nx nx_runtime.nx nx_cap_harvest.nx

imports: nx_store_seed_lib.nxnx_seg_store.nxnx_syscalls.nxnx_runtime.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ch_werr sys_write ch_slen sys_exit ss_cat sts_seed ss_begin_cap sys_mmap ↻ sts_mm sys_mmap ↻ sts_werr sys_write ↻ sys_exit ↻ sts_rowkey ss_catn sys_mmap ↻ ss_add ss_add2 ss_w32 ss_len ss_catn ↻ ss_commit ss_segid_ok sys_mmap ↻ ss_cat ↻ ss_catn ↻ sys_write ↻ ss_write_seg ss_segid_ok ↻ sys_mmap ↻ ss_cat ↻ ss_catn ↻

structs

none

consts

12const CH_CAP: i64 = 1048576
13const CH_NL: i64 = 10
14const CH_TAB: i64 = 9
15const CH_HASH: i64 = 35
16const CH_US: i64 = 95
17const CH_SP: i64 = 32
18const CH_SEV7: i64 = 55
19const CH_STDERR: i64 = 2
20const CH_EXIT_IO: i64 = 1
21const CH_MAXOUT: i64 = 512

functions

23func ch_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: ch_werr
24func ch_werr(s: *u8) -> i64 { sys_write(CH_STDERR, s, ch_slen(s)); return 0 }
called by 1: main calls 2: sys_writech_slen
26func main(argc: i64, argv: *i64) -> i64