topic: cap
24 modules sharing the cap name family (derived from the tree's prefix discipline).
The 'cap' topic family provides capability-based security primitives for the Nishi sovereign ecosystem, ensuring secure and measurable control over system resources. The nx_cap_census serves as the unified capability driver, emphasizing measurement-first design, while nx_cap_detect_lib offers a silent-truncation detector for consistent rule enforcement. nx_cap_grant_e2e_gate acts as the capstone, validating end-to-end MCP-grant paths offline, ensuring robustness across the ecosystem's modular architecture.
auto-narrated by the local model from this topic's module headers; links verified against the wiki index.
narrated overview -- maintained by the narration lane, module links verified against this wiki.
| module | description | lines | funcs |
|---|---|---|---|
| cap.nx | capability-based security primitives. | 141 | 5 |
| nx_cap.nx | capability-based security primitives. | 147 | 5 |
| nx_cap_census.nx | THE NISHI CAPABILITY DRIVER (unified, measurement-first). ONE engine measures how SOTA | 624 | 27 |
| nx_cap_detect_lib.nx | the SILENT-TRUNCATION CAP detector CORE, shared (DRY, rule 15) by the CLI sweep | 138 | 7 |
| nx_cap_exists.nx | LIB: the Nishi builder's "does this already exist?" anti-duplicate guard (importable). | 132 | 12 |
| nx_cap_exists_gate.nx | 201 | 14 | |
| nx_cap_gap_sov.nx | SOVEREIGN endpoint/missing-generation finder (operator 2026-06-22: "no more tsvs ... | 172 | 13 |
| nx_cap_grant_e2e_gate.nx | THE CAPSTONE: proves the ENTIRE production MCP-grant path end-to-end, offline, with a | 106 | 8 |
| nx_cap_guard_gate.nx | 54 | 3 | |
| nx_cap_harvest.nx | SCALE (F310b): auto-harvest a BROAD capability catalog from the live tool | 94 | 3 |
| nx_cap_invoke_gate.nx | proves R2: MCP tools/call over R0 is CAPABILITY-SCOPED. Drives ta_handle_pfx in-process | 89 | 4 |
| nx_cap_issue_gate.nx | proves the self-service DELEGATION endpoint (POST /api/cap/issue) over R0's ta_handle: | 101 | 6 |
| nx_cap_keygen.nx | provision the capability-token SIGNING SECRET on the machine that will verify it (the NAS). | 76 | 5 |
| nx_cap_keygen_gate.nx | proves nx_cap_keygen provisions a REAL CSPRNG signing secret that (a) is 256-bit hex, | 67 | 5 |
| nx_cap_mint.nx | CLI to MINT a capability token for R0's tools/call (R2 live). Reads the HMAC secret from a keyfile | 49 | 5 |
| nx_cap_mint_gate.nx | proves the root minter cm_mint (a) issues a capability that grants exactly the listed | 45 | 2 |
| nx_cap_provision.nx | FAIL-CLOSED capability-secret provisioning check (closes audit risk #1: | 55 | 6 |
| nx_cap_provision_gate.nx | proves the FAIL-CLOSED cap-secret check. NEGATIVE CONTROLS are load- | 65 | 2 |
| nx_cap_register.nx | the LIBRARIAN registers a capability so the team (not Claude hand-editing) writes | 37 | 5 |
| nx_cap_register_test.nx | prove the Librarian's lint+register catches the EXACT bug Claude made by hand | 64 | 4 |
| nx_cap_revoke_gate.nx | proves REVOCATION over R0's ta_handle: a valid cap invokes; after POST /api/cap/revoke | 60 | 6 |
| nx_cap_token.nx | sovereign CAPABILITY TOKEN: the "beyond MCP" security primitive for tool invocation. | 144 | 10 |
| nx_cap_token_gate.nx | proves the capability token is the BEYOND-MCP security primitive: authority-in-the-token, | 56 | 2 |
| nx_cap_type_classify.nx | the census CAPABILITY-TYPE classifier (L7 of the | 153 | 7 |