code wiki / (root) / nx_cap_token_gate.nx

nx_cap_token_gate.nx

buildroot/runtime/nx_cap_token_gate.nx

4115 B56 linesdepth 8pulls 11 transitivereach 0 importersview sourcekind gate/prooftopic cap
docsdependenciesstructsconstsfunctions

about

nx_cap_token_gate.nx -- proves the capability token is the BEYOND-MCP security primitive: authority-in-the-token, unforgeable (HMAC), least-authority (grants only listed tools), attenuable SUBSET-ONLY (can weaken, never widen), and time-bounded. All in-process (no socket). license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_cap_token.nx nx_gate.nx nx_cap_token_gate.nx

imports: nx_cap_token.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 capt_slen capt_issue capt_payload capt_catb capt_catn signed_cookie_sign sc_sign_bytes sys_mmap hmac_sha256 sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sha256_update sha256_final sha256_init ↻ sha256_update ↻ sha256_final ↻ b64_encode b64_enc_char cg_expect gw ↻ gn sys_write ↻ sys_mmap ↻ capt_verify capt_mac_ok sc_sign_bytes ↻ capt_allows capt_attenuate capt_mac_ok ↻ capt_allows ↻ capt_issue ↻ gn ↻

structs

none

consts

none

functions

7func cg_expect(actual: i64, expected: i64, pass: *i64, tot: *i64, label: *u8) -> i64
called by 1: main calls 2: gwgn
14func main() -> i64