AgentSnapshot<State> class
final
A generate-style, typed veneer over a raw SessionSnapshot. Mirrors how AgentResponse wraps an AgentOutput: it delegates the snapshot's scalar fields and surfaces the aggregates (messages, artifacts) and the typed custom state (custom), while keeping the untyped wire objects reachable via sessionState / raw.
Because SessionSnapshot is a generated schemantic type it cannot carry a
State type parameter itself; this wrapper provides it by composition.
Constructors
- AgentSnapshot.forTesting(SessionSnapshot raw)
- Test-only constructor for building a snapshot wrapper directly from a raw SessionSnapshot, bypassing a transport read.
Properties
-
artifacts
→ List<
Artifact> -
The artifacts carried by this snapshot's session state.
no setter
- createdAt → String
-
no setter
- custom → State?
-
The typed custom state, cast/parsed via the optional schema.
nullwhen the snapshot carries no custom state.no setter - error → AgentErrorInfo?
-
no setter
- finishReason → AgentFinishReason?
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- heartbeatAt → String?
-
no setter
-
messages
→ List<
Message> -
The message history carried by this snapshot's session state.
no setter
- parentId → String?
-
no setter
- raw → SessionSnapshot
-
The underlying raw SessionSnapshot.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sessionId → String?
-
Stable identifier correlating snapshots/turns of this conversation.
no setter
- sessionState → SessionState?
-
The raw session state (with untyped
custom), if you need it.no setter - snapshotId → String
-
no setter
- status → SnapshotStatus?
-
no setter
- updatedAt → String?
-
no setter
Methods
-
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