{ "info": { "title": "Agent LCARS work items", "version": "1" }, "servers": [ { "url": "/api/work/v1" } ], "components": { "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" }, "runToken": { "type": "http", "scheme": "bearer", "description": "A run claim token minted by POST /runs/claim." } }, "schemas": { "UndefinedError": { "title": "UndefinedError", "type": "object", "properties": { "defined": { "const": false }, "code": { "type": "string" }, "status": { "type": "number" }, "message": { "type": "string" }, "data": {} }, "required": ["defined", "code", "status", "message"] }, "Forbidden": { "title": "FORBIDDEN", "type": "object", "properties": { "defined": { "const": true }, "code": { "const": "FORBIDDEN" }, "status": { "const": 403 }, "message": { "type": "string" }, "data": {} }, "required": ["defined", "code", "status", "message"] }, "NotFound": { "title": "NOT_FOUND", "type": "object", "properties": { "defined": { "const": true }, "code": { "const": "NOT_FOUND" }, "status": { "const": 404 }, "message": { "type": "string" }, "data": {} }, "required": ["defined", "code", "status", "message"] }, "Conflict": { "title": "CONFLICT", "type": "object", "properties": { "defined": { "const": true }, "code": { "const": "CONFLICT" }, "status": { "const": 409 }, "message": { "type": "string" }, "data": {} }, "required": ["defined", "code", "status", "message"] }, "BadRequest": { "title": "BAD_REQUEST", "type": "object", "properties": { "defined": { "const": true }, "code": { "const": "BAD_REQUEST" }, "status": { "const": 400 }, "message": { "type": "string" }, "data": {} }, "required": ["defined", "code", "status", "message"] }, "Unauthorized": { "title": "UNAUTHORIZED", "type": "object", "properties": { "defined": { "const": true }, "code": { "const": "UNAUTHORIZED" }, "status": { "const": 401 }, "message": { "type": "string" }, "data": {} }, "required": ["defined", "code", "status", "message"] }, "InternalServerError": { "title": "INTERNAL_SERVER_ERROR", "type": "object", "properties": { "defined": { "const": true }, "code": { "const": "INTERNAL_SERVER_ERROR" }, "status": { "const": 500 }, "message": { "type": "string" }, "data": {} }, "required": ["defined", "code", "status", "message"] }, "ServiceUnavailable": { "title": "SERVICE_UNAVAILABLE", "type": "object", "properties": { "defined": { "const": true }, "code": { "const": "SERVICE_UNAVAILABLE" }, "status": { "const": 503 }, "message": { "type": "string" }, "data": {} }, "required": ["defined", "code", "status", "message"] } } }, "openapi": "3.2.0", "paths": { "/issues/owner": { "get": { "operationId": "getIssueOwner", "summary": "Read authoritative ownership for a GitHub or Linear issue", "tags": ["items"], "parameters": [ { "in": "query", "name": "tracker", "schema": { "type": "string", "enum": ["github", "linear"] }, "allowEmptyValue": true, "allowReserved": true, "required": true }, { "in": "query", "name": "issue", "schema": { "type": "string", "minLength": 1, "maxLength": 256 }, "allowEmptyValue": true, "allowReserved": true, "required": true }, { "in": "query", "name": "repo", "schema": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "allowEmptyValue": true, "allowReserved": true } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "anchor": { "anyOf": [ { "type": "object", "properties": { "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["repo", "issue"], "additionalProperties": false }, { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] } ] }, "identifier": { "type": "string" }, "repository": { "type": "string" }, "workId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "observedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "verdict": { "type": "string", "enum": ["fleet-run", "interactive-session", "none"] }, "complete": { "type": "boolean" }, "warnings": { "type": "array", "items": { "type": "string" } }, "task": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "running", "done", "parked", "failed", "canceled" ] }, "pipeline": { "type": "string" }, "runCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "activeRunId": { "type": "string" }, "updatedAt": { "type": "string" }, "run": { "type": "object", "properties": { "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "triagePublication": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "pending", "complete", "superseded", "failed" ] }, "commentBody": { "type": "string", "maxLength": 65536 }, "commentId": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } ] }, "sourceComment": { "type": "object", "properties": { "id": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } ] }, "body": { "type": "string", "maxLength": 65536 }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["id", "body", "updatedAt"], "additionalProperties": false }, "addedLabels": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "dispatchRequested": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "dispatchObserved": { "type": "boolean" }, "error": { "type": "string", "maxLength": 400 } }, "required": ["state"], "additionalProperties": false }, "delivery": { "type": "object", "properties": { "runId": { "type": "string" }, "repo": { "type": "string" }, "number": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "baseRef": { "type": "string", "minLength": 1, "maxLength": 255 }, "head": { "type": "string", "pattern": "^[a-f0-9]{40}$" }, "state": { "type": "string", "enum": ["waiting", "complete"] }, "correctionRunId": { "type": "string" }, "observedAt": { "type": "string" }, "mergeCommit": { "type": "string", "pattern": "^[a-f0-9]{40}$" } }, "required": [ "runId", "repo", "number", "baseRef", "head", "state", "observedAt" ], "additionalProperties": false }, "runId": { "type": "string" }, "state": { "type": "string", "enum": [ "pending", "running", "finished", "canceled", "lost" ] }, "pipeline": { "type": "string" }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "result": { "type": "object", "properties": { "ok": { "type": "boolean" }, "summary": { "type": "string", "maxLength": 4096 }, "ref": { "type": "string", "maxLength": 1024 }, "relatedRefs": { "maxItems": 1, "type": "array", "items": { "type": "string", "maxLength": 1024 } }, "message": { "type": "string", "description": "The run message, including the saved report body for a report (final provider reply for legacy two-line reports). Single-item reads return it whole. Listings return its first 16,384 characters when messageOverflow is present." }, "messageOverflow": { "type": "object", "properties": { "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "chars": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "bytes": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "chunks": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "sha256", "chars", "bytes", "chunks" ], "additionalProperties": false, "description": "Present only when message is a preview; GET /items/{id} returns the whole message." }, "humanNeededActions": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "type": "object", "properties": { "text": { "type": "string", "minLength": 1, "maxLength": 400 }, "command": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": ["text"], "additionalProperties": false } } }, "required": ["ok"], "additionalProperties": false }, "sourceRevision": { "type": "object", "properties": { "key": { "type": "string" }, "input": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "observedAt": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "required": ["key", "input"], "additionalProperties": false }, "revisionAttempt": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "providerFallback": { "type": "object", "properties": { "allowedPipelines": { "type": "array", "items": { "type": "string" } }, "attemptedPipelines": { "type": "array", "items": { "type": "string" } }, "originalRunId": { "type": "string" }, "fromRunId": { "type": "string" }, "trigger": { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "provider-limit", "provider-cooldown", "agent-timeout" ] }, "failureRunId": { "type": "string" }, "limitedPipeline": { "type": "string" } }, "required": [ "reason", "failureRunId", "limitedPipeline" ], "additionalProperties": false } }, "required": [ "allowedPipelines", "attemptedPipelines", "originalRunId" ], "additionalProperties": false }, "reply": { "type": "string" }, "replyChannel": { "type": "string", "maxLength": 64 }, "replyPrincipal": { "type": "string", "maxLength": 256 }, "queue": { "type": "object", "properties": { "state": { "type": "string", "enum": ["queued", "claimed", "retired"] }, "claimedBy": { "type": "string" }, "claimedAt": { "type": "string" }, "firstHeartbeatAt": { "type": "string" }, "providerProcessStartedAt": { "type": "string" }, "startDeadlineAt": { "type": "string" }, "placement": { "type": "object", "properties": { "phase": { "type": "string", "enum": [ "waiting-for-placement", "bootstrapping", "unavailable" ] }, "reason": { "type": "string", "enum": [ "pending", "unschedulable", "scheduled", "inventory-unavailable", "launch-pending" ] }, "observedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "jobCreatedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["phase", "reason", "observedAt"], "additionalProperties": false } }, "required": ["state"], "additionalProperties": false }, "evidence": { "type": "object", "properties": { "source": { "type": "string", "const": "acp" }, "harness": { "default": "other", "type": "string", "enum": [ "openclaw", "claude", "codex", "other" ] }, "stopReason": { "default": "other", "type": "string", "enum": [ "end_turn", "max_tokens", "max_turn_requests", "refusal", "cancelled", "other" ] }, "toolCallCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "toolCalls": { "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "kind": { "default": "other", "type": "string", "enum": [ "read", "edit", "delete", "move", "search", "execute", "think", "fetch", "switch_mode", "other" ] }, "status": { "default": "other", "type": "string", "enum": [ "pending", "in_progress", "completed", "failed", "other" ] } }, "required": ["kind", "status"], "additionalProperties": false } }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "outputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "totalTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "thoughtTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedReadTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedWriteTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextWindow": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cost": { "type": "object", "properties": { "amount": { "type": "number", "minimum": 0, "maximum": 1000000 }, "currency": { "type": "string", "enum": [ "USD", "EUR", "GBP", "JPY", "CNY", "CAD", "AUD", "CHF" ] } }, "required": ["amount", "currency"], "additionalProperties": false } }, "additionalProperties": false }, "durationMs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "recordedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "source", "harness", "toolCallCount", "toolCalls", "recordedAt" ], "additionalProperties": false, "description": "What the run's worker saw its agent do; present on single-item reads of a run that reported it." } }, "required": [ "runId", "state", "pipeline", "priority", "createdAt", "updatedAt" ], "additionalProperties": false }, "runSessions": { "type": "array", "items": { "type": "object", "properties": { "sessionId": { "type": "string" }, "runId": { "type": "string" }, "startedAt": { "type": "string" }, "lastActivityAt": { "type": "string" }, "title": { "type": "string" }, "status": { "type": "string" }, "transcriptGcsUri": { "type": "string" } }, "required": [ "sessionId", "runId", "startedAt", "lastActivityAt" ], "additionalProperties": false } } }, "required": [ "state", "pipeline", "runCount", "updatedAt", "runSessions" ], "additionalProperties": false }, "cliSessions": { "type": "array", "items": { "type": "object", "properties": { "sessionId": { "type": "string" }, "agent": { "type": "string" }, "liveness": { "type": "string", "enum": ["live", "idle", "ended", "stale"] }, "host": { "type": "string" }, "branch": { "type": "string" }, "pr": { "type": "object", "properties": { "number": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "url": { "type": "string" } }, "required": ["number", "url"], "additionalProperties": false }, "title": { "type": "string" }, "status": { "type": "string" }, "startedAt": { "type": "string" }, "lastActivityAt": { "type": "string" } }, "required": [ "sessionId", "agent", "liveness", "startedAt", "lastActivityAt" ], "additionalProperties": false } } }, "required": [ "anchor", "observedAt", "verdict", "complete", "warnings", "cliSessions" ], "additionalProperties": false } } } }, "400": { "description": "Invalid issue source request", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/BadRequest" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "Tracker or repository access denied", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "Issue source unavailable", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Issue source conflicts with existing Work", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/issues/source": { "get": { "operationId": "getIssueSource", "summary": "Read an issue and its existing Work binding", "tags": ["items"], "parameters": [ { "in": "query", "name": "tracker", "schema": { "type": "string", "enum": ["github", "linear"] }, "allowEmptyValue": true, "allowReserved": true, "required": true }, { "in": "query", "name": "issue", "schema": { "type": "string", "minLength": 1, "maxLength": 256 }, "allowEmptyValue": true, "allowReserved": true, "required": true }, { "in": "query", "name": "repo", "schema": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "allowEmptyValue": true, "allowReserved": true } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "observedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "workId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" } }, "required": ["issue", "observedAt"], "additionalProperties": false } } } }, "400": { "description": "Invalid issue source request", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/BadRequest" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "Tracker or repository access denied", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "Issue source unavailable", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Issue source conflicts with existing Work", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/issues": { "get": { "operationId": "listIssueSources", "summary": "Browse current issue projections without dispatching work", "tags": ["items"], "parameters": [ { "in": "query", "name": "tracker", "schema": { "type": "string", "enum": ["github", "linear"] }, "allowEmptyValue": true, "allowReserved": true, "required": true }, { "in": "query", "name": "repo", "schema": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "allowEmptyValue": true, "allowReserved": true }, { "in": "query", "name": "limit", "schema": { "default": 50, "type": "integer", "minimum": 1, "maximum": 200 }, "allowEmptyValue": true, "allowReserved": true }, { "in": "query", "name": "cursor", "schema": { "type": "string", "maxLength": 2048 }, "allowEmptyValue": true, "allowReserved": true } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "issues": { "type": "array", "items": { "type": "object", "properties": { "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "observedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "workId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" } }, "required": ["issue", "observedAt"], "additionalProperties": false } }, "nextCursor": { "type": "string" } }, "required": ["issues"], "additionalProperties": false } } } }, "400": { "description": "Invalid issue source request", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/BadRequest" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "Tracker or repository access denied", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "Issue source unavailable", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Issue source conflicts with existing Work", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/issues/refresh": { "post": { "operationId": "refreshIssueSources", "summary": "Refresh one bounded page of configured tracker issues", "tags": ["items"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "tracker": { "type": "string", "enum": ["github", "linear"] }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "cursor": { "type": "string", "maxLength": 2048 } }, "required": ["tracker"], "additionalProperties": false } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "refreshed": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "nextCursor": { "type": "string" } }, "required": ["refreshed"], "additionalProperties": false } } } }, "400": { "description": "Invalid issue source request", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/BadRequest" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "Tracker or repository access denied", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "Issue source unavailable", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Issue source conflicts with existing Work", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/issues/dispatch": { "post": { "operationId": "dispatchIssue", "summary": "Dispatch or continue an issue through its canonical Work pipeline", "tags": ["items"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "issue": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": ["tracker", "organizationId", "issueId"], "additionalProperties": false } ] }, "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "pipeline": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] }, "requestId": { "type": "string", "minLength": 1, "maxLength": 128 } }, "required": ["issue", "pipeline", "requestId"], "additionalProperties": false } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "runId": { "type": "string" }, "workId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "location": { "type": "string" } }, "required": ["runId", "location"], "additionalProperties": false } } } }, "400": { "description": "Invalid issue source request", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/BadRequest" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "Tracker or repository access denied", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "Issue source unavailable", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Issue source conflicts with existing Work", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/anchors/github/owner": { "get": { "operationId": "getGithubAnchorOwner", "summary": "Who Console says is working a GitHub issue or pull request", "description": "Read-only. Answers from the orchestrator task and runs for the anchor and from recent CLI session telemetry; it records no claim. Call it before starting work on an issue. Requires work.operator or work.reader; the repository must be a control-plane repository, and a GitHub Actions principal may read only its own repository.", "tags": ["items"], "parameters": [ { "in": "query", "name": "repo", "schema": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "allowEmptyValue": true, "allowReserved": true, "required": true }, { "in": "query", "name": "issue", "schema": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "allowEmptyValue": true, "allowReserved": true, "required": true } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "anchor": { "anyOf": [ { "type": "object", "properties": { "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["repo", "issue"], "additionalProperties": false }, { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] } ] }, "identifier": { "type": "string" }, "repository": { "type": "string" }, "workId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "observedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "verdict": { "type": "string", "enum": ["fleet-run", "interactive-session", "none"] }, "complete": { "type": "boolean" }, "warnings": { "type": "array", "items": { "type": "string" } }, "task": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "running", "done", "parked", "failed", "canceled" ] }, "pipeline": { "type": "string" }, "runCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "activeRunId": { "type": "string" }, "updatedAt": { "type": "string" }, "run": { "type": "object", "properties": { "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "triagePublication": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "pending", "complete", "superseded", "failed" ] }, "commentBody": { "type": "string", "maxLength": 65536 }, "commentId": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } ] }, "sourceComment": { "type": "object", "properties": { "id": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } ] }, "body": { "type": "string", "maxLength": 65536 }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["id", "body", "updatedAt"], "additionalProperties": false }, "addedLabels": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "dispatchRequested": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "dispatchObserved": { "type": "boolean" }, "error": { "type": "string", "maxLength": 400 } }, "required": ["state"], "additionalProperties": false }, "delivery": { "type": "object", "properties": { "runId": { "type": "string" }, "repo": { "type": "string" }, "number": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "baseRef": { "type": "string", "minLength": 1, "maxLength": 255 }, "head": { "type": "string", "pattern": "^[a-f0-9]{40}$" }, "state": { "type": "string", "enum": ["waiting", "complete"] }, "correctionRunId": { "type": "string" }, "observedAt": { "type": "string" }, "mergeCommit": { "type": "string", "pattern": "^[a-f0-9]{40}$" } }, "required": [ "runId", "repo", "number", "baseRef", "head", "state", "observedAt" ], "additionalProperties": false }, "runId": { "type": "string" }, "state": { "type": "string", "enum": [ "pending", "running", "finished", "canceled", "lost" ] }, "pipeline": { "type": "string" }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "result": { "type": "object", "properties": { "ok": { "type": "boolean" }, "summary": { "type": "string", "maxLength": 4096 }, "ref": { "type": "string", "maxLength": 1024 }, "relatedRefs": { "maxItems": 1, "type": "array", "items": { "type": "string", "maxLength": 1024 } }, "message": { "type": "string", "description": "The run message, including the saved report body for a report (final provider reply for legacy two-line reports). Single-item reads return it whole. Listings return its first 16,384 characters when messageOverflow is present." }, "messageOverflow": { "type": "object", "properties": { "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "chars": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "bytes": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "chunks": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "sha256", "chars", "bytes", "chunks" ], "additionalProperties": false, "description": "Present only when message is a preview; GET /items/{id} returns the whole message." }, "humanNeededActions": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "type": "object", "properties": { "text": { "type": "string", "minLength": 1, "maxLength": 400 }, "command": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": ["text"], "additionalProperties": false } } }, "required": ["ok"], "additionalProperties": false }, "sourceRevision": { "type": "object", "properties": { "key": { "type": "string" }, "input": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "observedAt": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "required": ["key", "input"], "additionalProperties": false }, "revisionAttempt": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "providerFallback": { "type": "object", "properties": { "allowedPipelines": { "type": "array", "items": { "type": "string" } }, "attemptedPipelines": { "type": "array", "items": { "type": "string" } }, "originalRunId": { "type": "string" }, "fromRunId": { "type": "string" }, "trigger": { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "provider-limit", "provider-cooldown", "agent-timeout" ] }, "failureRunId": { "type": "string" }, "limitedPipeline": { "type": "string" } }, "required": [ "reason", "failureRunId", "limitedPipeline" ], "additionalProperties": false } }, "required": [ "allowedPipelines", "attemptedPipelines", "originalRunId" ], "additionalProperties": false }, "reply": { "type": "string" }, "replyChannel": { "type": "string", "maxLength": 64 }, "replyPrincipal": { "type": "string", "maxLength": 256 }, "queue": { "type": "object", "properties": { "state": { "type": "string", "enum": ["queued", "claimed", "retired"] }, "claimedBy": { "type": "string" }, "claimedAt": { "type": "string" }, "firstHeartbeatAt": { "type": "string" }, "providerProcessStartedAt": { "type": "string" }, "startDeadlineAt": { "type": "string" }, "placement": { "type": "object", "properties": { "phase": { "type": "string", "enum": [ "waiting-for-placement", "bootstrapping", "unavailable" ] }, "reason": { "type": "string", "enum": [ "pending", "unschedulable", "scheduled", "inventory-unavailable", "launch-pending" ] }, "observedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "jobCreatedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["phase", "reason", "observedAt"], "additionalProperties": false } }, "required": ["state"], "additionalProperties": false }, "evidence": { "type": "object", "properties": { "source": { "type": "string", "const": "acp" }, "harness": { "default": "other", "type": "string", "enum": [ "openclaw", "claude", "codex", "other" ] }, "stopReason": { "default": "other", "type": "string", "enum": [ "end_turn", "max_tokens", "max_turn_requests", "refusal", "cancelled", "other" ] }, "toolCallCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "toolCalls": { "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "kind": { "default": "other", "type": "string", "enum": [ "read", "edit", "delete", "move", "search", "execute", "think", "fetch", "switch_mode", "other" ] }, "status": { "default": "other", "type": "string", "enum": [ "pending", "in_progress", "completed", "failed", "other" ] } }, "required": ["kind", "status"], "additionalProperties": false } }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "outputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "totalTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "thoughtTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedReadTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedWriteTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextWindow": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cost": { "type": "object", "properties": { "amount": { "type": "number", "minimum": 0, "maximum": 1000000 }, "currency": { "type": "string", "enum": [ "USD", "EUR", "GBP", "JPY", "CNY", "CAD", "AUD", "CHF" ] } }, "required": ["amount", "currency"], "additionalProperties": false } }, "additionalProperties": false }, "durationMs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "recordedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "source", "harness", "toolCallCount", "toolCalls", "recordedAt" ], "additionalProperties": false, "description": "What the run's worker saw its agent do; present on single-item reads of a run that reported it." } }, "required": [ "runId", "state", "pipeline", "priority", "createdAt", "updatedAt" ], "additionalProperties": false }, "runSessions": { "type": "array", "items": { "type": "object", "properties": { "sessionId": { "type": "string" }, "runId": { "type": "string" }, "startedAt": { "type": "string" }, "lastActivityAt": { "type": "string" }, "title": { "type": "string" }, "status": { "type": "string" }, "transcriptGcsUri": { "type": "string" } }, "required": [ "sessionId", "runId", "startedAt", "lastActivityAt" ], "additionalProperties": false } } }, "required": [ "state", "pipeline", "runCount", "updatedAt", "runSessions" ], "additionalProperties": false }, "cliSessions": { "type": "array", "items": { "type": "object", "properties": { "sessionId": { "type": "string" }, "agent": { "type": "string" }, "liveness": { "type": "string", "enum": ["live", "idle", "ended", "stale"] }, "host": { "type": "string" }, "branch": { "type": "string" }, "pr": { "type": "object", "properties": { "number": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "url": { "type": "string" } }, "required": ["number", "url"], "additionalProperties": false }, "title": { "type": "string" }, "status": { "type": "string" }, "startedAt": { "type": "string" }, "lastActivityAt": { "type": "string" } }, "required": [ "sessionId", "agent", "liveness", "startedAt", "lastActivityAt" ], "additionalProperties": false } } }, "required": [ "anchor", "observedAt", "verdict", "complete", "warnings", "cliSessions" ], "additionalProperties": false } } } }, "403": { "description": "Principal may not read this repository", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/metrics/lifecycle": { "get": { "operationId": "getLifecycleMetrics", "summary": "Bounded durable lifecycle observations (work.operator or work.cron)", "tags": ["items"], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "observedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "windowSeconds": { "type": "number", "const": 3600 }, "complete": { "type": "boolean" }, "prometheus": { "type": "string", "maxLength": 65536 } }, "required": [ "observedAt", "windowSeconds", "complete", "prometheus" ], "additionalProperties": false } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/maintenance/tick": { "post": { "operationId": "tickMaintenance", "summary": "Run bounded control-plane maintenance (work.cron required)", "tags": ["items", "cron"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": {}, "additionalProperties": false } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "jobCredentials": { "type": "object", "properties": { "version": { "type": "number", "const": 1 }, "observedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "configured": { "type": "boolean" }, "metadataAvailable": { "type": "boolean" }, "dependency": { "type": "string", "enum": [ "disabled", "idle", "ready", "unavailable", "unknown" ] }, "counts": { "type": "object", "properties": { "total": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "ready": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "disabled": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "unpromoted": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "expired": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "expiring": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "unknown": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "total", "ready", "disabled", "unpromoted", "expired", "expiring", "unknown" ], "additionalProperties": false }, "deliveries": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "deliveryTimed": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "deliveryDurationSeconds": { "type": "number", "minimum": 0, "maximum": 9007199254740991 }, "admissionRefusals": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "deliveryRefusals": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "lastDeliveryAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "lastRefusalAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "version", "observedAt", "configured", "metadataAvailable", "dependency" ], "additionalProperties": false }, "repositoryAgents": { "type": "object", "properties": { "version": { "type": "number", "const": 1 }, "observedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "agents": { "type": "object", "properties": { "enabled": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "vetoed": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "invalid": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "unavailable": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "removed": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "enabled", "vetoed", "invalid", "unavailable", "removed" ], "additionalProperties": false }, "sources": { "type": "array", "items": { "type": "object", "properties": { "repository": { "type": "string", "pattern": "^[A-Za-z0-9_.-]{1,100}\\/[A-Za-z0-9_.-]{1,100}$" }, "attemptedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "succeededAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "failedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "unavailable": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["repository"], "additionalProperties": false } } }, "required": [ "version", "observedAt", "agents", "sources" ], "additionalProperties": false }, "credentialRecovery": { "type": "object", "properties": { "recovered": { "type": "array", "items": { "type": "string" } }, "unresolved": { "type": "array", "items": { "type": "string" } } }, "required": ["recovered", "unresolved"], "additionalProperties": false }, "lost": { "type": "array", "items": { "type": "string" } }, "retried": { "type": "array", "items": { "type": "object", "properties": { "lostRunId": { "type": "string" }, "newRunId": { "type": "string" } }, "required": ["lostRunId", "newRunId"], "additionalProperties": false } }, "rerouted": { "type": "array", "items": { "type": "object", "properties": { "fromRunId": { "type": "string" }, "newRunId": { "type": "string" } }, "required": ["fromRunId", "newRunId"], "additionalProperties": false } }, "dispatched": { "type": "array", "items": { "type": "string" } }, "reported": { "type": "array", "items": { "type": "string" } }, "outboxProcessed": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "outboxContinuationNeeded": { "type": "boolean" }, "outboxDrainFailed": { "type": "array", "items": { "type": "object", "properties": { "entryId": { "type": "string" }, "error": { "type": "string" } }, "required": ["entryId", "error"], "additionalProperties": false } } }, "required": [ "lost", "retried", "dispatched", "reported", "outboxProcessed", "outboxContinuationNeeded" ], "additionalProperties": false } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/items/{id}": { "put": { "operationId": "createItem", "summary": "Create a work item (idempotent by client ULID)", "tags": ["items"], "parameters": [ { "in": "path", "required": true, "name": "id", "schema": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "spec": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] } }, "deliveryRuntime": { "type": "string", "enum": ["none", "required"] }, "deliverable": { "type": "string", "enum": ["report"] }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false } }, "required": ["title", "description", "pipeline", "target"], "additionalProperties": false }, "thread": { "type": "string", "maxLength": 512 } }, "required": ["spec"] } } } }, "responses": { "201": { "description": "Created. A replay of the same id and spec returns the existing item.", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "state": { "type": "string", "enum": [ "running", "done", "parked", "failed", "canceled" ] }, "spec": { "anyOf": [ { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] } }, "deliveryRuntime": { "type": "string", "enum": ["none", "required"] }, "deliverable": { "type": "string", "enum": ["report"] }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false } }, "required": [ "title", "description", "pipeline", "priority", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["inbox-summary", "handoff-summary"] }, "priority": { "type": "string", "const": "background" }, "sourceKey": { "type": "string", "minLength": 1, "maxLength": 256 } }, "required": [ "title", "description", "pipeline", "priority", "sourceKey" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "const": "goose" }, "priority": { "type": "string", "const": "background" }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false }, "jobOccurrence": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }, "required": [ "title", "description", "pipeline", "priority", "target", "jobOccurrence" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "priority": { "type": "string", "const": "background" }, "pipeline": {}, "agent": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+\\/[a-z][a-z0-9-]*$" }, "sourceKey": { "type": "string", "minLength": 1 } }, "required": [ "title", "description", "priority", "pipeline", "agent", "sourceKey" ], "additionalProperties": false } ] }, "origin": { "type": "object", "properties": { "principal": { "type": "string", "minLength": 1, "maxLength": 128 }, "channel": { "type": "string", "enum": [ "api", "cron", "console", "github", "linear", "slack" ] }, "thread": { "type": "string", "maxLength": 512 } }, "required": ["principal", "channel"], "additionalProperties": false }, "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "closedAt": { "type": "string" }, "providerRouting": { "type": "object", "properties": { "requestId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "requestedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "actor": { "type": "string", "minLength": 1, "maxLength": 128 }, "requestedPipeline": { "type": "string", "minLength": 1, "maxLength": 128 }, "effectivePipeline": { "type": "string", "minLength": 1, "maxLength": 128 }, "status": { "type": "string", "enum": ["accepted", "refused"] }, "reason": { "type": "string", "minLength": 1, "maxLength": 128 }, "fromRunId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "acceptedGeneration": { "type": "object", "properties": { "runId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "requestedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "pipeline": { "type": "string", "minLength": 1, "maxLength": 128 } }, "required": ["runId", "requestedAt", "pipeline"], "additionalProperties": false }, "successorRunId": { "type": "string", "minLength": 1, "maxLength": 1024 } }, "required": [ "requestId", "requestedAt", "actor", "requestedPipeline", "effectivePipeline", "status" ], "additionalProperties": false }, "runs": { "type": "array", "items": { "type": "object", "properties": { "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "triagePublication": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "pending", "complete", "superseded", "failed" ] }, "commentBody": { "type": "string", "maxLength": 65536 }, "commentId": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } ] }, "sourceComment": { "type": "object", "properties": { "id": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } ] }, "body": { "type": "string", "maxLength": 65536 }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["id", "body", "updatedAt"], "additionalProperties": false }, "addedLabels": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "dispatchRequested": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "dispatchObserved": { "type": "boolean" }, "error": { "type": "string", "maxLength": 400 } }, "required": ["state"], "additionalProperties": false }, "delivery": { "type": "object", "properties": { "runId": { "type": "string" }, "repo": { "type": "string" }, "number": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "baseRef": { "type": "string", "minLength": 1, "maxLength": 255 }, "head": { "type": "string", "pattern": "^[a-f0-9]{40}$" }, "state": { "type": "string", "enum": ["waiting", "complete"] }, "correctionRunId": { "type": "string" }, "observedAt": { "type": "string" }, "mergeCommit": { "type": "string", "pattern": "^[a-f0-9]{40}$" } }, "required": [ "runId", "repo", "number", "baseRef", "head", "state", "observedAt" ], "additionalProperties": false }, "runId": { "type": "string" }, "state": { "type": "string", "enum": [ "pending", "running", "finished", "canceled", "lost" ] }, "pipeline": { "type": "string" }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "result": { "type": "object", "properties": { "ok": { "type": "boolean" }, "summary": { "type": "string", "maxLength": 4096 }, "ref": { "type": "string", "maxLength": 1024 }, "relatedRefs": { "maxItems": 1, "type": "array", "items": { "type": "string", "maxLength": 1024 } }, "message": { "type": "string", "description": "The run message, including the saved report body for a report (final provider reply for legacy two-line reports). Single-item reads return it whole. Listings return its first 16,384 characters when messageOverflow is present." }, "messageOverflow": { "type": "object", "properties": { "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "chars": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "bytes": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "chunks": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "sha256", "chars", "bytes", "chunks" ], "additionalProperties": false, "description": "Present only when message is a preview; GET /items/{id} returns the whole message." }, "humanNeededActions": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "type": "object", "properties": { "text": { "type": "string", "minLength": 1, "maxLength": 400 }, "command": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": ["text"], "additionalProperties": false } } }, "required": ["ok"], "additionalProperties": false }, "sourceRevision": { "type": "object", "properties": { "key": { "type": "string" }, "input": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "observedAt": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "required": ["key", "input"], "additionalProperties": false }, "revisionAttempt": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "providerFallback": { "type": "object", "properties": { "allowedPipelines": { "type": "array", "items": { "type": "string" } }, "attemptedPipelines": { "type": "array", "items": { "type": "string" } }, "originalRunId": { "type": "string" }, "fromRunId": { "type": "string" }, "trigger": { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "provider-limit", "provider-cooldown", "agent-timeout" ] }, "failureRunId": { "type": "string" }, "limitedPipeline": { "type": "string" } }, "required": [ "reason", "failureRunId", "limitedPipeline" ], "additionalProperties": false } }, "required": [ "allowedPipelines", "attemptedPipelines", "originalRunId" ], "additionalProperties": false }, "reply": { "type": "string" }, "replyChannel": { "type": "string", "maxLength": 64 }, "replyPrincipal": { "type": "string", "maxLength": 256 }, "queue": { "type": "object", "properties": { "state": { "type": "string", "enum": ["queued", "claimed", "retired"] }, "claimedBy": { "type": "string" }, "claimedAt": { "type": "string" }, "firstHeartbeatAt": { "type": "string" }, "providerProcessStartedAt": { "type": "string" }, "startDeadlineAt": { "type": "string" }, "placement": { "type": "object", "properties": { "phase": { "type": "string", "enum": [ "waiting-for-placement", "bootstrapping", "unavailable" ] }, "reason": { "type": "string", "enum": [ "pending", "unschedulable", "scheduled", "inventory-unavailable", "launch-pending" ] }, "observedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "jobCreatedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["phase", "reason", "observedAt"], "additionalProperties": false } }, "required": ["state"], "additionalProperties": false }, "evidence": { "type": "object", "properties": { "source": { "type": "string", "const": "acp" }, "harness": { "default": "other", "type": "string", "enum": ["openclaw", "claude", "codex", "other"] }, "stopReason": { "default": "other", "type": "string", "enum": [ "end_turn", "max_tokens", "max_turn_requests", "refusal", "cancelled", "other" ] }, "toolCallCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "toolCalls": { "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "kind": { "default": "other", "type": "string", "enum": [ "read", "edit", "delete", "move", "search", "execute", "think", "fetch", "switch_mode", "other" ] }, "status": { "default": "other", "type": "string", "enum": [ "pending", "in_progress", "completed", "failed", "other" ] } }, "required": ["kind", "status"], "additionalProperties": false } }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "outputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "totalTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "thoughtTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedReadTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedWriteTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextWindow": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cost": { "type": "object", "properties": { "amount": { "type": "number", "minimum": 0, "maximum": 1000000 }, "currency": { "type": "string", "enum": [ "USD", "EUR", "GBP", "JPY", "CNY", "CAD", "AUD", "CHF" ] } }, "required": ["amount", "currency"], "additionalProperties": false } }, "additionalProperties": false }, "durationMs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "recordedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "source", "harness", "toolCallCount", "toolCalls", "recordedAt" ], "additionalProperties": false, "description": "What the run's worker saw its agent do; present on single-item reads of a run that reported it." } }, "required": [ "runId", "state", "pipeline", "priority", "createdAt", "updatedAt" ], "additionalProperties": false } }, "sessions": { "type": "array", "items": { "type": "object", "properties": { "sessionId": { "type": "string" }, "runId": { "type": "string" }, "startedAt": { "type": "string" }, "lastActivityAt": { "type": "string" }, "title": { "type": "string" }, "status": { "type": "string" }, "transcriptGcsUri": { "type": "string" } }, "required": [ "sessionId", "runId", "startedAt", "lastActivityAt" ], "additionalProperties": false } } }, "required": [ "id", "state", "spec", "origin", "createdAt", "updatedAt", "runs", "sessions" ], "additionalProperties": false } } } }, "403": { "description": "Principal may not request this pipeline", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Item exists with a different spec", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] }, "get": { "operationId": "getItem", "summary": "Read a work item", "description": "Requires `work.operator` or `work.reaper`, except claw work, which its admitting principal, holding `work.claw.admit` for its pipeline, may also read. A caller holding only `work.claw.admit` receives 404 for every item it may not read.", "tags": ["items"], "parameters": [ { "in": "path", "required": true, "name": "id", "schema": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "state": { "type": "string", "enum": [ "running", "done", "parked", "failed", "canceled" ] }, "spec": { "anyOf": [ { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] } }, "deliveryRuntime": { "type": "string", "enum": ["none", "required"] }, "deliverable": { "type": "string", "enum": ["report"] }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false } }, "required": [ "title", "description", "pipeline", "priority", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["inbox-summary", "handoff-summary"] }, "priority": { "type": "string", "const": "background" }, "sourceKey": { "type": "string", "minLength": 1, "maxLength": 256 } }, "required": [ "title", "description", "pipeline", "priority", "sourceKey" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "const": "goose" }, "priority": { "type": "string", "const": "background" }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false }, "jobOccurrence": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }, "required": [ "title", "description", "pipeline", "priority", "target", "jobOccurrence" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "priority": { "type": "string", "const": "background" }, "pipeline": {}, "agent": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+\\/[a-z][a-z0-9-]*$" }, "sourceKey": { "type": "string", "minLength": 1 } }, "required": [ "title", "description", "priority", "pipeline", "agent", "sourceKey" ], "additionalProperties": false } ] }, "origin": { "type": "object", "properties": { "principal": { "type": "string", "minLength": 1, "maxLength": 128 }, "channel": { "type": "string", "enum": [ "api", "cron", "console", "github", "linear", "slack" ] }, "thread": { "type": "string", "maxLength": 512 } }, "required": ["principal", "channel"], "additionalProperties": false }, "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "closedAt": { "type": "string" }, "providerRouting": { "type": "object", "properties": { "requestId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "requestedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "actor": { "type": "string", "minLength": 1, "maxLength": 128 }, "requestedPipeline": { "type": "string", "minLength": 1, "maxLength": 128 }, "effectivePipeline": { "type": "string", "minLength": 1, "maxLength": 128 }, "status": { "type": "string", "enum": ["accepted", "refused"] }, "reason": { "type": "string", "minLength": 1, "maxLength": 128 }, "fromRunId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "acceptedGeneration": { "type": "object", "properties": { "runId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "requestedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "pipeline": { "type": "string", "minLength": 1, "maxLength": 128 } }, "required": ["runId", "requestedAt", "pipeline"], "additionalProperties": false }, "successorRunId": { "type": "string", "minLength": 1, "maxLength": 1024 } }, "required": [ "requestId", "requestedAt", "actor", "requestedPipeline", "effectivePipeline", "status" ], "additionalProperties": false }, "runs": { "type": "array", "items": { "type": "object", "properties": { "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "triagePublication": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "pending", "complete", "superseded", "failed" ] }, "commentBody": { "type": "string", "maxLength": 65536 }, "commentId": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } ] }, "sourceComment": { "type": "object", "properties": { "id": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } ] }, "body": { "type": "string", "maxLength": 65536 }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["id", "body", "updatedAt"], "additionalProperties": false }, "addedLabels": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "dispatchRequested": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "dispatchObserved": { "type": "boolean" }, "error": { "type": "string", "maxLength": 400 } }, "required": ["state"], "additionalProperties": false }, "delivery": { "type": "object", "properties": { "runId": { "type": "string" }, "repo": { "type": "string" }, "number": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "baseRef": { "type": "string", "minLength": 1, "maxLength": 255 }, "head": { "type": "string", "pattern": "^[a-f0-9]{40}$" }, "state": { "type": "string", "enum": ["waiting", "complete"] }, "correctionRunId": { "type": "string" }, "observedAt": { "type": "string" }, "mergeCommit": { "type": "string", "pattern": "^[a-f0-9]{40}$" } }, "required": [ "runId", "repo", "number", "baseRef", "head", "state", "observedAt" ], "additionalProperties": false }, "runId": { "type": "string" }, "state": { "type": "string", "enum": [ "pending", "running", "finished", "canceled", "lost" ] }, "pipeline": { "type": "string" }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "result": { "type": "object", "properties": { "ok": { "type": "boolean" }, "summary": { "type": "string", "maxLength": 4096 }, "ref": { "type": "string", "maxLength": 1024 }, "relatedRefs": { "maxItems": 1, "type": "array", "items": { "type": "string", "maxLength": 1024 } }, "message": { "type": "string", "description": "The run message, including the saved report body for a report (final provider reply for legacy two-line reports). Single-item reads return it whole. Listings return its first 16,384 characters when messageOverflow is present." }, "messageOverflow": { "type": "object", "properties": { "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "chars": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "bytes": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "chunks": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "sha256", "chars", "bytes", "chunks" ], "additionalProperties": false, "description": "Present only when message is a preview; GET /items/{id} returns the whole message." }, "humanNeededActions": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "type": "object", "properties": { "text": { "type": "string", "minLength": 1, "maxLength": 400 }, "command": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": ["text"], "additionalProperties": false } } }, "required": ["ok"], "additionalProperties": false }, "sourceRevision": { "type": "object", "properties": { "key": { "type": "string" }, "input": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "observedAt": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "required": ["key", "input"], "additionalProperties": false }, "revisionAttempt": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "providerFallback": { "type": "object", "properties": { "allowedPipelines": { "type": "array", "items": { "type": "string" } }, "attemptedPipelines": { "type": "array", "items": { "type": "string" } }, "originalRunId": { "type": "string" }, "fromRunId": { "type": "string" }, "trigger": { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "provider-limit", "provider-cooldown", "agent-timeout" ] }, "failureRunId": { "type": "string" }, "limitedPipeline": { "type": "string" } }, "required": [ "reason", "failureRunId", "limitedPipeline" ], "additionalProperties": false } }, "required": [ "allowedPipelines", "attemptedPipelines", "originalRunId" ], "additionalProperties": false }, "reply": { "type": "string" }, "replyChannel": { "type": "string", "maxLength": 64 }, "replyPrincipal": { "type": "string", "maxLength": 256 }, "queue": { "type": "object", "properties": { "state": { "type": "string", "enum": ["queued", "claimed", "retired"] }, "claimedBy": { "type": "string" }, "claimedAt": { "type": "string" }, "firstHeartbeatAt": { "type": "string" }, "providerProcessStartedAt": { "type": "string" }, "startDeadlineAt": { "type": "string" }, "placement": { "type": "object", "properties": { "phase": { "type": "string", "enum": [ "waiting-for-placement", "bootstrapping", "unavailable" ] }, "reason": { "type": "string", "enum": [ "pending", "unschedulable", "scheduled", "inventory-unavailable", "launch-pending" ] }, "observedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "jobCreatedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["phase", "reason", "observedAt"], "additionalProperties": false } }, "required": ["state"], "additionalProperties": false }, "evidence": { "type": "object", "properties": { "source": { "type": "string", "const": "acp" }, "harness": { "default": "other", "type": "string", "enum": ["openclaw", "claude", "codex", "other"] }, "stopReason": { "default": "other", "type": "string", "enum": [ "end_turn", "max_tokens", "max_turn_requests", "refusal", "cancelled", "other" ] }, "toolCallCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "toolCalls": { "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "kind": { "default": "other", "type": "string", "enum": [ "read", "edit", "delete", "move", "search", "execute", "think", "fetch", "switch_mode", "other" ] }, "status": { "default": "other", "type": "string", "enum": [ "pending", "in_progress", "completed", "failed", "other" ] } }, "required": ["kind", "status"], "additionalProperties": false } }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "outputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "totalTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "thoughtTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedReadTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedWriteTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextWindow": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cost": { "type": "object", "properties": { "amount": { "type": "number", "minimum": 0, "maximum": 1000000 }, "currency": { "type": "string", "enum": [ "USD", "EUR", "GBP", "JPY", "CNY", "CAD", "AUD", "CHF" ] } }, "required": ["amount", "currency"], "additionalProperties": false } }, "additionalProperties": false }, "durationMs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "recordedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "source", "harness", "toolCallCount", "toolCalls", "recordedAt" ], "additionalProperties": false, "description": "What the run's worker saw its agent do; present on single-item reads of a run that reported it." } }, "required": [ "runId", "state", "pipeline", "priority", "createdAt", "updatedAt" ], "additionalProperties": false } }, "sessions": { "type": "array", "items": { "type": "object", "properties": { "sessionId": { "type": "string" }, "runId": { "type": "string" }, "startedAt": { "type": "string" }, "lastActivityAt": { "type": "string" }, "title": { "type": "string" }, "status": { "type": "string" }, "transcriptGcsUri": { "type": "string" } }, "required": [ "sessionId", "runId", "startedAt", "lastActivityAt" ], "additionalProperties": false } } }, "required": [ "id", "state", "spec", "origin", "createdAt", "updatedAt", "runs", "sessions" ], "additionalProperties": false } } } }, "404": { "description": "No such item", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] }, "patch": { "operationId": "updateItem", "summary": "Edit a work item's title and description", "tags": ["items"], "parameters": [ { "in": "path", "required": true, "name": "id", "schema": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 } }, "required": ["title", "description"] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "state": { "type": "string", "enum": [ "running", "done", "parked", "failed", "canceled" ] }, "spec": { "anyOf": [ { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] } }, "deliveryRuntime": { "type": "string", "enum": ["none", "required"] }, "deliverable": { "type": "string", "enum": ["report"] }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false } }, "required": [ "title", "description", "pipeline", "priority", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["inbox-summary", "handoff-summary"] }, "priority": { "type": "string", "const": "background" }, "sourceKey": { "type": "string", "minLength": 1, "maxLength": 256 } }, "required": [ "title", "description", "pipeline", "priority", "sourceKey" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "const": "goose" }, "priority": { "type": "string", "const": "background" }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false }, "jobOccurrence": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }, "required": [ "title", "description", "pipeline", "priority", "target", "jobOccurrence" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "priority": { "type": "string", "const": "background" }, "pipeline": {}, "agent": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+\\/[a-z][a-z0-9-]*$" }, "sourceKey": { "type": "string", "minLength": 1 } }, "required": [ "title", "description", "priority", "pipeline", "agent", "sourceKey" ], "additionalProperties": false } ] }, "origin": { "type": "object", "properties": { "principal": { "type": "string", "minLength": 1, "maxLength": 128 }, "channel": { "type": "string", "enum": [ "api", "cron", "console", "github", "linear", "slack" ] }, "thread": { "type": "string", "maxLength": 512 } }, "required": ["principal", "channel"], "additionalProperties": false }, "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "closedAt": { "type": "string" }, "providerRouting": { "type": "object", "properties": { "requestId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "requestedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "actor": { "type": "string", "minLength": 1, "maxLength": 128 }, "requestedPipeline": { "type": "string", "minLength": 1, "maxLength": 128 }, "effectivePipeline": { "type": "string", "minLength": 1, "maxLength": 128 }, "status": { "type": "string", "enum": ["accepted", "refused"] }, "reason": { "type": "string", "minLength": 1, "maxLength": 128 }, "fromRunId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "acceptedGeneration": { "type": "object", "properties": { "runId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "requestedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "pipeline": { "type": "string", "minLength": 1, "maxLength": 128 } }, "required": ["runId", "requestedAt", "pipeline"], "additionalProperties": false }, "successorRunId": { "type": "string", "minLength": 1, "maxLength": 1024 } }, "required": [ "requestId", "requestedAt", "actor", "requestedPipeline", "effectivePipeline", "status" ], "additionalProperties": false }, "runs": { "type": "array", "items": { "type": "object", "properties": { "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "triagePublication": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "pending", "complete", "superseded", "failed" ] }, "commentBody": { "type": "string", "maxLength": 65536 }, "commentId": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } ] }, "sourceComment": { "type": "object", "properties": { "id": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } ] }, "body": { "type": "string", "maxLength": 65536 }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["id", "body", "updatedAt"], "additionalProperties": false }, "addedLabels": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "dispatchRequested": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "dispatchObserved": { "type": "boolean" }, "error": { "type": "string", "maxLength": 400 } }, "required": ["state"], "additionalProperties": false }, "delivery": { "type": "object", "properties": { "runId": { "type": "string" }, "repo": { "type": "string" }, "number": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "baseRef": { "type": "string", "minLength": 1, "maxLength": 255 }, "head": { "type": "string", "pattern": "^[a-f0-9]{40}$" }, "state": { "type": "string", "enum": ["waiting", "complete"] }, "correctionRunId": { "type": "string" }, "observedAt": { "type": "string" }, "mergeCommit": { "type": "string", "pattern": "^[a-f0-9]{40}$" } }, "required": [ "runId", "repo", "number", "baseRef", "head", "state", "observedAt" ], "additionalProperties": false }, "runId": { "type": "string" }, "state": { "type": "string", "enum": [ "pending", "running", "finished", "canceled", "lost" ] }, "pipeline": { "type": "string" }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "result": { "type": "object", "properties": { "ok": { "type": "boolean" }, "summary": { "type": "string", "maxLength": 4096 }, "ref": { "type": "string", "maxLength": 1024 }, "relatedRefs": { "maxItems": 1, "type": "array", "items": { "type": "string", "maxLength": 1024 } }, "message": { "type": "string", "description": "The run message, including the saved report body for a report (final provider reply for legacy two-line reports). Single-item reads return it whole. Listings return its first 16,384 characters when messageOverflow is present." }, "messageOverflow": { "type": "object", "properties": { "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "chars": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "bytes": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "chunks": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "sha256", "chars", "bytes", "chunks" ], "additionalProperties": false, "description": "Present only when message is a preview; GET /items/{id} returns the whole message." }, "humanNeededActions": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "type": "object", "properties": { "text": { "type": "string", "minLength": 1, "maxLength": 400 }, "command": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": ["text"], "additionalProperties": false } } }, "required": ["ok"], "additionalProperties": false }, "sourceRevision": { "type": "object", "properties": { "key": { "type": "string" }, "input": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "observedAt": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "required": ["key", "input"], "additionalProperties": false }, "revisionAttempt": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "providerFallback": { "type": "object", "properties": { "allowedPipelines": { "type": "array", "items": { "type": "string" } }, "attemptedPipelines": { "type": "array", "items": { "type": "string" } }, "originalRunId": { "type": "string" }, "fromRunId": { "type": "string" }, "trigger": { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "provider-limit", "provider-cooldown", "agent-timeout" ] }, "failureRunId": { "type": "string" }, "limitedPipeline": { "type": "string" } }, "required": [ "reason", "failureRunId", "limitedPipeline" ], "additionalProperties": false } }, "required": [ "allowedPipelines", "attemptedPipelines", "originalRunId" ], "additionalProperties": false }, "reply": { "type": "string" }, "replyChannel": { "type": "string", "maxLength": 64 }, "replyPrincipal": { "type": "string", "maxLength": 256 }, "queue": { "type": "object", "properties": { "state": { "type": "string", "enum": ["queued", "claimed", "retired"] }, "claimedBy": { "type": "string" }, "claimedAt": { "type": "string" }, "firstHeartbeatAt": { "type": "string" }, "providerProcessStartedAt": { "type": "string" }, "startDeadlineAt": { "type": "string" }, "placement": { "type": "object", "properties": { "phase": { "type": "string", "enum": [ "waiting-for-placement", "bootstrapping", "unavailable" ] }, "reason": { "type": "string", "enum": [ "pending", "unschedulable", "scheduled", "inventory-unavailable", "launch-pending" ] }, "observedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "jobCreatedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["phase", "reason", "observedAt"], "additionalProperties": false } }, "required": ["state"], "additionalProperties": false }, "evidence": { "type": "object", "properties": { "source": { "type": "string", "const": "acp" }, "harness": { "default": "other", "type": "string", "enum": ["openclaw", "claude", "codex", "other"] }, "stopReason": { "default": "other", "type": "string", "enum": [ "end_turn", "max_tokens", "max_turn_requests", "refusal", "cancelled", "other" ] }, "toolCallCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "toolCalls": { "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "kind": { "default": "other", "type": "string", "enum": [ "read", "edit", "delete", "move", "search", "execute", "think", "fetch", "switch_mode", "other" ] }, "status": { "default": "other", "type": "string", "enum": [ "pending", "in_progress", "completed", "failed", "other" ] } }, "required": ["kind", "status"], "additionalProperties": false } }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "outputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "totalTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "thoughtTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedReadTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedWriteTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextWindow": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cost": { "type": "object", "properties": { "amount": { "type": "number", "minimum": 0, "maximum": 1000000 }, "currency": { "type": "string", "enum": [ "USD", "EUR", "GBP", "JPY", "CNY", "CAD", "AUD", "CHF" ] } }, "required": ["amount", "currency"], "additionalProperties": false } }, "additionalProperties": false }, "durationMs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "recordedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "source", "harness", "toolCallCount", "toolCalls", "recordedAt" ], "additionalProperties": false, "description": "What the run's worker saw its agent do; present on single-item reads of a run that reported it." } }, "required": [ "runId", "state", "pipeline", "priority", "createdAt", "updatedAt" ], "additionalProperties": false } }, "sessions": { "type": "array", "items": { "type": "object", "properties": { "sessionId": { "type": "string" }, "runId": { "type": "string" }, "startedAt": { "type": "string" }, "lastActivityAt": { "type": "string" }, "title": { "type": "string" }, "status": { "type": "string" }, "transcriptGcsUri": { "type": "string" } }, "required": [ "sessionId", "runId", "startedAt", "lastActivityAt" ], "additionalProperties": false } } }, "required": [ "id", "state", "spec", "origin", "createdAt", "updatedAt", "runs", "sessions" ], "additionalProperties": false } } } }, "404": { "description": "No such item", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "A run is live, so the item cannot be edited right now", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/claw/agents/{owner}/{repo}/{name}/runs": { "post": { "operationId": "admitAgentRun", "summary": "Admit a run of a repository-owned claw agent (work.claw.admit required)", "description": "Runs the agent cataloged at `.lcars/agents/{name}` of `{owner}/{repo}`. The round pins the enabled definition and the message. `sourceKey` names one Work item per caller: the same message (and `requestId`) returns its existing round, and a new one supersedes a queued round. Without `sourceKey` every call admits a new item. The report is the settled run message.", "tags": ["items"], "parameters": [ { "in": "path", "required": true, "name": "owner", "schema": { "type": "string", "pattern": "^[\\w.-]+$" } }, { "in": "path", "required": true, "name": "repo", "schema": { "type": "string", "pattern": "^[\\w.-]+$" } }, { "in": "path", "required": true, "name": "name", "schema": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "minLength": 1 }, "requestId": { "type": "string", "minLength": 1 }, "sourceKey": { "type": "string", "minLength": 1 } }, "required": ["message"] } } } }, "responses": { "202": { "description": "Admitted, or the existing round for this input.", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "state": { "type": "string", "enum": [ "running", "done", "parked", "failed", "canceled" ] }, "spec": { "anyOf": [ { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] } }, "deliveryRuntime": { "type": "string", "enum": ["none", "required"] }, "deliverable": { "type": "string", "enum": ["report"] }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false } }, "required": [ "title", "description", "pipeline", "priority", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["inbox-summary", "handoff-summary"] }, "priority": { "type": "string", "const": "background" }, "sourceKey": { "type": "string", "minLength": 1, "maxLength": 256 } }, "required": [ "title", "description", "pipeline", "priority", "sourceKey" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "const": "goose" }, "priority": { "type": "string", "const": "background" }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false }, "jobOccurrence": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }, "required": [ "title", "description", "pipeline", "priority", "target", "jobOccurrence" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "priority": { "type": "string", "const": "background" }, "pipeline": {}, "agent": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+\\/[a-z][a-z0-9-]*$" }, "sourceKey": { "type": "string", "minLength": 1 } }, "required": [ "title", "description", "priority", "pipeline", "agent", "sourceKey" ], "additionalProperties": false } ] }, "origin": { "type": "object", "properties": { "principal": { "type": "string", "minLength": 1, "maxLength": 128 }, "channel": { "type": "string", "enum": [ "api", "cron", "console", "github", "linear", "slack" ] }, "thread": { "type": "string", "maxLength": 512 } }, "required": ["principal", "channel"], "additionalProperties": false }, "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "closedAt": { "type": "string" }, "providerRouting": { "type": "object", "properties": { "requestId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "requestedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "actor": { "type": "string", "minLength": 1, "maxLength": 128 }, "requestedPipeline": { "type": "string", "minLength": 1, "maxLength": 128 }, "effectivePipeline": { "type": "string", "minLength": 1, "maxLength": 128 }, "status": { "type": "string", "enum": ["accepted", "refused"] }, "reason": { "type": "string", "minLength": 1, "maxLength": 128 }, "fromRunId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "acceptedGeneration": { "type": "object", "properties": { "runId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "requestedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "pipeline": { "type": "string", "minLength": 1, "maxLength": 128 } }, "required": ["runId", "requestedAt", "pipeline"], "additionalProperties": false }, "successorRunId": { "type": "string", "minLength": 1, "maxLength": 1024 } }, "required": [ "requestId", "requestedAt", "actor", "requestedPipeline", "effectivePipeline", "status" ], "additionalProperties": false }, "runs": { "type": "array", "items": { "type": "object", "properties": { "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "triagePublication": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "pending", "complete", "superseded", "failed" ] }, "commentBody": { "type": "string", "maxLength": 65536 }, "commentId": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } ] }, "sourceComment": { "type": "object", "properties": { "id": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } ] }, "body": { "type": "string", "maxLength": 65536 }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["id", "body", "updatedAt"], "additionalProperties": false }, "addedLabels": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "dispatchRequested": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "dispatchObserved": { "type": "boolean" }, "error": { "type": "string", "maxLength": 400 } }, "required": ["state"], "additionalProperties": false }, "delivery": { "type": "object", "properties": { "runId": { "type": "string" }, "repo": { "type": "string" }, "number": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "baseRef": { "type": "string", "minLength": 1, "maxLength": 255 }, "head": { "type": "string", "pattern": "^[a-f0-9]{40}$" }, "state": { "type": "string", "enum": ["waiting", "complete"] }, "correctionRunId": { "type": "string" }, "observedAt": { "type": "string" }, "mergeCommit": { "type": "string", "pattern": "^[a-f0-9]{40}$" } }, "required": [ "runId", "repo", "number", "baseRef", "head", "state", "observedAt" ], "additionalProperties": false }, "runId": { "type": "string" }, "state": { "type": "string", "enum": [ "pending", "running", "finished", "canceled", "lost" ] }, "pipeline": { "type": "string" }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "result": { "type": "object", "properties": { "ok": { "type": "boolean" }, "summary": { "type": "string", "maxLength": 4096 }, "ref": { "type": "string", "maxLength": 1024 }, "relatedRefs": { "maxItems": 1, "type": "array", "items": { "type": "string", "maxLength": 1024 } }, "message": { "type": "string", "description": "The run message, including the saved report body for a report (final provider reply for legacy two-line reports). Single-item reads return it whole. Listings return its first 16,384 characters when messageOverflow is present." }, "messageOverflow": { "type": "object", "properties": { "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "chars": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "bytes": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "chunks": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "sha256", "chars", "bytes", "chunks" ], "additionalProperties": false, "description": "Present only when message is a preview; GET /items/{id} returns the whole message." }, "humanNeededActions": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "type": "object", "properties": { "text": { "type": "string", "minLength": 1, "maxLength": 400 }, "command": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": ["text"], "additionalProperties": false } } }, "required": ["ok"], "additionalProperties": false }, "sourceRevision": { "type": "object", "properties": { "key": { "type": "string" }, "input": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "observedAt": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "required": ["key", "input"], "additionalProperties": false }, "revisionAttempt": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "providerFallback": { "type": "object", "properties": { "allowedPipelines": { "type": "array", "items": { "type": "string" } }, "attemptedPipelines": { "type": "array", "items": { "type": "string" } }, "originalRunId": { "type": "string" }, "fromRunId": { "type": "string" }, "trigger": { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "provider-limit", "provider-cooldown", "agent-timeout" ] }, "failureRunId": { "type": "string" }, "limitedPipeline": { "type": "string" } }, "required": [ "reason", "failureRunId", "limitedPipeline" ], "additionalProperties": false } }, "required": [ "allowedPipelines", "attemptedPipelines", "originalRunId" ], "additionalProperties": false }, "reply": { "type": "string" }, "replyChannel": { "type": "string", "maxLength": 64 }, "replyPrincipal": { "type": "string", "maxLength": 256 }, "queue": { "type": "object", "properties": { "state": { "type": "string", "enum": ["queued", "claimed", "retired"] }, "claimedBy": { "type": "string" }, "claimedAt": { "type": "string" }, "firstHeartbeatAt": { "type": "string" }, "providerProcessStartedAt": { "type": "string" }, "startDeadlineAt": { "type": "string" }, "placement": { "type": "object", "properties": { "phase": { "type": "string", "enum": [ "waiting-for-placement", "bootstrapping", "unavailable" ] }, "reason": { "type": "string", "enum": [ "pending", "unschedulable", "scheduled", "inventory-unavailable", "launch-pending" ] }, "observedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "jobCreatedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["phase", "reason", "observedAt"], "additionalProperties": false } }, "required": ["state"], "additionalProperties": false }, "evidence": { "type": "object", "properties": { "source": { "type": "string", "const": "acp" }, "harness": { "default": "other", "type": "string", "enum": ["openclaw", "claude", "codex", "other"] }, "stopReason": { "default": "other", "type": "string", "enum": [ "end_turn", "max_tokens", "max_turn_requests", "refusal", "cancelled", "other" ] }, "toolCallCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "toolCalls": { "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "kind": { "default": "other", "type": "string", "enum": [ "read", "edit", "delete", "move", "search", "execute", "think", "fetch", "switch_mode", "other" ] }, "status": { "default": "other", "type": "string", "enum": [ "pending", "in_progress", "completed", "failed", "other" ] } }, "required": ["kind", "status"], "additionalProperties": false } }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "outputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "totalTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "thoughtTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedReadTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedWriteTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextWindow": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cost": { "type": "object", "properties": { "amount": { "type": "number", "minimum": 0, "maximum": 1000000 }, "currency": { "type": "string", "enum": [ "USD", "EUR", "GBP", "JPY", "CNY", "CAD", "AUD", "CHF" ] } }, "required": ["amount", "currency"], "additionalProperties": false } }, "additionalProperties": false }, "durationMs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "recordedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "source", "harness", "toolCallCount", "toolCalls", "recordedAt" ], "additionalProperties": false, "description": "What the run's worker saw its agent do; present on single-item reads of a run that reported it." } }, "required": [ "runId", "state", "pipeline", "priority", "createdAt", "updatedAt" ], "additionalProperties": false } }, "sessions": { "type": "array", "items": { "type": "object", "properties": { "sessionId": { "type": "string" }, "runId": { "type": "string" }, "startedAt": { "type": "string" }, "lastActivityAt": { "type": "string" }, "title": { "type": "string" }, "status": { "type": "string" }, "transcriptGcsUri": { "type": "string" } }, "required": [ "sessionId", "runId", "startedAt", "lastActivityAt" ], "additionalProperties": false } } }, "required": [ "id", "state", "spec", "origin", "createdAt", "updatedAt", "runs", "sessions" ], "additionalProperties": false } } } }, "403": { "description": "Principal may not run this agent", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "No enabled agent by that name", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Source key names incompatible Work", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/items": { "get": { "operationId": "listItems", "summary": "List work items", "description": "Pages over native items newest-first. A response carrying `nextCursor` may still have more behind it -- pass that value back as `cursor` to continue. `state`/`principal`/`repo` filter each page after it is read, so an empty `items` array with a `nextCursor` present means \"none on this page\", not \"no more pages\" -- keep paging until `nextCursor` is absent to see every matching item (issue #1546).", "tags": ["items"], "parameters": [ { "in": "query", "name": "state", "schema": { "type": "string", "enum": ["running", "done", "parked", "failed", "canceled"] }, "allowEmptyValue": true, "allowReserved": true }, { "in": "query", "name": "principal", "schema": { "type": "string", "maxLength": 128 }, "allowEmptyValue": true, "allowReserved": true }, { "in": "query", "name": "repo", "schema": { "type": "string", "maxLength": 256 }, "allowEmptyValue": true, "allowReserved": true }, { "in": "query", "name": "limit", "schema": { "default": 50, "type": "integer", "minimum": 1, "maximum": 200 }, "allowEmptyValue": true, "allowReserved": true }, { "in": "query", "name": "cursor", "schema": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "allowEmptyValue": true, "allowReserved": true } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "state": { "type": "string", "enum": [ "running", "done", "parked", "failed", "canceled" ] }, "spec": { "anyOf": [ { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": [ "claude", "codex", "opencode", "agy" ] }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": [ "claude", "codex", "opencode", "agy" ] } }, "deliveryRuntime": { "type": "string", "enum": ["none", "required"] }, "deliverable": { "type": "string", "enum": ["report"] }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false } }, "required": [ "title", "description", "pipeline", "priority", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["inbox-summary", "handoff-summary"] }, "priority": { "type": "string", "const": "background" }, "sourceKey": { "type": "string", "minLength": 1, "maxLength": 256 } }, "required": [ "title", "description", "pipeline", "priority", "sourceKey" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "const": "goose" }, "priority": { "type": "string", "const": "background" }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false }, "jobOccurrence": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }, "required": [ "title", "description", "pipeline", "priority", "target", "jobOccurrence" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "priority": { "type": "string", "const": "background" }, "pipeline": {}, "agent": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+\\/[a-z][a-z0-9-]*$" }, "sourceKey": { "type": "string", "minLength": 1 } }, "required": [ "title", "description", "priority", "pipeline", "agent", "sourceKey" ], "additionalProperties": false } ] }, "origin": { "type": "object", "properties": { "principal": { "type": "string", "minLength": 1, "maxLength": 128 }, "channel": { "type": "string", "enum": [ "api", "cron", "console", "github", "linear", "slack" ] }, "thread": { "type": "string", "maxLength": 512 } }, "required": ["principal", "channel"], "additionalProperties": false }, "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "closedAt": { "type": "string" }, "providerRouting": { "type": "object", "properties": { "requestId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "requestedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "actor": { "type": "string", "minLength": 1, "maxLength": 128 }, "requestedPipeline": { "type": "string", "minLength": 1, "maxLength": 128 }, "effectivePipeline": { "type": "string", "minLength": 1, "maxLength": 128 }, "status": { "type": "string", "enum": ["accepted", "refused"] }, "reason": { "type": "string", "minLength": 1, "maxLength": 128 }, "fromRunId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "acceptedGeneration": { "type": "object", "properties": { "runId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "requestedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "pipeline": { "type": "string", "minLength": 1, "maxLength": 128 } }, "required": [ "runId", "requestedAt", "pipeline" ], "additionalProperties": false }, "successorRunId": { "type": "string", "minLength": 1, "maxLength": 1024 } }, "required": [ "requestId", "requestedAt", "actor", "requestedPipeline", "effectivePipeline", "status" ], "additionalProperties": false }, "runs": { "type": "array", "items": { "type": "object", "properties": { "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "tracker", "repo", "issue" ], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "state": { "type": "string", "enum": ["open", "closed"] }, "oversized": { "type": "boolean", "const": true } }, "required": [ "reference", "identifier", "url", "title", "state" ], "additionalProperties": false }, "triagePublication": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "pending", "complete", "superseded", "failed" ] }, "commentBody": { "type": "string", "maxLength": 65536 }, "commentId": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } ] }, "sourceComment": { "type": "object", "properties": { "id": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } ] }, "body": { "type": "string", "maxLength": 65536 }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["id", "body", "updatedAt"], "additionalProperties": false }, "addedLabels": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "dispatchRequested": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "dispatchObserved": { "type": "boolean" }, "error": { "type": "string", "maxLength": 400 } }, "required": ["state"], "additionalProperties": false }, "delivery": { "type": "object", "properties": { "runId": { "type": "string" }, "repo": { "type": "string" }, "number": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "baseRef": { "type": "string", "minLength": 1, "maxLength": 255 }, "head": { "type": "string", "pattern": "^[a-f0-9]{40}$" }, "state": { "type": "string", "enum": ["waiting", "complete"] }, "correctionRunId": { "type": "string" }, "observedAt": { "type": "string" }, "mergeCommit": { "type": "string", "pattern": "^[a-f0-9]{40}$" } }, "required": [ "runId", "repo", "number", "baseRef", "head", "state", "observedAt" ], "additionalProperties": false }, "runId": { "type": "string" }, "state": { "type": "string", "enum": [ "pending", "running", "finished", "canceled", "lost" ] }, "pipeline": { "type": "string" }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "result": { "type": "object", "properties": { "ok": { "type": "boolean" }, "summary": { "type": "string", "maxLength": 4096 }, "ref": { "type": "string", "maxLength": 1024 }, "relatedRefs": { "maxItems": 1, "type": "array", "items": { "type": "string", "maxLength": 1024 } }, "message": { "type": "string", "description": "The run message, including the saved report body for a report (final provider reply for legacy two-line reports). Single-item reads return it whole. Listings return its first 16,384 characters when messageOverflow is present." }, "messageOverflow": { "type": "object", "properties": { "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "chars": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "bytes": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "chunks": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "sha256", "chars", "bytes", "chunks" ], "additionalProperties": false, "description": "Present only when message is a preview; GET /items/{id} returns the whole message." }, "humanNeededActions": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "type": "object", "properties": { "text": { "type": "string", "minLength": 1, "maxLength": 400 }, "command": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": ["text"], "additionalProperties": false } } }, "required": ["ok"], "additionalProperties": false }, "sourceRevision": { "type": "object", "properties": { "key": { "type": "string" }, "input": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "observedAt": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "required": ["key", "input"], "additionalProperties": false }, "revisionAttempt": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "providerFallback": { "type": "object", "properties": { "allowedPipelines": { "type": "array", "items": { "type": "string" } }, "attemptedPipelines": { "type": "array", "items": { "type": "string" } }, "originalRunId": { "type": "string" }, "fromRunId": { "type": "string" }, "trigger": { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "provider-limit", "provider-cooldown", "agent-timeout" ] }, "failureRunId": { "type": "string" }, "limitedPipeline": { "type": "string" } }, "required": [ "reason", "failureRunId", "limitedPipeline" ], "additionalProperties": false } }, "required": [ "allowedPipelines", "attemptedPipelines", "originalRunId" ], "additionalProperties": false }, "reply": { "type": "string" }, "replyChannel": { "type": "string", "maxLength": 64 }, "replyPrincipal": { "type": "string", "maxLength": 256 }, "queue": { "type": "object", "properties": { "state": { "type": "string", "enum": ["queued", "claimed", "retired"] }, "claimedBy": { "type": "string" }, "claimedAt": { "type": "string" }, "firstHeartbeatAt": { "type": "string" }, "providerProcessStartedAt": { "type": "string" }, "startDeadlineAt": { "type": "string" }, "placement": { "type": "object", "properties": { "phase": { "type": "string", "enum": [ "waiting-for-placement", "bootstrapping", "unavailable" ] }, "reason": { "type": "string", "enum": [ "pending", "unschedulable", "scheduled", "inventory-unavailable", "launch-pending" ] }, "observedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "jobCreatedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "phase", "reason", "observedAt" ], "additionalProperties": false } }, "required": ["state"], "additionalProperties": false }, "evidence": { "type": "object", "properties": { "source": { "type": "string", "const": "acp" }, "harness": { "default": "other", "type": "string", "enum": [ "openclaw", "claude", "codex", "other" ] }, "stopReason": { "default": "other", "type": "string", "enum": [ "end_turn", "max_tokens", "max_turn_requests", "refusal", "cancelled", "other" ] }, "toolCallCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "toolCalls": { "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "kind": { "default": "other", "type": "string", "enum": [ "read", "edit", "delete", "move", "search", "execute", "think", "fetch", "switch_mode", "other" ] }, "status": { "default": "other", "type": "string", "enum": [ "pending", "in_progress", "completed", "failed", "other" ] } }, "required": ["kind", "status"], "additionalProperties": false } }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "outputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "totalTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "thoughtTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedReadTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedWriteTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextWindow": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cost": { "type": "object", "properties": { "amount": { "type": "number", "minimum": 0, "maximum": 1000000 }, "currency": { "type": "string", "enum": [ "USD", "EUR", "GBP", "JPY", "CNY", "CAD", "AUD", "CHF" ] } }, "required": ["amount", "currency"], "additionalProperties": false } }, "additionalProperties": false }, "durationMs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "recordedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "source", "harness", "toolCallCount", "toolCalls", "recordedAt" ], "additionalProperties": false, "description": "What the run's worker saw its agent do; present on single-item reads of a run that reported it." } }, "required": [ "runId", "state", "pipeline", "priority", "createdAt", "updatedAt" ], "additionalProperties": false } }, "sessions": { "type": "array", "items": { "type": "object", "properties": { "sessionId": { "type": "string" }, "runId": { "type": "string" }, "startedAt": { "type": "string" }, "lastActivityAt": { "type": "string" }, "title": { "type": "string" }, "status": { "type": "string" }, "transcriptGcsUri": { "type": "string" } }, "required": [ "sessionId", "runId", "startedAt", "lastActivityAt" ], "additionalProperties": false } } }, "required": [ "id", "state", "spec", "origin", "createdAt", "updatedAt", "runs", "sessions" ], "additionalProperties": false } }, "nextCursor": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" } }, "required": ["items"], "additionalProperties": false } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/items/{id}/cancel": { "post": { "operationId": "cancelItem", "summary": "Cancel a work item", "description": "Requires `work.operator`, except claw work, which only its admitting principal, holding `work.claw.admit` for its pipeline, may cancel. A caller holding only `work.claw.admit` receives 404 for every item it may not cancel.", "tags": ["items"], "parameters": [ { "in": "path", "required": true, "name": "id", "schema": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "state": { "type": "string", "enum": [ "running", "done", "parked", "failed", "canceled" ] }, "spec": { "anyOf": [ { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] } }, "deliveryRuntime": { "type": "string", "enum": ["none", "required"] }, "deliverable": { "type": "string", "enum": ["report"] }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false } }, "required": [ "title", "description", "pipeline", "priority", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["inbox-summary", "handoff-summary"] }, "priority": { "type": "string", "const": "background" }, "sourceKey": { "type": "string", "minLength": 1, "maxLength": 256 } }, "required": [ "title", "description", "pipeline", "priority", "sourceKey" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "const": "goose" }, "priority": { "type": "string", "const": "background" }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false }, "jobOccurrence": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }, "required": [ "title", "description", "pipeline", "priority", "target", "jobOccurrence" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "priority": { "type": "string", "const": "background" }, "pipeline": {}, "agent": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+\\/[a-z][a-z0-9-]*$" }, "sourceKey": { "type": "string", "minLength": 1 } }, "required": [ "title", "description", "priority", "pipeline", "agent", "sourceKey" ], "additionalProperties": false } ] }, "origin": { "type": "object", "properties": { "principal": { "type": "string", "minLength": 1, "maxLength": 128 }, "channel": { "type": "string", "enum": [ "api", "cron", "console", "github", "linear", "slack" ] }, "thread": { "type": "string", "maxLength": 512 } }, "required": ["principal", "channel"], "additionalProperties": false }, "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "closedAt": { "type": "string" }, "providerRouting": { "type": "object", "properties": { "requestId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "requestedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "actor": { "type": "string", "minLength": 1, "maxLength": 128 }, "requestedPipeline": { "type": "string", "minLength": 1, "maxLength": 128 }, "effectivePipeline": { "type": "string", "minLength": 1, "maxLength": 128 }, "status": { "type": "string", "enum": ["accepted", "refused"] }, "reason": { "type": "string", "minLength": 1, "maxLength": 128 }, "fromRunId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "acceptedGeneration": { "type": "object", "properties": { "runId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "requestedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "pipeline": { "type": "string", "minLength": 1, "maxLength": 128 } }, "required": ["runId", "requestedAt", "pipeline"], "additionalProperties": false }, "successorRunId": { "type": "string", "minLength": 1, "maxLength": 1024 } }, "required": [ "requestId", "requestedAt", "actor", "requestedPipeline", "effectivePipeline", "status" ], "additionalProperties": false }, "runs": { "type": "array", "items": { "type": "object", "properties": { "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "triagePublication": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "pending", "complete", "superseded", "failed" ] }, "commentBody": { "type": "string", "maxLength": 65536 }, "commentId": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } ] }, "sourceComment": { "type": "object", "properties": { "id": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } ] }, "body": { "type": "string", "maxLength": 65536 }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["id", "body", "updatedAt"], "additionalProperties": false }, "addedLabels": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "dispatchRequested": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "dispatchObserved": { "type": "boolean" }, "error": { "type": "string", "maxLength": 400 } }, "required": ["state"], "additionalProperties": false }, "delivery": { "type": "object", "properties": { "runId": { "type": "string" }, "repo": { "type": "string" }, "number": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "baseRef": { "type": "string", "minLength": 1, "maxLength": 255 }, "head": { "type": "string", "pattern": "^[a-f0-9]{40}$" }, "state": { "type": "string", "enum": ["waiting", "complete"] }, "correctionRunId": { "type": "string" }, "observedAt": { "type": "string" }, "mergeCommit": { "type": "string", "pattern": "^[a-f0-9]{40}$" } }, "required": [ "runId", "repo", "number", "baseRef", "head", "state", "observedAt" ], "additionalProperties": false }, "runId": { "type": "string" }, "state": { "type": "string", "enum": [ "pending", "running", "finished", "canceled", "lost" ] }, "pipeline": { "type": "string" }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "result": { "type": "object", "properties": { "ok": { "type": "boolean" }, "summary": { "type": "string", "maxLength": 4096 }, "ref": { "type": "string", "maxLength": 1024 }, "relatedRefs": { "maxItems": 1, "type": "array", "items": { "type": "string", "maxLength": 1024 } }, "message": { "type": "string", "description": "The run message, including the saved report body for a report (final provider reply for legacy two-line reports). Single-item reads return it whole. Listings return its first 16,384 characters when messageOverflow is present." }, "messageOverflow": { "type": "object", "properties": { "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "chars": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "bytes": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "chunks": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "sha256", "chars", "bytes", "chunks" ], "additionalProperties": false, "description": "Present only when message is a preview; GET /items/{id} returns the whole message." }, "humanNeededActions": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "type": "object", "properties": { "text": { "type": "string", "minLength": 1, "maxLength": 400 }, "command": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": ["text"], "additionalProperties": false } } }, "required": ["ok"], "additionalProperties": false }, "sourceRevision": { "type": "object", "properties": { "key": { "type": "string" }, "input": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "observedAt": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "required": ["key", "input"], "additionalProperties": false }, "revisionAttempt": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "providerFallback": { "type": "object", "properties": { "allowedPipelines": { "type": "array", "items": { "type": "string" } }, "attemptedPipelines": { "type": "array", "items": { "type": "string" } }, "originalRunId": { "type": "string" }, "fromRunId": { "type": "string" }, "trigger": { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "provider-limit", "provider-cooldown", "agent-timeout" ] }, "failureRunId": { "type": "string" }, "limitedPipeline": { "type": "string" } }, "required": [ "reason", "failureRunId", "limitedPipeline" ], "additionalProperties": false } }, "required": [ "allowedPipelines", "attemptedPipelines", "originalRunId" ], "additionalProperties": false }, "reply": { "type": "string" }, "replyChannel": { "type": "string", "maxLength": 64 }, "replyPrincipal": { "type": "string", "maxLength": 256 }, "queue": { "type": "object", "properties": { "state": { "type": "string", "enum": ["queued", "claimed", "retired"] }, "claimedBy": { "type": "string" }, "claimedAt": { "type": "string" }, "firstHeartbeatAt": { "type": "string" }, "providerProcessStartedAt": { "type": "string" }, "startDeadlineAt": { "type": "string" }, "placement": { "type": "object", "properties": { "phase": { "type": "string", "enum": [ "waiting-for-placement", "bootstrapping", "unavailable" ] }, "reason": { "type": "string", "enum": [ "pending", "unschedulable", "scheduled", "inventory-unavailable", "launch-pending" ] }, "observedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "jobCreatedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["phase", "reason", "observedAt"], "additionalProperties": false } }, "required": ["state"], "additionalProperties": false }, "evidence": { "type": "object", "properties": { "source": { "type": "string", "const": "acp" }, "harness": { "default": "other", "type": "string", "enum": ["openclaw", "claude", "codex", "other"] }, "stopReason": { "default": "other", "type": "string", "enum": [ "end_turn", "max_tokens", "max_turn_requests", "refusal", "cancelled", "other" ] }, "toolCallCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "toolCalls": { "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "kind": { "default": "other", "type": "string", "enum": [ "read", "edit", "delete", "move", "search", "execute", "think", "fetch", "switch_mode", "other" ] }, "status": { "default": "other", "type": "string", "enum": [ "pending", "in_progress", "completed", "failed", "other" ] } }, "required": ["kind", "status"], "additionalProperties": false } }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "outputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "totalTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "thoughtTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedReadTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedWriteTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextWindow": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cost": { "type": "object", "properties": { "amount": { "type": "number", "minimum": 0, "maximum": 1000000 }, "currency": { "type": "string", "enum": [ "USD", "EUR", "GBP", "JPY", "CNY", "CAD", "AUD", "CHF" ] } }, "required": ["amount", "currency"], "additionalProperties": false } }, "additionalProperties": false }, "durationMs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "recordedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "source", "harness", "toolCallCount", "toolCalls", "recordedAt" ], "additionalProperties": false, "description": "What the run's worker saw its agent do; present on single-item reads of a run that reported it." } }, "required": [ "runId", "state", "pipeline", "priority", "createdAt", "updatedAt" ], "additionalProperties": false } }, "sessions": { "type": "array", "items": { "type": "object", "properties": { "sessionId": { "type": "string" }, "runId": { "type": "string" }, "startedAt": { "type": "string" }, "lastActivityAt": { "type": "string" }, "title": { "type": "string" }, "status": { "type": "string" }, "transcriptGcsUri": { "type": "string" } }, "required": [ "sessionId", "runId", "startedAt", "lastActivityAt" ], "additionalProperties": false } } }, "required": [ "id", "state", "spec", "origin", "createdAt", "updatedAt", "runs", "sessions" ], "additionalProperties": false } } } }, "403": { "description": "Principal may not cancel this item", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "No such item", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Item already settled", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/items/{id}/redispatch": { "post": { "operationId": "redispatchItem", "summary": "Mint a fresh run for a parked or failed item", "tags": ["items"], "parameters": [ { "in": "path", "required": true, "name": "id", "schema": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "resumeSessionId": { "type": "string", "minLength": 1, "maxLength": 256 }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] } } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "state": { "type": "string", "enum": [ "running", "done", "parked", "failed", "canceled" ] }, "spec": { "anyOf": [ { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] } }, "deliveryRuntime": { "type": "string", "enum": ["none", "required"] }, "deliverable": { "type": "string", "enum": ["report"] }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false } }, "required": [ "title", "description", "pipeline", "priority", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["inbox-summary", "handoff-summary"] }, "priority": { "type": "string", "const": "background" }, "sourceKey": { "type": "string", "minLength": 1, "maxLength": 256 } }, "required": [ "title", "description", "pipeline", "priority", "sourceKey" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "const": "goose" }, "priority": { "type": "string", "const": "background" }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false }, "jobOccurrence": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }, "required": [ "title", "description", "pipeline", "priority", "target", "jobOccurrence" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "priority": { "type": "string", "const": "background" }, "pipeline": {}, "agent": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+\\/[a-z][a-z0-9-]*$" }, "sourceKey": { "type": "string", "minLength": 1 } }, "required": [ "title", "description", "priority", "pipeline", "agent", "sourceKey" ], "additionalProperties": false } ] }, "origin": { "type": "object", "properties": { "principal": { "type": "string", "minLength": 1, "maxLength": 128 }, "channel": { "type": "string", "enum": [ "api", "cron", "console", "github", "linear", "slack" ] }, "thread": { "type": "string", "maxLength": 512 } }, "required": ["principal", "channel"], "additionalProperties": false }, "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "closedAt": { "type": "string" }, "providerRouting": { "type": "object", "properties": { "requestId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "requestedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "actor": { "type": "string", "minLength": 1, "maxLength": 128 }, "requestedPipeline": { "type": "string", "minLength": 1, "maxLength": 128 }, "effectivePipeline": { "type": "string", "minLength": 1, "maxLength": 128 }, "status": { "type": "string", "enum": ["accepted", "refused"] }, "reason": { "type": "string", "minLength": 1, "maxLength": 128 }, "fromRunId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "acceptedGeneration": { "type": "object", "properties": { "runId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "requestedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "pipeline": { "type": "string", "minLength": 1, "maxLength": 128 } }, "required": ["runId", "requestedAt", "pipeline"], "additionalProperties": false }, "successorRunId": { "type": "string", "minLength": 1, "maxLength": 1024 } }, "required": [ "requestId", "requestedAt", "actor", "requestedPipeline", "effectivePipeline", "status" ], "additionalProperties": false }, "runs": { "type": "array", "items": { "type": "object", "properties": { "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "triagePublication": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "pending", "complete", "superseded", "failed" ] }, "commentBody": { "type": "string", "maxLength": 65536 }, "commentId": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } ] }, "sourceComment": { "type": "object", "properties": { "id": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } ] }, "body": { "type": "string", "maxLength": 65536 }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["id", "body", "updatedAt"], "additionalProperties": false }, "addedLabels": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "dispatchRequested": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "dispatchObserved": { "type": "boolean" }, "error": { "type": "string", "maxLength": 400 } }, "required": ["state"], "additionalProperties": false }, "delivery": { "type": "object", "properties": { "runId": { "type": "string" }, "repo": { "type": "string" }, "number": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "baseRef": { "type": "string", "minLength": 1, "maxLength": 255 }, "head": { "type": "string", "pattern": "^[a-f0-9]{40}$" }, "state": { "type": "string", "enum": ["waiting", "complete"] }, "correctionRunId": { "type": "string" }, "observedAt": { "type": "string" }, "mergeCommit": { "type": "string", "pattern": "^[a-f0-9]{40}$" } }, "required": [ "runId", "repo", "number", "baseRef", "head", "state", "observedAt" ], "additionalProperties": false }, "runId": { "type": "string" }, "state": { "type": "string", "enum": [ "pending", "running", "finished", "canceled", "lost" ] }, "pipeline": { "type": "string" }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "result": { "type": "object", "properties": { "ok": { "type": "boolean" }, "summary": { "type": "string", "maxLength": 4096 }, "ref": { "type": "string", "maxLength": 1024 }, "relatedRefs": { "maxItems": 1, "type": "array", "items": { "type": "string", "maxLength": 1024 } }, "message": { "type": "string", "description": "The run message, including the saved report body for a report (final provider reply for legacy two-line reports). Single-item reads return it whole. Listings return its first 16,384 characters when messageOverflow is present." }, "messageOverflow": { "type": "object", "properties": { "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "chars": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "bytes": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "chunks": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "sha256", "chars", "bytes", "chunks" ], "additionalProperties": false, "description": "Present only when message is a preview; GET /items/{id} returns the whole message." }, "humanNeededActions": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "type": "object", "properties": { "text": { "type": "string", "minLength": 1, "maxLength": 400 }, "command": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": ["text"], "additionalProperties": false } } }, "required": ["ok"], "additionalProperties": false }, "sourceRevision": { "type": "object", "properties": { "key": { "type": "string" }, "input": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "observedAt": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "required": ["key", "input"], "additionalProperties": false }, "revisionAttempt": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "providerFallback": { "type": "object", "properties": { "allowedPipelines": { "type": "array", "items": { "type": "string" } }, "attemptedPipelines": { "type": "array", "items": { "type": "string" } }, "originalRunId": { "type": "string" }, "fromRunId": { "type": "string" }, "trigger": { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "provider-limit", "provider-cooldown", "agent-timeout" ] }, "failureRunId": { "type": "string" }, "limitedPipeline": { "type": "string" } }, "required": [ "reason", "failureRunId", "limitedPipeline" ], "additionalProperties": false } }, "required": [ "allowedPipelines", "attemptedPipelines", "originalRunId" ], "additionalProperties": false }, "reply": { "type": "string" }, "replyChannel": { "type": "string", "maxLength": 64 }, "replyPrincipal": { "type": "string", "maxLength": 256 }, "queue": { "type": "object", "properties": { "state": { "type": "string", "enum": ["queued", "claimed", "retired"] }, "claimedBy": { "type": "string" }, "claimedAt": { "type": "string" }, "firstHeartbeatAt": { "type": "string" }, "providerProcessStartedAt": { "type": "string" }, "startDeadlineAt": { "type": "string" }, "placement": { "type": "object", "properties": { "phase": { "type": "string", "enum": [ "waiting-for-placement", "bootstrapping", "unavailable" ] }, "reason": { "type": "string", "enum": [ "pending", "unschedulable", "scheduled", "inventory-unavailable", "launch-pending" ] }, "observedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "jobCreatedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["phase", "reason", "observedAt"], "additionalProperties": false } }, "required": ["state"], "additionalProperties": false }, "evidence": { "type": "object", "properties": { "source": { "type": "string", "const": "acp" }, "harness": { "default": "other", "type": "string", "enum": ["openclaw", "claude", "codex", "other"] }, "stopReason": { "default": "other", "type": "string", "enum": [ "end_turn", "max_tokens", "max_turn_requests", "refusal", "cancelled", "other" ] }, "toolCallCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "toolCalls": { "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "kind": { "default": "other", "type": "string", "enum": [ "read", "edit", "delete", "move", "search", "execute", "think", "fetch", "switch_mode", "other" ] }, "status": { "default": "other", "type": "string", "enum": [ "pending", "in_progress", "completed", "failed", "other" ] } }, "required": ["kind", "status"], "additionalProperties": false } }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "outputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "totalTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "thoughtTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedReadTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedWriteTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextWindow": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cost": { "type": "object", "properties": { "amount": { "type": "number", "minimum": 0, "maximum": 1000000 }, "currency": { "type": "string", "enum": [ "USD", "EUR", "GBP", "JPY", "CNY", "CAD", "AUD", "CHF" ] } }, "required": ["amount", "currency"], "additionalProperties": false } }, "additionalProperties": false }, "durationMs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "recordedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "source", "harness", "toolCallCount", "toolCalls", "recordedAt" ], "additionalProperties": false, "description": "What the run's worker saw its agent do; present on single-item reads of a run that reported it." } }, "required": [ "runId", "state", "pipeline", "priority", "createdAt", "updatedAt" ], "additionalProperties": false } }, "sessions": { "type": "array", "items": { "type": "object", "properties": { "sessionId": { "type": "string" }, "runId": { "type": "string" }, "startedAt": { "type": "string" }, "lastActivityAt": { "type": "string" }, "title": { "type": "string" }, "status": { "type": "string" }, "transcriptGcsUri": { "type": "string" } }, "required": [ "sessionId", "runId", "startedAt", "lastActivityAt" ], "additionalProperties": false } } }, "required": [ "id", "state", "spec", "origin", "createdAt", "updatedAt", "runs", "sessions" ], "additionalProperties": false } } } }, "400": { "description": "resumeSessionId does not name a resumable session for this item", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/BadRequest" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "Principal may not request this pipeline or repository", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "No such item", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Only a parked or failed item can be redispatched, or the named session has no archived transcript", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/items/{id}/reply": { "post": { "operationId": "replyToItem", "summary": "Answer a stopped item's agent and resume its session", "tags": ["items"], "parameters": [ { "in": "path", "required": true, "name": "id", "schema": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "text": { "type": "string", "minLength": 1 }, "requestId": { "type": "string", "minLength": 1, "maxLength": 128 }, "expectedParkedRunId": { "description": "Only admit a new reply if this park still owns the decision.", "type": "string", "minLength": 1, "maxLength": 256 }, "resume": { "type": "boolean" }, "pipeline": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] } } }, "required": ["text"] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "state": { "type": "string", "enum": [ "running", "done", "parked", "failed", "canceled" ] }, "spec": { "anyOf": [ { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] } }, "deliveryRuntime": { "type": "string", "enum": ["none", "required"] }, "deliverable": { "type": "string", "enum": ["report"] }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false } }, "required": [ "title", "description", "pipeline", "priority", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["inbox-summary", "handoff-summary"] }, "priority": { "type": "string", "const": "background" }, "sourceKey": { "type": "string", "minLength": 1, "maxLength": 256 } }, "required": [ "title", "description", "pipeline", "priority", "sourceKey" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "const": "goose" }, "priority": { "type": "string", "const": "background" }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false }, "jobOccurrence": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }, "required": [ "title", "description", "pipeline", "priority", "target", "jobOccurrence" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "priority": { "type": "string", "const": "background" }, "pipeline": {}, "agent": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+\\/[a-z][a-z0-9-]*$" }, "sourceKey": { "type": "string", "minLength": 1 } }, "required": [ "title", "description", "priority", "pipeline", "agent", "sourceKey" ], "additionalProperties": false } ] }, "origin": { "type": "object", "properties": { "principal": { "type": "string", "minLength": 1, "maxLength": 128 }, "channel": { "type": "string", "enum": [ "api", "cron", "console", "github", "linear", "slack" ] }, "thread": { "type": "string", "maxLength": 512 } }, "required": ["principal", "channel"], "additionalProperties": false }, "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "closedAt": { "type": "string" }, "providerRouting": { "type": "object", "properties": { "requestId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "requestedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "actor": { "type": "string", "minLength": 1, "maxLength": 128 }, "requestedPipeline": { "type": "string", "minLength": 1, "maxLength": 128 }, "effectivePipeline": { "type": "string", "minLength": 1, "maxLength": 128 }, "status": { "type": "string", "enum": ["accepted", "refused"] }, "reason": { "type": "string", "minLength": 1, "maxLength": 128 }, "fromRunId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "acceptedGeneration": { "type": "object", "properties": { "runId": { "type": "string", "minLength": 1, "maxLength": 1024 }, "requestedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "pipeline": { "type": "string", "minLength": 1, "maxLength": 128 } }, "required": ["runId", "requestedAt", "pipeline"], "additionalProperties": false }, "successorRunId": { "type": "string", "minLength": 1, "maxLength": 1024 } }, "required": [ "requestId", "requestedAt", "actor", "requestedPipeline", "effectivePipeline", "status" ], "additionalProperties": false }, "runs": { "type": "array", "items": { "type": "object", "properties": { "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "triagePublication": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "pending", "complete", "superseded", "failed" ] }, "commentBody": { "type": "string", "maxLength": 65536 }, "commentId": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } ] }, "sourceComment": { "type": "object", "properties": { "id": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } ] }, "body": { "type": "string", "maxLength": 65536 }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["id", "body", "updatedAt"], "additionalProperties": false }, "addedLabels": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "dispatchRequested": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "dispatchObserved": { "type": "boolean" }, "error": { "type": "string", "maxLength": 400 } }, "required": ["state"], "additionalProperties": false }, "delivery": { "type": "object", "properties": { "runId": { "type": "string" }, "repo": { "type": "string" }, "number": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "baseRef": { "type": "string", "minLength": 1, "maxLength": 255 }, "head": { "type": "string", "pattern": "^[a-f0-9]{40}$" }, "state": { "type": "string", "enum": ["waiting", "complete"] }, "correctionRunId": { "type": "string" }, "observedAt": { "type": "string" }, "mergeCommit": { "type": "string", "pattern": "^[a-f0-9]{40}$" } }, "required": [ "runId", "repo", "number", "baseRef", "head", "state", "observedAt" ], "additionalProperties": false }, "runId": { "type": "string" }, "state": { "type": "string", "enum": [ "pending", "running", "finished", "canceled", "lost" ] }, "pipeline": { "type": "string" }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "result": { "type": "object", "properties": { "ok": { "type": "boolean" }, "summary": { "type": "string", "maxLength": 4096 }, "ref": { "type": "string", "maxLength": 1024 }, "relatedRefs": { "maxItems": 1, "type": "array", "items": { "type": "string", "maxLength": 1024 } }, "message": { "type": "string", "description": "The run message, including the saved report body for a report (final provider reply for legacy two-line reports). Single-item reads return it whole. Listings return its first 16,384 characters when messageOverflow is present." }, "messageOverflow": { "type": "object", "properties": { "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "chars": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "bytes": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "chunks": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "sha256", "chars", "bytes", "chunks" ], "additionalProperties": false, "description": "Present only when message is a preview; GET /items/{id} returns the whole message." }, "humanNeededActions": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "type": "object", "properties": { "text": { "type": "string", "minLength": 1, "maxLength": 400 }, "command": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": ["text"], "additionalProperties": false } } }, "required": ["ok"], "additionalProperties": false }, "sourceRevision": { "type": "object", "properties": { "key": { "type": "string" }, "input": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "observedAt": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "required": ["key", "input"], "additionalProperties": false }, "revisionAttempt": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "providerFallback": { "type": "object", "properties": { "allowedPipelines": { "type": "array", "items": { "type": "string" } }, "attemptedPipelines": { "type": "array", "items": { "type": "string" } }, "originalRunId": { "type": "string" }, "fromRunId": { "type": "string" }, "trigger": { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "provider-limit", "provider-cooldown", "agent-timeout" ] }, "failureRunId": { "type": "string" }, "limitedPipeline": { "type": "string" } }, "required": [ "reason", "failureRunId", "limitedPipeline" ], "additionalProperties": false } }, "required": [ "allowedPipelines", "attemptedPipelines", "originalRunId" ], "additionalProperties": false }, "reply": { "type": "string" }, "replyChannel": { "type": "string", "maxLength": 64 }, "replyPrincipal": { "type": "string", "maxLength": 256 }, "queue": { "type": "object", "properties": { "state": { "type": "string", "enum": ["queued", "claimed", "retired"] }, "claimedBy": { "type": "string" }, "claimedAt": { "type": "string" }, "firstHeartbeatAt": { "type": "string" }, "providerProcessStartedAt": { "type": "string" }, "startDeadlineAt": { "type": "string" }, "placement": { "type": "object", "properties": { "phase": { "type": "string", "enum": [ "waiting-for-placement", "bootstrapping", "unavailable" ] }, "reason": { "type": "string", "enum": [ "pending", "unschedulable", "scheduled", "inventory-unavailable", "launch-pending" ] }, "observedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "jobCreatedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["phase", "reason", "observedAt"], "additionalProperties": false } }, "required": ["state"], "additionalProperties": false }, "evidence": { "type": "object", "properties": { "source": { "type": "string", "const": "acp" }, "harness": { "default": "other", "type": "string", "enum": ["openclaw", "claude", "codex", "other"] }, "stopReason": { "default": "other", "type": "string", "enum": [ "end_turn", "max_tokens", "max_turn_requests", "refusal", "cancelled", "other" ] }, "toolCallCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "toolCalls": { "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "kind": { "default": "other", "type": "string", "enum": [ "read", "edit", "delete", "move", "search", "execute", "think", "fetch", "switch_mode", "other" ] }, "status": { "default": "other", "type": "string", "enum": [ "pending", "in_progress", "completed", "failed", "other" ] } }, "required": ["kind", "status"], "additionalProperties": false } }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "outputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "totalTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "thoughtTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedReadTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedWriteTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextWindow": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cost": { "type": "object", "properties": { "amount": { "type": "number", "minimum": 0, "maximum": 1000000 }, "currency": { "type": "string", "enum": [ "USD", "EUR", "GBP", "JPY", "CNY", "CAD", "AUD", "CHF" ] } }, "required": ["amount", "currency"], "additionalProperties": false } }, "additionalProperties": false }, "durationMs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "recordedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "source", "harness", "toolCallCount", "toolCalls", "recordedAt" ], "additionalProperties": false, "description": "What the run's worker saw its agent do; present on single-item reads of a run that reported it." } }, "required": [ "runId", "state", "pipeline", "priority", "createdAt", "updatedAt" ], "additionalProperties": false } }, "sessions": { "type": "array", "items": { "type": "object", "properties": { "sessionId": { "type": "string" }, "runId": { "type": "string" }, "startedAt": { "type": "string" }, "lastActivityAt": { "type": "string" }, "title": { "type": "string" }, "status": { "type": "string" }, "transcriptGcsUri": { "type": "string" } }, "required": [ "sessionId", "runId", "startedAt", "lastActivityAt" ], "additionalProperties": false } }, "admittedRunId": { "type": "string", "description": "Run admitted by this reply, independent of current item history" }, "resumed": { "type": "boolean" } }, "required": [ "id", "state", "spec", "origin", "createdAt", "updatedAt", "runs", "sessions", "admittedRunId", "resumed" ], "additionalProperties": false } } } }, "403": { "description": "Principal may not request this pipeline or repository", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "No such item", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "The item cannot take a reply in its current state", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/schedules/{id}": { "put": { "operationId": "createSchedule", "summary": "Create a cron schedule (idempotent by client ULID)", "tags": ["schedules"], "parameters": [ { "in": "path", "required": true, "name": "id", "schema": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "cron": { "type": "string", "minLength": 1, "maxLength": 64 }, "spec": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] } }, "deliveryRuntime": { "type": "string", "enum": ["none", "required"] }, "deliverable": { "type": "string", "enum": ["report"] }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false } }, "required": ["title", "description", "pipeline", "target"], "additionalProperties": false }, "enabled": { "type": "boolean" } }, "required": ["cron", "spec"] } } } }, "responses": { "201": { "description": "Created. A replay of the same id, cron, and spec returns the existing schedule.", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "cron": { "type": "string" }, "spec": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] } }, "deliveryRuntime": { "type": "string", "enum": ["none", "required"] }, "deliverable": { "type": "string", "enum": ["report"] }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false } }, "required": [ "title", "description", "pipeline", "priority", "target" ], "additionalProperties": false }, "enabled": { "type": "boolean" }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "lastSlotAt": { "type": "string" }, "lastItemId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "disabledReason": { "type": "string", "enum": ["grant-revoked", "operator", "invalid"] }, "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "nextDueAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "pendingItemId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "lastClosedSlotAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "cron", "enabled", "createdBy", "createdAt", "updatedAt", "revision" ], "additionalProperties": false } } } }, "400": { "description": "Malformed cron expression", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/BadRequest" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "Principal may not request this pipeline", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Schedule exists with a different cron or spec", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] }, "patch": { "operationId": "updateSchedule", "summary": "Edit a schedule at its current configuration revision", "tags": ["schedules"], "parameters": [ { "in": "path", "required": true, "name": "id", "schema": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "expectedRevision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cron": { "type": "string", "minLength": 1, "maxLength": 64 }, "spec": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] } }, "deliveryRuntime": { "type": "string", "enum": ["none", "required"] }, "deliverable": { "type": "string", "enum": ["report"] }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false } }, "required": ["title", "description", "pipeline", "target"], "additionalProperties": false }, "enabled": { "type": "boolean" } }, "required": ["expectedRevision", "cron", "spec", "enabled"] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "cron": { "type": "string" }, "spec": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] } }, "deliveryRuntime": { "type": "string", "enum": ["none", "required"] }, "deliverable": { "type": "string", "enum": ["report"] }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false } }, "required": [ "title", "description", "pipeline", "priority", "target" ], "additionalProperties": false }, "enabled": { "type": "boolean" }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "lastSlotAt": { "type": "string" }, "lastItemId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "disabledReason": { "type": "string", "enum": ["grant-revoked", "operator", "invalid"] }, "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "nextDueAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "pendingItemId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "lastClosedSlotAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "cron", "enabled", "createdBy", "createdAt", "updatedAt", "revision" ], "additionalProperties": false } } } }, "400": { "description": "Malformed or impossible cron expression", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/BadRequest" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "No grant for this schedule or requested pipeline", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "No such schedule", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Schedule changed; reload before editing", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "operationId": "deleteSchedule", "summary": "Delete future recurrence; an already admitted occurrence may finish", "tags": ["schedules"], "parameters": [ { "in": "path", "required": true, "name": "id", "schema": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "expectedRevision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["expectedRevision"] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "deleted": { "type": "boolean", "const": true }, "pendingItemId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" } }, "required": ["id", "deleted"], "additionalProperties": false } } } }, "403": { "description": "No grant for this schedule", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "No such schedule", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Schedule changed; reload before deleting", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] }, "get": { "operationId": "getSchedule", "summary": "Read a cron schedule", "tags": ["schedules"], "parameters": [ { "in": "path", "required": true, "name": "id", "schema": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "cron": { "type": "string" }, "spec": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] } }, "deliveryRuntime": { "type": "string", "enum": ["none", "required"] }, "deliverable": { "type": "string", "enum": ["report"] }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false } }, "required": [ "title", "description", "pipeline", "priority", "target" ], "additionalProperties": false }, "enabled": { "type": "boolean" }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "lastSlotAt": { "type": "string" }, "lastItemId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "disabledReason": { "type": "string", "enum": ["grant-revoked", "operator", "invalid"] }, "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "nextDueAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "pendingItemId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "lastClosedSlotAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "cron", "enabled", "createdBy", "createdAt", "updatedAt", "revision" ], "additionalProperties": false } } } }, "404": { "description": "No such schedule", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/schedules": { "get": { "operationId": "listSchedules", "summary": "List cron schedules", "tags": ["schedules"], "parameters": [ { "in": "query", "name": "limit", "schema": { "default": 50, "type": "integer", "minimum": 1, "maximum": 200 }, "allowEmptyValue": true, "allowReserved": true } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "schedules": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "cron": { "type": "string" }, "spec": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] } }, "deliveryRuntime": { "type": "string", "enum": ["none", "required"] }, "deliverable": { "type": "string", "enum": ["report"] }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false } }, "required": [ "title", "description", "pipeline", "priority", "target" ], "additionalProperties": false }, "enabled": { "type": "boolean" }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "lastSlotAt": { "type": "string" }, "lastItemId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "disabledReason": { "type": "string", "enum": ["grant-revoked", "operator", "invalid"] }, "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "nextDueAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "pendingItemId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "lastClosedSlotAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "cron", "enabled", "createdBy", "createdAt", "updatedAt", "revision" ], "additionalProperties": false } } }, "required": ["schedules"], "additionalProperties": false } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/schedules/{id}/enable": { "post": { "operationId": "enableSchedule", "summary": "Enable a cron schedule", "tags": ["schedules"], "parameters": [ { "in": "path", "required": true, "name": "id", "schema": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "expectedRevision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["expectedRevision"] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "cron": { "type": "string" }, "spec": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] } }, "deliveryRuntime": { "type": "string", "enum": ["none", "required"] }, "deliverable": { "type": "string", "enum": ["report"] }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false } }, "required": [ "title", "description", "pipeline", "priority", "target" ], "additionalProperties": false }, "enabled": { "type": "boolean" }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "lastSlotAt": { "type": "string" }, "lastItemId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "disabledReason": { "type": "string", "enum": ["grant-revoked", "operator", "invalid"] }, "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "nextDueAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "pendingItemId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "lastClosedSlotAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "cron", "enabled", "createdBy", "createdAt", "updatedAt", "revision" ], "additionalProperties": false } } } }, "400": { "description": "Repair the invalid schedule before enabling it", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/BadRequest" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "No grant for this schedule", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "No such schedule", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Schedule changed; reload before toggling", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/schedules/{id}/disable": { "post": { "operationId": "disableSchedule", "summary": "Disable a cron schedule", "tags": ["schedules"], "parameters": [ { "in": "path", "required": true, "name": "id", "schema": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "expectedRevision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["expectedRevision"] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "cron": { "type": "string" }, "spec": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] } }, "deliveryRuntime": { "type": "string", "enum": ["none", "required"] }, "deliverable": { "type": "string", "enum": ["report"] }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false } }, "required": [ "title", "description", "pipeline", "priority", "target" ], "additionalProperties": false }, "enabled": { "type": "boolean" }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "lastSlotAt": { "type": "string" }, "lastItemId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "disabledReason": { "type": "string", "enum": ["grant-revoked", "operator", "invalid"] }, "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "nextDueAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "pendingItemId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "lastClosedSlotAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "cron", "enabled", "createdBy", "createdAt", "updatedAt", "revision" ], "additionalProperties": false } } } }, "400": { "description": "Repair the invalid schedule before enabling it", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/BadRequest" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "No grant for this schedule", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "No such schedule", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Schedule changed; reload before toggling", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/schedules/tick": { "post": { "operationId": "tickSchedules", "summary": "Mint items for every enabled schedule's latest due slot (work.cron required)", "tags": ["schedules", "cron"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": {}, "additionalProperties": false } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "ticked": { "type": "number" }, "minted": { "type": "array", "items": { "type": "object", "properties": { "scheduleId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "itemId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" } }, "required": ["scheduleId", "itemId"], "additionalProperties": false } }, "disabled": { "type": "array", "items": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" } }, "errors": { "type": "array", "items": { "type": "object", "properties": { "scheduleId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "message": { "type": "string" } }, "required": ["scheduleId", "message"], "additionalProperties": false } } }, "required": ["ticked", "minted", "disabled", "errors"], "additionalProperties": false } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/dispatches/github": { "post": { "operationId": "dispatchGithubAnchor", "summary": "Request a run for a GitHub issue or pull-request anchor", "tags": ["dispatches"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "anchor": { "type": "object", "properties": { "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["repo", "issue"], "additionalProperties": false }, "spec": { "type": "object", "properties": { "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "pipeline": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] } }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false } }, "required": ["title", "description", "pipeline", "target"], "additionalProperties": false }, "mode": { "type": "string", "enum": ["implement", "review"] }, "reply": { "type": "string" }, "runbook": { "type": "string", "minLength": 1, "maxLength": 128 }, "context": { "type": "string" }, "requestId": { "type": "string", "minLength": 1, "maxLength": 128 } }, "required": ["anchor", "spec", "mode", "requestId"], "additionalProperties": false } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "properties": { "outcome": { "type": "string", "const": "accepted" }, "runId": { "type": "string" }, "dispatched": { "type": "boolean" } }, "required": ["outcome", "runId", "dispatched"], "additionalProperties": false }, { "type": "object", "properties": { "outcome": { "type": "string", "const": "duplicate" }, "runId": { "type": "string" } }, "required": ["outcome", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "outcome": { "type": "string", "const": "busy" }, "runId": { "type": "string" } }, "required": ["outcome", "runId"], "additionalProperties": false } ] } } } }, "400": { "description": "Anchor repository must equal the Work target repository", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/BadRequest" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "Principal may not request this pipeline, repository, or anchor", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "GitHub anchor already has an immutable Work specification", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/dispatches/github/redispatch": { "post": { "operationId": "redispatchGithubAnchor", "summary": "Request another run of an admitted GitHub anchor", "description": "Reuses the immutable Work specification stored by the first GitHub-anchor admission. Callers provide only fresh run parameters and an idempotency key.", "tags": ["dispatches"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "anchor": { "type": "object", "properties": { "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["repo", "issue"], "additionalProperties": false }, "mode": { "type": "string", "enum": ["implement", "review"] }, "reply": { "type": "string" }, "runbook": { "type": "string", "minLength": 1, "maxLength": 128 }, "context": { "type": "string" }, "requestId": { "type": "string", "minLength": 1, "maxLength": 128 }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] } } }, "required": ["anchor", "mode", "requestId"], "additionalProperties": false } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "properties": { "outcome": { "type": "string", "const": "accepted" }, "runId": { "type": "string" }, "dispatched": { "type": "boolean" } }, "required": ["outcome", "runId", "dispatched"], "additionalProperties": false }, { "type": "object", "properties": { "outcome": { "type": "string", "const": "duplicate" }, "runId": { "type": "string" } }, "required": ["outcome", "runId"], "additionalProperties": false }, { "type": "object", "properties": { "outcome": { "type": "string", "const": "busy" }, "runId": { "type": "string" } }, "required": ["outcome", "runId"], "additionalProperties": false } ] } } } }, "403": { "description": "Principal may not request this pipeline, repository, or anchor", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "GitHub anchor has not been admitted", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "GitHub anchor cannot be redispatched", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/runs/{runId}/agents/{owner}/{repo}/{name}": { "post": { "operationId": "invokeRunAgent", "summary": "Admit an agent round on behalf of a live run", "tags": ["runs"], "parameters": [ { "in": "path", "required": true, "name": "runId", "schema": { "type": "string", "minLength": 1, "maxLength": 175 } }, { "in": "path", "required": true, "name": "owner", "schema": { "type": "string", "pattern": "^[\\w.-]+$" } }, { "in": "path", "required": true, "name": "repo", "schema": { "type": "string", "pattern": "^[\\w.-]+$" } }, { "in": "path", "required": true, "name": "name", "schema": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "requestId": { "type": "string", "minLength": 1 }, "message": { "type": "string", "minLength": 1 } }, "required": ["requestId", "message"] } } } }, "responses": { "202": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "workId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "state": { "type": "string" }, "ok": { "type": "boolean" }, "summary": { "type": "string" }, "report": { "type": "string" } }, "required": ["workId", "state"], "additionalProperties": false } } } }, "401": { "description": "Invalid or expired run token", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Unauthorized" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "This run may not invoke that agent", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "No enabled agent by that name", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Request id names an incompatible round", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "runToken": [] } ] } }, "/runs/{runId}/agent-runs/{workId}": { "get": { "operationId": "getRunAgentRun", "summary": "Read an agent round this live run invoked", "tags": ["runs"], "parameters": [ { "in": "path", "required": true, "name": "runId", "schema": { "type": "string", "minLength": 1, "maxLength": 175 } }, { "in": "path", "required": true, "name": "workId", "schema": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "workId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "state": { "type": "string" }, "ok": { "type": "boolean" }, "summary": { "type": "string" }, "report": { "type": "string" } }, "required": ["workId", "state"], "additionalProperties": false } } } }, "401": { "description": "Invalid or expired run token", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Unauthorized" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "No agent round by that id for this run", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "runToken": [] } ] } }, "/runs/{runId}/job-secrets": { "get": { "operationId": "getRunJobSecrets", "summary": "Resolve the admitted credential set for a live recipe run", "tags": ["runs"], "parameters": [ { "in": "path", "required": true, "name": "runId", "schema": { "type": "string", "minLength": 1, "maxLength": 175 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "environment": { "type": "object", "propertyNames": { "type": "string", "pattern": "^[A-Z][A-Z0-9_]{0,127}$" }, "additionalProperties": { "type": "string", "minLength": 1 } }, "files": { "type": "object", "propertyNames": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,63}$" }, "additionalProperties": { "type": "string", "minLength": 1 } } }, "required": ["environment", "files"], "additionalProperties": false } } } }, "401": { "description": "Invalid or expired run token", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Unauthorized" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "Job credential grant refused", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Selected secret unavailable", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "runToken": [] } ] } }, "/runs/{runId}/issue-source": { "get": { "operationId": "getRunIssueSource", "summary": "Read this run’s issue source and a bounded page of comments", "tags": ["runs"], "parameters": [ { "in": "path", "required": true, "name": "runId", "schema": { "type": "string", "minLength": 1, "maxLength": 175 } }, { "in": "query", "name": "cursor", "schema": { "type": "string", "maxLength": 2048 }, "allowEmptyValue": true, "allowReserved": true } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "admittedIssue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "comments": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "body": { "type": "string", "maxLength": 65536 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "author": { "type": "string", "maxLength": 256 }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["id", "body", "url", "updatedAt"], "additionalProperties": false } }, "nextCursor": { "type": "string" } }, "required": ["issue", "comments"], "additionalProperties": false } } } }, "401": { "description": "Invalid or expired run token", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Unauthorized" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "Source moved outside the admitted repository scope", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "Run has no issue source", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "runToken": [] } ] } }, "/runs/claim": { "post": { "operationId": "claimRun", "summary": "Claim the oldest queued run allowed to the executor principal", "tags": ["runs"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "runner": { "type": "string", "minLength": 1, "maxLength": 256 }, "placementAware": { "type": "boolean", "const": true }, "reviewOnly": { "type": "boolean", "const": true } }, "required": ["runner"], "additionalProperties": false } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "placementAware": { "type": "boolean", "const": true }, "runId": { "type": "string", "minLength": 1, "maxLength": 175 }, "workId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "pipeline": { "type": "string" }, "mode": { "type": "string", "minLength": 1, "maxLength": 64 }, "providerAuth": { "type": "string", "enum": ["claude", "agy"] }, "token": { "type": "string" }, "expiresAt": { "type": "string" } }, "required": ["runId", "pipeline", "token", "expiresAt"], "additionalProperties": false } } } }, "401": { "description": "work.executor scope required", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Unauthorized" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/runs/{runId}/recipe": { "get": { "operationId": "recipeBrief", "summary": "Fetch an admitted recipe", "tags": ["runs"], "parameters": [ { "in": "path", "required": true, "name": "runId", "schema": { "type": "string", "minLength": 1, "maxLength": 175 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } } } }, "401": { "description": "Invalid or expired run token", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Unauthorized" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "Recipe occurrence or execution profile refused", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Worker generation refused", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "runToken": [] } ] }, "post": { "operationId": "recipeComplete", "summary": "Complete an admitted recipe", "tags": ["runs"], "parameters": [ { "in": "path", "required": true, "name": "runId", "schema": { "type": "string", "minLength": 1, "maxLength": 175 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": {} }, "required": ["result"] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "runId": { "type": "string", "minLength": 1, "maxLength": 175 }, "state": { "type": "string" } }, "required": ["runId", "state"], "additionalProperties": false } } } }, "401": { "description": "Invalid or expired run token", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Unauthorized" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "Not a recipe occurrence", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Worker generation or completion refused", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "runToken": [] } ] } }, "/runs/{runId}/brief": { "get": { "operationId": "getRunBrief", "summary": "Fetch a claimed run's dispatch brief", "tags": ["runs"], "parameters": [ { "in": "path", "required": true, "name": "runId", "schema": { "type": "string", "minLength": 1, "maxLength": 175 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "spec": { "anyOf": [ { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": [ "claude", "codex", "opencode", "agy" ] } }, "deliveryRuntime": { "type": "string", "enum": ["none", "required"] }, "deliverable": { "type": "string", "enum": ["report"] }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false } }, "required": [ "title", "description", "pipeline", "priority", "target" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["inbox-summary", "handoff-summary"] }, "priority": { "type": "string", "const": "background" }, "sourceKey": { "type": "string", "minLength": 1, "maxLength": 256 } }, "required": [ "title", "description", "pipeline", "priority", "sourceKey" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "const": "goose" }, "priority": { "type": "string", "const": "background" }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false }, "jobOccurrence": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }, "required": [ "title", "description", "pipeline", "priority", "target", "jobOccurrence" ], "additionalProperties": false }, { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "priority": { "type": "string", "const": "background" }, "pipeline": {}, "agent": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+\\/[a-z][a-z0-9-]*$" }, "sourceKey": { "type": "string", "minLength": 1 } }, "required": [ "title", "description", "priority", "pipeline", "agent", "sourceKey" ], "additionalProperties": false } ] }, "anchor": { "type": "object", "properties": { "type": { "type": "string", "const": "work" }, "id": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "title": { "type": "string" }, "body": { "type": "string" }, "target_repo": { "type": "string" }, "html_url": { "type": "string" } }, "required": [ "type", "id", "title", "body", "target_repo", "html_url" ], "additionalProperties": false }, "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "pipeline": { "type": "string" }, "mode": { "type": "string" }, "reply": { "type": "string" }, "replyChannel": { "type": "string" }, "replyPrincipal": { "type": "string" }, "runbook": { "type": "string" }, "context": { "type": "string" }, "attemptId": { "type": "string" }, "generation": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "intentId": { "type": "string" }, "resume": { "type": "object", "properties": { "sessionId": { "type": "string" }, "transcriptGcsUri": { "type": "string" } }, "required": ["sessionId", "transcriptGcsUri"], "additionalProperties": false }, "crossRepo": { "type": "boolean" }, "timeoutMinutes": { "type": "integer", "minimum": 1, "maximum": 80 } }, "required": [ "id", "spec", "anchor", "pipeline", "mode", "reply", "replyChannel", "replyPrincipal", "runbook", "context", "attemptId", "generation", "intentId" ], "additionalProperties": false }, { "type": "object", "properties": { "anchor": { "type": "object", "properties": { "type": { "type": "string", "const": "github" }, "repo": { "type": "string" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "html_url": { "type": "string" } }, "required": ["type", "repo", "issue", "html_url"], "additionalProperties": false }, "work": { "type": "object", "properties": { "spec": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "pipeline": { "type": "string", "enum": ["claude", "codex", "opencode", "agy"] }, "priority": { "default": "normal", "type": "string", "enum": ["urgent", "normal", "background"] }, "fallbackPipelines": { "maxItems": 3, "type": "array", "items": { "type": "string", "enum": [ "claude", "codex", "opencode", "agy" ] } }, "deliveryRuntime": { "type": "string", "enum": ["none", "required"] }, "deliverable": { "type": "string", "enum": ["report"] }, "target": { "type": "object", "properties": { "repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" } }, "required": ["repo"], "additionalProperties": false } }, "required": [ "title", "description", "pipeline", "priority", "target" ], "additionalProperties": false } }, "required": ["spec"], "additionalProperties": false }, "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "pipeline": { "type": "string" }, "mode": { "type": "string" }, "reply": { "type": "string" }, "replyChannel": { "type": "string" }, "replyPrincipal": { "type": "string" }, "runbook": { "type": "string" }, "context": { "type": "string" }, "attemptId": { "type": "string" }, "generation": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "intentId": { "type": "string" }, "resume": { "type": "object", "properties": { "sessionId": { "type": "string" }, "transcriptGcsUri": { "type": "string" } }, "required": ["sessionId", "transcriptGcsUri"], "additionalProperties": false }, "crossRepo": { "type": "boolean" }, "timeoutMinutes": { "type": "integer", "minimum": 1, "maximum": 80 } }, "required": [ "anchor", "work", "pipeline", "mode", "reply", "replyChannel", "replyPrincipal", "runbook", "context", "attemptId", "generation", "intentId" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "spec": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "minLength": 1 }, "priority": { "type": "string", "const": "background" }, "pipeline": {}, "agent": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+\\/[a-z][a-z0-9-]*$" }, "sourceKey": { "type": "string", "minLength": 1 } }, "required": [ "title", "description", "priority", "pipeline", "agent", "sourceKey" ], "additionalProperties": false }, "anchor": { "type": "object", "properties": { "type": { "type": "string", "const": "work" }, "id": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" }, "title": { "type": "string" }, "body": { "type": "string" }, "html_url": { "type": "string" } }, "required": [ "type", "id", "title", "body", "html_url" ], "additionalProperties": false }, "issue": { "type": "object", "properties": { "reference": { "oneOf": [ { "type": "object", "properties": { "tracker": { "type": "string", "const": "github" }, "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["tracker", "repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "tracker": { "type": "string", "const": "linear" }, "organizationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "issueId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "tracker", "organizationId", "issueId" ], "additionalProperties": false } ] }, "identifier": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" }, "title": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 65536 }, "oversized": { "type": "boolean", "const": true }, "state": { "type": "string", "enum": ["open", "closed"] }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "teamId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 }, "type": { "type": "string", "maxLength": 128 } }, "required": ["id", "name", "type"], "additionalProperties": false }, "labels": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } }, "assignees": { "maxItems": 256, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "name": { "type": "string", "maxLength": 256 } }, "required": ["id", "name"], "additionalProperties": false } } }, "required": [ "reference", "identifier", "url", "title", "description", "state", "updatedAt", "labels", "assignees" ], "additionalProperties": false }, "pipeline": { "type": "string" }, "mode": { "type": "string", "const": "claw" }, "reply": { "type": "string" }, "replyChannel": { "type": "string" }, "replyPrincipal": { "type": "string" }, "runbook": { "type": "string" }, "context": { "type": "string" }, "attemptId": { "type": "string" }, "generation": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "intentId": { "type": "string" }, "resume": { "type": "object", "properties": { "sessionId": { "type": "string" }, "transcriptGcsUri": { "type": "string" } }, "required": ["sessionId", "transcriptGcsUri"], "additionalProperties": false }, "crossRepo": { "type": "boolean" }, "timeoutMinutes": { "type": "integer", "minimum": 1, "maximum": 80 }, "claw": { "anyOf": [ { "type": "object", "properties": { "agent": { "type": "string" }, "revision": { "type": "string", "pattern": "^[a-f0-9]{40}$" }, "digest": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "requireToolEvidence": { "type": "boolean" }, "message": { "type": "string", "minLength": 1 }, "files": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "string", "minLength": 1 }, "mode": { "type": "string", "enum": ["100644", "100755"] }, "sha": { "type": "string", "pattern": "^[a-f0-9]{40}$" }, "content": { "type": "string" } }, "required": [ "path", "mode", "sha", "content" ], "additionalProperties": false } } }, "required": [ "agent", "revision", "digest", "requireToolEvidence", "message", "files" ], "additionalProperties": false }, { "type": "object", "properties": { "agent": { "type": "string" }, "revision": { "type": "string", "pattern": "^[a-f0-9]{40}$" }, "digest": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "requireToolEvidence": { "type": "boolean" }, "message": { "type": "string", "minLength": 1 }, "harness": { "type": "string", "enum": ["openclaw", "claude", "codex"] }, "mode": { "type": "string", "pattern": "^[A-Za-z][\\w-]{0,63}$" }, "definition": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "string", "minLength": 1 }, "mode": { "type": "string", "enum": ["100644", "100755"] }, "sha": { "type": "string", "pattern": "^[a-f0-9]{40}$" }, "content": { "type": "string" } }, "required": [ "path", "mode", "sha", "content" ], "additionalProperties": false } } }, "required": [ "agent", "revision", "digest", "requireToolEvidence", "message", "definition" ], "additionalProperties": false } ] } }, "required": [ "id", "spec", "anchor", "pipeline", "mode", "reply", "replyChannel", "replyPrincipal", "runbook", "context", "attemptId", "generation", "intentId", "claw" ], "additionalProperties": false } ] } } } }, "401": { "description": "Invalid or expired run token", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Unauthorized" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Worker generation refused", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "runToken": [] } ] } }, "/runs/{runId}/introspect": { "get": { "operationId": "introspectRun", "summary": "Verify live run identity without renewing or changing it", "tags": ["runs"], "parameters": [ { "in": "path", "required": true, "name": "runId", "schema": { "type": "string", "minLength": 1, "maxLength": 175 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "version": { "type": "number", "const": 1 }, "runId": { "type": "string", "minLength": 1, "maxLength": 175 }, "repository": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "anchor": { "anyOf": [ { "type": "object", "properties": { "repo": { "type": "string", "maxLength": 140, "pattern": "^[\\w.-]+\\/[\\w.-]+$" }, "issue": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["repo", "issue"], "additionalProperties": false }, { "type": "object", "properties": { "workId": { "type": "string", "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$" } }, "required": ["workId"], "additionalProperties": false } ] }, "issueUrl": { "anyOf": [ { "type": "string", "maxLength": 256, "format": "uri" }, { "type": "null" } ] }, "verifiedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "validUntil": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "version", "runId", "repository", "anchor", "issueUrl", "verifiedAt", "validUntil" ], "additionalProperties": false } } } }, "401": { "description": "Invalid or expired run token", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Unauthorized" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Worker generation refused", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "runToken": [] } ] } }, "/runs/{runId}/heartbeat": { "post": { "operationId": "heartbeatRun", "summary": "Renew a claimed run's lease", "tags": ["runs"], "parameters": [ { "in": "path", "required": true, "name": "runId", "schema": { "type": "string", "minLength": 1, "maxLength": 175 } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "providerProcessStarted": { "type": "boolean", "const": true } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "runId": { "type": "string", "minLength": 1, "maxLength": 175 }, "expiresAt": { "type": "string" }, "reviewerLogin": { "type": "string" } }, "required": ["runId", "expiresAt"], "additionalProperties": false } } } }, "401": { "description": "Invalid or expired run token", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Unauthorized" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Worker generation refused", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "runToken": [] } ] } }, "/runs/{runId}/placement": { "post": { "operationId": "observeRunPlacement", "summary": "Report exact-claim scheduler placement", "tags": ["runs"], "parameters": [ { "in": "path", "required": true, "name": "runId", "schema": { "type": "string", "minLength": 1, "maxLength": 175 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "runner": { "type": "string", "minLength": 1, "maxLength": 256 }, "claimFingerprint": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "placement": { "type": "object", "properties": { "phase": { "type": "string", "enum": [ "waiting-for-placement", "bootstrapping", "unavailable" ] }, "reason": { "type": "string", "enum": [ "pending", "unschedulable", "scheduled", "inventory-unavailable", "launch-pending" ] }, "observedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "jobCreatedAt": { "type": "string", "maxLength": 32, "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["phase", "reason", "observedAt"], "additionalProperties": false } }, "required": ["runner", "claimFingerprint", "placement"] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "runId": { "type": "string", "minLength": 1, "maxLength": 175 } }, "required": ["runId"], "additionalProperties": false } } } }, "401": { "description": "work.executor scope required", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Unauthorized" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "executor may not observe this claim", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "unknown run", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/runs/{runId}/startup-placement": { "post": { "operationId": "observeRunStartupPlacement", "summary": "Report exact executor-owned worker placement", "tags": ["runs"], "parameters": [ { "in": "path", "required": true, "name": "runId", "schema": { "type": "string", "minLength": 1, "maxLength": 175 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "runner": { "type": "string", "minLength": 1, "maxLength": 256 }, "claimFingerprint": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "jobUid": { "type": "string", "minLength": 1, "maxLength": 256 }, "observedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "placed": { "type": "boolean" } }, "required": [ "runner", "claimFingerprint", "jobUid", "observedAt", "placed" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "runId": { "type": "string", "minLength": 1, "maxLength": 175 }, "jobUid": { "type": "string" }, "expiresAt": { "type": "string" } }, "required": ["runId", "jobUid", "expiresAt"], "additionalProperties": false } } } }, "401": { "description": "work.executor scope required", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Unauthorized" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "executor does not own this placement-aware claim", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "unknown run", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Placement observation refused", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/runs/{runId}/claim-status": { "get": { "operationId": "getRunClaimStatus", "summary": "Read the authenticated executor's exact claim liveness", "tags": ["runs"], "parameters": [ { "in": "path", "required": true, "name": "runId", "schema": { "type": "string", "minLength": 1, "maxLength": 175 } }, { "in": "query", "name": "runner", "schema": { "type": "string", "minLength": 1, "maxLength": 256 }, "allowEmptyValue": true, "allowReserved": true, "required": true }, { "in": "query", "name": "claimFingerprint", "schema": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "allowEmptyValue": true, "allowReserved": true, "required": true } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "runId": { "type": "string", "minLength": 1, "maxLength": 175 }, "runner": { "type": "string" }, "claimFingerprint": { "type": "string" }, "status": { "type": "string", "enum": ["live", "settled"] } }, "required": ["runId", "runner", "claimFingerprint", "status"], "additionalProperties": false } } } }, "401": { "description": "work.executor scope required", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Unauthorized" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "executor may not inspect this claim", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "unknown run", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/runs/{runId}/exit": { "post": { "operationId": "reportRunExit", "summary": "Report that a claimed run's worker terminated", "tags": ["runs"], "parameters": [ { "in": "path", "required": true, "name": "runId", "schema": { "type": "string", "minLength": 1, "maxLength": 175 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "runner": { "type": "string", "minLength": 1, "maxLength": 256 }, "claimFingerprint": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }, "required": ["runner"] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "runId": { "type": "string", "minLength": 1, "maxLength": 175 }, "state": { "type": "string" }, "ok": { "type": "boolean" } }, "required": ["runId", "state"], "additionalProperties": false } } } }, "401": { "description": "work.executor scope required", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Unauthorized" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "executor may not report this run", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "unknown run", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/runs/{runId}/evidence": { "post": { "operationId": "reportRunEvidence", "summary": "Record what a claimed run's agent did", "tags": ["runs"], "parameters": [ { "in": "path", "required": true, "name": "runId", "schema": { "type": "string", "minLength": 1, "maxLength": 175 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "evidence": { "type": "object", "properties": { "source": { "type": "string", "const": "acp" }, "harness": { "type": "string", "maxLength": 64 }, "stopReason": { "type": "string", "maxLength": 64 }, "toolCallCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "toolCalls": { "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "kind": { "type": "string", "maxLength": 64 }, "status": { "type": "string", "maxLength": 64 } }, "required": ["kind", "status"] } }, "usage": { "type": "object", "properties": { "inputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "outputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "totalTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "thoughtTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedReadTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cachedWriteTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "contextWindow": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cost": { "type": "object", "properties": { "amount": { "type": "number" }, "currency": { "type": "string", "maxLength": 64 } }, "required": ["amount", "currency"] } } }, "durationMs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "source", "harness", "toolCallCount", "toolCalls" ] } }, "required": ["evidence"] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "runId": { "type": "string", "minLength": 1, "maxLength": 175 } }, "required": ["runId"], "additionalProperties": false } } } }, "401": { "description": "Invalid or expired run token", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Unauthorized" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "runToken": [] } ] } }, "/runs/{runId}/complete": { "post": { "operationId": "completeRun", "summary": "Report a claimed run's outcome", "tags": ["runs"], "parameters": [ { "in": "path", "required": true, "name": "runId", "schema": { "type": "string", "minLength": 1, "maxLength": 175 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "outcome": {}, "outcomeReference": {}, "message": { "type": "string", "description": "The whole final message, stored and returned whole; at most 4194304 UTF-8 bytes." } }, "required": ["outcome"] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "runId": { "type": "string", "minLength": 1, "maxLength": 175 }, "state": { "type": "string" } }, "required": ["runId", "state"], "additionalProperties": false } } } }, "401": { "description": "Invalid or expired run token", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Unauthorized" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Worker generation refused", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "runToken": [] } ] } }, "/runs/{runId}/checkout-token": { "get": { "operationId": "getRunCheckoutToken", "summary": "Mint a short-lived GitHub token for a claimed run's target repo", "tags": ["runs"], "parameters": [ { "in": "path", "required": true, "name": "runId", "schema": { "type": "string", "minLength": 1, "maxLength": 175 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "token": { "type": "string" }, "expiresAt": { "type": ["string", "null"] }, "repository": { "type": "string" }, "reviewerLogin": { "type": "string" }, "refreshAt": { "type": "string" }, "identity": { "type": "object", "properties": { "login": { "type": "string", "pattern": "^[a-zA-Z0-9-]{1,39}$" }, "git": { "type": "object", "properties": { "name": { "type": "string" }, "email": { "type": "string" } }, "required": ["name", "email"], "additionalProperties": false } }, "required": ["login", "git"], "additionalProperties": false }, "gitIdentity": { "type": "object", "properties": { "name": { "type": "string" }, "email": { "type": "string" } }, "required": ["name", "email"], "additionalProperties": false }, "grants": { "type": "array", "items": { "type": "object", "properties": { "owner": { "type": "string" }, "repositories": { "type": "array", "items": { "type": "string" } }, "token": { "type": "string" }, "expiresAt": { "type": "string" } }, "required": [ "owner", "repositories", "token", "expiresAt" ], "additionalProperties": false } } }, "required": ["token", "expiresAt", "repository"], "additionalProperties": false } } } }, "401": { "description": "Invalid or expired run token", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Unauthorized" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "Recipe occurrence or execution profile refused", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Worker generation or credential refused", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "runToken": [] } ] } }, "/runs/{runId}/reviewer-checkout-token": { "get": { "operationId": "getRunReviewerCheckoutToken", "summary": "Mint a GitHub token for a run bound to the reviewer App", "tags": ["runs"], "parameters": [ { "in": "path", "required": true, "name": "runId", "schema": { "type": "string", "minLength": 1, "maxLength": 175 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "token": { "type": "string" }, "expiresAt": { "type": ["string", "null"] }, "repository": { "type": "string" }, "reviewerLogin": { "type": "string" }, "refreshAt": { "type": "string" }, "identity": { "type": "object", "properties": { "login": { "type": "string", "pattern": "^[a-zA-Z0-9-]{1,39}$" }, "git": { "type": "object", "properties": { "name": { "type": "string" }, "email": { "type": "string" } }, "required": ["name", "email"], "additionalProperties": false } }, "required": ["login", "git"], "additionalProperties": false }, "gitIdentity": { "type": "object", "properties": { "name": { "type": "string" }, "email": { "type": "string" } }, "required": ["name", "email"], "additionalProperties": false }, "grants": { "type": "array", "items": { "type": "object", "properties": { "owner": { "type": "string" }, "repositories": { "type": "array", "items": { "type": "string" } }, "token": { "type": "string" }, "expiresAt": { "type": "string" } }, "required": [ "owner", "repositories", "token", "expiresAt" ], "additionalProperties": false } } }, "required": ["token", "expiresAt", "repository"], "additionalProperties": false } } } }, "401": { "description": "Invalid or expired run token", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Unauthorized" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "Recipe occurrence or execution profile refused", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Worker generation or credential refused", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "runToken": [] } ] } }, "/runs/{runId}/codex-auth": { "get": { "operationId": "getRunCodexAuth", "summary": "Restore the centrally owned Codex lineage for an authorized run", "tags": ["runs"], "parameters": [ { "in": "path", "required": true, "name": "runId", "schema": { "type": "string", "minLength": 1, "maxLength": 175 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "authBase64": { "type": "string", "minLength": 1, "maxLength": 524288 }, "generation": { "type": "string", "pattern": "^\\d+$" }, "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" } }, "required": ["authBase64", "generation", "sha256"], "additionalProperties": false } } } }, "401": { "description": "Invalid, expired, or non-Codex run token", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Unauthorized" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "404": { "description": "Codex authentication is not seeded", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Codex subscription authentication is in use", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "500": { "description": "Codex authentication storage is unavailable", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/InternalServerError" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "runToken": [] } ] }, "put": { "operationId": "persistRunCodexAuth", "summary": "Persist an authorized Codex run's conditionally rotated central lineage", "tags": ["runs"], "parameters": [ { "in": "path", "required": true, "name": "runId", "schema": { "type": "string", "minLength": 1, "maxLength": 175 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "generation": { "type": "string", "pattern": "^[1-9]\\d*$" }, "restoredSha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "authBase64": { "type": "string", "minLength": 1, "maxLength": 524288 }, "authFailure": { "type": "string", "enum": [ "access-token-refresh-failed", "refresh-token-reused", "codex-login-401" ] } }, "required": ["generation", "restoredSha256", "authBase64"] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "enum": ["updated", "unchanged", "skipped-burned"] } }, "required": ["status"], "additionalProperties": false } } } }, "400": { "description": "Codex authentication payload is invalid", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/BadRequest" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "401": { "description": "Invalid, expired, or non-Codex run token", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Unauthorized" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Codex authentication was already rotated", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "500": { "description": "Codex authentication storage is unavailable", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/InternalServerError" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "runToken": [] } ] } }, "/events/outline": { "post": { "operationId": "reportOutlineSourceEvent", "summary": "Report pike-authorized Outline identifiers", "tags": ["events"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "noticeId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "outcome": { "type": "string", "enum": [ "accepted", "own-change", "untrusted-actor", "foreign-document", "document-unavailable", "no-text-change" ] }, "agentCreated": { "type": "boolean" } }, "required": ["noticeId", "outcome", "agentCreated"], "additionalProperties": false } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventId": { "type": "string" }, "delivered": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["eventId", "delivered"], "additionalProperties": false } } } }, "403": { "description": "Only the configured Outline source may report authorization", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/events/outline/observations": { "post": { "operationId": "reportOutlineDocumentObservation", "summary": "Record pike-verified document creator metadata", "tags": ["events"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "documentId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "agentCreated": { "type": "boolean" }, "previouslySubscribed": { "type": "boolean", "const": true } }, "required": ["documentId", "agentCreated"], "additionalProperties": false } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "type": "boolean", "const": true } }, "required": ["ok"], "additionalProperties": false } } } }, "403": { "description": "Only the configured Outline source may attest document creators", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/events/outline/fallback": { "post": { "operationId": "reportOutlineDeliveryFailure", "summary": "Report an undeliverable Outline notice addressed to this host", "tags": ["events"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "deliveryId": { "type": "string", "minLength": 1, "maxLength": 400 } }, "required": ["deliveryId"], "additionalProperties": false } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "type": "boolean", "const": true } }, "required": ["ok"], "additionalProperties": false } } } }, "403": { "description": "No Outline delivery receipt for this host", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "503": { "description": "Outline fallback is not active", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/ServiceUnavailable" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/events/subscriptions": { "post": { "operationId": "createAgentEventSubscription", "summary": "Subscribe a live session on the calling host, or a dispatched run's Work, to an event key", "description": "With events.deliver: accepted only when the session telemetry reports the calling host and the session has not ended. With a run token and runId: the subscription targets the run’s own native Work (a workId naming any other Work is refused), and a matching event starts a resume run of that Work with the event notice as its input. Sources without an available producer are refused. Idempotent: the same target, key, kinds and until return the existing subscription.", "tags": ["events"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "string", "minLength": 1, "maxLength": 256 }, "kinds": { "minItems": 1, "maxItems": 16, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 64 } }, "until": { "type": "string", "minLength": 1, "maxLength": 64 }, "sessionId": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$" }, "githubStream": { "type": "boolean" }, "runId": { "type": "string", "minLength": 1, "maxLength": 175 }, "workId": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$" } }, "required": ["key"], "additionalProperties": false } } } }, "responses": { "201": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "githubStream": { "type": "boolean" }, "id": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$" }, "key": { "type": "string" }, "source": { "type": "string", "enum": [ "lcars:session", "lcars:work", "github:pr", "github:issue", "github:run", "outline:doc" ] }, "kinds": { "type": "array", "items": { "type": "string" } }, "until": { "type": "string" }, "target": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "session" }, "sessionId": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$" }, "host": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{0,62}$" } }, "required": ["type", "sessionId", "host"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "work" }, "workId": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$" } }, "required": ["type", "workId"], "additionalProperties": false } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["id", "key", "source", "target", "createdAt"], "additionalProperties": false } } } }, "400": { "description": "Malformed key, kinds or until", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/BadRequest" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "No live session on the calling host, not the run’s own resumable Work, or source unavailable", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "409": { "description": "Subscription limit reached for the session or Work", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Conflict" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "503": { "description": "Outline creator verification is pending on its trusted source host", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/ServiceUnavailable" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] }, "get": { "operationId": "listAgentEventSubscriptions", "summary": "List the calling host's event subscriptions, or a run's Work's", "tags": ["events"], "parameters": [ { "in": "query", "name": "sessionId", "schema": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$" }, "allowEmptyValue": true, "allowReserved": true }, { "in": "query", "name": "runId", "schema": { "type": "string", "minLength": 1, "maxLength": 175 }, "allowEmptyValue": true, "allowReserved": true } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "subscriptions": { "type": "array", "items": { "type": "object", "properties": { "githubStream": { "type": "boolean" }, "id": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$" }, "key": { "type": "string" }, "source": { "type": "string", "enum": [ "lcars:session", "lcars:work", "github:pr", "github:issue", "github:run", "outline:doc" ] }, "kinds": { "type": "array", "items": { "type": "string" } }, "until": { "type": "string" }, "target": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "session" }, "sessionId": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$" }, "host": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{0,62}$" } }, "required": ["type", "sessionId", "host"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "work" }, "workId": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$" } }, "required": ["type", "workId"], "additionalProperties": false } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "key", "source", "target", "createdAt" ], "additionalProperties": false } } }, "required": ["subscriptions"], "additionalProperties": false } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/events/github": { "post": { "operationId": "reportHostGitHubEvent", "summary": "Route a host native GitHub stream event only to that host’s non-App subscriptions", "tags": ["events"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "event": { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]{0,199}$" }, "key": { "type": "string", "minLength": 1, "maxLength": 256 }, "kind": { "type": "string", "pattern": "^[a-z][a-z-]{0,63}$" }, "occurredAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "actor": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_.@[\\]-]{0,99}$" }, "link": { "type": "string", "maxLength": 2048, "pattern": "^https:\\/\\/[\\x21-\\x7e]+$" }, "detail": { "type": "string", "pattern": "^[A-Za-z0-9 _.:,/#()-]{1,120}$" } }, "required": ["id", "key", "kind", "occurredAt"], "additionalProperties": false } }, "required": ["event"], "additionalProperties": false } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventId": { "type": "string" }, "delivered": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["eventId", "delivered"], "additionalProperties": false } } } }, "400": { "description": "Malformed GitHub stream event", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/BadRequest" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "Host-only non-App GitHub PR source required", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/events/session": { "post": { "operationId": "reportAgentSessionEvent", "summary": "Report that a session on the calling host went idle or ended", "description": "Requires events.deliver. An idle report is accepted only for a session the telemetry reports live on the calling host; an ended report for any CLI session the telemetry reports from that host, live or not. Routes an lcars:session: event whose id is derived from the session, kind and occurredAt, so a repeated report is not delivered twice.", "tags": ["events"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "sessionId": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$" }, "kind": { "type": "string", "enum": ["idle", "ended"] }, "occurredAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": ["sessionId", "kind", "occurredAt"], "additionalProperties": false } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "eventId": { "type": "string" }, "delivered": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["eventId", "delivered"], "additionalProperties": false } } } }, "400": { "description": "Malformed report", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/BadRequest" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } }, "403": { "description": "No such session on the calling host", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Forbidden" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/events/subscriptions/{id}": { "delete": { "operationId": "deleteAgentEventSubscription", "summary": "Remove one of the calling host's, or a run's Work's, event subscriptions", "tags": ["events"], "parameters": [ { "in": "path", "required": true, "name": "id", "schema": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "runId": { "type": "string", "minLength": 1, "maxLength": 175 } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$" }, "deleted": { "type": "boolean", "const": true } }, "required": ["id", "deleted"], "additionalProperties": false } } } }, "404": { "description": "No such subscription for this caller", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/NotFound" }, { "$ref": "#/components/schemas/UndefinedError" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } } } }