CheckpointRecord class final
Marks a self-service context checkpoint created by the checkpoint tool
so a later rewind can collapse the exploratory detour into a report.
Ported from oh-my-pi's checkpoint feature (packages/coding-agent/src/ tools/checkpoint.ts), where the mark is in-memory only; here the mark is
a tree record so it survives in the session log. The record anchors the
branch point: messageCount is the in-memory transcript length at the
mark (AFTER the checkpoint tool result was appended, omp semantics), and
the record's own id is the session-tree anchor the rewind navigates
back to. The record itself projects to nothing in model context.
- Inheritance
-
- Object
- SessionRecord
- CheckpointRecord
Constructors
- CheckpointRecord({required String id, required String? parentId, required DateTime timestamp, required int messageCount, String? goal})
-
Creates a CheckpointRecord.
const
Properties
- goal → String?
-
Optional investigation goal text given by the model.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique record id (short random id generated by the storage).
finalinherited
- messageCount → int
-
In-memory message count at the checkpoint (the rewind prune anchor).
final
- parentId → String?
-
Id of the parent record, or
nullfor a tree root.finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timestamp → DateTime
-
When the record was created.
finalinherited
- type → String
-
The type discriminator written to JSON (pi's
typefield).no setteroverride
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
payloadJson(
) → Map< String, dynamic> -
Type-specific fields merged into toJson by subclasses.
override
-
toJson(
) → Map< String, dynamic> -
Serializes to a JSON map with the
typediscriminator (pi shape).inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited