Events
Canonical LiveEvent types emitted by OSS Runtime.
@nylorun/core/contracts · beta
Wire shape:
{
eventId: string;
sessionId: string;
turnId: string;
cursor: string;
createdAt: string;
type: string;
payload: JsonValue;
}History: GET /v1/sessions/:id/items returns { items, cursor }. Optional
?agent= keeps events whose payload.agent.delegationId or
payload.agent.path matches (session.history({ agent })). Live SSE:
GET /v1/sessions/:id/events. SessionClient.observe parses JSON data and
ignores SSE events named heartbeat or ready. The server also sends
: keepalive comments.
Runtime LiveEvent.type
type | When |
|---|---|
command.message | User message accepted |
command.approve | Approval command |
command.respond | Response command |
command.cancel | Cancel command |
turn.completed | Durable success (output in payload) |
turn.paused | Waiting on interactions |
turn.failed | Failure |
turn.cancelled | Cancel (reason) |
turn.waiting | Waiting on remote work |
turn.uncertain | Uncertain turn |
action.pending | Tool or hook action offered |
action.claimed | Executor claimed |
action.completed | Result applied |
action.uncertain | Expired non-hook claim |
effect.uncertain | Lost or cancelled effect |
sandbox.state | Sandbox lifecycle |
sandbox.exec | Sandbox exec audit |
delegation.started | An agent used as a tool began. Payload includes agent: { id, path, delegationId } and task. |
delegation.completed | That child settled. Payload includes agent plus status and outcome. |
Harness-internal observations (tool.started, model.requested, …) are not
wire events. Do not treat onEvent from @nylorun/harness/run as Runtime SSE.
Guide: Run: events.