-
-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
github-actions[bot] edited this page Sep 12, 2026
·
1 revision
Token Terminator is designed as an optimization layer, not a replacement runtime.
- conversation/transcript persistence;
- memory and context-engine lifecycle;
- provider client and response streaming;
- tool execution;
- authoritative session/request identity.
- its private SQLite artifact vault;
- content-addressed evidence and observations;
- exposure/receipt accounting;
- temporal terminal baselines;
- request-reduction metrics and experiment ledger;
- middleware transformations at adapter-defined boundaries.
That separation is deliberate. Token Terminator can disappear or fail and the host should still behave normally.
A typical request cycle can touch five reduction paths:
- Terminal rewrite — eligible terminal commands can be rewritten through RTK before execution.
- Temporal delta — after a repeated terminal command actually executes, the new exact output may be represented as a smaller diff/no-change receipt.
- Native tool-result compression — supported large tool outputs can be compacted after exact evidence is vaulted.
- Evidence vault / receipts — duplicate or previously exposed evidence can be represented by bounded recovery receipts.
- Final request compiler — the fully assembled provider request is deep-copied, compacted, measured, and accepted only if the final payload is smaller.
Optional tokenizer-aware measurement adds a second acceptance gate after character reduction.
The first-party Hermes adapter connects the core through:
-
tool_requestmiddleware for terminal rewrites; -
transform_tool_resultfor native and temporal result reduction; - observational lifecycle and
post_tool_callhooks; -
llm_requestmiddleware for provider-bound request compilation; - the compact
token_terminatorrecovery/status tool.
A custom adapter needs four things:
- stable session/request/tool-call identifiers;
- a tool-result transformation seam;
- a final provider-request seam;
- a recovery tool exposed to the model.
The adapter must interpret None or an exception as pass through unchanged. See Async and Adapter Integration for the API shape.
Token Terminator v0.6.0 · Repository · Releases · crates.io · MIT
Documentation is source-controlled from the repository wiki/ directory.
Token Terminator
Core mechanics
- Vault & Exact Recovery
- Temporal Delta Compression
- Request Compiler & Context Compaction
- Async & Adapter Integration
Operations
Development