code wiki / (root) / nx_libindex.nx

nx_libindex.nx

buildroot/runtime/nx_libindex.nx

3001 B54 linesdepth 6pulls 10 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_libindex.nx -- CLI front door for the library discovery index (PG1, procgen.plan, 2026-08-24). Thin main only. Every function lives in nx_libindex_lib.nx so nx_libindex_gate can compose them IN-PROCESS rather than forking a deployed binary: a gate that rebuilds the test but not the subject proves nothing, and this way there is no subject to rebuild. WHY THIS ORGAN EXISTS: nx_capsearch ranks REGISTERED MCP TOOLS, and a library has no registration row by design. So the one instrument CLAUDE.md orders run before building anything is structurally blind to every library in the estate -- which is how eight duplicate isqrt copies came to be written beside each other. THE INDEX IS A SOVEREIGN ROW PLANE at knowledge/store/libindex- (never a .tsv file in the plane -- that shape was retired 2026-08-13). The scratch descriptor the walker streams into is organ-owned and transient. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_libindex_lib.nx nx_libindex.nx

imports: nx_libindex_lib.nx

imported by: nobody (leaf or entry point)

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

main li_usage li_out li_w sys_write li_cen 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 ↻ li_build_to li_out ↻ li_scan_dir sys_mmap ↻ li_ends_nx cl_cat3 cl_is_lib sys_mmap ↻ cl_slurp cl_open_estate sys_mmap ↻ sys_openat_rd cl_estate_path sys_munmap sys_mmap ↻ sys_read sys_close cl_slen sys_munmap ↻

structs

none

consts

none

functions

17func li_plane() -> *u8 { return "knowledge/store/libindex-" as *u8 }
called by 1: main
18func li_scratch() -> *u8 { return "/tmp/nx_libindex.scratch" as *u8 }
called by 1: main
20func li_usage() -> i64
called by 1: main calls 1: li_out
32func main(argc: i64, argv: *i64) -> i64