ContextManager
Defined in the manager module.Unified facade for context management. Orchestrates budgeting, composition, optimization, and monitoring. Provides hooks for exact LLM boundary snapshots. Tracks optimization history for debugging.
Constructor
No description available.
No description available.
No description available.
No description available.
No description available.
No description available.
Methods
process()
Process messages through the context pipeline.
capture_llm_boundary()
Capture exact state at LLM call boundary.
register_snapshot_callback()
Register a callback for LLM boundary snapshots.
get_last_snapshot_hook()
Get the last LLM boundary snapshot.
estimate_tokens()
Estimate tokens with optional validation.
get_tool_budget()
Get token budget for a specific tool.
set_tool_budget()
Set token budget for a specific tool.
truncate_tool_output()
Truncate tool output according to its budget.
get_history()
Get optimization history.
get_stats()
Get current context statistics.
emergency_truncate()
Emergency truncation when optimization isn’t enough.
get_resolved_config()
Get the fully resolved configuration with source info.
reset()
Reset manager state.

