Events
Sessions expose two typed directions:
Session.Send(ClientEvent)sends commands to the runtime.Session.Eventsyields runtime events until the Session ends.
Client events
| Type | Meaning |
|---|---|
user.message | Starts a Turn using the supplied content blocks. |
interrupt | Cancels the active Turn and ends the Session. |
tool.tool_confirmation | Reserved for approval flow; not fully implemented. |
Agent events
| Type | Meaning |
|---|---|
agent.message | Final assistant content for a Turn. |
agent.tool_use | A tool is about to execute. |
agent.tool_result | A tool completed successfully. |
agent.status | Session/Turn progress such as running or completed. |
agent.error | A runtime or model error visible to the caller. |
The command serializes each Event as one JSON object per stdout line. This is
NDJSON framing, not HTTP Server-Sent Events. A transport may translate these
typed events into SSE or another protocol outside the kernel.
Event fields are not yet versioned. Consumers should reject unknown required semantics but tolerate additional JSON fields.