Skip to main content
API reference sections

Schema

StepKind

What a step is. A closed enum mirroring §7.5's rows plus control handover (§7.4), artifact registration, recovery and the honest gap (§7.1: replay never invents what it did not receive). Counts ride the variant that needs them, bounded by type.

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 or object or object or object or object or object or object or object or object or object or object

Shape

One of 24 shapes:

  1. step: "run_created"

    The Run document was committed (§7.1 step 3).

    FieldTypeDescription
    steprequired"run_created"
  2. step: "started"

    An attempt's provider is up.

    FieldTypeDescription
    steprequired"started"
  3. step: "turn_started"

    FieldTypeDescription
    originatorrequiredTurnOriginator

    Who submitted a turn.

    steprequired"turn_started"
  4. step: "tools_completed"

    ToolCompleted events, coalesced (§7.5: bounded, never one row per call).

    `failures` is what makes the count actionable - which tools failed and how, in tokens, bounded by type. An entry written before this build carries none, and reads as the counts alone: the same sentence it has always drawn, with nothing invented under it.

    FieldTypeDescription
    callsrequiredinteger (uint32, >= 0)
    failedrequiredinteger (uint32, >= 0)
    failuresStoredToolFailures

    How the breakdown is written down: the listed pairs and the tail's count, both absent when there are none. A fixed array would store eight nulls in every entry; this stores nothing in the ordinary case.

    steprequired"tools_completed"
  5. step: "approval_required"

    FieldTypeDescription
    steprequired"approval_required"
  6. step: "approval_resolved"

    FieldTypeDescription
    outcomerequiredApprovalOutcome

    How an approval ended.

    steprequired"approval_resolved"
  7. step: "waiting_for_input"

    FieldTypeDescription
    steprequired"waiting_for_input"
  8. step: "attachment_accepted"

    FieldTypeDescription
    steprequired"attachment_accepted"
  9. step: "attachment_rejected"

    Rejection is news (§7.5).

    FieldTypeDescription
    steprequired"attachment_rejected"
  10. step: "child_session_detected"

    A child session appeared and was terminated (§7.3).

    FieldTypeDescription
    steprequired"child_session_detected"
  11. step: "turn_completed"

    FieldTypeDescription
    originatorrequiredTurnOriginator

    Who submitted a turn.

    artifacts_registeredrequiredinteger (uint32, >= 0)
    steprequired"turn_completed"
  12. step: "turn_cancelled"

    FieldTypeDescription
    originatorrequiredTurnOriginator

    Who submitted a turn.

    reasonrequiredCancelReason

    Why a turn was cancelled (D36). Only `Run` terminalizes.

    steprequired"turn_cancelled"
  13. step: "turn_failed"

    FieldTypeDescription
    originatorrequiredTurnOriginator

    Who submitted a turn.

    stagerequiredFailureStage

    Why a start or a turn failed. A closed vocabulary - a stage, never a message - so a failure can be reported anywhere without carrying text.

    steprequired"turn_failed"
  14. step: "interrupted"

    A restart ended the attempt (§7.6).

    FieldTypeDescription
    prior_attemptrequiredPriorAttempt

    What recovery could prove about the attempt a restart interrupted (§7.6).

    steprequired"interrupted"
  15. step: "resumed"

    FieldTypeDescription
    viarequiredResumeSeam

    Which seam a resume went through (P1.9: the timeline says which).

    steprequired"resumed"
  16. step: "control_taken"

    The human lease was granted. discovered marks a takeover recovery found already in place, timestamped at discovery (§7.4).

    FieldTypeDescription
    discoveredrequiredboolean
    steprequired"control_taken"
  17. step: "control_returned"

    FieldTypeDescription
    steprequired"control_returned"
  18. step: "artifact_registered"

    FieldTypeDescription
    steprequired"artifact_registered"
  19. step: "completed"

    FieldTypeDescription
    steprequired"completed"
  20. step: "failed"

    FieldTypeDescription
    stagerequiredFailureStage

    Why a start or a turn failed. A closed vocabulary - a stage, never a message - so a failure can be reported anywhere without carrying text.

    reasonRunFailureReason or null
    steprequired"failed"
  21. step: "cancelled"

    FieldTypeDescription
    reasonrequiredCancelReason

    Why a turn was cancelled (D36). Only `Run` terminalizes.

    steprequired"cancelled"
  22. step: "rated"

    FieldTypeDescription
    ratingrequiredRating

    One gesture on a finished run (D44): good or not good. An unrated run is a normal state, which is why the header holds an Option<RunRating> and this enum has no "unrated" arm.

    steprequired"rated"
  23. step: "gap"

    Facts Koru never received - a provider tail evicted during delegate downtime. events_lost when the eviction reported a count.

    FieldTypeDescription
    events_lostinteger (uint32, >= 0) or null
    steprequired"gap"
  24. step: "scope_busy"

    A manual start proceeded onto a folder another run holds (D34, §7.8): the warning the person saw and overrode, as a step. holders counts the runs that held it; their attempts ride the refs.

    FieldTypeDescription
    holdersrequiredinteger (uint32, >= 0)
    steprequired"scope_busy"
Example
{
  "step": "run_created"
}

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.