{"openapi":"3.1.0","info":{"title":"Apiary Control Plane","description":"Router: assignment, work items, grants, worker API (ADR 0001/0006)","version":"0.1.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Health Get"}}}}}}},"/v1/auth/status":{"get":{"summary":"Get Human Auth Status","operationId":"getHumanAuthStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/auth/password/login":{"post":{"summary":"Login Human Password","operationId":"loginHumanPassword","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/auth/password/register":{"post":{"summary":"Register Human Password","operationId":"registerHumanPassword","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/auth/password/email":{"post":{"summary":"Lookup Human Password Email","operationId":"lookupHumanPasswordEmail","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/auth/password/change":{"post":{"summary":"Change Human Password","operationId":"changeHumanPassword","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/auth/logout":{"post":{"summary":"Logout Human Session","operationId":"logoutHumanSession","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/auth/bootstrap/claims":{"post":{"summary":"Create Human Bootstrap Claim","operationId":"createHumanBootstrapClaim","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/auth/invitations":{"get":{"summary":"List Human Invitations","operationId":"listHumanInvitations","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Create Human Invitation","operationId":"createHumanInvitation","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/auth/invitations/{invitation_id}":{"delete":{"summary":"Revoke Human Invitation","operationId":"revokeHumanInvitation","parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","title":"Invitation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/me":{"get":{"summary":"Get Current Human User","operationId":"getCurrentHumanUser","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"patch":{"summary":"Update Current Human Intro","operationId":"updateCurrentHumanIntro","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/auth/sessions":{"get":{"summary":"List Current Human Sessions","operationId":"listCurrentHumanSessions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/auth/sessions/{session_id}":{"delete":{"summary":"Revoke Current Human Session","operationId":"revokeCurrentHumanSession","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/human-members":{"get":{"summary":"List Workspace Human Members","operationId":"listWorkspaceHumanMembers","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/human-members/{human_user_id}":{"patch":{"summary":"Update Workspace Human Member","operationId":"updateWorkspaceHumanMember","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"human_user_id","in":"path","required":true,"schema":{"type":"string","title":"Human User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Remove Workspace Human Member","operationId":"removeWorkspaceHumanMember","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"human_user_id","in":"path","required":true,"schema":{"type":"string","title":"Human User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/diagnostics":{"post":{"summary":"Submit Client Diagnostics","description":"In-app \"Run Diagnostics\": persist one bounded client environment report.","operationId":"submitClientDiagnostics","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/persona-packs":{"get":{"summary":"List Persona Packs","description":"Instance-wide registry read for authenticated workspace users.","operationId":"list_persona_packs_v1_persona_packs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Persona Packs V1 Persona Packs Get"}}}}}},"post":{"summary":"Create Persona Pack","operationId":"create_persona_pack_v1_persona_packs_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Persona Pack V1 Persona Packs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/ops-events":{"get":{"summary":"List Ops Events","description":"List worker swallowed-seam ops events for this workspace (newest first).\n\nOperator or workspace member. Never returns another tenant's rows.","operationId":"list_ops_events_v1_workspaces__workspace_id__ops_events_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Ops Events V1 Workspaces  Workspace Id  Ops Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/events":{"get":{"summary":"List Events","description":"List thin substrate events for exactly this workspace (G3 list).\n\nKeyset paged over (created_at, id) on idx_events_ws. Unknown/swept cursor\nresyncs to the oldest retained page with resynced=true (never blank).\nCursorless = oldest retained page; next_after is the last row id when the\npage was full, else null. Retention window is 90d (APIARY_EVENTS_RETENTION_DAYS,\n0=disabled); exempt receipt kinds never sweep.\n\nRequires workspace membership or an explicit operator principal and never\nreturns rows from another workspace. Authorized reads arm the throttled\nreaper (retention sweep rides reap_stale).","operationId":"list_events_v1_workspaces__workspace_id__events_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Events V1 Workspaces  Workspace Id  Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/events/search":{"get":{"summary":"Search Events","description":"Search thin substrate events within one workspace only (G3 search).\n\nRequires workspace membership or an explicit operator principal.\nFail-closed: foreign workspace rows never leak even if query text would\nmatch their payloads. Scan is bounded by the 90d retention window.","operationId":"search_events_v1_workspaces__workspace_id__events_search_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","description":"Substring over kind/actor/id/payload","default":"","title":"Q"},"description":"Substring over kind/actor/id/payload"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Search Events V1 Workspaces  Workspace Id  Events Search Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bridges":{"post":{"summary":"Create Bridge","operationId":"create_bridge_v1_bridges_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBridgeBody"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Bridge V1 Bridges Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bridges/{bridge_id}":{"get":{"summary":"Get Bridge","operationId":"get_bridge_v1_bridges__bridge_id__get","parameters":[{"name":"bridge_id","in":"path","required":true,"schema":{"type":"string","title":"Bridge Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Bridge V1 Bridges  Bridge Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bridges/{bridge_id}/revoke":{"post":{"summary":"Revoke Bridge","operationId":"revoke_bridge_v1_bridges__bridge_id__revoke_post","parameters":[{"name":"bridge_id","in":"path","required":true,"schema":{"type":"string","title":"Bridge Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Revoke Bridge V1 Bridges  Bridge Id  Revoke Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/reviews":{"post":{"summary":"Create Review Request","operationId":"create_review_request_v1_workspaces__workspace_id__reviews_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReviewBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Review Request V1 Workspaces  Workspace Id  Reviews Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Review Requests","operationId":"list_review_requests_v1_workspaces__workspace_id__reviews_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Review Requests V1 Workspaces  Workspace Id  Reviews Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/attachments":{"post":{"summary":"Upload Attachment","description":"Human upload: session + workspace membership + browser CSRF.","operationId":"upload_attachment_v1_workspaces__workspace_id__attachments_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadAttachmentBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upload Attachment V1 Workspaces  Workspace Id  Attachments Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/grants/{grant_id}/attachments":{"post":{"summary":"Worker Upload Attachment","description":"Grant-scoped upload; workspace + agent pinned from the Bearer grant.","operationId":"worker_upload_attachment_v1_workers_grants__grant_id__attachments_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadAttachmentBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Worker Upload Attachment V1 Workers Grants  Grant Id  Attachments Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/attachments/{attachment_id}":{"get":{"summary":"Download Attachment","description":"Human member OR grant Bearer whose grant's workspace matches.","operationId":"download_attachment_v1_workspaces__workspace_id__attachments__attachment_id__get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","title":"Attachment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/channels":{"get":{"summary":"List Channels","description":"Channels organize messages within a workspace — never isolation.","operationId":"list_channels_v1_workspaces__workspace_id__channels_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Channels V1 Workspaces  Workspace Id  Channels Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Channel","operationId":"create_channel_v1_workspaces__workspace_id__channels_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChannel"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Channel V1 Workspaces  Workspace Id  Channels Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces":{"get":{"summary":"List Workspaces","operationId":"list_workspaces_v1_workspaces_get","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Workspaces V1 Workspaces Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Workspace","description":"Any authenticated human (their own isolated workspace) or the operator.","operationId":"create_workspace_v1_workspaces_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspace"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Workspace V1 Workspaces Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}":{"get":{"summary":"Get Workspace","operationId":"get_workspace_v1_workspaces__workspace_id__get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Workspace V1 Workspaces  Workspace Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update Workspace","description":"Full-replace workspace repo attachments (un-cloned metadata; eligible\nlocal-path sources grant default folder access at mint, so this is ALSO\nhow repo-derived access is removed).","operationId":"update_workspace_v1_workspaces__workspace_id__patch","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkspace"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Workspace V1 Workspaces  Workspace Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/archive":{"post":{"summary":"Archive Workspace","description":"Soft delete / restore (audit doctrine — never a row deletion).\n\narchived=true hides the workspace from the default listing and fails it\nclosed everywhere a workspace id is used; refused with 409 while a\nMission is active or a grant is live (archive is not a stop).\narchived=false restores the workspace to active.","operationId":"archive_workspace_v1_workspaces__workspace_id__archive_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveWorkspaceBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Archive Workspace V1 Workspaces  Workspace Id  Archive Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/wipe":{"post":{"summary":"Wipe Workspace","description":"Hard-delete the workspace's conversations + memory (testing affordance,\n2026-08-17). Unlike archive, rows are DELETED: consults, delegations,\ngrants/inbox/messages/activity, sync-plane copies, non-exempt events\n(verification receipts survive), and memory replica manifests/files.\nThe workspace, channels, agents, memberships, and the Workboard plane\nsurvive. Refused 409 while frozen or real work is live (a grant with a\nwork_item_id, an active Mission, an unsettled workflow); live chat\ngrants are cancelled in-transaction instead. 404 on archived.","operationId":"wipe_workspace_v1_workspaces__workspace_id__wipe_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Wipe Workspace V1 Workspaces  Workspace Id  Wipe Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/control-plane-owner":{"put":{"summary":"Set Control Plane Owner","description":"Dual-run flip: set assignment authority to apiary or harness.\n\nRefuses while a work_item is running. See docs/design/dual-run-registry-v0.md.","operationId":"set_control_plane_owner_v1_workspaces__workspace_id__control_plane_owner_put","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ControlPlaneOwnerBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Control Plane Owner V1 Workspaces  Workspace Id  Control Plane Owner Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dual-run/registry":{"get":{"summary":"Dual Run Registry","description":"List authorized workspaces with their control-plane owner.","operationId":"dual_run_registry_v1_dual_run_registry_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Dual Run Registry V1 Dual Run Registry Get"}}}}}}},"/v1/mode":{"get":{"summary":"Get Mode","description":"Global mode + mode-independent NEVER list + engaged HITL policy stub.","operationId":"get_mode_v1_mode_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Mode V1 Mode Get"}}}}}},"put":{"summary":"Set Mode","operationId":"set_mode_v1_mode_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModeBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Mode V1 Mode Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/freeze":{"get":{"summary":"Get Freeze","description":"G10 mini freeze status (meta OR env APIARY_CONTROL_FREEZE).","operationId":"get_freeze_v1_freeze_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Freeze V1 Freeze Get"}}}}}},"put":{"summary":"Set Freeze","description":"Set control-plane freeze (meta). Env freeze still OR-wins if set.","operationId":"set_freeze_v1_freeze_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-apiary-operator-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Apiary-Operator-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreezeBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Freeze V1 Freeze Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/members":{"get":{"summary":"List Workspace Members","operationId":"list_workspace_members_v1_workspaces__workspace_id__members_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Workspace Members V1 Workspaces  Workspace Id  Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Add Workspace Member","operationId":"add_workspace_member_v1_workspaces__workspace_id__members_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Workspace Member V1 Workspaces  Workspace Id  Members Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/members/{agent_id}":{"patch":{"summary":"Update Workspace Member","operationId":"update_workspace_member_v1_workspaces__workspace_id__members__agent_id__patch","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMembershipBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Workspace Member V1 Workspaces  Workspace Id  Members  Agent Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents":{"get":{"summary":"List Agents","operationId":"list_agents_v1_agents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Agents V1 Agents Get"}}}}}},"post":{"summary":"Register Agent","description":"Any authenticated human (they own the registration) or the operator.","operationId":"register_agent_v1_agents_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgent"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Register Agent V1 Agents Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/proxy-providers":{"get":{"summary":"List Proxy Providers","description":"Model-proxy provider catalog (seeds + meta overrides).\n\nNon-secret metadata only (display names, small-fast pinning, worker\nsupport) — provider OAuth tokens never leave the worker. Any\nauthenticated principal may read it: the catalog drives the agent\nconfig form.","operationId":"list_proxy_providers_v1_agents_proxy_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Proxy Providers V1 Agents Proxy Providers Get"}}}}}}},"/v1/workers/agents":{"get":{"summary":"List Worker Agents","description":"Worker roster discovery: the agents homed on THIS computer.\n\nThe presence loop previously read the human/operator ``/v1/agents`` route\nwith worker headers and 401'd on every refresh (live 2026-08-13), falling\nback to the single env slug. Computer-scoped principal, computer-filtered\npayload: a worker can only ever see its own roster.","operationId":"list_worker_agents_v1_workers_agents_get","parameters":[{"name":"computer_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Computer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Worker Agents V1 Workers Agents Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}":{"get":{"summary":"Get Agent","operationId":"get_agent_v1_agents__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Agent V1 Agents  Agent Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update Agent","operationId":"update_agent_v1_agents__agent_id__patch","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgent"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Agent V1 Agents  Agent Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Agent","operationId":"delete_agent_v1_agents__agent_id__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Agent V1 Agents  Agent Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/computers":{"get":{"summary":"List Computers","description":"Presence: heartbeat roster + last_seen/age per computer (no tokens).\n\nPlain humans see only the computers they own; the instance admin and\nthe operator see the whole fleet. Rows never carry tokens.","operationId":"list_computers_v1_computers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Computers V1 Computers Get"}}}}}},"post":{"summary":"Register Computer","description":"Mint a per-computer device token (disclosed exactly once).\n\nAny authenticated human may provision a computer they own; the server\nalways mints the token for humans. The operator may register unowned\n(instance) computers and may supply the plaintext token explicitly.","operationId":"register_computer_v1_computers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterComputerBody"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Register Computer V1 Computers Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/heartbeat":{"post":{"summary":"Worker Heartbeat","operationId":"worker_heartbeat_v1_workers_heartbeat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Worker Heartbeat V1 Workers Heartbeat Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/sync/batches":{"post":{"summary":"Ingest Sync Batch","operationId":"ingest_sync_batch_v1_workers_sync_batches_post","parameters":[{"name":"computer_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Computer Id"}},{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ingest Sync Batch V1 Workers Sync Batches Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/sync/diagnostics":{"post":{"summary":"Submit Sync Diagnostic","operationId":"submit_sync_diagnostic_v1_workers_sync_diagnostics_post","parameters":[{"name":"computer_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Computer Id"}},{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Workspace Id"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"title":"Agent Id"}},{"name":"report_kind","in":"query","required":false,"schema":{"type":"string","default":"worker_failure","title":"Report Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Submit Sync Diagnostic V1 Workers Sync Diagnostics Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/sync/manifests":{"post":{"summary":"Create Sync Manifest","operationId":"create_sync_manifest_v1_workers_sync_manifests_post","parameters":[{"name":"computer_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Computer Id"}},{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Workspace Id"}},{"name":"agent_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Sync Manifest V1 Workers Sync Manifests Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/sync/manifests/{manifest_id}/content":{"put":{"summary":"Upload Sync Manifest Content","operationId":"upload_sync_manifest_content_v1_workers_sync_manifests__manifest_id__content_put","parameters":[{"name":"manifest_id","in":"path","required":true,"schema":{"type":"string","title":"Manifest Id"}},{"name":"computer_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Computer Id"}},{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Workspace Id"}},{"name":"agent_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upload Sync Manifest Content V1 Workers Sync Manifests  Manifest Id  Content Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ops/sync":{"get":{"summary":"Ops Sync","operationId":"ops_sync_v1_ops_sync_get","parameters":[{"name":"resource","in":"query","required":false,"schema":{"type":"string","default":"status","title":"Resource"}},{"name":"computer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"title":"Computer Id"}},{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"title":"Workspace Id"}},{"name":"report_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"title":"Report Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ops Sync V1 Ops Sync Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ops/memory-replica":{"get":{"summary":"Ops Memory Replica","operationId":"ops_memory_replica_v1_ops_memory_replica_get","parameters":[{"name":"resource","in":"query","required":false,"schema":{"type":"string","default":"manifests","title":"Resource"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"const":"ready","type":"string"},{"type":"null"}],"title":"State"}},{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Workspace Id"}},{"name":"agent_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Agent Id"}},{"name":"source_computer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"title":"Source Computer Id"}},{"name":"memory_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}],"title":"Memory Id"}},{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}],"title":"Session Id"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Kind"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Q"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Source"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Status"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"recent","title":"Sort"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":100000,"minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ops Memory Replica V1 Ops Memory Replica Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/work-items":{"get":{"summary":"List Work Items","operationId":"list_work_items_v1_workspaces__workspace_id__work_items_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Work Items V1 Workspaces  Workspace Id  Work Items Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Work Item","operationId":"create_work_item_v1_workspaces__workspace_id__work_items_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkItem"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Work Item V1 Workspaces  Workspace Id  Work Items Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/gates/{gate_id}/resolve":{"post":{"summary":"Resolve Gate","description":"Resolve a work item's verify-leg gate with a server-derived receipt actor.","operationId":"resolve_gate_v1_gates__gate_id__resolve_post","parameters":[{"name":"gate_id","in":"path","required":true,"schema":{"type":"string","title":"Gate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveGateBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Resolve Gate V1 Gates  Gate Id  Resolve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/board":{"get":{"summary":"Get Workboard","operationId":"get_workboard_v1_workspaces__workspace_id__board_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Workboard V1 Workspaces  Workspace Id  Board Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/proposals":{"get":{"summary":"List Proposals","operationId":"list_proposals_v1_workspaces__workspace_id__proposals_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Proposals V1 Workspaces  Workspace Id  Proposals Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Proposal","operationId":"create_proposal_v1_workspaces__workspace_id__proposals_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProposalBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Proposal V1 Workspaces  Workspace Id  Proposals Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/grants/{grant_id}/proposals":{"post":{"summary":"Worker Create Proposal","operationId":"worker_create_proposal_v1_workers_grants__grant_id__proposals_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProposalBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Worker Create Proposal V1 Workers Grants  Grant Id  Proposals Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/proposals/{proposal_id}/disposition":{"post":{"summary":"Disposition Proposal","operationId":"disposition_proposal_v1_workspaces__workspace_id__proposals__proposal_id__disposition_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","title":"Proposal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalDispositionBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Disposition Proposal V1 Workspaces  Workspace Id  Proposals  Proposal Id  Disposition Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/work-items/{work_item_id}/authorize":{"post":{"summary":"Authorize Work Item","operationId":"authorize_work_item_v1_workspaces__workspace_id__work_items__work_item_id__authorize_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"work_item_id","in":"path","required":true,"schema":{"type":"string","title":"Work Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeWorkItemBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Authorize Work Item V1 Workspaces  Workspace Id  Work Items  Work Item Id  Authorize Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/work-items/{work_item_id}/archive":{"post":{"summary":"Archive Work Item","operationId":"archive_work_item_v1_workspaces__workspace_id__work_items__work_item_id__archive_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"work_item_id","in":"path","required":true,"schema":{"type":"string","title":"Work Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveWorkItemBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Archive Work Item V1 Workspaces  Workspace Id  Work Items  Work Item Id  Archive Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/missions":{"get":{"summary":"List Missions","operationId":"list_missions_v1_workspaces__workspace_id__missions_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Missions V1 Workspaces  Workspace Id  Missions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/missions/{mission_id}":{"get":{"summary":"Mission Detail","operationId":"mission_detail_v1_workspaces__workspace_id__missions__mission_id__get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"mission_id","in":"path","required":true,"schema":{"type":"string","title":"Mission Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Mission Detail V1 Workspaces  Workspace Id  Missions  Mission Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/missions/{mission_id}/actions":{"post":{"summary":"Mission Action","operationId":"mission_action_v1_workspaces__workspace_id__missions__mission_id__actions_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"mission_id","in":"path","required":true,"schema":{"type":"string","title":"Mission Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MissionActionBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Mission Action V1 Workspaces  Workspace Id  Missions  Mission Id  Actions Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/grants/{grant_id}/mission-checkpoints":{"post":{"summary":"Post Mission Checkpoint","operationId":"post_mission_checkpoint_v1_workers_grants__grant_id__mission_checkpoints_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MissionCheckpointBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Post Mission Checkpoint V1 Workers Grants  Grant Id  Mission Checkpoints Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/grants/{grant_id}/mission-verification":{"post":{"summary":"Post Mission Verification","description":"Autonomous-mode agent reviewer close of a verifying Mission.\n\nSame grant-principal auth as the other worker routes. Reviewer identity\nis payload truth (bound from the caller grant control-side, never\nbody-supplied); the mode gate is read at call time — engaged refuses\n403 and the operator route stays the single closer.","operationId":"post_mission_verification_v1_workers_grants__grant_id__mission_verification_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MissionVerificationBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Post Mission Verification V1 Workers Grants  Grant Id  Mission Verification Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/missions/{mission_id}/verification":{"post":{"summary":"Complete Mission Verification","operationId":"complete_mission_verification_v1_workspaces__workspace_id__missions__mission_id__verification_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"mission_id","in":"path","required":true,"schema":{"type":"string","title":"Mission Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteVerificationBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Complete Mission Verification V1 Workspaces  Workspace Id  Missions  Mission Id  Verification Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workflow-packs":{"get":{"summary":"List Workflow Packs","description":"Registry read: global packs + the caller's own (operator/admin: all).","operationId":"list_workflow_packs_v1_workflow_packs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Workflow Packs V1 Workflow Packs Get"}}}}}},"post":{"summary":"Create Workflow Pack","description":"Publish a pack version (immutable; schema-validated fail-closed).\n\nHuman principal: owner stamped = their user id. Operator: global (NULL).","operationId":"create_workflow_pack_v1_workflow_packs_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Workflow Pack V1 Workflow Packs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/workflow-runs":{"get":{"summary":"List Workflow Runs","operationId":"list_workflow_runs_v1_workspaces__workspace_id__workflow_runs_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"view","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"View"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Workflow Runs V1 Workspaces  Workspace Id  Workflow Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Workflow Run","operationId":"create_workflow_run_v1_workspaces__workspace_id__workflow_runs_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkflowRunBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Workflow Run V1 Workspaces  Workspace Id  Workflow Runs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/workflow-runs/{run_id}":{"get":{"summary":"Get Workflow Run","operationId":"get_workflow_run_v1_workspaces__workspace_id__workflow_runs__run_id__get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Workflow Run V1 Workspaces  Workspace Id  Workflow Runs  Run Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/workflow-runs/{run_id}/stop":{"post":{"summary":"Stop Workflow Run","description":"Revoke live slot grants and park the run stopped. Idempotent 200.","operationId":"stop_workflow_run_v1_workspaces__workspace_id__workflow_runs__run_id__stop_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Stop Workflow Run V1 Workspaces  Workspace Id  Workflow Runs  Run Id  Stop Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/workflow-runs/{run_id}/steering":{"post":{"summary":"Steer Workflow Run","description":"Resolve an open workflow_steering gate and advance the run.","operationId":"steer_workflow_run_v1_workspaces__workspace_id__workflow_runs__run_id__steering_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowSteeringBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Steer Workflow Run V1 Workspaces  Workspace Id  Workflow Runs  Run Id  Steering Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/grants/{grant_id}/workflow-runs":{"post":{"summary":"Start Grant Workflow Run","operationId":"start_grant_workflow_run_v1_workers_grants__grant_id__workflow_runs_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartWorkflowRunBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Start Grant Workflow Run V1 Workers Grants  Grant Id  Workflow Runs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/grants/{grant_id}/workflow-runs/{run_id}":{"get":{"summary":"Get Grant Workflow Run","operationId":"get_grant_workflow_run_v1_workers_grants__grant_id__workflow_runs__run_id__get","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Grant Workflow Run V1 Workers Grants  Grant Id  Workflow Runs  Run Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/grants/{grant_id}/workflow-runs/{run_id}/stop":{"post":{"summary":"Stop Grant Workflow Run","operationId":"stop_grant_workflow_run_v1_workers_grants__grant_id__workflow_runs__run_id__stop_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Stop Grant Workflow Run V1 Workers Grants  Grant Id  Workflow Runs  Run Id  Stop Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/grants/{grant_id}/workflow-artifact":{"post":{"summary":"Post Workflow Artifact","description":"Worker posts its slot's final JSON output (grant Bearer auth).\n\nCAS by request_id (idempotent 200 {status: stored}); parse/schema failure\n→ 422 {detail: 'invalid artifact', errors: [..]} — the worker proceeds to\nits terminal status; the reconciler owns retry/failed.","operationId":"post_workflow_artifact_v1_workers_grants__grant_id__workflow_artifact_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowArtifactBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Post Workflow Artifact V1 Workers Grants  Grant Id  Workflow Artifact Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/grants/{grant_id}/gates":{"post":{"summary":"Open Grant Gate","description":"P3.1: a live session opens a typed decision gate for its own work item.\nGrant Bearer only (workspace + work item derived from the grant, never\nmodel-supplied). The card parks blocked; the operator resolves it.","operationId":"open_grant_gate_v1_workers_grants__grant_id__gates_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenGrantGateBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Open Grant Gate V1 Workers Grants  Grant Id  Gates Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/work-items/{work_item_id}/decision-gates":{"post":{"summary":"Create Decision Gate","operationId":"create_decision_gate_v1_workspaces__workspace_id__work_items__work_item_id__decision_gates_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"work_item_id","in":"path","required":true,"schema":{"type":"string","title":"Work Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDecisionGateBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Decision Gate V1 Workspaces  Workspace Id  Work Items  Work Item Id  Decision Gates Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decision-gates/{gate_id}/resolve":{"post":{"summary":"Resolve Decision Gate","operationId":"resolve_decision_gate_v1_decision_gates__gate_id__resolve_post","parameters":[{"name":"gate_id","in":"path","required":true,"schema":{"type":"string","title":"Gate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveDecisionGateBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Resolve Decision Gate V1 Decision Gates  Gate Id  Resolve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decision-gates/{gate_id}":{"get":{"summary":"Get Decision Gate","operationId":"get_decision_gate_v1_decision_gates__gate_id__get","parameters":[{"name":"gate_id","in":"path","required":true,"schema":{"type":"string","title":"Gate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Decision Gate V1 Decision Gates  Gate Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/fs-access":{"get":{"summary":"List Fs Access","description":"Folder-access entries for the management list (read, like gate reads).\n\nworkspace_repos is ADDITIVE (items keeps its shape): each workspace repo\nwith its mint-eligibility — eligible local-path sources stamp a derived\nwrite entry onto every mint; remote sources never do.","operationId":"list_fs_access_v1_workspaces__workspace_id__fs_access_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Fs Access V1 Workspaces  Workspace Id  Fs Access Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Add Fs Access","operationId":"add_fs_access_v1_workspaces__workspace_id__fs_access_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddFsAccessBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Fs Access V1 Workspaces  Workspace Id  Fs Access Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/fs-access/{entry_id}/revoke":{"post":{"summary":"Revoke Fs Access","operationId":"revoke_fs_access_v1_workspaces__workspace_id__fs_access__entry_id__revoke_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Revoke Fs Access V1 Workspaces  Workspace Id  Fs Access  Entry Id  Revoke Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/decision-gates":{"get":{"summary":"List Decision Gates","operationId":"list_decision_gates_v1_workspaces__workspace_id__decision_gates_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"work_item_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Work Item Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Decision Gates V1 Workspaces  Workspace Id  Decision Gates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/isolation-rejection":{"post":{"summary":"Isolation Rejection","operationId":"isolation_rejection_v1_workers_isolation_rejection_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsolationRejectionBody"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Isolation Rejection V1 Workers Isolation Rejection Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/ops-events":{"post":{"summary":"Worker Ops Event","description":"Worker swallowed-seam ingest (device or grant credential).\n\nCosmetic: never flips grant status. Grant principals may only attach\ntheir own grant_id. Computer principals stamp computer_id from the\npresenting token. Unknown workspace_id is stored as null (fail-open).","operationId":"worker_ops_event_v1_workers_ops_events_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpsEventBody"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Worker Ops Event V1 Workers Ops Events Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/isolation-rejections":{"get":{"summary":"List Isolation Rejections","operationId":"list_isolation_rejections_v1_isolation_rejections_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"computer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Computer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Isolation Rejections V1 Isolation Rejections Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/red-flags":{"get":{"summary":"List Red Flags","operationId":"list_red_flags_v1_red_flags_get","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"}},{"name":"active","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Active"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Red Flags V1 Red Flags Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/red-flags/{key}/clear":{"post":{"summary":"Clear Red Flag","operationId":"clear_red_flag_v1_red_flags__key__clear_post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearRedFlagBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Clear Red Flag V1 Red Flags  Key  Clear Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ops/fleet":{"get":{"summary":"Ops Fleet","operationId":"ops_fleet_v1_ops_fleet_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Ops Fleet V1 Ops Fleet Get"}}}}}}},"/v1/ops/brief":{"get":{"summary":"Ops Brief","operationId":"ops_brief_v1_ops_brief_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Ops Brief V1 Ops Brief Get"}}}}}}},"/v1/ops/assurance":{"get":{"summary":"Ops Assurance","description":"Durability assurance read — freshness + restorability over stamped facts.\n\nSame principal gating as /v1/ops/brief (401/403 when APIARY_OPERATOR_TOKEN\nset, open when unset for demo). A PURE read: no sweep arming, no events\nscan, never a writer of red_flags. Returns {generated_at, status\n(ok|warn|crit, worst check wins), checks: [{name, status, age_s,\nthreshold_s, detail}], meta: {backup_interval_s, backup_last_file}}.\n\nChecks: backup_freshness (reads ONLY backup_last_ok_at — the duty stamp\nlast_backup_at stays fresh on throttled no-ops and is never consulted;\nwarn 1.5x / crit 2x the effective interval), backup_last_attempt (crit on\nresult=error, detail is the scrubbed backup_last_error), backup_rotation\n(E3-1 prune accounting; honest-absent 'not yet stamped' until the first\nfull-rotation verify), and duty_liveness:{name} per loop duty (loop-\nliveness only, never functional health; 600s = 2x the 300s backoff cap).","operationId":"ops_assurance_v1_ops_assurance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Ops Assurance V1 Ops Assurance Get"}}}}}}},"/v1/workspaces/{workspace_id}/work-items/{work_item_id}/dispatch/preview":{"post":{"summary":"Dispatch Preview","operationId":"dispatch_preview_v1_workspaces__workspace_id__work_items__work_item_id__dispatch_preview_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"work_item_id","in":"path","required":true,"schema":{"type":"string","title":"Work Item Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DispatchBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Dispatch Preview V1 Workspaces  Workspace Id  Work Items  Work Item Id  Dispatch Preview Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/work-items/{work_item_id}/dispatch":{"post":{"summary":"Dispatch Work Item","operationId":"dispatch_work_item_v1_workspaces__workspace_id__work_items__work_item_id__dispatch_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"work_item_id","in":"path","required":true,"schema":{"type":"string","title":"Work Item Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DispatchBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Dispatch Work Item V1 Workspaces  Workspace Id  Work Items  Work Item Id  Dispatch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/dispatch/suggestions":{"get":{"summary":"Dispatch Suggestions","operationId":"dispatch_suggestions_v1_workspaces__workspace_id__dispatch_suggestions_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Dispatch Suggestions V1 Workspaces  Workspace Id  Dispatch Suggestions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/dispatch/defaults":{"get":{"summary":"Dispatch Defaults","operationId":"dispatch_defaults_v1_workspaces__workspace_id__dispatch_defaults_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Dispatch Defaults V1 Workspaces  Workspace Id  Dispatch Defaults Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/grant-activity":{"get":{"summary":"List Grant Activity","operationId":"list_grant_activity_v1_workspaces__workspace_id__grant_activity_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After"}},{"name":"task_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Grant Activity V1 Workspaces  Workspace Id  Grant Activity Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/grants/pull":{"get":{"summary":"Pull Grants","operationId":"pull_grants_v1_workers_grants_pull_get","parameters":[{"name":"computer_id","in":"query","required":true,"schema":{"type":"string","title":"Computer Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":5,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Pull Grants V1 Workers Grants Pull Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/grants/{grant_id}":{"get":{"summary":"Get Grant","description":"Read grant status. Terminal state is API-checkable, not thread prose.","operationId":"get_grant_v1_workspaces__workspace_id__grants__grant_id__get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Grant V1 Workspaces  Workspace Id  Grants  Grant Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/grants/{grant_id}/revoke":{"post":{"summary":"Revoke Grant","operationId":"revoke_grant_v1_workspaces__workspace_id__grants__grant_id__revoke_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Revoke Grant V1 Workspaces  Workspace Id  Grants  Grant Id  Revoke Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/grants/{grant_id}/hold":{"post":{"summary":"Hold Grant","operationId":"hold_grant_v1_workspaces__workspace_id__grants__grant_id__hold_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/HoldGrantBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Hold Grant V1 Workspaces  Workspace Id  Grants  Grant Id  Hold Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/grants/{grant_id}/release":{"post":{"summary":"Release Grant","operationId":"release_grant_v1_workspaces__workspace_id__grants__grant_id__release_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Release Grant V1 Workspaces  Workspace Id  Grants  Grant Id  Release Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/grants/{grant_id}/instructions":{"post":{"summary":"Enqueue Grant Instruction","operationId":"enqueue_grant_instruction_v1_workspaces__workspace_id__grants__grant_id__instructions_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnqueueGrantInstructionBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Enqueue Grant Instruction V1 Workspaces  Workspace Id  Grants  Grant Id  Instructions Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/grants/{grant_id}/status":{"post":{"summary":"Grant Status","operationId":"grant_status_v1_workers_grants__grant_id__status_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantStatusBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Grant Status V1 Workers Grants  Grant Id  Status Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/grants/{grant_id}/activity":{"post":{"summary":"Post Grant Activity","description":"One-shot stream runner feed: throttled thinking excerpts, tool_start\nnotices, and empty liveness beats (grant-liveness-thinking plan).\n\nSame scoping as grant status writes — a grant Bearer posts only for its\nown grant_id. The store gates on active/expiry; missing/foreign/terminal\ngrant is 403, never 404. Malformed batch entries are skipped, not 422'd;\nUNIQUE(grant_id, seq) makes poster redelivery idempotent.","operationId":"post_grant_activity_v1_workers_grants__grant_id__activity_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantActivityBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Post Grant Activity V1 Workers Grants  Grant Id  Activity Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/grants/{grant_id}/instructions/pull":{"get":{"summary":"Pull Grant Instructions","description":"P3: a live session pulls control→session instructions (gate.resolved,\ncancel, session.close). Same scoping as grant status writes — a device\nworker pulls for its sessions; a grant-token plugin pulls only its own.\nUnder the /v1/workers/grants/ allowlist prefix (grant Bearer permitted).","operationId":"pull_grant_instructions_v1_workers_grants__grant_id__instructions_pull_get","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Pull Grant Instructions V1 Workers Grants  Grant Id  Instructions Pull Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/messages":{"get":{"summary":"List Messages","operationId":"list_messages_v1_workspaces__workspace_id__messages_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"room_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Room Id"}},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Messages V1 Workspaces  Workspace Id  Messages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Post Message","description":"Post a principal-attributed human message and route it to a worker inbox.","operationId":"post_message_v1_workspaces__workspace_id__messages_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostMessageBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Post Message V1 Workspaces  Workspace Id  Messages Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/grants/{grant_id}/continue":{"post":{"summary":"Continue Chat Grant","description":"Mint an explicitly authorized continuation chat grant.","operationId":"continue_chat_grant_v1_workspaces__workspace_id__grants__grant_id__continue_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ContinueChatGrantBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Continue Chat Grant V1 Workspaces  Workspace Id  Grants  Grant Id  Continue Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/grants/{grant_id}/retry":{"post":{"summary":"Retry Chat Grant","description":"Mint an explicitly authorized retry of a failed chat grant.","operationId":"retry_chat_grant_v1_workspaces__workspace_id__grants__grant_id__retry_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Retry Chat Grant V1 Workspaces  Workspace Id  Grants  Grant Id  Retry Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/inbox/pull":{"get":{"summary":"Pull Inbox","description":"Worker pulls pending human messages to answer (router → bot).","operationId":"pull_inbox_v1_workers_inbox_pull_get","parameters":[{"name":"computer_id","in":"query","required":true,"schema":{"type":"string","title":"Computer Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Pull Inbox V1 Workers Inbox Pull Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/inbox/{inbox_id}/complete":{"post":{"summary":"Complete Inbox","description":"Worker posts agent reply into the workspace thread.\n\nWhen computer tokens are configured, require X-Apiary-Computer-Token for the\ninbox row's computer_id (same binding as pull) so a peer device cannot complete\nanother computer's claim.","operationId":"complete_inbox_v1_workers_inbox__inbox_id__complete_post","parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"type":"string","title":"Inbox Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteInboxBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Complete Inbox V1 Workers Inbox  Inbox Id  Complete Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/inbox/{inbox_id}/fail":{"post":{"summary":"Fail Inbox","operationId":"fail_inbox_v1_workers_inbox__inbox_id__fail_post","parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"type":"string","title":"Inbox Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FailInboxBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Fail Inbox V1 Workers Inbox  Inbox Id  Fail Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/router/pull":{"get":{"summary":"Pull Router","description":"Luna router lane: pending join-vs-new classifications for the router.\n\nDevice-only (a grant principal is 403'd by the worker middleware — the\npath is outside its allowlist). Kill switch: meta router_agent_slug\nunset → empty; frozen → empty. The same transaction sweeps stale\npending rows to 'skipped'.","operationId":"pull_router_v1_workers_router_pull_get","parameters":[{"name":"computer_id","in":"query","required":true,"schema":{"type":"string","title":"Computer Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":5,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Pull Router V1 Workers Router Pull Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/router/{message_id}/decision":{"post":{"summary":"Router Decision","description":"Apply the router's verdict; the row is ALWAYS marked classified.\n\nCorrections apply only inside the narrow safety window (see\nStore.reassign_chat_task); every failure keeps the deterministic stamp.\nWhen computer tokens are configured, bound to the message's inbox row's\ncomputer (same binding as inbox complete).","operationId":"router_decision_v1_workers_router__message_id__decision_post","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RouterDecisionBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Router Decision V1 Workers Router  Message Id  Decision Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/grants/{grant_id}/task-outcome/stage":{"post":{"summary":"Stage Task Outcome","operationId":"stage_task_outcome_v1_workers_grants__grant_id__task_outcome_stage_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageTaskOutcomeBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Stage Task Outcome V1 Workers Grants  Grant Id  Task Outcome Stage Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/grants/{grant_id}/task-outcome":{"get":{"summary":"Read Task Outcome","operationId":"read_task_outcome_v1_workers_grants__grant_id__task_outcome_get","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Read Task Outcome V1 Workers Grants  Grant Id  Task Outcome Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/grants/{grant_id}/task-outcome/finalize":{"post":{"summary":"Finalize Task Outcome","operationId":"finalize_task_outcome_v1_workers_grants__grant_id__task_outcome_finalize_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeTaskOutcomeBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Finalize Task Outcome V1 Workers Grants  Grant Id  Task Outcome Finalize Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/messages":{"post":{"summary":"Worker Agent Message","description":"Worker posts agent progress/result into a workspace thread (no inbox re-queue).\n\nFail-closed: grant_id must name an active grant for (workspace, agent);\nagent must be a workspace member. Cross-workspace bleed returns 403.\nGrant-scoped principal must match body.grant_id.","operationId":"worker_agent_message_v1_workers_messages_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerAgentMessageBody"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Worker Agent Message V1 Workers Messages Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/grants/{grant_id}/consults":{"post":{"summary":"Create Consult","description":"P4: requester opens an advice-only consult from its live grant.\n\nAuth mirrors open_grant_gate; the error mapping deliberately differs —\nPermissionError (freeze / locked / dual-run) is a 409 here. Storm\nrefusals land as 409 with the verbatim refusal_reason; duplicate\ncollapse returns 200 with deduped:true (no second row, no event).","operationId":"create_consult_v1_workers_grants__grant_id__consults_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConsultBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Consult V1 Workers Grants  Grant Id  Consults Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Grant Consults","description":"P4: requester self-poll — this grant's consults, responses embedded.\n\nThe one-shot requester's answer channel (live sessions also get the\nconsult.answered push). Same grant-principal scoping as R1/R2.","operationId":"list_grant_consults_v1_workers_grants__grant_id__consults_get","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Grant Consults V1 Workers Grants  Grant Id  Consults Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/grants/{grant_id}/consults/{consult_id}/respond":{"post":{"summary":"Respond Consult","description":"P4: responder answers its consult (single answer, race-guarded).\n\nThe Bearer grant must be the consult's minted responder grant (wrong\ngrant → 403). The consult.answered enqueue to the requester is\nbest-effort inside the store and can never 500 this route.","operationId":"respond_consult_v1_workers_grants__grant_id__consults__consult_id__respond_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}},{"name":"consult_id","in":"path","required":true,"schema":{"type":"string","title":"Consult Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondConsultBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Respond Consult V1 Workers Grants  Grant Id  Consults  Consult Id  Respond Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/consults":{"get":{"summary":"List Consults","operationId":"list_consults_v1_workspaces__workspace_id__consults_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"from_agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Agent Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Consults V1 Workspaces  Workspace Id  Consults Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/consults/{consult_id}":{"get":{"summary":"Get Consult","operationId":"get_consult_v1_workspaces__workspace_id__consults__consult_id__get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"consult_id","in":"path","required":true,"schema":{"type":"string","title":"Consult Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Consult V1 Workspaces  Workspace Id  Consults  Consult Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/consults/{consult_id}/respond":{"post":{"summary":"Operator Respond Consult","operationId":"operator_respond_consult_v1_workspaces__workspace_id__consults__consult_id__respond_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"consult_id","in":"path","required":true,"schema":{"type":"string","title":"Consult Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondConsultBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Operator Respond Consult V1 Workspaces  Workspace Id  Consults  Consult Id  Respond Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/consults/{consult_id}/cancel":{"post":{"summary":"Cancel Consult","operationId":"cancel_consult_v1_workspaces__workspace_id__consults__consult_id__cancel_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"consult_id","in":"path","required":true,"schema":{"type":"string","title":"Consult Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Consult V1 Workspaces  Workspace Id  Consults  Consult Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/computers/{computer_id}/credentials/{provider}/reauth":{"post":{"summary":"Start Reauth","operationId":"start_reauth_v1_computers__computer_id__credentials__provider__reauth_post","parameters":[{"name":"computer_id","in":"path","required":true,"schema":{"type":"string","title":"Computer Id"}},{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Start Reauth V1 Computers  Computer Id  Credentials  Provider  Reauth Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/computers/{computer_id}/credentials/reauth/{session_id}/cancel":{"post":{"summary":"Cancel Reauth","operationId":"cancel_reauth_v1_computers__computer_id__credentials_reauth__session_id__cancel_post","parameters":[{"name":"computer_id","in":"path","required":true,"schema":{"type":"string","title":"Computer Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Reauth V1 Computers  Computer Id  Credentials Reauth  Session Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/computers/{computer_id}/credentials/reauth/{session_id}/redirect":{"post":{"summary":"Submit Redirect","operationId":"submit_redirect_v1_computers__computer_id__credentials_reauth__session_id__redirect_post","parameters":[{"name":"computer_id","in":"path","required":true,"schema":{"type":"string","title":"Computer Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedirectInputBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Submit Redirect V1 Computers  Computer Id  Credentials Reauth  Session Id  Redirect Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/computers/{computer_id}/credentials":{"get":{"summary":"List Credentials","operationId":"list_credentials_v1_computers__computer_id__credentials_get","parameters":[{"name":"computer_id","in":"path","required":true,"schema":{"type":"string","title":"Computer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Credentials V1 Computers  Computer Id  Credentials Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/credentials/reauth-report":{"post":{"summary":"Worker Reauth Report","description":"Worker advances its own reauth session (url/code/port/status).\n\nComputer-scoped: the principal must own body.computer_id AND the session\nmust belong to that computer (service enforces both).","operationId":"worker_reauth_report_v1_workers_credentials_reauth_report_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReauthReportBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Worker Reauth Report V1 Workers Credentials Reauth Report Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/grants/{grant_id}/delegations":{"post":{"summary":"Create Delegation","description":"A live host/allowlisted grant delegates real, tracked coding work.\n\nAuth mirrors create_consult (grant Bearer, own grant only; device\nallowed). Identity (workspace, from_agent, depth, origin room/task)\ncomes ONLY from the caller grant payload — the wire model forbids\nbody-supplied identity outright (422). Mappings: master flag off → 403\n(\"delegation disabled\"); fence refusals → 409 with the VERBATIM\npersisted reason (the model sees it in-turn — the anti-incident\nguarantee); dedupe collapse → 200 ``deduped:true``; a flipped engaged\nmatrix cell → 202 ``pending_approval`` with the gate id; minted → 201.\nNo token ever rides the response (the delegation row carries none).","operationId":"create_delegation_v1_workers_grants__grant_id__delegations_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDelegationBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Create Delegation V1 Workers Grants  Grant Id  Delegations Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Grant Delegations","description":"Requester self-poll (delivery leg 3) — this grant's delegations with\nstatus + result summary embedded; returning a terminal row CAS-stamps\nresult_delivered_at (delivered_channel='poll'). Works with the master\nflag OFF (reads stay open while the domain is dark). Same grant-principal\nscoping as the consult self-poll.","operationId":"list_grant_delegations_v1_workers_grants__grant_id__delegations_get","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Grant Delegations V1 Workers Grants  Grant Id  Delegations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/grants/{grant_id}/delegations/{delegation_id}/verify":{"post":{"summary":"Verify Delegation","description":"Delegator leg resolution (§10-D2 HYBRID, decided at call time).\n\nAuth is agent-scoped delegator-only: the Bearer grant must belong to the\ndelegation's from_agent (the original grant may be dead — the\ndelegation_result followup grant is the natural verifier vehicle) AND\nthat agent must still hold delegation authority (fresh DB read).\nAutonomous mode → legs resolve through the existing gates machinery with\ncontrol-validated evidence_refs (manufactured receipts → 400 verbatim);\nengaged → 409 with the actionable D2 copy (the operator closes via the\ngates route). Legs-all-green → work item done + delegation completed.","operationId":"verify_delegation_v1_workers_grants__grant_id__delegations__delegation_id__verify_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}},{"name":"delegation_id","in":"path","required":true,"schema":{"type":"string","title":"Delegation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyDelegationBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Verify Delegation V1 Workers Grants  Grant Id  Delegations  Delegation Id  Verify Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/grants/{grant_id}/delegations/{delegation_id}/cancel":{"post":{"summary":"Cancel Delegation","description":"Delegator cancel (§2 Q12): REAL revocation of the delegate grant\n(card→ready per existing revoke semantics — deliberately unlike consult's\nnon-revoking cancel), row → cancelled with the reason verbatim. Same\nagent-scoped delegator-only auth as verify.","operationId":"cancel_delegation_v1_workers_grants__grant_id__delegations__delegation_id__cancel_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}},{"name":"delegation_id","in":"path","required":true,"schema":{"type":"string","title":"Delegation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelDelegationBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Delegation V1 Workers Grants  Grant Id  Delegations  Delegation Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/delegations":{"get":{"summary":"List Delegations","operationId":"list_delegations_v1_workspaces__workspace_id__delegations_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Delegations V1 Workspaces  Workspace Id  Delegations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspaces/{workspace_id}/scorecards":{"get":{"summary":"List Scorecards","description":"Workspace-scoped scorecard rows, most recent first (per-workspace\ndoctrine §7: the corpus never crosses a workspace boundary).","operationId":"list_scorecards_v1_workspaces__workspace_id__scorecards_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(execution|verification)$"},{"type":"null"}],"title":"Kind"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Scorecards V1 Workspaces  Workspace Id  Scorecards Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/models":{"get":{"summary":"Admin Models","description":"All models seen in the fleet (agents ∪ scorecards) with measured\naggregates and the matching baseline (exact beats longest-prefix-*).","operationId":"adminModels","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Adminmodels"}}}}}}},"/v1/admin/users":{"get":{"summary":"Admin Users","description":"users → owned computers → agents, plus unowned (operator-registered)\ncomputers — the complete fleet picture.","operationId":"adminUsers","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Adminusers"}}}}}},"post":{"summary":"Admin Create User","description":"Create a human account; the minted temp password (when no explicit\npassword is supplied) appears ONLY in this response.","operationId":"adminCreateUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserCreateBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admincreateuser"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/{user_id}/reset_password":{"post":{"summary":"Admin Reset Password","operationId":"adminResetPassword","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Adminresetpassword"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/{user_id}/status":{"post":{"summary":"Admin Set User Status","description":"'disabled' blocks login AND revokes every live session.","operationId":"adminSetUserStatus","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserStatusBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Adminsetuserstatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/{user_id}":{"delete":{"summary":"Admin Delete User","description":"Workspaces the user solo-owns are archived first; 409 verbatim when\nanother human would be stranded or an archive fence refuses.","operationId":"adminDeleteUser","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admindeleteuser"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/invitations":{"post":{"summary":"Admin Mint Invitation","description":"Sign-in-only invitation; the code/URL appear ONLY in this response.","operationId":"adminMintInvitation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminInvitationBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Adminmintinvitation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/baselines":{"get":{"summary":"List Baselines","operationId":"adminListBaselines","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Adminlistbaselines"}}}}}}},"/v1/admin/baselines/{model_pattern}":{"put":{"summary":"Upsert Baseline","operationId":"adminUpsertBaseline","parameters":[{"name":"model_pattern","in":"path","required":true,"schema":{"type":"string","title":"Model Pattern"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaselineUpsertBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Adminupsertbaseline"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Baseline","operationId":"adminDeleteBaseline","parameters":[{"name":"model_pattern","in":"path","required":true,"schema":{"type":"string","title":"Model Pattern"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admindeletebaseline"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/diagnostics":{"get":{"summary":"Admin List Diagnostics","description":"Newest-first client diagnostics reports with parsed report objects.","operationId":"adminListDiagnostics","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Adminlistdiagnostics"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AddFsAccessBody":{"properties":{"path":{"type":"string","title":"Path"},"mode":{"type":"string","enum":["read","write"],"title":"Mode"}},"type":"object","required":["path","mode"],"title":"AddFsAccessBody","description":"Operator manual folder-access add (no gate — the operator IS the\napproval). Path is operator-supplied but still bounded and syntactically\nvalidated in the service exactly like every stored path (fail-closed)."},"AdminInvitationBody":{"properties":{"email":{"anyOf":[{"type":"string","maxLength":320,"minLength":3},{"type":"null"}],"title":"Email"},"note":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Note"}},"additionalProperties":false,"type":"object","title":"AdminInvitationBody"},"AdminUserCreateBody":{"properties":{"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"display_name":{"type":"string","maxLength":200,"minLength":1,"title":"Display Name"},"password":{"anyOf":[{"type":"string","maxLength":1024,"minLength":10},{"type":"null"}],"title":"Password"}},"additionalProperties":false,"type":"object","required":["email","display_name"],"title":"AdminUserCreateBody"},"AdminUserStatusBody":{"properties":{"status":{"type":"string","enum":["active","disabled"],"title":"Status"}},"additionalProperties":false,"type":"object","required":["status"],"title":"AdminUserStatusBody"},"ArchiveWorkItemBody":{"properties":{"archived":{"type":"boolean","title":"Archived"}},"type":"object","required":["archived"],"title":"ArchiveWorkItemBody"},"ArchiveWorkspaceBody":{"properties":{"archived":{"type":"boolean","title":"Archived"}},"type":"object","required":["archived"],"title":"ArchiveWorkspaceBody"},"AuthorizeWorkItemBody":{"properties":{"scope":{"additionalProperties":true,"type":"object","title":"Scope"},"budget":{"additionalProperties":true,"type":"object","title":"Budget"},"policy":{"additionalProperties":true,"type":"object","title":"Policy"},"plan_hash":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Plan Hash"},"expires_in_s":{"type":"integer","maximum":28800.0,"minimum":60.0,"title":"Expires In S","default":7200},"approved_by_type":{"type":"string","enum":["human","policy"],"title":"Approved By Type","default":"human"},"approved_by_id":{"type":"string","maxLength":256,"minLength":1,"title":"Approved By Id","default":"operator"},"start":{"type":"boolean","title":"Start","default":true}},"type":"object","title":"AuthorizeWorkItemBody"},"BaselineUpsertBody":{"properties":{"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"additionalProperties":false,"type":"object","required":["payload"],"title":"BaselineUpsertBody"},"CancelDelegationBody":{"properties":{"reason":{"type":"string","title":"Reason"}},"additionalProperties":false,"type":"object","required":["reason"],"title":"CancelDelegationBody","description":"POST .../delegations/{delegation_id}/cancel body.\n\nreason is required (tool schema apiary_delegation_cancel pins it) — a\ncancel without a stated reason is unauditable."},"ClearRedFlagBody":{"properties":{"disposition":{"type":"string","title":"Disposition"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["disposition"],"title":"ClearRedFlagBody"},"CompleteInboxBody":{"properties":{"reply_text":{"type":"string","title":"Reply Text"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},"type":"object","required":["reply_text"],"title":"CompleteInboxBody"},"CompleteVerificationBody":{"properties":{"artifact_hash":{"type":"string","maxLength":256,"minLength":1,"title":"Artifact Hash"},"status":{"type":"string","enum":["pass","fail"],"title":"Status"},"reviewer_type":{"type":"string","enum":["human","agent","ci"],"title":"Reviewer Type","default":"human"},"reviewer_id":{"type":"string","maxLength":256,"minLength":1,"title":"Reviewer Id","default":"operator"},"reviewer_grant_id":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Reviewer Grant Id"},"evidence":{"items":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}]},"type":"array","maxItems":100,"minItems":1,"title":"Evidence"}},"type":"object","required":["artifact_hash","status"],"title":"CompleteVerificationBody"},"ContinueChatGrantBody":{"properties":{"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"ContinueChatGrantBody","description":"Operator 'Keep going' (continue-mint-plan-2026-08-03). Empty body is\nfine — the source grant is the path param. Optional note rides the brief\nas operator context (never authorization-bearing)."},"ControlPlaneOwnerBody":{"properties":{"owner":{"type":"string","enum":["apiary","harness"],"title":"Owner"}},"type":"object","required":["owner"],"title":"ControlPlaneOwnerBody","description":"Dual-run flip: exactly one assignment authority per workspace."},"CreateAgent":{"properties":{"slug":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,62}$","title":"Slug"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"computer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Computer Id"},"default_persona_pack":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Persona Pack"},"runtime_kind":{"type":"string","title":"Runtime Kind","default":"claude_code"},"runtime_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runtime Provider"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"permission_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Permission Mode"},"checkout_suffix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkout Suffix"},"effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effort"},"identity_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Identity Prompt"},"can_review":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Can Review"},"proxy":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Proxy"}},"type":"object","required":["slug"],"title":"CreateAgent"},"CreateBridgeBody":{"properties":{"from_workspace_id":{"type":"string","title":"From Workspace Id"},"to_workspace_id":{"type":"string","title":"To Workspace Id"},"kind":{"type":"string","title":"Kind","default":"shared-edit"},"expires_at":{"type":"string","title":"Expires At"},"checkout_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkout Path"}},"type":"object","required":["from_workspace_id","to_workspace_id","expires_at"],"title":"CreateBridgeBody"},"CreateChannel":{"properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,62}$","title":"Key"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"}},"type":"object","required":["key"],"title":"CreateChannel"},"CreateConsultBody":{"properties":{"to_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Agent Id"},"kind":{"type":"string","title":"Kind"},"question":{"type":"string","title":"Question"},"subject_work_item_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Work Item Id"},"context_refs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Context Refs"},"budget":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Budget"},"in_reply_to_consult_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"In Reply To Consult Id"}},"additionalProperties":false,"type":"object","required":["kind","question"],"title":"CreateConsultBody","description":"P4: a live session opens an advice-only consult from its grant.\n\nIdentity is derived from the grant, never the body. to_agent_id None =\noperator-directed. Free-text/list bounds are validated in the store\n(ValueError → 400), keeping the wire model shape-only."},"CreateDecisionGateBody":{"properties":{"question":{"type":"string","title":"Question"},"kind":{"type":"string","title":"Kind","default":"custom"},"options":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Options"},"recommendation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommendation"},"grant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grant Id"}},"type":"object","required":["question"],"title":"CreateDecisionGateBody"},"CreateDelegationBody":{"properties":{"to_agent_slug":{"type":"string","title":"To Agent Slug"},"title":{"type":"string","title":"Title"},"brief":{"type":"string","title":"Brief"},"acceptance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acceptance"},"verify":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Verify"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"},"context_refs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Context Refs"},"budget":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Budget"},"checkout_mode":{"type":"string","enum":["isolated","shared"],"title":"Checkout Mode","default":"isolated"}},"additionalProperties":false,"type":"object","required":["to_agent_slug","title","brief"],"title":"CreateDelegationBody","description":"POST /v1/workers/grants/{grant_id}/delegations body."},"CreateProposalBody":{"properties":{"kind":{"type":"string","enum":["suggestion","suspected_bug"],"title":"Kind","default":"suggestion"},"title":{"type":"string","maxLength":240,"minLength":1,"title":"Title"},"summary":{"type":"string","maxLength":8000,"minLength":1,"title":"Summary"},"evidence":{"items":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}]},"type":"array","maxItems":50,"title":"Evidence"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"source_type":{"type":"string","maxLength":64,"minLength":1,"title":"Source Type","default":"human"},"source_id":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Source Id"},"created_by_type":{"type":"string","enum":["human","agent","monitor","imported"],"title":"Created By Type","default":"human"},"created_by_id":{"type":"string","maxLength":256,"minLength":1,"title":"Created By Id","default":"operator"},"suggested_priority":{"anyOf":[{"type":"string","enum":["low","normal","high","urgent"]},{"type":"null"}],"title":"Suggested Priority"},"dedupe_key":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Dedupe Key"}},"type":"object","required":["title","summary"],"title":"CreateProposalBody"},"CreateReviewBody":{"properties":{"work_item_id":{"type":"string","title":"Work Item Id"},"author_session":{"type":"string","title":"Author Session"},"base":{"type":"string","title":"Base","default":""},"head":{"type":"string","title":"Head","default":""}},"type":"object","required":["work_item_id","author_session"],"title":"CreateReviewBody"},"CreateWorkItem":{"properties":{"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description","default":""},"topology_id":{"type":"string","title":"Topology Id","default":"solo"}},"type":"object","required":["title"],"title":"CreateWorkItem"},"CreateWorkflowRunBody":{"properties":{"pack_ref":{"type":"string","maxLength":128,"minLength":3,"title":"Pack Ref"},"focus":{"type":"string","maxLength":2000,"minLength":1,"title":"Focus"},"dials":{"additionalProperties":true,"type":"object","title":"Dials"},"title":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}],"title":"Title"},"assignments":{"additionalProperties":{"type":"string"},"type":"object","title":"Assignments"},"origin_task_id":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Origin Task Id"},"origin_room_id":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Origin Room Id"}},"type":"object","required":["pack_ref","focus"],"title":"CreateWorkflowRunBody"},"CreateWorkspace":{"properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,62}$","title":"Key"},"name":{"type":"string","title":"Name"},"template":{"type":"string","title":"Template","default":"toy"},"control_plane_owner":{"type":"string","title":"Control Plane Owner","default":"apiary"},"repos":{"items":{"$ref":"#/components/schemas/RepoAttachment"},"type":"array","title":"Repos"}},"type":"object","required":["key","name"],"title":"CreateWorkspace"},"DispatchBody":{"properties":{"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"persona_pack_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona Pack Ref"},"computer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Computer Id"},"checkout_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkout Path"},"allow_unattended":{"type":"boolean","title":"Allow Unattended","default":false},"room_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Room Id"},"max_runtime_s":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Runtime S"},"max_chained_grants":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Chained Grants"}},"type":"object","title":"DispatchBody"},"EnqueueGrantInstructionBody":{"properties":{"type":{"type":"string","title":"Type"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}},"type":"object","required":["type"],"title":"EnqueueGrantInstructionBody","description":"Operator free-text / typed instruction for a live (or queued) grant.\n\nUX-4 item 1: ``operator.steer`` carries operator text in ``text`` (also\naccepted under ``payload.text``). Other members of GRANT_INSTRUCTION_TYPES\nmay be enqueued for tests/ops; payload is an opaque dict."},"FailInboxBody":{"properties":{"error":{"type":"string","title":"Error"}},"type":"object","required":["error"],"title":"FailInboxBody"},"FinalizeTaskOutcomeBody":{"properties":{"request_id":{"type":"string","maxLength":128,"minLength":1,"title":"Request Id"},"status":{"type":"string","enum":["completed","blocked"],"title":"Status"},"artifact_hash":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Artifact Hash"},"verification_receipts":{"anyOf":[{"items":{"$ref":"#/components/schemas/TaskVerificationReceipt"},"type":"array","maxItems":20,"minItems":1},{"type":"null"}],"title":"Verification Receipts"}},"additionalProperties":false,"type":"object","required":["request_id","status"],"title":"FinalizeTaskOutcomeBody"},"FreezeBody":{"properties":{"frozen":{"type":"boolean","title":"Frozen"}},"type":"object","required":["frozen"],"title":"FreezeBody"},"GrantActivityBody":{"properties":{"events":{"items":{},"type":"array","maxItems":50,"minItems":1,"title":"Events"}},"type":"object","required":["events"],"title":"GrantActivityBody"},"GrantStatusBody":{"properties":{"status":{"type":"string","enum":["active","completed","failed","cancelled"],"title":"Status"},"detail":{"type":"string","title":"Detail","default":""},"result_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Kind"},"attestation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attestation"},"usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Usage"},"error_class":{"anyOf":[{"type":"string","const":"launch_unavailable"},{"type":"null"}],"title":"Error Class"},"launch_stage":{"anyOf":[{"type":"string","const":"pre_exec"},{"type":"null"}],"title":"Launch Stage"}},"type":"object","required":["status"],"title":"GrantStatusBody"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HarnessReadiness":{"properties":{"kind":{"type":"string","enum":["claude_code","dirac","oh_my_pi"],"title":"Kind"},"available":{"type":"boolean","title":"Available"},"version":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Version"},"ready_state":{"anyOf":[{"type":"string","enum":["unknown","available","unavailable"]},{"type":"null"}],"title":"Ready State"},"interpreter_ok":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Interpreter Ok"}},"type":"object","required":["kind","available"],"title":"HarnessReadiness","description":"Secret-free worker report for one locally installed coding harness."},"HeartbeatBody":{"properties":{"computer_id":{"type":"string","title":"Computer Id"},"agents":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Agents"},"checkouts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Checkouts"},"memory_engine":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Engine"},"sessions":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Sessions"},"proxies":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProxyHealth"},"type":"array"},{"type":"null"}],"title":"Proxies"},"harnesses":{"anyOf":[{"items":{"$ref":"#/components/schemas/HarnessReadiness"},"type":"array"},{"type":"null"}],"title":"Harnesses"},"build":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Build"},"sync":{"anyOf":[{"$ref":"#/components/schemas/SyncHeartbeatStatus"},{"type":"null"}]},"runtime_attestation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Runtime Attestation"},"credential_health":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Credential Health"},"capabilities":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Capabilities"}},"type":"object","required":["computer_id"],"title":"HeartbeatBody"},"HoldGrantBody":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"HoldGrantBody"},"IsolationRejectionBody":{"properties":{"computer_id":{"type":"string","title":"Computer Id"},"kind":{"type":"string","title":"Kind"},"detail":{"type":"string","title":"Detail"},"grant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grant Id"}},"type":"object","required":["computer_id","kind","detail"],"title":"IsolationRejectionBody"},"MembershipBody":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"role":{"type":"string","title":"Role","default":"member"}},"type":"object","required":["agent_id"],"title":"MembershipBody"},"MissionActionBody":{"properties":{"action":{"type":"string","enum":["start","reconcile","pause","resume","stop"],"title":"Action"},"reason":{"type":"string","maxLength":2000,"title":"Reason","default":""}},"type":"object","required":["action"],"title":"MissionActionBody"},"MissionCheckpointBody":{"properties":{"sequence":{"type":"integer","minimum":1.0,"title":"Sequence"},"kind":{"type":"string","enum":["checkpoint","milestone"],"title":"Kind","default":"checkpoint"},"phase":{"type":"string","maxLength":128,"minLength":1,"title":"Phase","default":"execute"},"narrative":{"type":"string","maxLength":12000,"minLength":1,"title":"Narrative"},"disposition":{"type":"string","enum":["continue","verify","blocked","complete","stop"],"title":"Disposition"},"progress":{"additionalProperties":true,"type":"object","title":"Progress"},"evidence":{"items":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}]},"type":"array","maxItems":100,"title":"Evidence"},"artifact_hash":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Artifact Hash"},"generation":{"type":"integer","minimum":1.0,"title":"Generation"}},"type":"object","required":["sequence","narrative","disposition","generation"],"title":"MissionCheckpointBody"},"MissionVerificationBody":{"properties":{"artifact_hash":{"type":"string","maxLength":256,"minLength":1,"title":"Artifact Hash"},"status":{"type":"string","enum":["pass","fail"],"title":"Status"},"evidence":{"items":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}]},"type":"array","maxItems":100,"minItems":1,"title":"Evidence"}},"type":"object","required":["artifact_hash","status"],"title":"MissionVerificationBody","description":"Worker route body for the autonomous-mode agent reviewer.\n\nReviewer identity is NEVER body-supplied: reviewer_type/reviewer_id/\nreviewer_grant_id are bound from the caller grant's payload control-side\n(same identity rule as the delegation routes)."},"ModeBody":{"properties":{"mode":{"type":"string","title":"Mode"}},"type":"object","required":["mode"],"title":"ModeBody"},"OpenGrantGateBody":{"properties":{"question":{"type":"string","maxLength":4000,"title":"Question"},"kind":{"type":"string","title":"Kind","default":"custom"},"options":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","maxItems":20,"title":"Options"},"recommendation":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Recommendation"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"}},"type":"object","required":["question"],"title":"OpenGrantGateBody","description":"P3.1: a live session opens a typed gate for its own grant's work item.\n\nModel-supplied via grant Bearer, so every free-text field is bounded —\nthe gate row lands in SQLite and the prompt echoes into blocked_reason,\naudit events, and the operator UI."},"OpsEventBody":{"properties":{"kind":{"type":"string","maxLength":64,"minLength":1,"title":"Kind"},"detail":{"type":"string","maxLength":500,"minLength":1,"title":"Detail"},"grant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grant Id"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["kind","detail"],"title":"OpsEventBody","description":"POST /v1/workers/ops-events — worker swallowed-seam ingest."},"PostMessageBody":{"properties":{"text":{"type":"string","title":"Text"},"room_id":{"type":"string","title":"Room Id","default":"mission_control"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"target_task_number":{"anyOf":[{"type":"integer","maximum":9.223372036854776e+18,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Target Task Number"},"enqueue_for_agent":{"type":"boolean","title":"Enqueue For Agent","default":true},"anchor_new_task":{"type":"boolean","title":"Anchor New Task","default":false},"attachment_ids":{"items":{"type":"string"},"type":"array","maxItems":8,"title":"Attachment Ids"}},"type":"object","required":["text"],"title":"PostMessageBody"},"ProposalDispositionBody":{"properties":{"action":{"type":"string","enum":["accept","reject","snooze","research"],"title":"Action"},"reason":{"type":"string","maxLength":2000,"title":"Reason","default":""},"effective_kind":{"anyOf":[{"type":"string","enum":["bug","feature","improvement","maintenance","research","decision","task"]},{"type":"null"}],"title":"Effective Kind"},"claim_state":{"anyOf":[{"type":"string","enum":["hypothesis","suspected","reproduced","confirmed"]},{"type":"null"}],"title":"Claim State"},"priority":{"type":"string","enum":["low","normal","high","urgent"],"title":"Priority","default":"normal"},"acceptance":{"additionalProperties":true,"type":"object","title":"Acceptance"},"snoozed_until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snoozed Until"},"topology_id":{"type":"string","title":"Topology Id","default":"solo"}},"type":"object","required":["action"],"title":"ProposalDispositionBody"},"ProxyHealth":{"properties":{"agent_id":{"type":"string","maxLength":128,"minLength":1,"title":"Agent Id"},"listen":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Listen"},"pid":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Pid"},"healthy":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Healthy"},"auth_present":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auth Present"},"provider":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Provider"},"model":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Model"},"instance_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Instance Id"},"port_slot":{"anyOf":[{"type":"integer","maximum":99.0,"minimum":1.0},{"type":"null"}],"title":"Port Slot"},"usage":{"anyOf":[{"$ref":"#/components/schemas/ProxyUsage"},{"type":"null"}]}},"type":"object","required":["agent_id"],"title":"ProxyHealth","description":"Persistable health for one supervised proxy, with no credentials."},"ProxyLocalUsageObservation":{"properties":{"state":{"type":"string","enum":["observed","unavailable","unknown"],"title":"State","default":"unknown"},"request_count":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Request Count"},"input_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Input Tokens"},"output_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Output Tokens"}},"type":"object","title":"ProxyLocalUsageObservation","description":"A local proxy counter; it intentionally has no quota fields."},"ProxyProviderReportedUsage":{"properties":{"state":{"type":"string","enum":["reported","unavailable","unknown"],"title":"State","default":"unknown"},"request_count":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Request Count"},"input_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Input Tokens"},"output_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Output Tokens"},"quota_remaining":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Quota Remaining"},"quota_limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Quota Limit"},"observed_at":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Observed At"},"quota_resets_at":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Quota Resets At"}},"type":"object","title":"ProxyProviderReportedUsage","description":"A provider's own usage/quota observation, never credentials."},"ProxyUsage":{"properties":{"provider_alias":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Provider Alias"},"provider_reported":{"anyOf":[{"$ref":"#/components/schemas/ProxyProviderReportedUsage"},{"type":"null"}]},"local_observation":{"anyOf":[{"$ref":"#/components/schemas/ProxyLocalUsageObservation"},{"type":"null"}]}},"type":"object","title":"ProxyUsage","description":"Independent provider and local observations from one proxy status."},"ReauthReportBody":{"properties":{"computer_id":{"type":"string","maxLength":64,"minLength":1,"title":"Computer Id"},"session_id":{"type":"string","maxLength":80,"minLength":1,"title":"Session Id"},"status":{"type":"string","maxLength":24,"minLength":1,"title":"Status"},"url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Url"},"code":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Code"},"callback_port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Callback Port"},"login_id":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Login Id"},"detail":{"anyOf":[{"type":"string","maxLength":1500},{"type":"null"}],"title":"Detail"}},"type":"object","required":["computer_id","session_id","status"],"title":"ReauthReportBody"},"RedirectInputBody":{"properties":{"redirect_input":{"type":"string","maxLength":4000,"minLength":1,"title":"Redirect Input"}},"type":"object","required":["redirect_input"],"title":"RedirectInputBody"},"RegisterComputerBody":{"properties":{"computer_id":{"type":"string","title":"Computer Id"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"},"connectivity":{"anyOf":[{"type":"string","enum":["always_on","intermittent"]},{"type":"null"}],"title":"Connectivity"},"unreachable_sustained_s":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Unreachable Sustained S"}},"type":"object","required":["computer_id"],"title":"RegisterComputerBody"},"RepoAttachment":{"properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,62}$","title":"Name"},"source":{"type":"string","title":"Source"}},"additionalProperties":false,"type":"object","required":["name","source"],"title":"RepoAttachment"},"ResolveDecisionGateBody":{"properties":{"resolution":{"type":"string","enum":["approve","reject","park"],"title":"Resolution"},"chosen_option":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chosen Option"}},"type":"object","required":["resolution"],"title":"ResolveDecisionGateBody"},"ResolveGateBody":{"properties":{"resolution":{"type":"string","enum":["pass","fail","skipped"],"title":"Resolution"},"evidence_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence Ref"},"actor":{"type":"string","title":"Actor","default":"operator"}},"type":"object","required":["resolution"],"title":"ResolveGateBody"},"RespondConsultBody":{"properties":{"answer_prose":{"type":"string","title":"Answer Prose"},"evidence_refs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Evidence Refs"},"confidence":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Confidence"},"declines":{"type":"boolean","title":"Declines","default":false}},"additionalProperties":false,"type":"object","required":["answer_prose"],"title":"RespondConsultBody","description":"P4: consult answer — responder grant (R2) or operator (R6)."},"RouterDecisionBody":{"properties":{"decision":{"type":"string","enum":["join","new","unclear"],"title":"Decision"},"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"}},"type":"object","required":["decision"],"title":"RouterDecisionBody"},"StageTaskOutcomeBody":{"properties":{"request_id":{"type":"string","maxLength":128,"minLength":1,"title":"Request Id"},"status":{"type":"string","enum":["completed","blocked"],"title":"Status"},"summary":{"type":"string","maxLength":4000,"minLength":1,"title":"Summary"},"blocked_reason":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Blocked Reason"},"verification_commands":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":20,"minItems":1},{"type":"null"}],"title":"Verification Commands"}},"additionalProperties":false,"type":"object","required":["request_id","status","summary"],"title":"StageTaskOutcomeBody"},"StartWorkflowRunBody":{"properties":{"pack_ref":{"type":"string","maxLength":128,"minLength":3,"title":"Pack Ref"},"focus":{"type":"string","maxLength":2000,"minLength":1,"title":"Focus"},"dials":{"additionalProperties":true,"type":"object","title":"Dials"},"title":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}],"title":"Title"}},"type":"object","required":["pack_ref","focus"],"title":"StartWorkflowRunBody"},"SyncHeartbeatStatus":{"properties":{"protocol_version":{"type":"integer","const":1,"title":"Protocol Version","default":1},"state":{"type":"string","enum":["ok","degraded","error","disabled"],"title":"State"},"pending_count":{"type":"integer","maximum":9.223372036854776e+18,"minimum":0.0,"title":"Pending Count","default":0},"retrying_count":{"type":"integer","maximum":9.223372036854776e+18,"minimum":0.0,"title":"Retrying Count","default":0},"dead_count":{"type":"integer","maximum":9.223372036854776e+18,"minimum":0.0,"title":"Dead Count","default":0},"last_error_code":{"anyOf":[{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]*$"},{"type":"null"}],"title":"Last Error Code"}},"additionalProperties":false,"type":"object","required":["state"],"title":"SyncHeartbeatStatus","description":"Closed, metadata-only worker sync status carried by new heartbeats."},"TaskVerificationReceipt":{"properties":{"grant_id":{"type":"string","maxLength":256,"minLength":1,"title":"Grant Id"},"command":{"type":"string","maxLength":1000,"minLength":1,"title":"Command"},"success":{"type":"boolean","const":true,"title":"Success"},"exit_code":{"type":"integer","const":0,"title":"Exit Code"},"stdout":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Stdout"},"stderr":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Stderr"}},"additionalProperties":false,"type":"object","required":["grant_id","command","success","exit_code"],"title":"TaskVerificationReceipt"},"UpdateAgent":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"computer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Computer Id"},"default_persona_pack":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Persona Pack"},"runtime_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runtime Kind"},"runtime_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runtime Provider"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"permission_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Permission Mode"},"checkout_suffix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkout Suffix"},"effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effort"},"identity_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Identity Prompt"},"can_review":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Can Review"},"proxy":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Proxy"}},"type":"object","title":"UpdateAgent"},"UpdateMembershipBody":{"properties":{"can_delegate":{"type":"boolean","title":"Can Delegate"}},"type":"object","required":["can_delegate"],"title":"UpdateMembershipBody","description":"PATCH /v1/workspaces/{ws}/members/{agent_id} — the D5 delegation\nallowlist flip (delegation-final-plan §10-D5). Operator token only."},"UpdateWorkspace":{"properties":{"repos":{"items":{"$ref":"#/components/schemas/RepoAttachment"},"type":"array","title":"Repos"}},"type":"object","required":["repos"],"title":"UpdateWorkspace"},"UploadAttachmentBody":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"data_b64":{"type":"string","maxLength":14680064,"minLength":1,"title":"Data B64"}},"additionalProperties":false,"type":"object","required":["name","data_b64"],"title":"UploadAttachmentBody"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyDelegationBody":{"properties":{"legs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Legs"}},"additionalProperties":false,"type":"object","required":["legs"],"title":"VerifyDelegationBody","description":"POST .../delegations/{delegation_id}/verify body (shape-only).\n\nEach leg is {name, pass, evidence_ref, note?}; the service validates\nnames against the frozen verify_plan and resolves every passed leg's\nevidence_ref control-side (manufactured receipts refused verbatim)."},"WorkerAgentMessageBody":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"agent_id":{"type":"string","title":"Agent Id"},"text":{"type":"string","title":"Text"},"room_id":{"type":"string","title":"Room Id","default":"mission_control"},"grant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grant Id"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"attachment_ids":{"items":{"type":"string"},"type":"array","maxItems":8,"title":"Attachment Ids"}},"type":"object","required":["workspace_id","agent_id","text"],"title":"WorkerAgentMessageBody"},"WorkflowArtifactBody":{"properties":{"payload":{"type":"string","maxLength":262144,"minLength":1,"title":"Payload"},"request_id":{"type":"string","maxLength":64,"minLength":1,"title":"Request Id"}},"type":"object","required":["payload","request_id"],"title":"WorkflowArtifactBody"},"WorkflowSteeringBody":{"properties":{"decisions":{"additionalProperties":{"type":"string","enum":["keep","drop","refocus","promote"]},"type":"object","maxProperties":64,"minProperties":1,"title":"Decisions"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"}},"additionalProperties":false,"type":"object","required":["decisions"],"title":"WorkflowSteeringBody","description":"POST .../workflow-runs/{run_id}/steering — operator keep/drop/refocus/promote."}}}}