Skip to main content
API reference sections

Schema

RunView

GET /v1/runs/{run}: the header, what this device holds, the state of each pinned source, and a window of the history.

Type object

Shape

FieldTypeDescription
documentrequiredDocumentId

DocumentId - a client-minted v4 UUID, hyphenated and lowercase. Immutable, and never derived from a name or a path.

headerrequiredRunHeader

What the Run document carries (D14).

There is no conversion to or from [crate::AttemptState], and these two doctests keep it that way: the day someone writes the From, they fail.

compile_fail use koru_delegate_core::{AttemptState, RunHeader}; fn sync_side(state: AttemptState) -> RunHeader { state.into() }

compile_fail use koru_delegate_core::{AttemptState, RunHeader}; fn execution_side(header: RunHeader) -> AttemptState { header.into() }

executionrequiredRunExecution

What the device that answered can do about the run, and what it holds (D3, D15, §7.4).

Deliberately not a header field: the header is what a run means on every device, and how far this machine got is execution state. A surface compares [Self::device] with the header's executing device to decide whether it may offer an action at all, and takes control through [Self::session] when there is one.

contextarray of ContextState

What each of the header's context pins points at now (D46, D47), in the header's own order. Either empty - this device could not resolve the sources, and a surface says nothing rather than saying "gone" - or exactly as long as header.context.

Default []

timelinerequiredTimelineWindow
Example
{
  "document": "00000000-0000-4000-8000-000000000000",
  "header": {
    "run": "00000000-0000-4000-8000-000000000000",
    "created_at_ms": 0,
    "requested_by": {
      "profile": "00000000-0000-4000-8000-000000000000",
      "kind": "person"
    },
    "objective": "string",
    "agent": {
      "kind": "built_in",
      "value": "string"
    },
    "requested_model": "string",
    "scope": {
      "kind": "none"
    },
    "context": [
      {
        "workspace": "00000000-0000-4000-8000-000000000000",
        "document": "00000000-0000-4000-8000-000000000000",
        "version": "00000000-0000-4000-8000-000000000000",
        "kind": "document"
      }
    ],
    "grants": [],
    "status": {
      "state": "created"
    },
    "failure_reason": "capability_not_negotiated",
    "environment": {
      "device": "string",
      "kind": "local_device"
    },
    "artifacts": [],
    "economics": {
      "orchestrator_turns": 0,
      "human_turns": 0,
      "turns_with_usage": 0,
      "input": {
        "known": 0,
        "unavailable_turns": 0
      },
      "output": {
        "known": 0,
        "unavailable_turns": 0
      },
      "cached_input": {
        "known": 0,
        "unavailable_turns": 0
      },
      "tool_calls": 0,
      "interventions": 0,
      "elapsed_ms": null,
      "models": [],
      "complete": false
    },
    "rating": {
      "rating": "good",
      "note": "string",
      "rated_by": {
        "profile": "00000000-0000-4000-8000-000000000000",
        "kind": "person"
      },
      "rated_at_ms": 0
    },
    "origin": {
      "origin": "manual"
    }
  },
  "execution": {
    "device": "string",
    "session": "00000000-0000-4000-8000-000000000000",
    "run_workspace": "string"
  },
  "context": [],
  "timeline": {
    "total": 0,
    "from": 0,
    "items": [
      {
        "id": "00000000-0000-4000-8000-000000000000",
        "kind": {
          "step": "run_created"
        },
        "refs": [],
        "at_ms": 0
      }
    ]
  }
}

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

Used by

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.