Skip to main content
API reference sections

Schema

TrashRunResponse

POST /v1/runs/{run}/trash: the header, and the document the caller now has to move into the workspace's bin.

The worker records; the window moves. Trashing a run is a manifest edit and the manifest is the window's, so this call is the half only the worker can do - refusing a run that is still working, and remembering what to do with its results - and it answers with what the other half needs.

Type object

Shape

FieldTypeDescription
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() }

documentrequiredDocumentId

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

Example
{
  "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"
    }
  },
  "document": "00000000-0000-4000-8000-000000000000"
}

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.