Projects agent runtime events into ZorphyPatch deltas over an AgentSessionDocument (issue #2256).
This is the seam that makes ZfaStore the single source of truth for a
live agent session: the runtime keeps emitting its pi-style events, and
the projector folds each batch into ONE surgical patch whose toWire()
names exactly the fields the batch touched — so a reactive view rebuilds
only those, and a remote ZfaLink inspector ships only those.
final patch = AgentSessionProjector.project(sessionId, events);
if (patch.isNotEmpty) store.applyPatch(sessionId, patch);
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
Static Methods
-
messageDelta(
String sessionId, AgentMessageDelta delta, {AgentSessionDocument? base}) → ZorphyPatch< AgentSessionDocument> -
The patch for a single
message_updatedelta. -
project(
String sessionId, List< AgentSessionEvent> events, {AgentSessionDocument? base}) → ZorphyPatch<AgentSessionDocument> -
Folds
eventsinto a single patch for the sessionsessionId. -
toolEnd(
String sessionId, String toolName, ToolCallOutcome outcome, int turn, {AgentSessionDocument? base}) → ZorphyPatch< AgentSessionDocument> -
The patch for a single
tool_execution_endevent. -
toolStart(
String sessionId, String toolName, int turn, {AgentSessionDocument? base}) → ZorphyPatch< AgentSessionDocument> -
The patch for a single
tool_execution_startevent. -
turnEnd(
String sessionId, int turn, {AgentSessionDocument? base}) → ZorphyPatch< AgentSessionDocument> -
The patch for a single
turn_endevent.