CheckpointRewindController class final

Orchestrates the checkpoint/rewind flow for one Agent.

Created once per agent (the CLI creates one next to builtinTools); the tools register next to the other built-ins. Capture and application ride the agent's event stream, so the tools themselves stay simple.

Constructors

CheckpointRewindController({required Agent agent, required CheckpointSessionSink sink, void onRewindApplied(int messageCount)?})
Creates a controller and attaches it to agent: subscribes to the event stream and wraps Agent.prepareNextTurn (preserving any existing hook, the same composition pattern attachApproval uses).

Properties

activeCheckpoint → CheckpointState?
The active checkpoint, if any.
no setter
hashCode → int
The hash code for this object.
no setterinherited
lastCompletedRewind → CompletedRewind?
The last completed rewind, if any (drives the repeat-call guard).
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tools → List<AgentTool>
The checkpoint and rewind tools bound to this controller.
latefinal

Methods

clear() → void
Clears all checkpoint/rewind state (e.g. when the host resets the session).
dispose() → void
Detaches from the agent: unsubscribes the event listener and restores the Agent.prepareNextTurn hook this controller wrapped.
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