CompactExpandController class final

Owns the per-turn expand budget and the compact_expand tool for one agent. Created next to builtinTools (see CheckpointRewindController); the budget resets when a new user turn starts.

Constructors

CompactExpandController({required Agent agent, required Session? session(), int turnBudgetTokens = defaultExpandTurnBudgetTokens, int pageChars = defaultExpandPageChars})
Creates the controller and attaches the turn-reset listener to agent. session resolves the LIVE session per call — hosts switch sessions without rebuilding the tool surface.

Properties

hashCode → int
The hash code for this object.
no setterinherited
pageChars → int
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
session → Session? Function()
final
spentTokens → int
Tokens spent on expands this turn so far.
no setter
tool → AgentTool
The compact_expand tool bound to this controller.
latefinal
turnBudgetTokens → int
final

Methods

dispose() → void
Detaches from the agent.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited