code wiki / _hdl_build / nx_tokgate_gate.nx
nx_tokgate_gate.nx
buildroot/runtime/_hdl_build/nx_tokgate_gate.nx
about
nx_tokgate_gate.nx -- the REFEREE for nx_tokgate (engineshift ES17, 2026-09-02). Its whole input arrives on
fd 0, so every tooth drives it through gk_run_capture_in with a real PreToolUse payload on stdin.
u2605 A HOOK ORGAN TESTED WITHOUT ITS STDIN IS TESTED WITHOUT ITS INPUT.
nx_tokgate_gate [subject-elf] default _build/nx_tokgate.sov.elf (cwd nxc2)
Fixtures are assembled at runtime under /tmp/nx_tokgate_gate/. license_tier: ORIGINAL. No hw writes.
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_gatekit_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 10 | const TGG_CAP: i64 = 131072 |
| 11 | const TGG_BIG: i64 = 4096 // above the bootstrap floor (3072) and above the fixture conf floor (1000) |
| 12 | const TGG_MID: i64 = 1500 // above the fixture conf floor (1000), below the bootstrap floor (3072) |
| 13 | const TGG_SMALL: i64 = 400 // below every floor |
| 14 | const TGG_ROOT: *u8 = "/tmp/nx_tokgate_gate" |
| 15 | const TGG_CONF: *u8 = "/tmp/nx_tokgate_gate/tokgate.conf" |
| 16 | const TGG_NOCONF: *u8 = "/tmp/nx_tokgate_gate/absent.conf" |
| 17 | const TGG_BIGF: *u8 = "/tmp/nx_tokgate_gate/big.txt" |
| 18 | const TGG_MIDF: *u8 = "/tmp/nx_tokgate_gate/mid.txt" |
| 19 | const TGG_SMALLF: *u8 = "/tmp/nx_tokgate_gate/small.txt" |
| 21 | const TGG_SHELLCONF: *u8 = "/tmp/nx_tokgate_gate/shellverb.conf" |
| 22 | const TGG_NOSHELLCONF: *u8 = "/tmp/nx_tokgate_gate/absent_shellverb.conf" |
| 23 | const TGG_TREE: *u8 = "/tmp/nx_tokgate_gate/tree" |
| 24 | const TGG_TREE_FS: *u8 = "/tmp/nx_tokgate_gate/tree/nx_fs.nx" |
| 25 | const TGG_TREE_TXT: *u8 = "/tmp/nx_tokgate_gate/tree/nx_txtscan.nx" |
| 26 | const TGG_TREE_JOB: *u8 = "/tmp/nx_tokgate_gate/tree/nx_job_run.nx" // deliberately NEVER written: the source=ABSENT control |
functions
| 29 | func tgg_fill(path: *u8, n: i64) -> i64 |
| 39 | func tgg_payload(path: *u8, tool: *u8, inner: *u8) -> i64 |
| 51 | func tgg_run(elf: *u8, conf: *u8, payload: *u8, buf: *u8, ln: *i64) -> i64 |
| 55 | func tgg_run2(elf: *u8, conf: *u8, shellconf: *u8, payload: *u8, buf: *u8, ln: *i64) -> i64 |
| 59 | func tgg_wellformed(buf: *u8, n: i64) -> i64 called by 1: main |
| 68 | func main(argc: i64, argv: *i64) -> i64 |