nx_tool_exec_allow.nx
buildroot/runtime/nx_tool_exec_allow.nx
about
dependencies 1 imports · 24 importers
diagram shows first 10 each side; +0 more imports, +14 more importers in the complete lists below.
imports: nx_tool_run.nx
imported by: nx_cr_exec_proof.nxnx_crew_contract_audit.nxnx_job_concurrent_canonical_gate_t182.nxnx_job_concurrent_gate_t182.nxnx_job_reservation_canonical_gate_t182.nxnx_job_reservation_gate_t182.nxnx_mgmt_api.nxnx_mgmt_api.pre-toolchain-20260910.nxnx_mgmt_api_search_candidate_t330.nxnx_mgmt_api_toolchain_session_20260910.nxnx_mgmt_cap_candidate_t186.nxnx_mgmt_deploy_candidate_t185.nxnx_sync_promote_gate.nxnx_tea_pinned_gate.nxnx_tool_exec_allow_gate.nxnx_tools_api.nxnx_tools_api_candidate_t182.nxnx_tools_api_canonical_candidate_t182.nxnx_tools_api_idem_candidate_t190.nxnx_tools_api_recovery_candidate_t316.nxnx_tools_api_recovery_candidate_v2_t316.nxnx_tools_api_recovery_candidate_v3_t316.nxnx_vizsla_mcp_gate.nxnx_vizsla_notify_mcp_gate.nx
structs
| none |
consts
| 17 | const TEA_MAGIC_4096: i64 = 4096 |
| 18 | const TEA_MAGIC_262144: i64 = 262144 |
| 20 | const TEA_CONF: *u8 = "tool_allowlist.conf" as *u8 // relative to the server CWD (same convention as cap_revoked.list) |
| 23 | const TEA_OK: i64 = 1 // allowlisted AND gate-GREEN -> out_path filled, runnable |
| 24 | const TEA_BLOCKED: i64 = 0 // allowlisted but gate-status != GREEN -> present, NOT runnable |
| 25 | const TEA_NOTFOUND: i64 = 0 - 1 // no such tool in the allowlist |
| 26 | const TEA_NOCONF: i64 = 0 - 2 // allowlist file absent/unreadable (fail-closed) |
| 129 | const TEA_EXEC_TIMEOUT_MS: i64 = 120000 |
| 150 | const TEA_EDGE_WINDOW_MS: i64 = 15000 |
| 151 | const TEA_EXEC_TIMEOUT_SYNC_MS: i64 = TEA_EDGE_WINDOW_MS - 1000 |
| 392 | const TEA_WINDOW_CONF: *u8 = "knowledge/edge_window.conf" as *u8 |
| 393 | const TEA_WINDOW_KEY: *u8 = "edge_window_ms" as *u8 |
| 394 | const TEA_RESERVE_KEY: *u8 = "reply_reserve_ms" as *u8 |
| 395 | const TEA_REPLY_RESERVE_DEFAULT_MS: i64 = TEA_EDGE_WINDOW_MS - TEA_EXEC_TIMEOUT_SYNC_MS |
| 396 | const TEA_CONF_CAP: i64 = TEA_MAGIC_4096 // a two-row conf; a full read of it fits with 40x headroom |
| 397 | const TEA_SRC_DEFAULT: i64 = 0 |
| 398 | const TEA_SRC_CONF: i64 = 1 |
| 399 | const TEA_NL: i64 = 10 |
| 400 | const TEA_D0: i64 = 48 |
| 401 | const TEA_D9: i64 = 57 |
functions
| 29 | func tea_field_eq(buf: *u8, s: i64, e: i64, key: *u8) -> i64 |
| 40 | func tea_field_eq_n(buf: *u8, s: i64, e: i64, name: *u8, nlen: i64) -> i64 |
| 50 | func tea_name_ok(name: *u8, nlen: i64) -> i64 |
| 70 | func tea_resolve_from(conf: *u8, name: *u8, nlen: i64, out_path: *u8, out_cap: i64) -> i64 called by 4: tea_resolvetea_run_fromtea_run_argv_frommain calls 3: tea_name_oktea_field_eq_ntea_field_eq |
| 115 | func tea_resolve(name: *u8, nlen: i64, out_path: *u8, out_cap: i64) -> i64 calls 1: tea_resolve_from |
| 157 | func tea_run_from(conf: *u8, name: *u8, nlen: i64, arg: *u8, out: *u8, out_cap: i64, outlen: *i64, rc: *i64) -> i64 |
| 166 | func tea_run(name: *u8, nlen: i64, arg: *u8, out: *u8, out_cap: i64, outlen: *i64, rc: *i64) -> i64 calls 1: tea_run_from |
| 175 | func tea_run_argv_from(conf: *u8, name: *u8, nlen: i64, argv: *i64, out: *u8, out_cap: i64, outlen: *i64, rc: *i64) -> i64 |
| 185 | func tea_run_argv(name: *u8, nlen: i64, argv: *i64, out: *u8, out_cap: i64, outlen: *i64, rc: *i64) -> i64 calls 1: tea_run_argv_from |
| 197 | func tea_read_conf(path: *u8, out_len: *i64) -> *u8 |
| 220 | func tea_tokenize(s: *u8, argv: *i64, base: i64, scratch: *u8, scap: i64) -> i64 |
| 241 | func tea_tokenize_checked(s:*u8, argv:*i64, base:i64, argv_cap:i64, scratch:*u8, scap:i64)->i64 |
| 262 | func tea_resolve_pinned_from(conf: *u8, name: *u8, nlen: i64, out_path: *u8, out_cap: i64, out_pin: *u8, pin_cap: i64, out_haspin: *i64) -> i64 |
| 328 | func tea_run_pinned_from_to(conf: *u8, name: *u8, nlen: i64, callerargv: *i64, out: *u8, out_cap: i64, outlen: *i64, rc: *i64, tmo: i64) -> i64 |
| 349 | func tea_run_pinned_from(conf: *u8, name: *u8, nlen: i64, callerargv: *i64, out: *u8, out_cap: i64, outlen: *i64, rc: *i64) -> i64 |
| 352 | func tea_run_pinned_to(name: *u8, nlen: i64, callerargv: *i64, out: *u8, out_cap: i64, outlen: *i64, rc: *i64, tmo: i64) -> i64 called by 7: ta_mcp_callta_mcp_callta_mcp_callta_mcp_callta_mcp_callta_mcp_call+1 calls 1: tea_run_pinned_from_to |
| 355 | func tea_run_pinned(name: *u8, nlen: i64, callerargv: *i64, out: *u8, out_cap: i64, outlen: *i64, rc: *i64) -> i64 |
| 363 | func tea_run_pinned_deadline_from(conf: *u8, name: *u8, nlen: i64, callerargv: *i64, out: *u8, out_cap: i64, outlen: *i64, rc: *i64, deadline_ms: i64, out_pid: *i64, out_rfd: *i64) -> i64 called by 1: tea_run_pinned_deadline calls 3: tea_resolve_pinned_fromtea_tokenize_checkedtr_run_capture_deadline |
| 382 | func tea_run_pinned_deadline(name: *u8, nlen: i64, callerargv: *i64, out: *u8, out_cap: i64, outlen: *i64, rc: *i64, deadline_ms: i64, out_pid: *i64, out_rfd: *i64) -> i64 called by 7: ta_mcp_callta_mcp_callta_mcp_callta_mcp_callta_mcp_callta_mcp_call+1 calls 1: tea_run_pinned_deadline_from |
| 406 | func tea_conf_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 420 | func tea_conf_int(buf: *u8, n: i64, key: *u8, dflt: i64) -> i64 |
| 450 | func tea_edge_window_ms_from(conf: *u8, out_src: *i64) -> i64 |
| 460 | func tea_edge_window_ms(out_src: *i64) -> i64 { return tea_edge_window_ms_from(TEA_WINDOW_CONF, out_src) } calls 1: tea_edge_window_ms_from |
| 461 | func tea_reply_reserve_ms_from(conf: *u8) -> i64 |
| 469 | func tea_reply_reserve_ms() -> i64 { return tea_reply_reserve_ms_from(TEA_WINDOW_CONF) } |
| 473 | func tea_sync_promote_ms_from(conf: *u8, out_src: *i64) -> i64 |
| 480 | func tea_sync_promote_ms(out_src: *i64) -> i64 { return tea_sync_promote_ms_from(TEA_WINDOW_CONF, out_src) } called by 7: ta_mcp_callta_mcp_callta_mcp_callta_mcp_callta_mcp_callta_mcp_call+1 calls 1: tea_sync_promote_ms_from |