Sign in
Docs
API referenceCoordinator

API reference

Report a turn

Have a token? Manage tokens in the console
POST
/v1/coordinator/turns/{turn_id}/report

A finished turn signed with the runner's key: outcome, reply, provider session, usage and cost. Fenced by the lease and idempotent per attempt.

Needs scope coordinator:runner.

Authorization

bearer
headerAuthorizationBearer <JWT>

An access token from the identity provider: a person's, or a customer's from the client credentials grant with an API key (developers.inorbit.hr). The gateway verifies it; the audience is iohr-api.

Path Parameters

turn_id*string

The turn's id, trn_ and a ULID, from Get a turn's pack.

Request Body

iohr.coordinator.v1.ReportTurnRequest; path variables override their fields

application/json
  1. body

iohr.coordinator.v1.ReportTurnRequest

account_id?string
attempt?integer
Formatint32
denied_tools?array<string>
detail?string
duration_ms?string
Formatint64
fencing_token?string
Formatint64
lease_id?string
num_turns?integer
Formatint32
outcome?string
pack_sha256?string
provider?string
provider_session_id?string
provider_version?string
reply?

iohr.coordinator.v1.TurnReply

resets_at?string
resumed?boolean
runner_id?string
signature?string
Formatbyte
total_cost_usd?number
Formatdouble
turn_id?string
usage?

iohr.coordinator.v1.TurnUsage

Response Body

iohr.coordinator.v1.ReportTurnResponse

application/json
  1. response

iohr.coordinator.v1.ReportTurnResponse

duplicate*boolean
job?

iohr.coordinator.v1.Job

transition?

iohr.coordinator.v1.Transition

turn?

iohr.coordinator.v1.Turn

import { ApiError, Public } from "@inorbithr/sdk";// Reads INORBIT_TOKEN, or INORBIT_KEY_ID and INORBIT_KEY_SECRET.const api = Public.fromEnv();try {  const { value } = await api.coordinator.reportTurn("<turn_id>", {    denied_tools: ["<denied_tools>"],    detail: "<detail>",    outcome: "<outcome>",    pack_sha256: "<pack_sha256>",  });  console.log(value);} catch (e) {  if (!(e instanceof ApiError)) throw e;  console.error(`${e.code}: ${e.problem} (request id ${e.raw.requestId})`);  process.exitCode = 1;}

npm install @inorbithr/sdk. Calls the package's public surface; an operation newer than your package needs the next release or a client generated for your account. The SDKs.

Example Response
{  "duplicate": true,  "job": {    "account_id": "string",    "await_deadline": "string",    "await_escalation": "string",    "await_kind": "string",    "brief": "string",    "brief_sha256": "string",    "compliance": {      "evidence_id": "string",      "needed": "string",      "paths_observed": true,      "pull_request": "string",      "pull_request_state": "string",      "reasons": [        "string"      ],      "repository": "string",      "required": true,      "verified": true    },    "created_at": "string",    "created_by": "string",    "document_id": "string",    "hold_ask": "string",    "hold_reason": "string",    "job_id": "string",    "kind": "string",    "lease_id": "string",    "mode": "string",    "model": "string",    "model_override_reason": "string",    "parent_job_id": "string",    "paused_from": "string",    "priority": 0,    "repository": "string",    "retried": true,    "retry_at": "string",    "runner_labels": [      "string"    ],    "stage": "string",    "state": "string",    "supersedes": "string",    "tags": [      "string"    ],    "thread_id": "string",    "token_budget": 0,    "trust_tier": "string",    "updated_at": "string",    "usage": {      "cache_read_tokens": "string",      "cache_write_tokens": "string",      "done_job_tokens": "string",      "reports": 0,      "tokens_in": "string",      "tokens_out": "string",      "total_tokens": "string"    },    "user": "string"  },  "transition": {    "actor": "string",    "checks": [      {        "check": "string",        "detail": "string",        "evidence": [          "string"        ],        "outcome": "string"      }    ],    "compensation": [      "string"    ],    "created_at": "string",    "detail": "string",    "evidence": [      "string"    ],    "from_mode": "string",    "from_stage": "string",    "gate": "string",    "job_id": "string",    "kind": "string",    "ledger_hash": "string",    "outcome": "string",    "reason": "string",    "request": "string",    "seq": 0,    "to_mode": "string",    "to_stage": "string"  },  "turn": {    "attempt": 0,    "cost": {      "duration_ms": "string",      "label": "string",      "usage": {        "cache_read": "string",        "cache_write": "string",        "input": "string",        "output": "string"      },      "usd_estimate": 0.1    },    "created_at": "string",    "denied_tools": [      "string"    ],    "duration_ms": "string",    "job_id": "string",    "kind": "string",    "lease_id": "string",    "model": "string",    "num_turns": 0,    "origin": "string",    "outcome": "string",    "pack_sha256": "string",    "provider": "string",    "provider_session_id": "string",    "reply": {      "actions": [        {          "kind": "string",          "payload_json": "string"        }      ],      "evidence": [        "string"      ],      "left": [        "string"      ],      "say": "string",      "state": "string"    },    "reported_at": "string",    "resumed": true,    "runner_id": "string",    "started_at": "string",    "state": "string",    "thread_id": "string",    "turn_id": "string",    "updated_at": "string",    "user": "string"  }}