{"openapi":"3.1.0","info":{"title":"Team0 External API","version":"1.0.0-beta","summary":"Contract-first API for Team0 Chiefs and the Team0 World Model.","description":"Exact machine-readable contract for the currently deployed, allowlisted Team0 External API beta. Protected operations still require their declared Team0 credential and scope.","contact":{"name":"Team0 developer support","email":"hey@team0.ai"}},"servers":[{"url":"https://api.team0.ai/v1"}],"tags":[{"name":"Discovery"},{"name":"Control plane"},{"name":"World Model"},{"name":"Chief"},{"name":"Work"},{"name":"Operations"},{"name":"Webhooks"}],"security":[{"OAuth2":[]},{"ApiKey":[]}],"x-team0-event-contracts":{"chief-run-sse":{"operationId":"streamChiefRun","transport":"text/event-stream","schema":"#/components/schemas/EventEnvelope"},"webhook":{"transport":"standard-webhooks-compatible-v1","schema":"#/components/schemas/EventEnvelope"}},"x-team0-agent-conversation-contract":{"status":"contract-frozen-codex-reference-runtime-implemented","schema_version":"team0.agent_conversation.turn.v1","payload_schema":"#/components/schemas/AgentConversationTurnV1","registered_source_kind":"external_agent","source_binding":"one-active-agent-grant","primary_profile_unique":false,"contribution_policies":["off","candidate","trusted_transcript"],"service_agent_authorship":"candidate-or-evidence-only","trusted_transcript_authority":"explicit-versioned-owner-grant","dedupe_key":["credential.tenant_id","bound_agent_grant_id","conversation_id","turn_id"],"raw_transcript_policy":"tenant-isolated-retention-bounded-independently-deletable"},"x-team0-problem-codes":{"request.invalid":400,"auth.required":401,"auth.invalid_token":401,"auth.insufficient_scope":403,"resource.not_found":404,"state.conflict":409,"idempotency.conflict":409,"resource.gone":410,"precondition.failed":412,"validation.failed":422,"precondition.required":428,"rate_limit.exceeded":429,"internal.error":500,"dependency.unavailable":503},"paths":{"/.well-known/oauth-protected-resource":{"get":{"tags":["Discovery"],"operationId":"getOAuthProtectedResourceMetadata","summary":"Discover the authorization server and supported delegated scopes.","security":[],"x-team0-audit-class":"A0","x-team0-scope":"public","x-team0-data-class":"C0","x-team0-rate-class":"R0","responses":{"200":{"description":"OAuth protected-resource metadata for the Team0 API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthProtectedResourceMetadata"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/capabilities":{"get":{"tags":["Discovery"],"operationId":"getCapabilities","x-team0-audit-class":"A0","x-team0-scope":"authenticated","x-team0-data-class":"C0","x-team0-rate-class":"R0","responses":{"200":{"description":"Capabilities authorized for this principal and application grant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Capabilities"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/chiefs":{"get":{"tags":["Chief"],"operationId":"listChiefs","x-team0-audit-class":"A1","x-team0-scope":"chief.read","x-team0-data-class":"C1","x-team0-rate-class":"R1","parameters":[{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Chiefs visible to the current principal.","headers":{"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChiefList"}}}},"304":{"description":"The authorized Chief projection has not changed."},"default":{"$ref":"#/components/responses/Problem"}}}},"/connections":{"get":{"tags":["Control plane"],"operationId":"listConnections","x-team0-audit-class":"A1","x-team0-scope":"connections.read","x-team0-data-class":"C1","x-team0-rate-class":"R1","parameters":[{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Authorized connection status and capability metadata; never credentials.","headers":{"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionList"}}}},"304":{"description":"The authorized connection projection has not changed."},"default":{"$ref":"#/components/responses/Problem"}}}},"/usage":{"get":{"tags":["Control plane"],"operationId":"getUsage","x-team0-audit-class":"A1","x-team0-scope":"usage.read","x-team0-data-class":"C1","x-team0-rate-class":"R1","parameters":[{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Authorized usage records without customer content.","headers":{"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageList"}}}},"304":{"description":"The authorized usage projection has not changed."},"default":{"$ref":"#/components/responses/Problem"}}}},"/developer-apps":{"get":{"tags":["Control plane"],"operationId":"listDeveloperApps","x-team0-human-delegation-required":true,"x-team0-audit-class":"A1","x-team0-scope":"developer_apps.manage","x-team0-data-class":"C1","x-team0-rate-class":"R1","parameters":[{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Developer applications owned by the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperAppList"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"post":{"tags":["Control plane"],"operationId":"createDeveloperApp","x-team0-human-delegation-required":true,"x-team0-audit-class":"A4","x-team0-scope":"developer_apps.manage","x-team0-data-class":"C1","x-team0-rate-class":"R4","x-team0-idempotency":"required","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperAppCreate"}}}},"responses":{"201":{"description":"Developer application created.","headers":{"Location":{"$ref":"#/components/headers/Location"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperApp"}}}},"202":{"description":"OAuth application accepted locally and awaiting Clerk protocol reconciliation.","headers":{"Location":{"$ref":"#/components/headers/Location"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperApp"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/developer-apps/{app_id}":{"parameters":[{"$ref":"#/components/parameters/AppId"}],"get":{"tags":["Control plane"],"operationId":"getDeveloperApp","x-team0-human-delegation-required":true,"x-team0-audit-class":"A1","x-team0-scope":"developer_apps.manage","x-team0-data-class":"C1","x-team0-rate-class":"R4","responses":{"200":{"description":"Developer application metadata.","headers":{"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperApp"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"patch":{"tags":["Control plane"],"operationId":"updateDeveloperApp","x-team0-human-delegation-required":true,"x-team0-audit-class":"A4","x-team0-scope":"developer_apps.manage","x-team0-data-class":"C1","x-team0-rate-class":"R4","x-team0-idempotency":"required","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/merge-patch+json":{"schema":{"$ref":"#/components/schemas/DeveloperAppUpdate"}}}},"responses":{"200":{"description":"Updated application metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperApp"}}}},"202":{"description":"OAuth metadata accepted locally and awaiting Clerk protocol reconciliation.","headers":{"Location":{"$ref":"#/components/headers/Location"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperApp"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"delete":{"tags":["Control plane"],"operationId":"deleteDeveloperApp","x-team0-human-delegation-required":true,"x-team0-audit-class":"A4","x-team0-scope":"developer_apps.manage","x-team0-data-class":"C1","x-team0-rate-class":"R4","x-team0-idempotency":"required","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/IfMatch"}],"responses":{"202":{"description":"Authority revoked immediately; durable deletion accepted.","headers":{"Location":{"$ref":"#/components/headers/Location"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"}}}},"204":{"description":"Legacy private-console response while durable deletion is disabled."},"default":{"$ref":"#/components/responses/Problem"}}}},"/developer-apps/{app_id}/credentials":{"parameters":[{"$ref":"#/components/parameters/AppId"}],"get":{"tags":["Control plane"],"operationId":"listAppCredentials","x-team0-human-delegation-required":true,"x-team0-audit-class":"A4","x-team0-scope":"developer_apps.manage","x-team0-data-class":"C4","x-team0-rate-class":"R4","responses":{"200":{"description":"Credential hints and lifecycle metadata; never raw secrets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialList"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"post":{"tags":["Control plane"],"operationId":"issueAppCredential","x-team0-human-delegation-required":true,"x-team0-audit-class":"A4","x-team0-scope":"developer_apps.manage","x-team0-data-class":"C4","x-team0-rate-class":"R4","x-team0-idempotency":"required","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialIssue"}}}},"responses":{"201":{"description":"Credential issued. The first execution reveals the raw secret; an idempotent replay returns only redacted credential metadata.","headers":{"ETag":{"$ref":"#/components/headers/ETag"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialIssueOutcome"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/developer-apps/{app_id}/credentials/{credential_id}":{"get":{"tags":["Control plane"],"operationId":"getAppCredential","x-team0-human-delegation-required":true,"x-team0-audit-class":"A4","x-team0-scope":"developer_apps.manage","x-team0-data-class":"C4","x-team0-rate-class":"R4","parameters":[{"$ref":"#/components/parameters/AppId"},{"$ref":"#/components/parameters/CredentialId"}],"responses":{"200":{"description":"Redacted credential metadata and its current lifecycle version.","headers":{"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credential"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/developer-apps/{app_id}/credentials/{credential_id}/rotate":{"post":{"tags":["Control plane"],"operationId":"rotateAppCredential","x-team0-human-delegation-required":true,"x-team0-audit-class":"A4","x-team0-scope":"developer_apps.manage","x-team0-data-class":"C4","x-team0-rate-class":"R4","x-team0-idempotency":"required","parameters":[{"$ref":"#/components/parameters/AppId"},{"$ref":"#/components/parameters/CredentialId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/IfMatch"}],"responses":{"200":{"description":"Overlapping credential issued. The first execution reveals the new raw secret; an idempotent replay returns only redacted credential metadata.","headers":{"ETag":{"$ref":"#/components/headers/ETag"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialIssueOutcome"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/developer-apps/{app_id}/credentials/{credential_id}/revoke":{"post":{"tags":["Control plane"],"operationId":"revokeAppCredential","x-team0-human-delegation-required":true,"x-team0-audit-class":"A4","x-team0-scope":"developer_apps.manage","x-team0-data-class":"C4","x-team0-rate-class":"R4","x-team0-idempotency":"required","parameters":[{"$ref":"#/components/parameters/AppId"},{"$ref":"#/components/parameters/CredentialId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/IfMatch"}],"responses":{"200":{"description":"Credential revoked and grant version advanced.","headers":{"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credential"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/developer-apps/{app_id}/agent-grants":{"get":{"tags":["Control plane"],"operationId":"listAgentGrants","x-team0-human-delegation-required":true,"x-team0-audit-class":"A3","x-team0-scope":"developer_apps.manage","x-team0-data-class":"C3","x-team0-rate-class":"R1","parameters":[{"$ref":"#/components/parameters/AppId"}],"responses":{"200":{"description":"Exact independently revocable grants for this dedicated service app.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentGrantList"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"post":{"tags":["Control plane"],"operationId":"createAgentGrant","x-team0-human-delegation-required":true,"x-team0-audit-class":"A4","x-team0-scope":"developer_apps.manage","x-team0-data-class":"C3","x-team0-rate-class":"R4","x-team0-idempotency":"required","parameters":[{"$ref":"#/components/parameters/AppId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentGrantCreate"}}}},"responses":{"201":{"description":"Owned agent bound to a dedicated service app and exact key scopes.","headers":{"Location":{"$ref":"#/components/headers/Location"},"ETag":{"$ref":"#/components/headers/ETag"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentGrant"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/developer-apps/{app_id}/agent-grants/{grant_id}":{"get":{"tags":["Control plane"],"operationId":"getAgentGrant","x-team0-human-delegation-required":true,"x-team0-audit-class":"A3","x-team0-scope":"developer_apps.manage","x-team0-data-class":"C3","x-team0-rate-class":"R1","parameters":[{"$ref":"#/components/parameters/AppId"},{"$ref":"#/components/parameters/AgentGrantId"}],"responses":{"200":{"description":"Current redacted authority for one owned agent grant.","headers":{"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentGrant"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/developer-apps/{app_id}/agent-grants/{grant_id}/activation":{"get":{"tags":["Control plane"],"operationId":"getAgentActivation","description":"Return content-free lifecycle evidence for the exact current agent grant. `active` requires both a finalized governed understanding read and an accepted `team0.agent_conversation.turn.v1` contribution from credentials and a registered source bound to this grant. Grant/key creation and MCP discovery are not activation evidence. This proves the adapter delivered both lifecycle sides; it does not prove that a particular turn produced a semantic fact or is already available on readback.","x-team0-human-delegation-required":true,"x-team0-audit-class":"A3","x-team0-scope":"developer_apps.manage","x-team0-data-class":"C3","x-team0-rate-class":"R1","parameters":[{"$ref":"#/components/parameters/AppId"},{"$ref":"#/components/parameters/AgentGrantId"}],"responses":{"200":{"description":"Current content-free connection evidence; never cached.","headers":{"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentActivation"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/developer-apps/{app_id}/agent-grants/{grant_id}/transcript-consent":{"post":{"tags":["Control plane"],"operationId":"setAgentTranscriptConsent","description":"Explicit consent by the current human owner to trust this agent to relay that owner's messages. Requires If-Match from the grant the owner reviewed. Enabling requires the tenant rollout and schema; disabling remains available after rollout is turned off. This does not prove human keystrokes or trust agent assertions. Revocation stops pending learning; it does not delete previously learned information. Replay returns current consent.","x-team0-human-delegation-required":true,"x-team0-audit-class":"A4","x-team0-scope":"developer_apps.manage","x-team0-data-class":"C3","x-team0-rate-class":"R4","x-team0-idempotency":"required","parameters":[{"$ref":"#/components/parameters/AppId"},{"$ref":"#/components/parameters/AgentGrantId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTranscriptConsentUpdate"}}}},"responses":{"200":{"description":"Current consent and advanced grant version; exact owner binding stays server-side.","headers":{"ETag":{"$ref":"#/components/headers/ETag"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentGrant"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/developer-apps/{app_id}/agent-grants/{grant_id}/understanding-scope":{"post":{"tags":["Control plane"],"operationId":"setAgentUnderstandingScope","description":"Set this agent's Living Understanding visibility ceiling independently of C2C message-sharing trust. Requires review of the current grant via If-Match.","x-team0-human-delegation-required":true,"x-team0-audit-class":"A4","x-team0-scope":"developer_apps.manage","x-team0-data-class":"C3","x-team0-rate-class":"R4","x-team0-idempotency":"required","parameters":[{"$ref":"#/components/parameters/AppId"},{"$ref":"#/components/parameters/AgentGrantId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentUnderstandingScopeUpdate"}}}},"responses":{"200":{"description":"Current grant with an advanced version; C2C sharing is unchanged.","headers":{"ETag":{"$ref":"#/components/headers/ETag"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentGrant"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/developer-apps/{app_id}/agent-grants/{grant_id}/revoke":{"post":{"tags":["Control plane"],"operationId":"revokeAgentGrant","x-team0-human-delegation-required":true,"x-team0-audit-class":"A4","x-team0-scope":"developer_apps.manage","x-team0-data-class":"C3","x-team0-rate-class":"R4","x-team0-idempotency":"required","parameters":[{"$ref":"#/components/parameters/AppId"},{"$ref":"#/components/parameters/AgentGrantId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/IfMatch"}],"responses":{"200":{"description":"Grant and every live key for its dedicated app revoked immediately.","headers":{"ETag":{"$ref":"#/components/headers/ETag"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentGrant"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/wm/reads":{"post":{"tags":["World Model"],"operationId":"createWorldModelRead","x-team0-audit-class":"A2","x-team0-scope":"wm.read","x-team0-data-class":"C2","x-team0-rate-class":"R2","x-team0-idempotency":"required","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WMReadCreate"}}}},"responses":{"201":{"description":"Frozen authorized World Model read.","headers":{"Location":{"$ref":"#/components/headers/Location"},"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WMRead"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/wm/reads/{read_id}":{"get":{"tags":["World Model"],"operationId":"getWorldModelRead","x-team0-audit-class":"A2","x-team0-scope":"wm.read","x-team0-data-class":"C2","x-team0-rate-class":"R1","parameters":[{"$ref":"#/components/parameters/ReadId"}],"responses":{"200":{"description":"Immutable replay after current-grant reauthorization.","headers":{"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WMRead"}}}},"410":{"$ref":"#/components/responses/Problem"},"default":{"$ref":"#/components/responses/Problem"}}}},"/wm/evidence/{evidence_id}":{"get":{"tags":["World Model"],"operationId":"getEvidence","x-team0-audit-class":"A2","x-team0-scope":"wm.evidence.read","x-team0-field-scopes":{"excerpt":"wm.source_content.read"},"x-team0-data-class":"C3","x-team0-rate-class":"R2","parameters":[{"$ref":"#/components/parameters/EvidenceId"}],"responses":{"200":{"description":"Authorized provenance and optionally bounded excerpt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evidence"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/wm/compositions":{"post":{"tags":["World Model"],"operationId":"createComposition","x-team0-audit-class":"A2","x-team0-scope":"wm.compose","x-team0-data-class":"C2","x-team0-rate-class":"R2","x-team0-idempotency":"required","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/Prefer"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompositionCreate"}}}},"responses":{"201":{"description":"Composition completed within the synchronous wait budget.","headers":{"Location":{"$ref":"#/components/headers/Location"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Composition"}}}},"202":{"description":"Durable composition operation accepted.","headers":{"Location":{"$ref":"#/components/headers/Location"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"Preference-Applied":{"$ref":"#/components/headers/PreferenceApplied"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/wm/compositions/{composition_id}":{"get":{"tags":["World Model"],"operationId":"getComposition","x-team0-audit-class":"A2","x-team0-scope":"wm.compose","x-team0-data-class":"C2","x-team0-rate-class":"R1","parameters":[{"$ref":"#/components/parameters/CompositionId"}],"responses":{"200":{"description":"Immutable composition result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Composition"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/operations/{operation_id}":{"get":{"tags":["Operations"],"operationId":"getOperation","x-team0-audit-class":"A1","x-team0-scope":"inherited","x-team0-data-class":"C1","x-team0-rate-class":"R1","parameters":[{"$ref":"#/components/parameters/OperationId"}],"responses":{"200":{"description":"Durable operation status, metering, errors and result link.","headers":{"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/operations/{operation_id}/cancel":{"post":{"tags":["Operations"],"operationId":"cancelOperation","x-team0-audit-class":"A3","x-team0-scope":"inherited","x-team0-data-class":"C1","x-team0-rate-class":"R3","x-team0-idempotency":"required","parameters":[{"$ref":"#/components/parameters/OperationId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/IfMatch"}],"responses":{"202":{"description":"Cancellation requested.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/chiefs/{chief_id}/runs":{"post":{"tags":["Chief"],"operationId":"createChiefRun","x-team0-audit-class":"A3","x-team0-scope":"chief.run","x-team0-data-class":"C2","x-team0-rate-class":"R3","x-team0-idempotency":"required","parameters":[{"$ref":"#/components/parameters/ChiefId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChiefRunCreate"}}}},"responses":{"202":{"description":"Durable Chief run accepted.","headers":{"Location":{"$ref":"#/components/headers/Location"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChiefRun"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/chiefs/{chief_id}/runs/{run_id}":{"get":{"tags":["Chief"],"operationId":"getChiefRun","x-team0-audit-class":"A2","x-team0-scope":"chief.read","x-team0-data-class":"C2","x-team0-rate-class":"R1","parameters":[{"$ref":"#/components/parameters/ChiefId"},{"$ref":"#/components/parameters/RunId"}],"responses":{"200":{"description":"Run state including every pending interaction.","headers":{"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChiefRun"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/chiefs/{chief_id}/runs/{run_id}/events":{"get":{"tags":["Chief"],"operationId":"streamChiefRun","x-team0-audit-class":"A2","x-team0-scope":"chief.read","x-team0-data-class":"C2","x-team0-rate-class":"R1","x-team0-authentication":"fetch-bearer-header-only","parameters":[{"$ref":"#/components/parameters/ChiefId"},{"$ref":"#/components/parameters/RunId"},{"$ref":"#/components/parameters/LastEventId"}],"responses":{"200":{"description":"Resumable SSE projection of the durable run-event log.","content":{"text/event-stream":{"schema":{"type":"string"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/chiefs/{chief_id}/runs/{run_id}/cancel":{"post":{"tags":["Chief"],"operationId":"cancelChiefRun","x-team0-audit-class":"A3","x-team0-scope":"chief.run","x-team0-data-class":"C2","x-team0-rate-class":"R3","x-team0-idempotency":"required","parameters":[{"$ref":"#/components/parameters/ChiefId"},{"$ref":"#/components/parameters/RunId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/IfMatch"}],"responses":{"202":{"description":"Run cancellation requested; completed effects are not undone.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChiefRun"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/chiefs/{chief_id}/runs/{run_id}/inputs/{input_request_id}":{"post":{"tags":["Chief"],"operationId":"submitChiefRunInput","x-team0-audit-class":"A3","x-team0-scope":"chief.run","x-team0-data-class":"C2","x-team0-rate-class":"R3","x-team0-idempotency":"required","parameters":[{"$ref":"#/components/parameters/ChiefId"},{"$ref":"#/components/parameters/RunId"},{"$ref":"#/components/parameters/InputRequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InputSubmission"}}}},"responses":{"200":{"description":"Input accepted against the exact pending request version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChiefRun"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/chiefs/{chief_id}/runs/{run_id}/approvals/{approval_id}":{"post":{"tags":["Chief"],"operationId":"decideChiefApproval","x-team0-audit-class":"A4","x-team0-scope":"chief.approve","x-team0-human-delegation-required":true,"x-team0-data-class":"C3","x-team0-rate-class":"R4","x-team0-idempotency":"required","parameters":[{"$ref":"#/components/parameters/ChiefId"},{"$ref":"#/components/parameters/RunId"},{"$ref":"#/components/parameters/ApprovalId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalDecision"}}}},"responses":{"200":{"description":"First valid approval decision committed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChiefRun"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/chiefs/{chief_id}/runs/{run_id}/effects/{effect_id}/resolution":{"post":{"tags":["Chief"],"operationId":"resolveChiefEffect","x-team0-audit-class":"A4","x-team0-scope":"chief.effects.resolve","x-team0-human-delegation-required":true,"x-team0-data-class":"C3","x-team0-rate-class":"R4","x-team0-idempotency":"required","parameters":[{"$ref":"#/components/parameters/ChiefId"},{"$ref":"#/components/parameters/RunId"},{"$ref":"#/components/parameters/EffectId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EffectResolution"}}}},"responses":{"200":{"description":"Effect resolution or explicit uncertainty acknowledgment committed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChiefRun"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/action-items":{"get":{"tags":["Work"],"operationId":"listActionItems","x-team0-audit-class":"A2","x-team0-scope":"action_items.read","x-team0-data-class":"C2","x-team0-rate-class":"R1","parameters":[{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Authorized action items.","headers":{"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionItemList"}}}},"304":{"description":"The authorized collection projection has not changed."},"default":{"$ref":"#/components/responses/Problem"}}}},"/action-items/{action_item_id}":{"parameters":[{"$ref":"#/components/parameters/ActionItemId"}],"get":{"tags":["Work"],"operationId":"getActionItem","x-team0-audit-class":"A2","x-team0-scope":"action_items.read","x-team0-data-class":"C2","x-team0-rate-class":"R1","responses":{"200":{"description":"Authorized action item.","headers":{"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionItem"}}}},"304":{"description":"The authorized action-item projection has not changed."},"default":{"$ref":"#/components/responses/Problem"}}}},"/artifacts":{"get":{"tags":["Work"],"operationId":"listArtifacts","x-team0-audit-class":"A2","x-team0-scope":"artifacts.read","x-team0-data-class":"C2","x-team0-rate-class":"R1","parameters":[{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Artifact metadata and authorized versions.","headers":{"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactList"}}}},"304":{"description":"The authorized collection projection has not changed."},"default":{"$ref":"#/components/responses/Problem"}}}},"/artifacts/{artifact_id}":{"get":{"tags":["Work"],"operationId":"getArtifact","x-team0-audit-class":"A2","x-team0-scope":"artifacts.read","x-team0-data-class":"C2","x-team0-rate-class":"R1","parameters":[{"$ref":"#/components/parameters/ArtifactId"}],"responses":{"200":{"description":"Artifact metadata and, when separately authorized, a short-lived content link; never a storage key.","headers":{"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Artifact"}}}},"304":{"description":"The authorized artifact projection has not changed."},"default":{"$ref":"#/components/responses/Problem"}}}}},"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","bearerFormat":"Team0 API key","description":"Server-only `Authorization: Bearer t0_live_...`; always a service principal."},"OAuth2":{"type":"oauth2","description":"Delegated-human OAuth issued by Clerk. Access tokens are opaque in the beta and are always combined with Team0 tenant, membership, object, field and grant-version policy.","x-team0-token-format":"opaque","x-team0-service-principals":"ApiKey","x-team0-browser-client":"public-pkce-s256-or-confidential-bff","x-team0-public-client-policy":"pkce-s256-no-client-secret","x-team0-refresh-token-policy":"rotated-single-use-non-expiring","flows":{"authorizationCode":{"authorizationUrl":"https://clerk.team0.ai/oauth/authorize","tokenUrl":"https://clerk.team0.ai/oauth/token","refreshUrl":"https://clerk.team0.ai/oauth/token","scopes":{"offline_access":"Refresh delegated access; Clerk adds this automatically, rotates refresh tokens on use, and rejects reuse.","action_items.read":"Read authorized action items.","action_items.write":"Create and update authorized action items.","artifacts.read":"Read authorized artifact metadata and content links.","artifacts.write":"Create authorized artifacts when enabled.","chief.approve":"Decide exact, version-bound Chief approvals as a delegated human.","chief.effects.resolve":"Resolve exact uncertain effects under operator policy.","wm.read":"Read authorized World Model projections.","wm.compose":"Compose from a frozen World Model read.","wm.evidence.read":"Read authorized evidence provenance.","wm.candidates.read":"Read authorized unresolved World Model candidates.","wm.source_content.read":"Read bounded authorized source excerpts.","wm.events.write":"Submit immutable events for a registered source.","wm.corrections.write":"Submit delegated-human World Model corrections.","chief.read":"Read authorized Chief resources and runs.","chief.run":"Start and interact with Chief runs.","connections.read":"Read connection status and capabilities.","connections.manage":"Start delegated provider-consent sessions.","developer_apps.manage":"Administer developer apps and their credentials.","usage.read":"Read authorized usage records.","webhooks.manage":"Administer webhook endpoints and deliveries.","c2c.directory.read":"Search the C2C directory and list the service principal's bound agents.","c2c.message":"Send C2C messages as one explicitly bound external-agent identity.","c2c.inbox.read":"Read responses, inbox items and channels for the bound C2C identity.","c2c.inbox.write":"Acknowledge inbox items for the bound C2C identity.","c2c.contribute":"Submit attributed external-agent contributions through the governed candidate lane."}}}}},"parameters":{"Cursor":{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":2048}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":255}},"IfMatch":{"name":"If-Match","in":"header","required":true,"schema":{"type":"string","minLength":3,"maxLength":255}},"Prefer":{"name":"Prefer","in":"header","required":false,"schema":{"type":"string","enum":["respond-async"]}},"LastEventId":{"name":"Last-Event-ID","in":"header","required":false,"schema":{"type":"string","maxLength":255}},"AppId":{"name":"app_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OpaqueId"}},"AgentGrantId":{"name":"grant_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OpaqueId"}},"CredentialId":{"name":"credential_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OpaqueId"}},"RegisteredSourceId":{"name":"source_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OpaqueId"}},"ChiefId":{"name":"chief_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OpaqueId"}},"RunId":{"name":"run_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OpaqueId"}},"ReadId":{"name":"read_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OpaqueId"}},"EvidenceId":{"name":"evidence_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OpaqueId"}},"CompositionId":{"name":"composition_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OpaqueId"}},"OperationId":{"name":"operation_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OpaqueId"}},"InputRequestId":{"name":"input_request_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OpaqueId"}},"ApprovalId":{"name":"approval_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OpaqueId"}},"EffectId":{"name":"effect_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OpaqueId"}},"ActionItemId":{"name":"action_item_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OpaqueId"}},"ArtifactId":{"name":"artifact_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OpaqueId"}},"EndpointId":{"name":"endpoint_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OpaqueId"}},"DeliveryId":{"name":"delivery_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OpaqueId"}}},"headers":{"Location":{"description":"Canonical resource or operation URL","schema":{"type":"string","format":"uri-reference"}},"ETag":{"description":"Opaque tenant-keyed resource version","schema":{"type":"string"}},"RetryAfter":{"description":"Suggested polling delay in seconds","schema":{"type":"integer","minimum":1}},"PreferenceApplied":{"description":"Applied HTTP preference","schema":{"type":"string","enum":["respond-async"]}},"IdempotentReplayed":{"description":"Present and true only when this response replays a previously committed outcome; one-time secrets are never replayed.","schema":{"type":"string","const":"true"}}},"responses":{"Problem":{"description":"RFC 9457 problem response. Cross-tenant identity is non-enumerating.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"schemas":{"OAuthProtectedResourceMetadata":{"type":"object","additionalProperties":false,"required":["resource","authorization_servers","bearer_methods_supported","scopes_supported"],"properties":{"resource":{"type":"string","format":"uri","const":"https://api.team0.ai"},"authorization_servers":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","format":"uri"}},"bearer_methods_supported":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","enum":["header"]}},"scopes_supported":{"type":"array","uniqueItems":true,"items":{"type":"string"}},"resource_documentation":{"type":"string","format":"uri"}}},"OpaqueId":{"type":"string","minLength":4,"maxLength":255,"pattern":"^[A-Za-z0-9_-]+$"},"ExecutionPolicy":{"type":"string","enum":["caller_acts","team0_asks_first","team0_may_act"],"description":"Maximum or effective action owner. A request may narrow an application's maximum but never widen it."},"Timestamp":{"type":"string","format":"date-time"},"Link":{"type":"string","format":"uri-reference"},"Problem":{"type":"object","additionalProperties":false,"required":["type","title","status","code","request_id"],"properties":{"type":{"type":"string","format":"uri-reference"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"code":{"type":"string","enum":["request.invalid","auth.required","auth.invalid_token","auth.insufficient_scope","resource.not_found","state.conflict","idempotency.conflict","resource.gone","precondition.failed","validation.failed","precondition.required","rate_limit.exceeded","internal.error","dependency.unavailable"]},"request_id":{"type":"string"}}},"EventEnvelope":{"type":"object","additionalProperties":false,"required":["specversion","id","type","source","subject","time","datacontenttype","data"],"properties":{"specversion":{"const":"1.0"},"id":{"$ref":"#/components/schemas/OpaqueId"},"type":{"type":"string","pattern":"^team0\\.[a-z0-9_.-]+\\.v[1-9][0-9]*$"},"source":{"type":"string","format":"uri"},"subject":{"type":"string","minLength":1,"maxLength":1000},"time":{"$ref":"#/components/schemas/Timestamp"},"datacontenttype":{"const":"application/json"},"data":{"type":"object","maxProperties":50}}},"Page":{"type":"object","additionalProperties":false,"required":["data","has_more"],"properties":{"data":{"type":"array","items":{}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}},"Capabilities":{"type":"object","additionalProperties":false,"required":["object","scopes","features","versions"],"properties":{"object":{"const":"capabilities"},"scopes":{"type":"array","uniqueItems":true,"items":{"type":"string"}},"features":{"type":"object","additionalProperties":{"type":"boolean"}},"versions":{"type":"object","additionalProperties":{"type":"string"}},"latency_budget_classes_ms":{"type":"array","items":{"type":"integer","minimum":100}}}},"Chief":{"type":"object","additionalProperties":false,"required":["id","object","kind","name"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"chief"},"kind":{"type":"string","enum":["personal","company"]},"name":{"type":"string","maxLength":200},"capabilities":{"type":"array","items":{"type":"string"}}}},"ChiefList":{"type":"object","additionalProperties":false,"required":["data","has_more"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Chief"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}},"Connection":{"type":"object","additionalProperties":false,"required":["id","object","provider","status","capabilities"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"connection"},"provider":{"type":"string"},"status":{"type":"string","enum":["connected","attention_required","disconnected"]},"capabilities":{"type":"array","items":{"type":"string"}},"last_success_at":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]}}},"ConnectionList":{"type":"object","additionalProperties":false,"required":["data","has_more"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Connection"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}},"ConnectionSessionCreate":{"type":"object","additionalProperties":false,"required":["provider","return_uri"],"properties":{"provider":{"type":"string","maxLength":100},"return_uri":{"type":"string","format":"uri","maxLength":2048}}},"ConnectionSession":{"type":"object","additionalProperties":false,"required":["id","object","consent_url","expires_at"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"connection_session"},"consent_url":{"type":"string","format":"uri"},"expires_at":{"$ref":"#/components/schemas/Timestamp"}}},"UsageRecord":{"type":"object","additionalProperties":false,"required":["id","object","category","route_id","usage_class","unit","quantity","status","scope","created_at"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"usage_record"},"category":{"type":"string","enum":["deterministic_request","model_operation"]},"route_id":{"type":"string"},"usage_class":{"type":"string","enum":["wm_read","supporting_read","living_understanding_read","model_operation"]},"unit":{"type":"string","enum":["request","model_tokens"]},"quantity":{"type":"number","minimum":0},"status":{"type":"string","enum":["finalized","reserved","refunded"]},"scope":{"type":"string","enum":["owner","public","c2c","tenant"]},"response_bytes":{"type":"integer","minimum":0},"latency_ms":{"type":"integer","minimum":0},"created_at":{"$ref":"#/components/schemas/Timestamp"}}},"UsageList":{"type":"object","additionalProperties":false,"required":["data","has_more"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UsageRecord"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}},"DeveloperAppCreate":{"type":"object","additionalProperties":false,"required":["name","kind","redirect_uris","allowed_origins"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["oauth_public","service"],"description":"Confidential OAuth clients are not self-service in the first beta; server integrations use Team0 service credentials."},"redirect_uris":{"type":"array","maxItems":20,"uniqueItems":true,"items":{"type":"string","format":"uri"}},"allowed_origins":{"type":"array","maxItems":20,"uniqueItems":true,"items":{"type":"string","format":"uri"}},"maximum_execution_policy":{"$ref":"#/components/schemas/ExecutionPolicy"}}},"DeveloperAppUpdate":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"redirect_uris":{"type":"array","maxItems":20,"uniqueItems":true,"items":{"type":"string","format":"uri"}},"allowed_origins":{"type":"array","maxItems":20,"uniqueItems":true,"items":{"type":"string","format":"uri"}},"maximum_execution_policy":{"$ref":"#/components/schemas/ExecutionPolicy"}}},"DeveloperApp":{"type":"object","additionalProperties":false,"required":["id","object","name","kind","protocol_status","redirect_uris","allowed_origins","maximum_execution_policy","version","created_at"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"developer_app"},"name":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["oauth_public","oauth_confidential","service"]},"protocol_status":{"type":"string","enum":["not_applicable","pending","ready","mismatch","disabled"]},"client_id":{"type":["string","null"],"description":"Clerk OAuth client ID for ready OAuth applications; never a client secret."},"redirect_uris":{"type":"array","maxItems":20,"uniqueItems":true,"items":{"type":"string","format":"uri"}},"allowed_origins":{"type":"array","maxItems":20,"uniqueItems":true,"items":{"type":"string","format":"uri"}},"maximum_execution_policy":{"$ref":"#/components/schemas/ExecutionPolicy"},"version":{"type":"integer","minimum":1},"created_at":{"$ref":"#/components/schemas/Timestamp"}}},"DeveloperAppList":{"type":"object","additionalProperties":false,"required":["data","has_more"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DeveloperApp"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}},"CredentialIssue":{"type":"object","additionalProperties":false,"required":["name","scopes","expires_at"],"properties":{"name":{"type":"string","maxLength":200},"scopes":{"type":"array","uniqueItems":true,"items":{"type":"string"}},"expires_at":{"$ref":"#/components/schemas/Timestamp"}}},"Credential":{"type":"object","additionalProperties":false,"required":["id","object","name","hint","scopes","status","expires_at","version"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"api_credential"},"name":{"type":"string"},"hint":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","expiring","revoked","expired"]},"expires_at":{"$ref":"#/components/schemas/Timestamp"},"version":{"type":"integer","minimum":1}}},"CredentialReveal":{"type":"object","additionalProperties":false,"required":["id","object","name","hint","scopes","status","expires_at","version","secret"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"api_credential"},"name":{"type":"string"},"hint":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","expiring","revoked","expired"]},"expires_at":{"$ref":"#/components/schemas/Timestamp"},"version":{"type":"integer","minimum":1},"secret":{"type":"string","readOnly":true}}},"CredentialIssueOutcome":{"description":"Reveal-once result on first execution or redacted credential metadata on idempotent replay.","oneOf":[{"$ref":"#/components/schemas/CredentialReveal"},{"$ref":"#/components/schemas/Credential"}]},"CredentialList":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Credential"}}}},"AgentGrantPermissions":{"type":"object","additionalProperties":false,"required":["understanding","invoke_chief","communicate_with_agents","read_inbox","contribute_conversations","contribute_tool_activity"],"properties":{"understanding":{"type":"boolean","description":"Allow bounded deterministic Living Understanding reads."},"invoke_chief":{"type":"boolean","description":"Allow this agent to invoke the configured Chief within the app execution ceiling."},"communicate_with_agents":{"type":"boolean","description":"Allow directory lookup and C2C messages."},"read_inbox":{"type":"boolean","description":"Allow this agent to read and acknowledge only its own C2C inbox."},"contribute_conversations":{"type":"boolean","description":"Accept attributed turns as candidates by default. Learning from relayed owner messages requires separate explicit transcript consent and tenant rollout."},"contribute_tool_activity":{"type":"boolean","description":"Accept changes observed through the agent's own tools as agent-attributed candidates. This never grants provider-authoritative status."},"read_work":{"type":"boolean","default":false,"description":"Read explicitly assigned or coordinated work and its task context."},"report_work":{"type":"boolean","default":false,"description":"Accept assignments","report progress and outcomes":null,"maintain checkpoints and ask or answer scoped questions. Includes work reads; does not grant completion approval or reassignment.":null},"manage_work":{"type":"boolean","default":false,"description":"Create and manage work where this agent is the designated coordinator. Includes work reads; does not grant external effects or owner-only approvals."}}},"AgentGrantCreate":{"type":"object","additionalProperties":false,"required":["agent_id","permissions","expires_at"],"properties":{"agent_id":{"$ref":"#/components/schemas/OpaqueId"},"permissions":{"$ref":"#/components/schemas/AgentGrantPermissions"},"understanding_scope":{"allOf":[{"$ref":"#/components/schemas/AgentUnderstandingScope"}],"default":"public","description":"Omit only for backward compatibility; omitted grants fail closed to public visibility."},"expires_at":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]}}},"AgentGrantAgent":{"type":"object","additionalProperties":false,"required":["id","name","handle"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"name":{"type":"string","minLength":1,"maxLength":200},"handle":{"type":"string","minLength":1,"maxLength":500}}},"AgentTranscriptConsentUpdate":{"type":"object","additionalProperties":false,"required":["enabled"],"properties":{"enabled":{"type":"boolean"}}},"AgentUnderstandingScope":{"type":"string","enum":["public","c2c","owner"],"description":"Explicit Living Understanding visibility ceiling; independent of C2C sharing trust."},"AgentUnderstandingScopeUpdate":{"type":"object","additionalProperties":false,"required":["scope"],"properties":{"scope":{"$ref":"#/components/schemas/AgentUnderstandingScope"}}},"AgentTranscriptConsent":{"type":"object","additionalProperties":false,"required":["enabled","is_yours","can_enable","can_disable","unavailable_reason"],"description":"Display hints only; every mutation and ingestion rechecks current authority. Missing on older servers means unavailable, never enabled.","properties":{"enabled":{"type":"boolean","description":"Stored consent","not a guarantee that every claim will be learned.":null},"is_yours":{"type":"boolean","description":"Consent was granted by the current human."},"can_enable":{"type":"boolean"},"can_disable":{"type":"boolean"},"unavailable_reason":{"type":["string","null"],"enum":["owner_required","another_owner","schema_required","rollout_disabled","inactive_grant","conversations_required",null]}}},"AgentGrant":{"type":"object","additionalProperties":false,"required":["id","object","developer_app_id","agent","permissions","allowed_tools","allowed_resources","understanding_scope","maximum_execution_policy","conversation_source_id","contribution_source_id","status","version","expires_at","created_at"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"agent_grant"},"developer_app_id":{"$ref":"#/components/schemas/OpaqueId"},"agent":{"$ref":"#/components/schemas/AgentGrantAgent"},"permissions":{"$ref":"#/components/schemas/AgentGrantPermissions"},"allowed_tools":{"type":"array","uniqueItems":true,"items":{"type":"string"}},"allowed_resources":{"type":"array","uniqueItems":true,"items":{"type":"string"}},"understanding_scope":{"$ref":"#/components/schemas/AgentUnderstandingScope"},"maximum_execution_policy":{"$ref":"#/components/schemas/ExecutionPolicy"},"conversation_source_id":{"deprecated":true,"description":"Compatibility alias for contribution_source_id when conversation contribution is enabled.","anyOf":[{"$ref":"#/components/schemas/OpaqueId"},{"type":"null"}]},"contribution_source_id":{"description":"Registered source to use when contributing an enabled conversation or tool-activity schema.","anyOf":[{"$ref":"#/components/schemas/OpaqueId"},{"type":"null"}]},"transcript_consent":{"$ref":"#/components/schemas/AgentTranscriptConsent"},"status":{"type":"string","enum":["active","revoked","expired"]},"version":{"type":"integer","minimum":1},"expires_at":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"created_at":{"$ref":"#/components/schemas/Timestamp"}}},"AgentActivationCapability":{"type":"object","additionalProperties":false,"required":["verified"],"properties":{"verified":{"type":"boolean"}}},"AgentActivation":{"type":"object","additionalProperties":false,"required":["status","first_read_at","read_count","first_write_at","write_count","capabilities"],"description":"Content-free proof of adapter lifecycle traffic for one exact current grant. `active` means both sides were observed, not that every contributed turn yielded a durable fact.","properties":{"status":{"type":"string","enum":["waiting","partial","active","inactive"]},"first_read_at":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"read_count":{"type":"integer","minimum":0},"first_write_at":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"write_count":{"type":"integer","minimum":0},"capabilities":{"type":"object","additionalProperties":false,"required":["understanding","learning"],"properties":{"understanding":{"$ref":"#/components/schemas/AgentActivationCapability"},"learning":{"$ref":"#/components/schemas/AgentActivationCapability"}}}}},"AgentGrantList":{"type":"object","additionalProperties":false,"required":["data","has_more"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentGrant"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}},"RegisteredSourceCreate":{"type":"object","additionalProperties":false,"required":["name","source_kind","schema_contracts","sensitivity_floor","ingest_lane"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"source_kind":{"type":"string","enum":["integration","external_agent"]},"schema_contracts":{"type":"object","minProperties":1,"maxProperties":20,"additionalProperties":{"type":"object","additionalProperties":false,"required":["sensitivity_floor","json_schema"],"properties":{"sensitivity_floor":{"type":"string","enum":["public","internal","private","sensitive"]},"json_schema":{"type":"object","description":"Closed Draft 2020-12 JSON Schema; remote references are rejected."}}}},"sensitivity_floor":{"type":"string","enum":["public","internal","private","sensitive"]},"ingest_lane":{"type":"string","enum":["candidate","evidence"],"description":"Server-enforced trust posture; neither lane can directly mint a trusted fact."}}},"RegisteredSource":{"type":"object","additionalProperties":false,"required":["id","object","developer_app_id","name","source_kind","status","schema_contracts","sensitivity_floor","ingest_lane","version","created_at","updated_at","links"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"wm.registered_source"},"developer_app_id":{"$ref":"#/components/schemas/OpaqueId"},"name":{"type":"string","minLength":1,"maxLength":200},"source_kind":{"type":"string","enum":["integration","external_agent"]},"status":{"type":"string","enum":["active","disabled","deleted"]},"schema_contracts":{"type":"object","additionalProperties":{"type":"object"}},"sensitivity_floor":{"type":"string","enum":["public","internal","private","sensitive"]},"ingest_lane":{"type":"string","enum":["candidate","evidence"]},"version":{"type":"integer","minimum":1},"created_at":{"$ref":"#/components/schemas/Timestamp"},"updated_at":{"$ref":"#/components/schemas/Timestamp"},"links":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Link"}}}},"RegisteredSourceList":{"type":"object","additionalProperties":false,"required":["data","has_more"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RegisteredSource"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}},"WMReadCreate":{"type":"object","additionalProperties":false,"required":["query","purpose"],"properties":{"query":{"type":"string","maxLength":8000},"purpose":{"type":"string","enum":["brief","answer","compare","structured"]},"as_of":{"$ref":"#/components/schemas/Timestamp"},"latency_budget_ms":{"type":"integer","minimum":100,"maximum":5000,"default":1500},"live":{"type":"boolean","default":false,"description":"Set true only when the user asks for current data right now (\"check my inbox now\") or the answer's last-synced times are too old for the question. Team0 then also reads the connected calendar and Gmail live for what the request names."},"output":{"type":"object","additionalProperties":false,"properties":{"include":{"type":"array","uniqueItems":true,"items":{"type":"string","enum":["maintained","situations","priorities","facts","candidates","storylines","episodes","open_work","live_context","contradictions","coverage"]}},"max_facts":{"type":"integer","minimum":0,"maximum":200},"max_items_per_component":{"type":"integer","minimum":0,"maximum":200,"description":"Keeps only the query-ranked prefix of each requested list component other than facts."}}}}},"EvidenceRef":{"type":"object","additionalProperties":false,"required":["id","object"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"evidence_ref"}}},"MaintainedMatter":{"type":"object","additionalProperties":false,"required":["id","object","version","title","current_read","why_it_matters","why_now","significance","recommended_posture","rationale","known_unknowns","next_review_at","fact_ids","support"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"wm.maintained_matter"},"version":{"type":"string"},"title":{"type":"string"},"current_read":{"type":"string"},"why_it_matters":{"type":"string"},"why_now":{"type":"string"},"significance":{"type":"string"},"recommended_posture":{"type":"string"},"rationale":{"type":"string"},"known_unknowns":{"type":"array","maxItems":3,"items":{"type":"string"}},"next_review_at":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"fact_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/components/schemas/OpaqueId"}},"support":{"type":"string","enum":["in_read","query_expansion_available"]}}},"MaintainedUnderstanding":{"type":"object","additionalProperties":false,"required":["state","evidence_version","reference_time","synthesized_at","degraded_sources","items"],"properties":{"state":{"type":"string","enum":["ready","unavailable","withheld","not_requested"]},"evidence_version":{"anyOf":[{"type":"string"},{"type":"null"}]},"reference_time":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"synthesized_at":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"degraded_sources":{"type":"array","uniqueItems":true,"items":{"type":"string"}},"items":{"type":"array","maxItems":200,"items":{"$ref":"#/components/schemas/MaintainedMatter"}}}},"Situation":{"type":"object","additionalProperties":false,"required":["id","object","title","status","fact_ids"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"wm.situation"},"title":{"type":"string"},"summary":{"type":"string"},"status":{"type":"string","enum":["active","stable","uncertain","resolved"]},"fact_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/components/schemas/OpaqueId"}}}},"Priority":{"type":"object","additionalProperties":false,"required":["id","object","title","horizon","objective_type","status","authority","displacement_rule","observed_at","source","fact_ids"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"wm.priority"},"title":{"type":"string"},"horizon":{"type":"string","enum":["now","today","current_week","thirty_to_sixty_days","long_term"]},"objective_type":{"type":"string","enum":["task","goal","strategy","constraint","risk","deadline"]},"status":{"type":"string","enum":["current","waiting","completed","cancelled","unknown"]},"authority":{"type":"string","enum":["owner_explicit","owner_confirmed","provider_authoritative","system_structural"]},"displacement_rule":{"type":"string","enum":["never","same_horizon","explicit_owner_override"]},"observed_at":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"source":{"$ref":"#/components/schemas/SourceAttribution"},"fact_ids":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/components/schemas/OpaqueId"}}}},"OpenWork":{"type":"object","additionalProperties":false,"required":["id","object","title","status"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"wm.open_work"},"title":{"type":"string"},"status":{"type":"string"},"owner_id":{"$ref":"#/components/schemas/OpaqueId"},"due_at":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"fact_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/components/schemas/OpaqueId"}}}},"LiveContext":{"type":"object","additionalProperties":false,"required":["id","object","kind","text"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"wm.live_context"},"kind":{"type":"string"},"text":{"type":"string"},"as_of":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"fact_ids":{"type":"array","uniqueItems":true,"items":{"$ref":"#/components/schemas/OpaqueId"}}}},"Fact":{"type":"object","additionalProperties":false,"required":["id","object","predicate","text","source_type","source","fact_when","learned_at","epistemic_status","evidence"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"wm.fact"},"predicate":{"type":"string"},"text":{"type":"string"},"source_type":{"type":"string"},"source":{"$ref":"#/components/schemas/SourceAttribution"},"fact_when":{"anyOf":[{"type":"string"},{"type":"null"}]},"learned_at":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"epistemic_status":{"type":"string","enum":["trusted","contradicted","uncertain"]},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/EvidenceRef"}},"about_query_subject":{"type":"boolean","description":"Present when the read resolved the request. True when the fact is about a record the request names."},"admitted_for_query":{"type":"boolean","description":"Present when the read resolved the request. True when the shared projection admitted the fact for this request."},"about_other_person":{"type":"boolean","description":"Present when the read resolved the request. True when the fact is about a person other than the owner and the records the request names."},"query_similarity":{"type":"number","description":"Present when the read resolved the request and the fact has a stored vector. Cosine similarity between the fact and the request."},"rank_score":{"type":"number","description":"Present when the read resolved the request. The hybrid search score that ranked this fact (meaning","keywords":null,"recency and importance) for this request only.":null},"disputed_by":{"type":"string","description":"Owner scope only. Another fact in this read that makes a different claim about the same matter; nothing yet settles which is current."},"progress":{"type":"array","description":"Owner scope only. Parts of this still-open item that later evidence already settled. The item itself stays open.","items":{"type":"object","additionalProperties":false,"required":["part","status"],"properties":{"part":{"type":"string"},"status":{"type":"string","enum":["done","declined","rescheduled","open","unclear"]}}}}}},"QueryResolution":{"type":"object","additionalProperties":false,"description":"What the request names and the period it asks about, resolved deterministically before the read. Present only when enabled for the tenant and scope is owner.","required":["subjects","ambiguous","unmatched","terms","window"],"properties":{"subjects":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","name"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"name":{"type":"string"},"importance":{"type":"string","description":"Nightly deterministic tier: inner, active, periphery or dormant."},"relationship":{"type":"string","description":"Stated relationship to the owner."}}}},"unconfirmed":{"type":"array","description":"Recent heard-but-unconfirmed (candidate) facts about the named records, owner scope only. Never evidence of an outcome.","items":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"predicate":{"type":"string"},"text":{"type":"string"},"source":{"type":"string"},"when":{"type":"string"},"learned":{"type":"string"},"progress":{"type":"string","description":"Parts later evidence already settled, e.g. 'send the deck: done, intro to Dana: declined'. The item itself stays open."}}}},"people_now":{"type":"array","description":"Present when the request names nothing. The inner and active circle by importance, with each person's relationship to the owner.","items":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"importance":{"type":"string"},"relationship":{"type":"string"}}}},"ambiguous":{"type":"array","description":"A mention several records share; never resolved by popularity.","items":{"type":"object","additionalProperties":false,"required":["mention","candidates"],"properties":{"mention":{"type":"string"},"candidates":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","name"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"name":{"type":"string"}}}}}}},"sources":{"type":"array","description":"Each connected source Team0 keeps current and when it last synced (UTC). Team0 keeps what they mean, not their raw contents.","items":{"type":"object","additionalProperties":false,"required":["source","synced_at"],"properties":{"source":{"type":"string"},"synced_at":{"type":"string"}}}},"live_emails":{"type":"array","description":"Emails read live from Gmail for this request (with the named people, or the latest primary-inbox emails when the request names nothing). Owner scope only.","items":{"type":"object","additionalProperties":false,"required":["account","from","to","date","subject","snippet"],"properties":{"account":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"date":{"type":"string"},"subject":{"type":"string"},"snippet":{"type":"string"}}}},"live_read_at":{"type":"string","description":"When the live Gmail/Calendar read ran (UTC)."},"activity":{"type":"array","description":"The named people's recent emails, meetings and calendar events from Team0's activity record, newest first. Owner scope only.","items":{"type":"object","additionalProperties":false,"required":["person","kind","when","title"],"properties":{"person":{"type":"string"},"kind":{"type":"string","enum":["email","meeting","calendar"]},"when":{"type":"string"},"title":{"type":"string"},"direction":{"type":"string"}}}},"recent_emails":{"type":"array","description":"When the request names nothing, the newest emails in Team0's hourly email copy with Team0's category. Owner scope only.","items":{"type":"object","additionalProperties":false,"required":["account","from","to","date","subject","snippet","category"],"properties":{"account":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"date":{"type":"string"},"subject":{"type":"string"},"snippet":{"type":"string"},"category":{"type":"string"}}}},"recent_emails_as_of":{"type":"string","description":"When the email copy behind recent_emails last synced (UTC)."},"unmatched":{"type":"array","items":{"type":"string"},"description":"Names no record holds when nothing else in the request resolved."},"terms":{"type":"array","items":{"type":"string"},"description":"Capitalized terms that matched no record; facts mentioning them may still exist."},"window":{"anyOf":[{"type":"null"},{"type":"object","additionalProperties":false,"required":["label","start","end","timezone","items"],"properties":{"label":{"type":"string"},"start":{"type":"string","format":"date"},"end":{"type":"string","format":"date"},"timezone":{"type":"string"},"calendar_as_of":{"type":"string","description":"When the calendar last synced; an event added since is not listed."},"calendar_live":{"type":"boolean","description":"True when the period's events were read live from every connected calendar at calendar_as_of."},"items":{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}]}}},"SourceAttribution":{"type":"object","additionalProperties":false,"required":["kind"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"kind":{"type":"string"},"name":{"type":"string","maxLength":200}}},"Candidate":{"type":"object","additionalProperties":false,"required":["id","object","kind","text","status","evidence"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"wm.candidate"},"kind":{"type":"string"},"text":{"type":"string"},"status":{"type":"string","enum":["unresolved","supported","rejected","superseded"]},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/EvidenceRef"}}}},"Storyline":{"type":"object","additionalProperties":false,"required":["id","object","title","kind","fact_count"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"wm.storyline"},"title":{"type":"string"},"kind":{"type":"string"},"fact_count":{"type":"integer","minimum":0},"last_activity_at":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]}}},"Episode":{"type":"object","additionalProperties":false,"required":["id","object","title","kind","origin"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"wm.episode"},"title":{"type":"string"},"kind":{"type":"string"},"started_at":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"summary":{"type":"string"},"origin":{"type":"string","enum":["semantic","recall_window"]}}},"Contradiction":{"type":"object","additionalProperties":false,"required":["id","object","attribute_key","status","competing_fact_ids"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"wm.contradiction"},"entity_id":{"$ref":"#/components/schemas/OpaqueId"},"attribute_key":{"type":"string"},"status":{"const":"unresolved_current_conflict"},"competing_fact_ids":{"type":"array","minItems":2,"uniqueItems":true,"items":{"$ref":"#/components/schemas/OpaqueId"}}}},"Coverage":{"type":"object","additionalProperties":false,"required":["source","status","enumerated"],"properties":{"source":{"type":"string"},"status":{"type":"string","enum":["complete","partial","stale","unavailable","not_connected","not_requested","unknown"]},"as_of":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]},"window_start":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"window_end":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"enumerated":{"type":"boolean"}}},"ProjectionStatus":{"type":"object","additionalProperties":false,"required":["status"],"properties":{"status":{"type":"string","enum":["complete","partial","not_requested","unavailable","withheld"]},"reason":{"type":"string"}}},"Staleness":{"type":"object","additionalProperties":false,"required":["status","evaluated_at"],"properties":{"status":{"type":"string","enum":["fresh","mixed","stale","unknown"]},"evaluated_at":{"$ref":"#/components/schemas/Timestamp"},"oldest_source_at":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]}}},"WMRead":{"type":"object","additionalProperties":false,"required":["id","object","version","created_at","usable_until","retained_until","as_of","scope","read_version","content_digest","status","projection","world","understanding","coverage","staleness","truncation"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"wm.read"},"version":{"type":"integer","minimum":1},"created_at":{"$ref":"#/components/schemas/Timestamp"},"usable_until":{"$ref":"#/components/schemas/Timestamp"},"retained_until":{"$ref":"#/components/schemas/Timestamp"},"as_of":{"$ref":"#/components/schemas/Timestamp"},"scope":{"type":"string","enum":["owner","public","c2c"]},"read_version":{"type":"string"},"content_digest":{"type":"string","pattern":"^wmcd_[A-Za-z0-9_-]+$"},"status":{"type":"string","enum":["complete","partial","degraded"]},"projection":{"type":"object","additionalProperties":false,"required":["maintained","situations","priorities","facts","candidates","storylines","episodes","open_work","live_context","contradictions","coverage"],"properties":{"maintained":{"$ref":"#/components/schemas/ProjectionStatus"},"situations":{"$ref":"#/components/schemas/ProjectionStatus"},"priorities":{"$ref":"#/components/schemas/ProjectionStatus"},"facts":{"$ref":"#/components/schemas/ProjectionStatus"},"candidates":{"$ref":"#/components/schemas/ProjectionStatus"},"storylines":{"$ref":"#/components/schemas/ProjectionStatus"},"episodes":{"$ref":"#/components/schemas/ProjectionStatus"},"open_work":{"$ref":"#/components/schemas/ProjectionStatus"},"live_context":{"$ref":"#/components/schemas/ProjectionStatus"},"contradictions":{"$ref":"#/components/schemas/ProjectionStatus"},"coverage":{"$ref":"#/components/schemas/ProjectionStatus"}}},"understanding":{"type":"object","additionalProperties":false,"required":["maintained","situations","priorities","open_work","live_context"],"properties":{"maintained":{"$ref":"#/components/schemas/MaintainedUnderstanding"},"situations":{"type":"array","items":{"$ref":"#/components/schemas/Situation"}},"priorities":{"type":"array","items":{"$ref":"#/components/schemas/Priority"}},"open_work":{"type":"array","items":{"$ref":"#/components/schemas/OpenWork"}},"live_context":{"type":"array","items":{"$ref":"#/components/schemas/LiveContext"}}}},"world":{"type":"object","additionalProperties":false,"required":["facts","candidates","storylines","episodes","contradictions"],"properties":{"facts":{"type":"array","items":{"$ref":"#/components/schemas/Fact"}},"candidates":{"type":"array","items":{"$ref":"#/components/schemas/Candidate"}},"storylines":{"type":"array","items":{"$ref":"#/components/schemas/Storyline"}},"episodes":{"type":"array","items":{"$ref":"#/components/schemas/Episode"}},"contradictions":{"type":"array","items":{"$ref":"#/components/schemas/Contradiction"}}}},"coverage":{"type":"array","items":{"$ref":"#/components/schemas/Coverage"}},"staleness":{"$ref":"#/components/schemas/Staleness"},"truncation":{"type":"object","additionalProperties":{"type":"integer","minimum":0}},"query_resolution":{"$ref":"#/components/schemas/QueryResolution"}}},"Evidence":{"type":"object","additionalProperties":false,"required":["id","object","source_type","source","sensitivity","trust_lane","content_digest"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"wm.evidence"},"source_type":{"type":"string"},"source":{"$ref":"#/components/schemas/SourceAttribution"},"sensitivity":{"type":"string"},"trust_lane":{"type":"string"},"observed_at":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"occurred_at":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"content_digest":{"type":"string","pattern":"^wmed_[A-Za-z0-9_-]+$"},"excerpt":{"type":"string","maxLength":4000}}},"CompositionCreate":{"type":"object","additionalProperties":false,"oneOf":[{"required":["read_id"]},{"required":["read"]}],"required":["purpose"],"properties":{"read_id":{"$ref":"#/components/schemas/OpaqueId"},"read":{"$ref":"#/components/schemas/WMReadCreate"},"execution":{"type":"string","enum":["auto","async"],"default":"auto"},"purpose":{"type":"string","enum":["answer","brief","summarize","compare","format"]},"instructions":{"type":"string","maxLength":8000}}},"Composition":{"type":"object","additionalProperties":false,"required":["id","object","operation_id","usage_charge_id","read_id","version","created_at","status","content","grounding","usage"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"wm.composition"},"operation_id":{"allOf":[{"$ref":"#/components/schemas/OpaqueId"}],"description":"Same durable operation identity returned by the asynchronous path."},"usage_charge_id":{"allOf":[{"$ref":"#/components/schemas/OpaqueId"}],"description":"Same single usage record attached to the durable operation."},"read_id":{"$ref":"#/components/schemas/OpaqueId"},"version":{"type":"integer","minimum":1},"created_at":{"$ref":"#/components/schemas/Timestamp"},"status":{"const":"completed"},"content":{"type":"string"},"grounding":{"type":"array","items":{"$ref":"#/components/schemas/EvidenceRef"}},"usage":{"type":"object","additionalProperties":{"type":"number","minimum":0}}}},"Operation":{"type":"object","additionalProperties":false,"required":["id","object","kind","status","version","created_at","usage_charge_id","links"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"operation"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","input_required","approval_required","resolution_required","completed","completed_with_uncertainty","failed","cancelled","expired"]},"version":{"type":"integer","minimum":1},"created_at":{"$ref":"#/components/schemas/Timestamp"},"updated_at":{"$ref":"#/components/schemas/Timestamp"},"usage_charge_id":{"allOf":[{"$ref":"#/components/schemas/OpaqueId"}],"description":"Durable usage record, including zero-charge operations."},"read_id":{"allOf":[{"$ref":"#/components/schemas/OpaqueId"}],"description":"Frozen World Model read used by this operation when its kind consumes or corrects one; absent for event ingestion."},"error":{"anyOf":[{"$ref":"#/components/schemas/Problem"},{"type":"null"}]},"usage":{"type":"object","additionalProperties":{"type":"number","minimum":0}},"deletion":{"$ref":"#/components/schemas/DeletionProgress"},"links":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Link"}}}},"DeletionProgress":{"type":"object","additionalProperties":false,"required":["id","target_type","status","version","blocking_reasons","tombstone_expires_at"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"target_type":{"type":"string","enum":["developer_app","registered_source","webhook_endpoint"]},"status":{"type":"string","enum":["accepted","processing","blocked","tombstoned"]},"version":{"type":"integer","minimum":1},"blocking_reasons":{"type":"array","uniqueItems":true,"items":{"type":"string","enum":["active_run","unresolved_effect","pending_source_input","replayable_webhook","billing_record","legal_hold","provider_unavailable","deletion_journal_unavailable"]}},"tombstone_expires_at":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]}}},"ChiefRunCreate":{"type":"object","additionalProperties":false,"required":["input","mode"],"properties":{"input":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"object","additionalProperties":false,"required":["type","text"],"properties":{"type":{"const":"text"},"text":{"type":"string","minLength":1,"maxLength":32000}}}},"mode":{"type":"string","enum":["respond","plan","act"]},"execution_policy":{"allOf":[{"$ref":"#/components/schemas/ExecutionPolicy"}],"description":"Optional per-run narrowing. Omission uses the application's maximum for act mode; respond and plan are always caller-owned."},"session_id":{"$ref":"#/components/schemas/OpaqueId"},"read_id":{"$ref":"#/components/schemas/OpaqueId"}}},"PendingInput":{"type":"object","additionalProperties":false,"required":["id","object","version","schema","expires_at","run_version","submission"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"chief.input_request"},"version":{"type":"integer","minimum":1},"schema":{"type":"object"},"expires_at":{"$ref":"#/components/schemas/Timestamp"},"run_version":{"type":"integer","minimum":1},"submission":{"$ref":"#/components/schemas/Link"}}},"PendingApproval":{"type":"object","additionalProperties":false,"required":["id","object","proposal_digest","grant_version","run_version","expires_at","decision"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"chief.approval"},"summary":{"type":"string"},"proposal_digest":{"type":"string"},"grant_version":{"type":"integer","minimum":1},"run_version":{"type":"integer","minimum":1},"expires_at":{"$ref":"#/components/schemas/Timestamp"},"decision":{"$ref":"#/components/schemas/Link"}}},"UnresolvedEffect":{"type":"object","additionalProperties":false,"required":["id","object","status","version","resolution"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"chief.effect"},"status":{"const":"indeterminate"},"version":{"type":"integer","minimum":1},"summary":{"type":"string"},"resolution":{"$ref":"#/components/schemas/Link"}}},"ChiefRun":{"type":"object","additionalProperties":false,"required":["id","object","chief_id","mode","execution_policy","status","version","pending_inputs","pending_approvals","unresolved_effects","links"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"chief.run"},"chief_id":{"$ref":"#/components/schemas/OpaqueId"},"mode":{"type":"string","enum":["respond","plan","act"]},"execution_policy":{"$ref":"#/components/schemas/ExecutionPolicy"},"status":{"type":"string","enum":["queued","running","input_required","approval_required","resolution_required","completed","completed_with_uncertainty","failed","cancelled","expired"]},"version":{"type":"integer","minimum":1},"result":{"type":["object","null"]},"read_ids":{"type":"array","items":{"$ref":"#/components/schemas/OpaqueId"}},"pending_inputs":{"type":"array","items":{"$ref":"#/components/schemas/PendingInput"}},"pending_approvals":{"type":"array","items":{"$ref":"#/components/schemas/PendingApproval"}},"unresolved_effects":{"type":"array","items":{"$ref":"#/components/schemas/UnresolvedEffect"}},"links":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Link"}}}},"InputSubmission":{"type":"object","additionalProperties":false,"required":["input_request_version","run_version","value"],"properties":{"input_request_version":{"type":"integer","minimum":1},"run_version":{"type":"integer","minimum":1},"value":{}}},"ApprovalDecision":{"type":"object","additionalProperties":false,"required":["decision","proposal_digest","grant_version","run_version"],"properties":{"decision":{"type":"string","enum":["approve","deny"]},"proposal_digest":{"type":"string"},"grant_version":{"type":"integer","minimum":1},"run_version":{"type":"integer","minimum":1}}},"EffectResolution":{"type":"object","additionalProperties":false,"required":["outcome","effect_version","run_version","reason"],"properties":{"outcome":{"type":"string","enum":["confirmed_succeeded","confirmed_failed","acknowledged_unknown"]},"effect_version":{"type":"integer","minimum":1},"run_version":{"type":"integer","minimum":1},"reason":{"type":"string","minLength":1,"maxLength":4000},"evidence":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/EvidenceRef"}}}},"ActionItemWrite":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"title":{"type":"string","minLength":1,"maxLength":500},"status":{"type":"string"},"owner_id":{"$ref":"#/components/schemas/OpaqueId"},"due_at":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]}}},"ActionItemCreate":{"type":"object","additionalProperties":false,"required":["title"],"properties":{"title":{"type":"string","minLength":1,"maxLength":500},"status":{"type":"string"},"owner_id":{"$ref":"#/components/schemas/OpaqueId"},"due_at":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]}}},"ActionItem":{"type":"object","additionalProperties":false,"required":["id","object","title","status","version"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"action_item"},"title":{"type":"string","minLength":1,"maxLength":500},"status":{"type":"string"},"owner_id":{"$ref":"#/components/schemas/OpaqueId"},"due_at":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]},"version":{"type":"integer","minimum":1}}},"ActionItemList":{"type":"object","additionalProperties":false,"required":["data","has_more"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ActionItem"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}},"ArtifactCreate":{"type":"object","additionalProperties":false,"required":["name","media_type","content"],"properties":{"name":{"type":"string","maxLength":500},"media_type":{"type":"string","maxLength":200},"content":{"type":"string","contentEncoding":"base64","maxLength":33554432}}},"Artifact":{"type":"object","additionalProperties":false,"required":["id","object","name","media_type","version"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"artifact"},"name":{"type":"string"},"media_type":{"type":"string"},"version":{"type":"integer","minimum":1},"content_url":{"type":"string","format":"uri"}}},"ArtifactList":{"type":"object","additionalProperties":false,"required":["data","has_more"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Artifact"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}},"WMEventCreate":{"type":"object","additionalProperties":false,"x-team0-dedupe-key":["credential.tenant_id","registered_source_id","external_event_id"],"x-team0-payload-conflict":409,"required":["registered_source_id","external_event_id","schema_version","occurred_at","observed_at","payload"],"properties":{"registered_source_id":{"$ref":"#/components/schemas/OpaqueId"},"external_event_id":{"type":"string","minLength":1,"maxLength":500},"schema_version":{"type":"string","maxLength":100},"occurred_at":{"$ref":"#/components/schemas/Timestamp"},"observed_at":{"$ref":"#/components/schemas/Timestamp"},"requested_sensitivity":{"type":"string"},"payload":{"type":"object","maxProperties":500},"evidence":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/EvidenceRef"}}}},"AgentConversationTurnV1":{"description":"One completed external-agent conversation turn. Agent identity, contribution policy and authorship posture come from the server-bound registered source and agent grant, never from this payload. This schema is frozen and used by the Codex reference adapter through the server-bound grant/source path; wider host rollout remains gated by conformance proof.","type":"object","additionalProperties":false,"required":["conversation_id","turn_id","sequence","user_message"],"properties":{"conversation_id":{"type":"string","minLength":1,"maxLength":500,"description":"Opaque caller correlation key; never identity or authority."},"turn_id":{"type":"string","minLength":1,"maxLength":500,"description":"Opaque turn identity, unique within this agent source and conversation."},"previous_turn_id":{"type":["string","null"],"minLength":1,"maxLength":500},"sequence":{"type":"integer","minimum":0},"user_message":{"type":"object","additionalProperties":false,"required":["message_id","content","occurred_at"],"properties":{"message_id":{"type":"string","minLength":1,"maxLength":500},"content":{"type":"string","minLength":1,"maxLength":16000},"occurred_at":{"$ref":"#/components/schemas/Timestamp"},"reply_to_message_id":{"type":["string","null"],"minLength":1,"maxLength":500}}},"agent_message":{"type":"object","additionalProperties":false,"required":["message_id","content","occurred_at"],"properties":{"message_id":{"type":"string","minLength":1,"maxLength":500},"content":{"type":"string","minLength":1,"maxLength":16000},"occurred_at":{"$ref":"#/components/schemas/Timestamp"},"reply_to_message_id":{"type":["string","null"],"minLength":1,"maxLength":500}}}}},"WMCorrectionCreate":{"type":"object","additionalProperties":false,"required":["read_id","target_type","target_id","expected_version","correction"],"properties":{"read_id":{"allOf":[{"$ref":"#/components/schemas/OpaqueId"}],"description":"Frozen World Model read that issued the snapshot-local target ID; current authority and target state are rechecked before application."},"target_type":{"const":"fact","description":"v1 exposes the existing governed fact-correction authority; entity mutation is not yet an accepted correction primitive."},"target_id":{"$ref":"#/components/schemas/OpaqueId"},"expected_version":{"type":"integer","minimum":1},"correction":{"type":"object","additionalProperties":false,"oneOf":[{"required":["text"],"properties":{"action":{"const":"edit"}}},{"required":["action"],"properties":{"action":{"enum":["done","wrong"]}},"not":{"anyOf":[{"required":["text"]},{"required":["when"]}]}}],"properties":{"action":{"enum":["edit","done","wrong"],"description":"Resolution requires a current unlinked commitment or request and the authenticated workspace owner. Task-linked work retains its separate task authority."},"text":{"type":"string","minLength":1,"maxLength":4000},"when":{"type":["string","null"],"maxLength":500,"description":"Omit to preserve the existing reference time; null clears it."}}},"reason":{"type":"string","maxLength":4000}}},"WebhookEndpointCreate":{"type":"object","additionalProperties":false,"required":["url","event_types"],"properties":{"url":{"type":"string","format":"uri","maxLength":2048},"event_types":{"type":"array","minItems":1,"maxItems":100,"uniqueItems":true,"items":{"type":"string"}}}},"WebhookEndpointUpdate":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"url":{"type":"string","format":"uri","maxLength":2048},"event_types":{"type":"array","minItems":1,"maxItems":100,"uniqueItems":true,"items":{"type":"string"}}}},"WebhookEndpoint":{"type":"object","additionalProperties":false,"required":["id","object","url","event_types","status","version"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"webhook_endpoint"},"url":{"type":"string","format":"uri"},"event_types":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","disabled","failing"]},"version":{"type":"integer","minimum":1},"secret_hint":{"type":"string"}}},"WebhookEndpointReveal":{"type":"object","additionalProperties":false,"required":["id","object","url","event_types","status","version","secret"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"webhook_endpoint"},"url":{"type":"string","format":"uri"},"event_types":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","disabled","failing"]},"version":{"type":"integer","minimum":1},"secret_hint":{"type":"string"},"secret":{"type":"string","pattern":"^whsec_[A-Za-z0-9+/=_-]+$","readOnly":true}}},"WebhookEndpointIssueOutcome":{"description":"Reveal-once result on first execution or redacted endpoint metadata on idempotent replay.","oneOf":[{"$ref":"#/components/schemas/WebhookEndpointReveal"},{"$ref":"#/components/schemas/WebhookEndpoint"}]},"WebhookEndpointList":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"WebhookDelivery":{"type":"object","additionalProperties":false,"required":["id","object","event_id","status","attempt_count","version"],"properties":{"id":{"$ref":"#/components/schemas/OpaqueId"},"object":{"const":"webhook_delivery"},"event_id":{"$ref":"#/components/schemas/OpaqueId"},"status":{"type":"string","enum":["pending","delivering","delivered","retrying","dead_letter","cancelled"]},"attempt_count":{"type":"integer","minimum":0},"version":{"type":"integer","minimum":1},"last_status_code":{"type":["integer","null"]},"next_attempt_at":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}]}}},"WebhookDeliveryList":{"type":"object","additionalProperties":false,"required":["data","has_more"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"externalDocs":{"description":"Team0 developer resources","url":"https://team0.ai/developers"},"x-team0-availability":"allowlisted-beta","x-team0-canonical-contract-version":"1.0.0-phase0"}