Skip to main content

Module extension_event

Module extension_event 

Source
Expand description

Events pi delivers to extension handlers, in the shape and key order of pi’s emit sites.

Mirrors the event interfaces in packages/coding-agent/src/core/extensions/types.ts in pi v1.0.0. Loop events (agent_start, message_update, tool_execution_* and the like) reach extensions as the fields of their AgentEvent. Three events are built where they are emitted: before_provider_request and before_provider_headers pass one field through a chain of handlers, and pi writes the data of provider_stream_event before its type.

Structs§

RegisteredMcpServer
pi’s RegisteredMcpServer: a server an extension registered with pi.registerMcpServer.
TreePreparation
pi’s TreePreparation: what navigating the session tree would summarize.
UiPrompt
pi’s UIPromptEvent: a blocking extension dialog opened or closed.

Enums§

ExtensionEvent
A pi event for extension handlers. Absent optional fields are left out, as pi leaves them undefined.