topic: token
9 modules sharing the token name family (derived from the tree's prefix discipline).
The 'token' topic family in the Nishi sovereign ecosystem addresses token management across session security, efficiency, and analysis. The nx_token module provides a secure random token for session IDs, ensuring cryptographic safety at the lowest build level. nx_token_counter integrates LLM token estimation with budget-aware context packing, while nx_token_counter_gate validates the sanity of token estimates and ensures pack_text constraints are respected. Together, these modules support secure, efficient, and analyzable token handling within the ecosystem.
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 |
|---|---|---|---|
| nx_token.nx | CMS layered-spec task #3 (L3-crypto, lowest BUILD): a secure random token for session IDs and | 60 | 4 |
| nx_token_counter.nx | SOVEREIGN LLM token estimation + budget-aware context packing: the "push our books into | 67 | 5 |
| nx_token_counter_gate.nx | proves the LLM token estimate is sane and, critically, that pack_text NEVER exceeds | 40 | 4 |
| nx_token_merge.nx | H8 token merging plan (bits-up). | 235 | 10 |
| nx_token_merge_test.nx | smoke for H8 token merging plan. | 185 | 1 |
| nx_token_meter.nx | TOKEN-EFFICIENCY METER (Auditor): the measured drivers | 115 | 4 |
| nx_token_permutation.nx | order-effect analyzer for prompt token sequences. | 274 | 6 |
| nx_token_permutation_test.nx | smoke + the user's 4-permutation case. | 98 | 2 |
| nx_token_sample.nx | logit sampling primitives for inference. | 318 | 5 |