Skip to main content

Module event

Module event 

Source
Expand description

Streaming events, in the shape pi’s JSON and RPC modes print them.

Mirrors AssistantMessageEvent in packages/ai/src/types.ts, AgentEvent in packages/agent/src/types.ts and AgentSessionEvent with toJsonEvent in packages/coding-agent/src/modes/json-event.ts in pi v1.0.0. pi’s in-process events also carry the live partial message; on the wire it is replaced by the cumulative usage, and toolcall_start gains the call’s id and tool name.

Structs§

CompactionResult
What a compaction produced.
ToolResult
What a tool returns: content for the model, details for the UI and session.

Enums§

AgentEvent
An agent session event, one JSON line in JSON mode.
AssistantMessageEvent
One step of a streamed assistant message, as carried by message_update.
CompactionReason
Why a compaction ran.
SummarySource
What a summary request summarizes.