code wiki / (root) / nx_tools_api_gate.nx

nx_tools_api_gate.nx

buildroot/runtime/nx_tools_api_gate.nx

18591 B280 linesdepth 9pulls 25 transitivereach 0 importersview sourcekind gate/prooftopic tools
docsdependenciesstructsconstsfunctions

about

nx_tools_api_gate.nx -- drives ta_handle_pfx IN-PROCESS (no socket, no curl): register two test tools, then assert the REST surface (/api/tools) and the MCP surface (/mcp: tools/list, initialize, error) are well-formed. Proves R0 = MCP-compatible + superset, sovereignly. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_tools_api.nx nx_gate.nx nx_tools_api_gate.nx

imports: nx_tools_api.nxnx_gate.nx

imported by: nobody (leaf or entry point)

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

main gw sys_write tool_register_pfx tr_cat tr_tab reg_put reg_put_x sts_lock sts_mm sys_mmap sts_werr sys_exit ss_cat sys_openat_append sts_werr ↻ sys_flock reg_key reg_cat ss_get sys_mmap ↻ ss_scan sys_mmap ↻ ss_manifest_dyn ss_scan_seglist reg_strlen reg_id_present sts_unlock sys_flock ↻ sys_close ss_next_segid sys_mmap ↻ ss_cat ↻ ss_readall sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ↻ ss_segid_ok

structs

none

consts

none

functions

7func tg_has(out: *u8, n: i64, needle: *u8) -> i64 { if ta_indexof(out, n, needle) >= 0 { return 1 } return 0 }
called by 1: main calls 1: ta_indexof
9func tg_streq(p: i64, expect: *u8) -> i64
called by 1: main
17func tg_slice_eq(buf: *u8, o2: *i64, expect: *u8) -> i64
called by 1: main
25func tg_write(path: *u8, content: *u8) -> i64
called by 1: main
33func main() -> i64