code wiki / token

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.

moduledescriptionlinesfuncs
nx_token.nxCMS layered-spec task #3 (L3-crypto, lowest BUILD): a secure random token for session IDs and604
nx_token_counter.nxSOVEREIGN LLM token estimation + budget-aware context packing: the "push our books into675
nx_token_counter_gate.nxproves the LLM token estimate is sane and, critically, that pack_text NEVER exceeds404
nx_token_merge.nxH8 token merging plan (bits-up).23510
nx_token_merge_test.nxsmoke for H8 token merging plan.1851
nx_token_meter.nxTOKEN-EFFICIENCY METER (Auditor): the measured drivers1154
nx_token_permutation.nxorder-effect analyzer for prompt token sequences.2746
nx_token_permutation_test.nxsmoke + the user's 4-permutation case. 982
nx_token_sample.nxlogit sampling primitives for inference.3185