ModelStreamUpdateEvent
Defined in: src/hooks/events.ts:568
Event triggered for each streaming event from the model. Wraps a ModelStreamEvent (transient streaming delta) during model inference. Completed content blocks are handled separately by ContentBlockEvent because they represent different granularities: partial deltas vs fully assembled results.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ModelStreamUpdateEvent(data): ModelStreamUpdateEvent;Defined in: src/hooks/events.ts:574
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data | { agent: LocalAgent; event: ModelStreamEvent; invocationState: InvocationState; } & HookableEventData |
Returns
Section titled “Returns”ModelStreamUpdateEvent
Overrides
Section titled “Overrides”Properties
Section titled “Properties”invocationContext?
Section titled “invocationContext?”readonly invocationContext?: InvocationContext;Defined in: src/hooks/events.ts:100
The request this event belongs to (undefined outside one); pass it to InvokeOptions.invocationContext to join it.
Inherited from
Section titled “Inherited from”HookableEvent.invocationContext
readonly type: "modelStreamUpdateEvent";Defined in: src/hooks/events.ts:569
readonly agent: LocalAgent;Defined in: src/hooks/events.ts:570
readonly event: ModelStreamEvent;Defined in: src/hooks/events.ts:571
invocationState
Section titled “invocationState”readonly invocationState: InvocationState;Defined in: src/hooks/events.ts:572
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): Pick<ModelStreamUpdateEvent, "type" | "event">;Defined in: src/hooks/events.ts:587
Serializes for wire transport, excluding the agent reference and invocationState. Called automatically by JSON.stringify().
Returns
Section titled “Returns”Pick<ModelStreamUpdateEvent, "type" | "event">