Commit Graph
1 Commits
Author SHA1 Message Date
Nick 770a66372c feat(context): ContextBroker — authoritative context assembly with admission, trace, compaction (#19)
Single authority over operator prompt context: registered contributors
with deterministic budgeted admission, measured blocks, per-block trace,
real context-length discovery from /api/show (conservative fallback 8192
+ T1 record_failure), log-only calibration vs served prompt_eval_count,
and 80%-threshold compaction that ARCHIVES raw history before lossy
compression (last 5 turns verbatim, rolling structured summary, T2
degrade). AttentionCapsule gains additive blocks ledger + to_messages();
consolidation's _save_knowledge runs exactly once per turn at collect
time; safety override decorates the final user block in place; approval
resume embeds the capsule in pending_state; token accounting is
trace-backed (no more static=0). 12 frozen tests + canary
canary_context_broker.py registered in ci.yml (henxels gate).
Pinned follow-ups: num_ctx per-site right-sizing, ambient bridge
decision. Deviations recorded in the plan tail.
2026-09-05 05:04:08 +01:00