Skip to main content
API reference sections

Schema

SessionEvent

Lifecycle and low-volume facts for one session. Render content has its own bounded [crate::RenderUpdate] stream.

Type object or object or object or object or object or object or object or object or object or object or object or object or object or object

Shape

One of 14 shapes:

  1. kind: "commands_updated"

    Protocol v23. The live session's current command listing, including an authoritative empty listing.

    FieldTypeDescription
    commandsrequiredarray of AgentCommand
    kindrequired"commands_updated"
  2. kind: "output"

    FieldTypeDescription
    byte_countrequiredinteger (uint64, >= 0)
    kindrequired"output"
  3. kind: "bell"

    FieldTypeDescription
    kindrequired"bell"
  4. kind: "started"

    FieldTypeDescription
    kindrequired"started"
  5. kind: "exited"

    FieldTypeDescription
    codeinteger (int32) or null
    kindrequired"exited"
  6. kind: "failed"

    FieldTypeDescription
    errorrequiredSessionFailure

    A content-free developer diagnostic. UI maps code to localized copy.

    kindrequired"failed"
  7. kind: "working_directory_changed"

    FieldTypeDescription
    working_directoryrequiredstring
    kindrequired"working_directory_changed"
  8. kind: "title_changed"

    FieldTypeDescription
    titlerequiredstring
    kindrequired"title_changed"
  9. kind: "attention_changed"

    FieldTypeDescription
    attentionrequiredAttentionState
    kindrequired"attention_changed"
  10. kind: "attachment_created"

    FieldTypeDescription
    attachment_idrequiredAttachmentId
    kindrequired"attachment_created"
  11. kind: "attachment_removed"

    FieldTypeDescription
    attachment_idrequiredAttachmentId
    kindrequired"attachment_removed"
  12. kind: "attachment_rejected"

    FieldTypeDescription
    attachment_idrequiredAttachmentId
    coderequiredErrorCode

    Stable error token; unknown values remain errors.

    kindrequired"attachment_rejected"
  13. kind: "attachment_delivered"

    FieldTypeDescription
    attachment_idrequiredAttachmentId
    turn_idrequiredAgentTurnId
    kindrequired"attachment_delivered"
  14. kind: "handover_changed"

    Protocol v14. The controller handover moved: someone asked, the holder released, the lease was taken, or it was given back. A new tag, so a host never sends it to a peer that negotiated less than v14.

    FieldTypeDescription
    handoverrequiredHandoverState

    Where a controller handover stands.

    Release, not preemption: nothing takes a lease from its holder. The holder is asked, releases at a boundary of its choosing, the requester attaches, and gives it back the same way. Each step is a state a reader can see and an event a subscriber receives.

    kindrequired"handover_changed"
Example
{
  "commands": [
    {
      "name": "string",
      "description": "string",
      "display_name": "string",
      "kind": "command",
      "input_hint": "string"
    }
  ],
  "kind": "commands_updated"
}

The contract has no example values, so example bodies are generated from each schema: every field is shown with a placeholder of its type.

Generated from contract version 1. Last updated .

Privacy choices

Choose which optional tools Koru may use on this site. Your choice is saved in a cookie in this browser for 12 months. Privacy policy

Privacy choices

Keep you signed in, protect forms and remember your language and this choice.

Always on

PostHog and Google Analytics 4 measure page views and actions such as downloads, using cookies or local storage.

PostHog records how pages are used, with form inputs masked and private pages excluded. Needs Analytics.

Ahrefs Web Analytics measures visits and where they come from, and Google Ads measures whether our ads led to a visit or download.