code wiki / (root) / nx_dr_route_cli.nx

nx_dr_route_cli.nx

buildroot/runtime/nx_dr_route_cli.nx

3587 B70 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic dr
docsdependenciesstructsconstsfunctions

about

nx_dr_route_cli.nx -- callable MCP/API surface for the web-vs-private router (DR-7). Given a sub-query's coverage in the private corpus and the web, decides where to source the answer -- and never dead-ends on private when it is insufficient. nx_dr_route <priv_thr> <web_thr> <priv_match> <web_match> <total> (thresholds & counts, permille via coverage) e.g. nx_dr_route 500 500 1 4 5 -> {"private_coverage_permil":200,"route":"WEB_ONLY","uses_web":1,...} license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 2 imports · 0 importers

nx_dr_route.nx nx_syscalls.nx nx_dr_route_cli.nx

imports: nx_dr_route.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main rr_puts sys_write rr_key rr_q sys_mmap sys_write ↻ rr_puts ↻ rr_q ↻ sys_exit rr_atoi rt_coverage rt_route rt_uses_web rt_uses_private rr_num sys_mmap ↻ sys_write ↻ rr_label rr_puts ↻

structs

none

consts

none

functions

10func rr_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 3: rr_keyrr_labelmain calls 1: sys_write
11func rr_q() -> i64 { let b: *u8 = sys_mmap(1); b[0] = 34 as u8; sys_write(1, b, 1); return 0 }
called by 2: rr_keymain calls 2: sys_mmapsys_write
12func rr_key(name: *u8) -> i64 { rr_q(); rr_puts(name); rr_q(); rr_puts(":" as *u8); return 0 }
called by 1: main calls 2: rr_qrr_puts
13func rr_num(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
25func rr_atoi(a: *u8) -> i64
called by 1: main
34func rr_label(code: i64) -> i64
called by 1: main calls 1: rr_puts
42func main(argc: i64, argv: *i64) -> i64