{"openapi":"3.1.0","info":{"title":"Autonomous Companies API","version":"03"},"servers":[{"url":"https://api.autonomouscompanies.ai"}],"components":{"schemas":{"CommunityServer":{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":1000},"endpoint":{"type":"string","maxLength":2048},"transport":{"type":"string","enum":["streamable_http","sse"]},"authKind":{"type":"string","enum":["none","bearer","oauth2","api_key","unknown"]},"requiredScopes":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":32},"dataDestinations":{"type":"array","items":{"type":"string","maxLength":2048},"maxItems":16}},"required":["slug","name","description","endpoint","transport","authKind","requiredScopes","dataDestinations"],"additionalProperties":false},"CommunityTool":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_.-]{0,63}$"},"description":{"type":"string","maxLength":2000},"effect":{"type":"string","enum":["read","write","purchase","publish","unknown"]},"inputSchema":{"$ref":"#/components/schemas/CommunitySchemaDocument"},"outputSchema":{"$ref":"#/components/schemas/CommunitySchemaDocument"}},"required":["name","description","effect","inputSchema"],"additionalProperties":false},"CommunityContract":{"type":"object","properties":{"versionLabel":{"type":"string","minLength":1,"maxLength":64},"tools":{"type":"array","items":{"$ref":"#/components/schemas/CommunityTool"},"minItems":1,"maxItems":128}},"required":["versionLabel","tools"],"additionalProperties":false},"CommunityValidation":{"type":"object","properties":{"status":{"type":"string","enum":["pending_validation","metadata_valid","metadata_invalid"]},"validatorVersion":{"type":"string","enum":["community01-metadata-v1"]},"errors":{"type":"array","items":{"$ref":"#/components/schemas/CommunityIssue"},"maxItems":32}},"required":["status","validatorVersion","errors"],"additionalProperties":false},"CommunityIssue":{"type":"object","properties":{"path":{"type":"string","maxLength":256},"code":{"type":"string","enum":["unsupported_keyword","invalid_keyword_type","duplicate_tool","schema_bound_exceeded","invalid_schema"]}},"required":["path","code"],"additionalProperties":false},"CommunityProjection":{"type":"object","properties":{"publisherId":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"submissionId":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"selectedVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"currentVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"previousHash":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]},"publisherLabel":{"type":"string","minLength":1,"maxLength":80},"server":{"$ref":"#/components/schemas/CommunityServer"},"contract":{"$ref":"#/components/schemas/CommunityContract"},"validation":{"$ref":"#/components/schemas/CommunityValidation"},"visibility":{"const":"private"},"communityStatus":{"enum":["listed","not_listed"]},"approval":{"enum":["not_reviewed","reviewed","stale"]},"ownership":{"const":"not_verified"},"endpointHealth":{"const":"not_checked"},"executable":{"const":false},"publicationEligible":{"const":false},"review":{"enum":["not_requested","requested","reviewed","stale","unreviewed","refused"]},"reviewedVersion":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"listing":{"enum":["not_listed","listed","suspended"]},"reviewedDigest":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]}},"required":["publisherId","submissionId","selectedVersion","currentVersion","contentHash","previousHash","publisherLabel","server","contract","validation","visibility","communityStatus","approval","ownership","endpointHealth","executable","publicationEligible"],"additionalProperties":false},"CommunityWriteAck":{"type":"object","properties":{"publisherId":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"submissionId":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"validationAtAcknowledgment":{"const":"pending_validation"},"visibility":{"const":"private"},"communityStatus":{"enum":["listed","not_listed"]},"approval":{"enum":["not_reviewed","reviewed","stale"]},"ownership":{"const":"not_verified"},"endpointHealth":{"const":"not_checked"},"executable":{"const":false},"publicationEligible":{"const":false},"review":{"enum":["not_requested","requested","reviewed","stale","unreviewed","refused"]},"reviewedVersion":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"listing":{"enum":["not_listed","listed","suspended"]}},"required":["publisherId","submissionId","contentHash","version","validationAtAcknowledgment","visibility","communityStatus","approval","ownership","endpointHealth","executable","publicationEligible"],"additionalProperties":false},"CommunityValidateAck":{"type":"object","properties":{"publisherId":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"submissionId":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"validation":{"$ref":"#/components/schemas/CommunityValidation"},"visibility":{"const":"private"},"communityStatus":{"enum":["listed","not_listed"]},"approval":{"enum":["not_reviewed","reviewed","stale"]},"ownership":{"const":"not_verified"},"endpointHealth":{"const":"not_checked"},"executable":{"const":false},"publicationEligible":{"const":false},"review":{"enum":["not_requested","requested","reviewed","stale","unreviewed","refused"]},"reviewedVersion":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"listing":{"enum":["not_listed","listed","suspended"]}},"required":["publisherId","submissionId","contentHash","version","validation","visibility","communityStatus","approval","ownership","endpointHealth","executable","publicationEligible"],"additionalProperties":false},"CommunitySupportedSchema":{"type":"object","properties":{"type":{"anyOf":[{"type":"string","enum":["object","array","string","integer","number","boolean","null"]},{"type":"array","items":{"type":"string","enum":["object","array","string","integer","number","boolean","null"]},"minItems":1,"maxItems":7,"uniqueItems":true}]},"properties":{"type":"object","maxProperties":128,"additionalProperties":{"$ref":"#/components/schemas/CommunitySupportedSchema"}},"required":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":128,"uniqueItems":true},"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#/components/schemas/CommunitySupportedSchema"}]},"items":{"$ref":"#/components/schemas/CommunitySupportedSchema"},"uniqueItems":{"type":"boolean"},"enum":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":4096},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"}]},"minItems":1,"maxItems":128},"const":{"anyOf":[{"type":"string","maxLength":4096},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"}]},"description":{"type":"string","maxLength":4096},"title":{"type":"string","maxLength":256},"minItems":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxItems":{"type":"integer","minimum":0,"maximum":9007199254740991},"minimum":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maximum":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minLength":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxLength":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":[],"additionalProperties":false,"description":"Semantic supportedsubset ONLY. Unsupported/ref/complexkeywords are metadata_invalid data, neverresolved/evaluated. Safe input schemaDocument has independent depth/node/string/body bounds."},"CommunitySchemaValue":{"anyOf":[{"anyOf":[{"type":"string","maxLength":4096},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"}]},{"type":"array","items":{"$ref":"#/components/schemas/CommunitySchemaValue"},"maxItems":128},{"type":"object","maxProperties":128,"additionalProperties":{"$ref":"#/components/schemas/CommunitySchemaValue"}}]},"CommunitySchemaDocument":{"type":"object","maxProperties":128,"additionalProperties":{"$ref":"#/components/schemas/CommunitySchemaValue"},"description":"Bounded declarative schema DATA domain only; unsupportedkeywordnamespersistforfeedback, globallyforbiddencredential/contact/prototypefields+depth/node/body/string limitscheckedbeforepersist. No publisherURL/ref everresolved."},"CommunityFinding":{"type":"object","properties":{"path":{"type":"string","maxLength":512},"code":{"enum":["tool_changed","tool_added","tool_removed","scope_added","scope_removed","destination_changed","endpoint_changed","auth_changed","price_changed"]}},"required":["path","code"],"additionalProperties":false},"CommunityReviewAck":{"type":"object","properties":{"submissionId":{"type":"string","format":"uuid"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"reviewId":{"type":"string","format":"uuid"},"reviewKind":{"enum":["requested","evaluated"]},"review":{"enum":["not_requested","requested","reviewed","stale","unreviewed","refused"]},"reviewedVersion":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"listing":{"enum":["not_listed","listed","suspended"]},"approval":{"enum":["not_reviewed","reviewed","stale"]},"communityStatus":{"enum":["listed","not_listed"]},"findings":{"type":"array","items":{"$ref":"#/components/schemas/CommunityFinding"},"maxItems":32}},"required":["submissionId","version","contentHash","reviewId","reviewKind","review","reviewedVersion","listing","approval","communityStatus","findings"],"additionalProperties":false},"CommunityEvaluateAck":{"type":"object","properties":{"reviewId":{"type":"string","format":"uuid"},"state":{"enum":["not_requested","requested","reviewed","stale","unreviewed","refused"]},"reviewedVersion":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"reviewedDigest":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]},"currentDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"listing":{"enum":["not_listed","listed","suspended"]},"findings":{"type":"array","items":{"$ref":"#/components/schemas/CommunityFinding"},"maxItems":32}},"required":["reviewId","state","reviewedVersion","reviewedDigest","currentDigest","listing","findings"],"additionalProperties":false},"CommunityDecisionAck":{"type":"object","properties":{"reviewId":{"type":"string","format":"uuid"},"decision":{"enum":["approved","refused"]},"state":{"enum":["not_requested","requested","reviewed","stale","unreviewed","refused"]},"reviewedVersion":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"reviewedDigest":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]},"communityStatus":{"enum":["listed","not_listed"]},"listing":{"enum":["not_listed","listed","suspended"]},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["reviewId","decision","state","reviewedVersion","reviewedDigest","communityStatus","listing","note"],"additionalProperties":false},"CommunitySuspensionAck":{"type":"object","properties":{"submissionId":{"type":"string","format":"uuid"},"listing":{"const":"suspended"},"reason":{"enum":["publisher_request","policy","security","ownership","inactive"]},"at":{"type":"string"}},"required":["submissionId","listing","reason","at"],"additionalProperties":false},"Key":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z2-7]{8}$"},"name":{"type":"string"},"actorId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"role":{"const":"agent"},"scopes":{"type":"array","items":{"type":"string","enum":["agent:read","agent:create","agent:run","agent:stop","agent:retry","agent:delete","account:read","account:admin","finance:read","finance:sync","finance:connection","brain:read","brain:configure","brain:observe","brain:approve","brain:ingest","brain:export","brain:erase","connections:read","connections:configure","capabilities:read","domains:read","domains:purchase","foundry:read","foundry:refresh","billing:read","billing:fund","billing:admin","launch:read","launch:run","launch:decide","loops:read","loops:create","loops:mandate","browser:read","browser:use","browser:profiles","account:provision","registry:review","eval:read","eval:write","eval:decide","order:approve","suppliers:deliver","improve:contribute","contacts:read","contacts:write","channels:read","channels:configure","channels:send","uploads:read","uploads:write","uploads:erase","foundry:write","foundry:review","foundry:work","foundry:decide","foundry:configure","foundry:admit","platform:analyse","outcomes:read","outcomes:record","people:self","people:decide","telemetry:configure","marketing:read","marketing:act"]}},"state":{"type":"string","enum":["active","revoked","expired"]},"createdAt":{"type":"string"},"createdBy":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"teams":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"maxItems":16},"teamsVersion":{"type":"integer","minimum":0},"secret":{"type":"string","readOnly":true,"description":"Returned once by keys.create only; never stored."}},"required":["id","name","actorId","role","scopes","state","createdAt","createdBy","lastUsedAt","expiresAt"],"additionalProperties":false},"Tenant":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["sandbox","active","suspended","closed"]},"billing":{"type":"string","enum":["internal","prepaid"]},"claimed":{"type":"boolean"},"createdAt":{"type":"string"},"agent":{"type":"object","properties":{"name":{"type":"string"},"vendor":{"type":"string"},"url":{"type":"string"}},"required":[],"additionalProperties":false},"terms":{"type":"object","properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["version","acceptedAt"],"additionalProperties":false}},"required":["id","name","status","billing","claimed","createdAt","terms"],"additionalProperties":false},"Principal":{"type":"object","properties":{"schema":{"const":"zerohuman.principal.v2"},"actorId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"tenantId":{"type":"string"},"kind":{"type":"string","enum":["user","key"]},"keyId":{"type":"string","pattern":"^[a-z2-7]{8}$"},"legacyActor":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member","agent"]},"teams":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"maxItems":16},"authMode":{"type":"string","enum":["user-jwt","legacy-owner","api-key","sso","recovery","oauth"]},"scopes":{"type":"array","items":{"type":"string","enum":["agent:read","agent:create","agent:run","agent:stop","agent:retry","agent:delete","account:read","account:admin","finance:read","finance:sync","finance:connection","brain:read","brain:configure","brain:observe","brain:approve","brain:ingest","brain:export","brain:erase","connections:read","connections:configure","capabilities:read","domains:read","domains:purchase","foundry:read","foundry:refresh","billing:read","billing:fund","billing:admin","launch:read","launch:run","launch:decide","loops:read","loops:create","loops:mandate","browser:read","browser:use","browser:profiles","account:provision","registry:review","eval:read","eval:write","eval:decide","order:approve","suppliers:deliver","improve:contribute","contacts:read","contacts:write","channels:read","channels:configure","channels:send","uploads:read","uploads:write","uploads:erase","foundry:write","foundry:review","foundry:work","foundry:decide","foundry:configure","foundry:admit","platform:analyse","outcomes:read","outcomes:record","people:self","people:decide","telemetry:configure","marketing:read","marketing:act"]}},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["schema","actorId","tenantId","kind","legacyActor","role","teams","authMode","scopes"],"additionalProperties":false},"Contact":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"displayName":{"type":"string","maxLength":200},"optedOutAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"addresses":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["slack","telegram","email","whatsapp"]},"address":{"type":"string","minLength":3,"maxLength":320},"source":{"type":"string","enum":["person","verified_match"]}},"required":["kind","address","source"],"additionalProperties":false}},"consent":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["slack","telegram","email","whatsapp","all"]},"state":{"type":"string","enum":["unknown","granted","withdrawn"]},"words":{"type":"string","maxLength":500},"source":{"anyOf":[{"type":"string","enum":["person","import","inbound_message","verified_match"]},{"type":"null"}]},"givenAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"withdrawnAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["kind","state","words","source","givenAt","withdrawnAt"],"additionalProperties":false}},"createdAt":{"type":"string"}},"required":["id","displayName","optedOutAt","addresses","consent","createdAt"],"additionalProperties":false},"Channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"kind":{"type":"string","enum":["slack","telegram","email","whatsapp"]},"address":{"type":"string","minLength":3,"maxLength":320},"state":{"type":"string","enum":["connected","revoked","expired"]},"agentId":{"type":"string","maxLength":100},"connectionId":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"createdAt":{"type":"string"},"secretNames":{"type":"object","properties":{"send":{"type":"string","maxLength":100},"verify":{"type":"string","maxLength":100}},"required":["send","verify"],"additionalProperties":false}},"required":["id","kind","address","state","agentId","connectionId","createdAt","secretNames"],"additionalProperties":false},"EvalSet":{"type":"object","properties":{"setId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"version":{"type":"integer","minimum":1},"product":{"anyOf":[{"type":"string"},{"type":"null"}]},"recipe":{"anyOf":[{"type":"string"},{"type":"null"}]},"recipeVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"tasks":{"type":"integer","minimum":0},"heldOutTasks":{"type":"integer","minimum":0},"heldOut":{"type":"boolean"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"state":{"type":"string","enum":["open","closed"]},"createdAt":{"type":"string"},"createdBy":{"type":"string","pattern":"^[a-f0-9-]{36}$"}},"required":["setId","version","tasks","heldOutTasks","heldOut","sha256","state","createdAt","createdBy"],"additionalProperties":false},"EvalTask":{"type":"object","properties":{"taskId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"target":{"type":"string","enum":["none","site","repo","supabase"]},"criterion":{"type":"string","enum":["check","person"]},"check":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},{"type":"null"}]},"contentRef":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"heldOut":{"type":"boolean"}},"required":["taskId","target","criterion","contentRef","contentSha256","heldOut"],"additionalProperties":false},"EvalChange":{"type":"object","properties":{"changeId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"product":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"candidate":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"previous":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},{"type":"null"}]},"setId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"version":{"type":"integer","minimum":1},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"heldOutResult":{"type":"string","enum":["pass","fail","not_measured"]},"state":{"type":"string","enum":["proposed","promoted","rolled_back","rejected"]},"proposer":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"decider":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"evidenceRef":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"createdAt":{"type":"string"},"decidedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["changeId","subject","candidate","setId","version","sha256","heldOutResult","state","proposer","createdAt"],"additionalProperties":false},"Dashboard":{"x-legacy-output-only":true,"x-source":"foundryos/src/dashboard.mjs:cachedSnapshot spread data","description":"Historical whole dashboard_snapshots.payload was previously returned via object spread; no shape validation exists at this boundary. Only the company whose own pack ships the legacy snapshot reads the cached snapshot, and it is selected by the signed-in session's tenant, never by a name in code (AC-652); the synthetic comprehension-test company (AC-516) reads its own declared, fictional fixture built on each read and labelled synthetic; every other tenant reads its own FoundryOS dashboard and never this row.","type":["object","array","string","number","boolean","null"]},"FinanceSummary":{"oneOf":[{"type":"object","properties":{"ok":{"const":true},"tenant":{"type":"string"},"summary":{"type":"object","properties":{"figures":{"type":"object","additionalProperties":false,"required":["schema","entries"],"properties":{"schema":{"const":"financeos.figures.v1"},"entries":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["path","kind","source","readAt","reference"],"properties":{"path":{"type":"string"},"kind":{"type":"string","enum":["source_fact","reconciled","provisional","forecast"]},"source":{"type":"string","enum":["stripe","quickbooks","xero","plaid"]},"readAt":{"type":"string"},"reference":{"type":"string"}}}}}},"generatedAt":{"type":"string"},"period":{"type":"object","properties":{"lastCompletedMonth":{"type":"string"},"monthToDate":{"type":"string"}},"required":["lastCompletedMonth","monthToDate"],"additionalProperties":false},"revenue":{"type":"object","properties":{"lastCompleted":{"type":"object","properties":{"month":{"type":"string"},"collected":{"type":"number"},"refunds":{"type":"number"},"manual":{"type":"number"},"revenue":{"type":"number"}},"required":["month","collected","refunds","manual","revenue"],"additionalProperties":false},"prior":{"anyOf":[{"type":"object","properties":{"month":{"type":"string"},"collected":{"type":"number"},"refunds":{"type":"number"},"manual":{"type":"number"},"revenue":{"type":"number"}},"required":["month","collected","refunds","manual","revenue"],"additionalProperties":false},{"type":"null"}]},"changePct":{"anyOf":[{"type":"number"},{"type":"null"}]},"series":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"collected":{"type":"number"},"refunds":{"type":"number"},"manual":{"type":"number"},"revenue":{"type":"number"}},"required":["month","collected","refunds","manual","revenue"],"additionalProperties":false}},"monthToDate":{"type":"object","properties":{"month":{"type":"string"},"collected":{"type":"number"},"refunds":{"type":"number"},"manual":{"type":"number"},"revenue":{"type":"number"}},"required":["month","collected","refunds","manual","revenue"],"additionalProperties":false}},"required":[],"additionalProperties":false},"mrr":{"type":"object","properties":{"today":{"type":"number"},"atLastCompletedClose":{"anyOf":[{"type":"number"},{"type":"null"}]},"series":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"mrr":{"anyOf":[{"type":"number"},{"type":"null"}]},"clients":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["month","mrr","clients"],"additionalProperties":false}},"lastObserved":{"anyOf":[{"type":"object","properties":{"month":{"type":"string"},"mrr":{"anyOf":[{"type":"number"},{"type":"null"}]},"clients":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["month","mrr","clients"],"additionalProperties":false},{"type":"null"}]},"movements":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"newMrr":{"anyOf":[{"type":"number"},{"type":"null"}]},"churnMrr":{"anyOf":[{"type":"number"},{"type":"null"}]},"netNew":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":[],"additionalProperties":false}},"clients":{"type":"object","properties":{"today":{"type":"integer"},"atLastCompletedClose":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":[],"additionalProperties":false},"pastDue":{"type":"number"},"arr":{"type":"number"},"momGrowthPct":{"anyOf":[{"type":"number"},{"type":"null"}]},"momGrowthMonth":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false},"retention":{"type":"object","properties":{"logoRetentionPct":{"anyOf":[{"type":"number"},{"type":"null"}]},"nrrPct":{"anyOf":[{"type":"number"},{"type":"null"}]},"churnPct":{"anyOf":[{"type":"number"},{"type":"null"}]},"observations":{"type":"object","properties":{"window":{"type":"integer"},"logo":{"type":"integer"},"nrr":{"type":"integer"}},"required":[],"additionalProperties":false},"monthly":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"logoRetention":{"anyOf":[{"type":"number"},{"type":"null"}]},"nrr":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":[],"additionalProperties":false}}},"required":[],"additionalProperties":false},"history":{"type":"object","properties":{"complete":{"type":"boolean"},"unavailableMonths":{"type":"array","items":{"type":"string"}},"stripeAsOf":{"anyOf":[{"type":"string"},{"type":"null"}]},"basis":{"type":"string"}},"required":[],"additionalProperties":false},"unit":{"type":"object","properties":{"arpa":{"type":"number"},"realizedLtv":{"type":"number"},"medianLtv":{"type":"number"},"projectedLtv":{"anyOf":[{"type":"number"},{"type":"null"}]},"avgLifetimeMonths":{"type":"number"},"churnedClients12mo":{"type":"integer"}},"required":[],"additionalProperties":false},"cohorts":{"type":"array","items":{"type":"object","properties":{"cohort":{"type":"string"},"size":{"type":"integer"},"startMrr":{"anyOf":[{"type":"number"},{"type":"null"}]},"retention":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"null"}]}}},"required":[],"additionalProperties":false}},"concentration":{"type":"object","properties":{"top":{"type":"array","items":{"type":"object","properties":{"rank":{"type":"integer"},"client":{"type":"string"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mrr":{"type":"number"},"share":{"type":"number"}},"required":[],"additionalProperties":false}},"top1Pct":{"type":"number"},"top5Pct":{"type":"number"},"top10Pct":{"type":"number"}},"required":[],"additionalProperties":false},"planMix":{"type":"array","items":{"type":"object","properties":{"tier":{"type":"string"},"clients":{"type":"integer"},"mrr":{"type":"number"},"share":{"type":"number"}},"required":[],"additionalProperties":false}},"sources":{"type":"object","properties":{"stripe":{"type":"object","properties":{"mrrSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"health":{"anyOf":[{"type":"object","properties":{"status":{"type":"string"},"lastAttemptAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSuccessAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false},{"type":"null"}]},"mrrStatus":{"type":"string"},"status":{"type":"string"},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"rows":{"type":"integer"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"deferredCharges":{"type":"integer"}},"required":[],"additionalProperties":false},"quickbooks":{"type":"object","properties":{"status":{"type":"string"},"connected":{"type":"boolean"},"configured":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"company":{"type":"string"},"health":{"type":"object","properties":{"status":{"type":"string"},"lastAttemptAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSuccessAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false},"connection":{"$ref":"#/components/schemas/ConnectionReference"}},"required":[],"additionalProperties":false},"plaid":{"anyOf":[{"type":"object","properties":{"status":{"type":"object","properties":{"status":{"type":"string"},"connected":{"type":"boolean"},"configured":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"institution":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"health":{"type":"object","properties":{"status":{"type":"string"},"lastAttemptAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSuccessAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"accounts":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"name":{"type":"string"},"officialName":{"anyOf":[{"type":"string"},{"type":"null"}]},"mask":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"subtype":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"available":{"anyOf":[{"type":"number"},{"type":"null"}]},"current":{"anyOf":[{"type":"number"},{"type":"null"}]},"limit":{"anyOf":[{"type":"number"},{"type":"null"}]},"asOf":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false}},"transactions":{"type":"array","items":{"type":"object","properties":{"transactionId":{"type":"string"},"accountId":{"type":"string"},"date":{"type":"string"},"authorizedDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"merchant":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"amount":{"type":"number"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"pending":{"type":"boolean"},"category":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false}},"figures":{"type":"object","additionalProperties":false,"required":["schema","entries"],"properties":{"schema":{"const":"financeos.figures.v1"},"entries":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["path","kind","source","readAt","reference"],"properties":{"path":{"type":"string"},"kind":{"type":"string","enum":["source_fact","reconciled","provisional","forecast"]},"source":{"type":"string","enum":["stripe","quickbooks","xero","plaid"]},"readAt":{"type":"string"},"reference":{"type":"string"}}}}}},"window":{"anyOf":[{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"}},"required":["startDate","endDate"],"additionalProperties":false},{"type":"null"}]}},"required":["status","accounts","transactions"],"additionalProperties":false},{"type":"null"}]},"manualAdjustments":{"type":"integer"},"aliases":{"type":"integer"}},"required":[],"additionalProperties":false},"profit":{"x-legacy-output-only":true,"x-source":"financeos/src/finance-qbo.mjs:cachedQuickBooks periods returned without revalidation","description":"Existing persisted report output; its calculated numeric totals are not revalidated at this read boundary. No input authority.","type":["object","array","string","number","boolean","null"]}},"required":["generatedAt","period","revenue","mrr","retention","history","unit","cohorts","concentration","planMix","sources","profit"],"additionalProperties":false}},"required":["ok","tenant","summary"],"additionalProperties":false},{"type":"object","properties":{"ok":{"const":true},"tenant":{"type":"string"},"summary":{"type":"object","properties":{"status":{"const":"not_connected"}},"required":["status"],"additionalProperties":false}},"required":["ok","tenant","summary"],"additionalProperties":false}]},"Routine":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"schedule":{"type":"object","properties":{"every":{"type":"string","enum":["hour","day","week"]},"at":{"anyOf":[{"type":"string"},{"type":"null"}]},"weekday":{"anyOf":[{"type":"integer"},{"type":"null"}]},"timezone":{"type":"string"}},"required":[],"additionalProperties":false},"scheduleText":{"type":"string"},"launch":{"type":"object","properties":{"ask":{"type":"string"},"target":{"type":"object","properties":{"kind":{"type":"string"},"repository":{"type":"string"}},"required":[],"additionalProperties":false},"tier":{"type":"string"},"budgetUsd":{"type":"number"},"agents":{"type":"integer"},"council":{"type":"object","properties":{"mode":{"type":"string"},"members":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string"},"label":{"type":"string"},"budgetUsd":{"type":"number"},"tools":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false}},"synthesizer":{"type":"object","properties":{"model":{"type":"string"}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"attachments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"text":{"type":"string"}},"required":[],"additionalProperties":false}},"hours":{"anyOf":[{"type":"number"},{"type":"null"}]},"recipe":{"type":"string"}},"required":[],"additionalProperties":false},"carryOver":{"type":"boolean"},"enabled":{"type":"boolean"},"nextRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastRun":{"anyOf":[{"type":"object","properties":{"at":{"type":"string"},"launchId":{"anyOf":[{"type":"string"},{"type":"null"}]},"skipped":{"anyOf":[{"type":"string","enum":["overlap","daily_cap","invalid"]},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":[],"additionalProperties":false},"Routines":{"type":"object","properties":{"routines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"schedule":{"type":"object","properties":{"every":{"type":"string","enum":["hour","day","week"]},"at":{"anyOf":[{"type":"string"},{"type":"null"}]},"weekday":{"anyOf":[{"type":"integer"},{"type":"null"}]},"timezone":{"type":"string"}},"required":[],"additionalProperties":false},"scheduleText":{"type":"string"},"launch":{"type":"object","properties":{"ask":{"type":"string"},"target":{"type":"object","properties":{"kind":{"type":"string"},"repository":{"type":"string"}},"required":[],"additionalProperties":false},"tier":{"type":"string"},"budgetUsd":{"type":"number"},"agents":{"type":"integer"},"council":{"type":"object","properties":{"mode":{"type":"string"},"members":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string"},"label":{"type":"string"},"budgetUsd":{"type":"number"},"tools":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false}},"synthesizer":{"type":"object","properties":{"model":{"type":"string"}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"attachments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"text":{"type":"string"}},"required":[],"additionalProperties":false}},"hours":{"anyOf":[{"type":"number"},{"type":"null"}]},"recipe":{"type":"string"}},"required":[],"additionalProperties":false},"carryOver":{"type":"boolean"},"enabled":{"type":"boolean"},"nextRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastRun":{"anyOf":[{"type":"object","properties":{"at":{"type":"string"},"launchId":{"anyOf":[{"type":"string"},{"type":"null"}]},"skipped":{"anyOf":[{"type":"string","enum":["overlap","daily_cap","invalid"]},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":[],"additionalProperties":false}},"limit":{"type":"integer"}},"required":[],"additionalProperties":false},"RoutineRun":{"type":"object","properties":{"launchId":{"type":"string"}},"required":["launchId"],"additionalProperties":false},"FinanceStatus":{"type":"object","properties":{"tenant":{"type":"string"},"stripe":{"type":"object","properties":{"status":{"type":"string"},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"rows":{"type":"integer"},"figures":{"type":"object","additionalProperties":false,"required":["schema","entries"],"properties":{"schema":{"const":"financeos.figures.v1"},"entries":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["path","kind","source","readAt","reference"],"properties":{"path":{"type":"string"},"kind":{"type":"string","enum":["source_fact","reconciled","provisional","forecast"]},"source":{"type":"string","enum":["stripe","quickbooks","xero","plaid"]},"readAt":{"type":"string"},"reference":{"type":"string"}}}}}},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"health":{"type":"object","properties":{"status":{"type":"string"},"lastAttemptAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSuccessAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"quickbooks":{"type":"object","properties":{"status":{"type":"string"},"connected":{"type":"boolean"},"configured":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"company":{"type":"string"},"health":{"type":"object","properties":{"status":{"type":"string"},"lastAttemptAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSuccessAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false},"connection":{"$ref":"#/components/schemas/ConnectionReference"}},"required":[],"additionalProperties":false},"plaid":{"anyOf":[{"type":"object","properties":{"status":{"type":"string"},"connected":{"type":"boolean"},"configured":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"institution":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"health":{"type":"object","properties":{"status":{"type":"string"},"lastAttemptAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSuccessAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},{"type":"null"}]}},"required":["stripe","quickbooks"],"additionalProperties":false},"QuickBooksStatus":{"type":"object","properties":{"tenant":{"type":"string"},"quickbooks":{"type":"object","properties":{"status":{"type":"string"},"connected":{"type":"boolean"},"configured":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"company":{"type":"string"},"health":{"type":"object","properties":{"status":{"type":"string"},"lastAttemptAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSuccessAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false},"connection":{"$ref":"#/components/schemas/ConnectionReference"}},"required":[],"additionalProperties":false}},"required":["tenant","quickbooks"],"additionalProperties":false},"PlaidFinance":{"type":"object","properties":{"tenant":{"type":"string"},"plaid":{"type":"object","properties":{"status":{"type":"object","properties":{"status":{"type":"string"},"connected":{"type":"boolean"},"configured":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"institution":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"health":{"type":"object","properties":{"status":{"type":"string"},"lastAttemptAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSuccessAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"accounts":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"name":{"type":"string"},"officialName":{"anyOf":[{"type":"string"},{"type":"null"}]},"mask":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"subtype":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"available":{"anyOf":[{"type":"number"},{"type":"null"}]},"current":{"anyOf":[{"type":"number"},{"type":"null"}]},"limit":{"anyOf":[{"type":"number"},{"type":"null"}]},"asOf":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false}},"transactions":{"type":"array","items":{"type":"object","properties":{"transactionId":{"type":"string"},"accountId":{"type":"string"},"date":{"type":"string"},"authorizedDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"merchant":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"amount":{"type":"number"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"pending":{"type":"boolean"},"category":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false}},"figures":{"type":"object","additionalProperties":false,"required":["schema","entries"],"properties":{"schema":{"const":"financeos.figures.v1"},"entries":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["path","kind","source","readAt","reference"],"properties":{"path":{"type":"string"},"kind":{"type":"string","enum":["source_fact","reconciled","provisional","forecast"]},"source":{"type":"string","enum":["stripe","quickbooks","xero","plaid"]},"readAt":{"type":"string"},"reference":{"type":"string"}}}}}},"window":{"anyOf":[{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"}},"required":["startDate","endDate"],"additionalProperties":false},{"type":"null"}]}},"required":["status","accounts","transactions"],"additionalProperties":false}},"required":["tenant","plaid"],"additionalProperties":false},"Profit":{"type":"object","properties":{"tenant":{"type":"string"},"profit":{"x-legacy-output-only":true,"x-source":"financeos/src/finance-qbo.mjs:cachedQuickBooks.periods","description":"Existing persisted QuickBooks report projection","type":["object","array","string","number","boolean","null"]}},"required":["tenant","profit"],"additionalProperties":false},"ConnectionReference":{"type":"object","properties":{"schema":{"const":"zerohuman.connection-ref.v1"},"id":{"type":"string"},"tenantId":{"type":"string"},"product":{"const":"finance"},"provider":{"const":"quickbooks"},"version":{"type":"string"},"capabilities":{"type":"array","items":{"type":"string"}},"custody":{"const":"composio"},"status":{"type":"string"}},"required":["schema","id","tenantId","product","provider","version","capabilities","custody","status"],"additionalProperties":false},"ConnectionReferences":{"type":"object","properties":{"schema":{"const":"zerohuman.connections.v1"},"tenantId":{"type":"string"},"checkedAt":{"type":"string"},"connections":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string"},"reference":{"anyOf":[{"type":"object","properties":{"schema":{"const":"zerohuman.connection-ref.v1"},"id":{"type":"string"},"tenantId":{"type":"string"},"product":{"const":"finance"},"provider":{"const":"quickbooks"},"version":{"type":"string"},"capabilities":{"type":"array","items":{"type":"string"}},"custody":{"const":"composio"},"status":{"type":"string"}},"required":["schema","id","tenantId","product","provider","version","capabilities","custody","status"],"additionalProperties":false},{"type":"null"}]}},"required":[],"additionalProperties":false}}},"required":["schema","tenantId","checkedAt","connections"],"additionalProperties":false},"Sync":{"type":"object","properties":{"ok":{"const":true},"accepted":{"const":true},"status":{"const":"not_due"}},"required":["ok","accepted"],"additionalProperties":false},"Brain":{"type":"object","properties":{"brain":{"type":"object","properties":{"schema":{"const":"zerohuman.brain-context.v1"},"tenantId":{"type":"string"},"version":{"type":"integer"},"kind":{"type":"string","enum":["none","context"]},"text":{"type":"string"},"title":{"type":"string"},"source":{"type":"string"},"observedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"configuredAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"authority":{"const":"owner-unverified"}},"required":["schema","tenantId","version","kind","text","title","source","observedAt","configuredAt","authority"],"additionalProperties":false},"limits":{"type":"object","properties":{"textBytes":{"type":"integer"},"titleBytes":{"type":"integer"},"sourceBytes":{"type":"integer"}},"required":[],"additionalProperties":false},"external":{"type":"object","properties":{"status":{"const":"not_configured"},"roles":{"type":"object","properties":{"brief":{"const":false},"search":{"const":false},"read":{"const":false},"observe":{"const":false}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false}},"required":["brain","limits","external"],"additionalProperties":false},"BrainSaved":{"type":"object","properties":{"brain":{"type":"object","properties":{"schema":{"const":"zerohuman.brain-context.v1"},"tenantId":{"type":"string"},"version":{"type":"integer"},"kind":{"type":"string","enum":["none","context"]},"text":{"type":"string"},"title":{"type":"string"},"source":{"type":"string"},"observedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"configuredAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"authority":{"const":"owner-unverified"}},"required":["schema","tenantId","version","kind","text","title","source","observedAt","configuredAt","authority"],"additionalProperties":false}},"required":["brain"],"additionalProperties":false},"BrainHealth":{"type":"object","properties":{"ok":{"type":"boolean"},"build":{"type":"string"},"database":{"type":"object","properties":{"ok":{"type":"boolean"},"ms":{"type":"integer"}},"required":["ok","ms"],"additionalProperties":false},"isolation":{"type":"object","properties":{"ok":{"type":"boolean"},"checkedAt":{"type":"string"},"probe":{"anyOf":[{"type":"object","properties":{"ok":{"type":"boolean"},"at":{"type":"string"}},"required":["ok","at"],"additionalProperties":false},{"type":"null"}]}},"required":["ok","checkedAt"],"additionalProperties":false},"counts":{"type":"object","properties":{"counters":{"type":"integer"},"records":{"type":"integer"},"current":{"type":"integer"},"files":{"type":"integer"},"evidence":{"type":"integer"},"byStatus":{"type":"object","additionalProperties":{"type":"integer"}}},"additionalProperties":{"type":"integer"}},"week":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["ok","build","database","isolation","counts"],"additionalProperties":false},"MarketingHealth":{"type":"object","properties":{"ok":{"type":"boolean"},"commit":{"type":"string"},"db":{"type":"string"}},"required":["ok","commit","db"],"additionalProperties":false},"BrainRecord":{"type":"object","properties":{"id":{"type":"string"},"rid":{"type":"string"},"ver":{"type":"integer"},"kind":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"text":{"type":"string"},"line":{"type":"string"},"status":{"type":"string"},"trust":{"type":"string"},"audience":{"type":"string"},"recordedAt":{"type":"string"},"recorded_at":{"type":"string"},"updated_at":{"type":"string"},"origin":{"type":"string"},"reason":{"type":"string"}},"required":[],"additionalProperties":false},"BrainRecordWritten":{"type":"object","properties":{"record":{"$ref":"#/components/schemas/BrainRecord"}},"required":["record"],"additionalProperties":false},"BrainRecords":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"title":{"type":"string"},"line":{"type":"string"},"status":{"type":"string"},"trust":{"type":"string"},"source":{"type":"string"},"recordedAt":{"type":"string"},"recorded_at":{"type":"string"},"verifiedAt":{"type":"string"}},"required":[],"additionalProperties":false}},"next":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next"],"additionalProperties":false},"BrainRead":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"text":{"type":"string"},"source":{"type":"string"},"updated_at":{"type":"string"},"kind":{"type":"string"},"ver":{"type":"integer"},"status":{"type":"string"},"trust":{"type":"string"},"line":{"type":"string"},"body":{"type":"string"},"measure":{"anyOf":[{"type":"object","properties":{"metric":{"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]},"period":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"history":{"type":"array","items":{"type":"object","properties":{"ver":{"type":"integer"},"status":{"type":"string"},"recordedAt":{"type":"string"},"title":{"type":"string"},"reason":{"type":"string"}},"required":[],"additionalProperties":false}},"evidence":{"type":"array","items":{"type":"object","properties":{"eid":{"type":"string"},"quote":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"author_label":{"type":"string"},"source":{"type":"string"},"written_at":{"type":"string"}},"required":[],"additionalProperties":false}}},"required":["id","title","text"],"additionalProperties":false},"BrainBrief":{"type":"object","properties":{"text":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":[],"additionalProperties":false}},"version":{"type":"string"},"dropped":{"type":"integer"},"truncated":{"type":"boolean"},"degraded":{"type":"array","items":{"type":"string"}},"freshness":{"type":"object","properties":{"newest_evidence_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"last_sync_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"type":"string"}},"required":[],"additionalProperties":false}}},"required":[],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"section":{"type":"string"},"text":{"type":"string"},"score":{"type":"object","properties":{"match":{"type":"number"},"trust":{"type":"number"},"age":{"type":"number"},"mix":{"type":"number"},"total":{"type":"number"}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false}}},"required":["text","sources","version"],"additionalProperties":false},"BrainEntities":{"type":"object","properties":{"entities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"ver":{"type":"integer"},"names":{"type":"array","items":{"type":"string"}},"records":{"type":"integer"},"progress":{"anyOf":[{"type":"object","properties":{"measure":{"anyOf":[{"type":"object","properties":{"metric":{"type":"string"},"target":{"anyOf":[{"type":"number"},{"type":"null"}]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]},"period":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"definition":{"anyOf":[{"type":"string"},{"type":"null"}]},"definedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"definedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false},{"type":"null"}]},"current":{"anyOf":[{"type":"integer"},{"type":"null"}]},"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"title":{"type":"string"},"at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false}},"truncated":{"type":"boolean"}},"required":[],"additionalProperties":false},{"type":"null"}]}},"required":[],"additionalProperties":false}}},"required":["entities"],"additionalProperties":false},"BrainSearch":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"snippet":{"type":"string"},"source":{"type":"string"},"updated_at":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string"},"trust":{"type":"string"},"verified_at":{"type":"string"}},"required":[],"additionalProperties":false}}},"required":["results"],"additionalProperties":false},"BrainLibrarianProposals":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"job":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"line":{"type":"string"},"quote":{"type":"string"},"targets":{"type":"array","items":{"type":"string"}},"targetTitles":{"type":"array","items":{"type":"object","properties":{"rid":{"type":"string"},"title":{"type":"string"},"measure":{"anyOf":[{"type":"object","properties":{"metric":{"anyOf":[{"type":"string"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]},"period":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false},{"type":"null"}]}},"required":[],"additionalProperties":false}},"supersedes":{"anyOf":[{"type":"string"},{"type":"null"}]},"audience":{"type":"string"},"trust":{"type":"string"},"state":{"type":"string"},"origin":{"type":"string"},"author":{"type":"string"},"reason":{"type":"string"},"createdAt":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"decidedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"decidedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"decision":{"anyOf":[{"type":"string"},{"type":"null"}]},"appliedRid":{"anyOf":[{"type":"string"},{"type":"null"}]},"current":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"version":{"type":"integer"}},"required":["text","version"],"additionalProperties":false},{"type":"null"}]},"stale":{"type":"boolean"}},"required":[],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"BrainLibrarianProposalDecided":{"type":"object","properties":{"proposal":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string"},"decision":{"anyOf":[{"type":"string"},{"type":"null"}]},"appliedRid":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","state"],"additionalProperties":false},"record":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"}},"required":[],"additionalProperties":false},{"type":"null"}]}},"required":["proposal"],"additionalProperties":false},"BrainLibrarian":{"type":"object","properties":{"routine":{"type":"object","properties":{"identity":{"type":"string"},"every":{"type":"string"},"at":{"type":"string"},"timezone":{"type":"string"},"budgetUsd":{"type":"number"},"enabled":{"type":"boolean"},"nextRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastRunState":{"anyOf":[{"type":"string"},{"type":"null"}]},"repository":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["identity","every","at","timezone","budgetUsd","enabled"],"additionalProperties":false},"today":{"type":"object","properties":{"usd":{"type":"number"},"proposals":{"type":"integer"},"refusals":{"type":"integer"}},"required":["usd","proposals","refusals"],"additionalProperties":false},"writeCredential":{"const":false}},"required":["routine","today","writeCredential"],"additionalProperties":false},"BrainLibrarianRun":{"type":"object","properties":{"repository":{"type":"string"},"commit":{"type":"string"},"routine":{"type":"object","properties":{"identity":{"type":"string"},"every":{"type":"string"},"at":{"type":"string"},"timezone":{"type":"string"},"budgetUsd":{"type":"number"},"nextRunAt":{"type":"string"}},"required":["identity","every","at","timezone","budgetUsd","nextRunAt"],"additionalProperties":false},"drift":{"type":"object","properties":{"changed":{"type":"array","items":{"type":"string"}},"missingInBrain":{"type":"array","items":{"type":"string"}},"missingInRepo":{"type":"array","items":{"type":"string"}},"clean":{"type":"boolean"}},"required":["changed","missingInBrain","missingInRepo","clean"],"additionalProperties":false},"proposals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false}},"dropped":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"reason":{"type":"string"}},"required":["title","reason"],"additionalProperties":false}},"duplicates":{"type":"array","items":{"type":"string"}},"expired":{"type":"array","items":{"type":"string"}},"budget":{"type":"object","properties":{"capUsd":{"type":"number"},"spentUsd":{"type":"number"},"stopped":{"type":"boolean"}},"required":["capUsd","spentUsd","stopped"],"additionalProperties":false},"read":{"type":"object","properties":{"records":{"type":"integer"},"files":{"type":"integer"}},"required":["records","files"],"additionalProperties":false}},"required":["repository","commit","routine","drift","proposals","dropped","duplicates","budget","read"],"additionalProperties":false},"Catalog":{"type":"object","properties":{"schema":{"type":"string"},"tenantId":{"type":"string"},"checkedAt":{"type":"string"},"policies":{"type":"array","items":{"type":"string"}},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"summary":{"type":"string"},"shelf":{"type":"string"},"provider":{"type":"string"},"credential":{"type":"string"},"state":{"type":"string"},"enabled":{"type":"boolean"},"policy":{"type":"string"},"policies":{"type":"array","items":{"type":"string"}},"version":{"type":"integer"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"title":{"type":"string"},"effect":{"type":"string"},"usdPerCall":{"type":"number"},"policy":{"type":"string"},"supplier":{"type":"string"},"capability":{"type":"string"}},"required":[],"additionalProperties":false}},"toolCount":{"type":"integer"},"usedBy":{"type":"array","items":{"type":"string"}},"product":{"type":"string"},"manage":{"type":"string","pattern":"^/"},"detail":{"type":"string"},"connect":{"type":"boolean"},"handoff":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"expiresAt":{"type":"string"}},"required":[],"additionalProperties":false},"custodian":{"type":"string"},"connectionId":{"type":"string"},"logoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"categories":{"type":"array","items":{"type":"string"}},"authKind":{"anyOf":[{"type":"string"},{"type":"null"}]},"featured":{"type":"boolean"}},"required":[],"additionalProperties":false}},"count":{"type":"integer"},"total":{"type":"integer"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"query":{"anyOf":[{"type":"string"},{"type":"null"}]},"counts":{"type":"object","properties":{"builtin":{"type":"integer"},"account":{"type":"integer"},"slack":{"type":"integer"},"synced":{"anyOf":[{"type":"integer"},{"type":"null"}]},"capped":{"type":"boolean"},"shown":{"type":"integer"},"countedFrom":{"type":"string","enum":["table","seeds"]}},"required":[],"additionalProperties":false},"needs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"state":{"type":"string"}},"required":[],"additionalProperties":false}},"ready":{"type":"boolean"},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"filter":{"type":"string","enum":["all","featured","connected"]},"connected":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"summary":{"type":"string"},"shelf":{"type":"string"},"provider":{"type":"string"},"credential":{"type":"string"},"state":{"type":"string"},"enabled":{"type":"boolean"},"policy":{"type":"string"},"policies":{"type":"array","items":{"type":"string"}},"version":{"type":"integer"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"title":{"type":"string"},"effect":{"type":"string"},"usdPerCall":{"type":"number"},"policy":{"type":"string"},"supplier":{"type":"string"},"capability":{"type":"string"}},"required":[],"additionalProperties":false}},"toolCount":{"type":"integer"},"usedBy":{"type":"array","items":{"type":"string"}},"product":{"type":"string"},"manage":{"type":"string","pattern":"^/"},"detail":{"type":"string"},"connect":{"type":"boolean"},"handoff":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"expiresAt":{"type":"string"}},"required":[],"additionalProperties":false},"custodian":{"type":"string"},"connectionId":{"type":"string"},"logoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"categories":{"type":"array","items":{"type":"string"}},"authKind":{"anyOf":[{"type":"string"},{"type":"null"}]},"featured":{"type":"boolean"}},"required":[],"additionalProperties":false}},"featured":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"summary":{"type":"string"},"shelf":{"type":"string"},"provider":{"type":"string"},"credential":{"type":"string"},"state":{"type":"string"},"enabled":{"type":"boolean"},"policy":{"type":"string"},"policies":{"type":"array","items":{"type":"string"}},"version":{"type":"integer"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"title":{"type":"string"},"effect":{"type":"string"},"usdPerCall":{"type":"number"},"policy":{"type":"string"},"supplier":{"type":"string"},"capability":{"type":"string"}},"required":[],"additionalProperties":false}},"toolCount":{"type":"integer"},"usedBy":{"type":"array","items":{"type":"string"}},"product":{"type":"string"},"manage":{"type":"string","pattern":"^/"},"detail":{"type":"string"},"connect":{"type":"boolean"},"handoff":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"expiresAt":{"type":"string"}},"required":[],"additionalProperties":false},"custodian":{"type":"string"},"connectionId":{"type":"string"},"logoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"categories":{"type":"array","items":{"type":"string"}},"authKind":{"anyOf":[{"type":"string"},{"type":"null"}]},"featured":{"type":"boolean"}},"required":[],"additionalProperties":false}},"categories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"apps":{"type":"integer"}},"required":[],"additionalProperties":false}}},"required":["schema","tenantId","checkedAt","policies","connectors"],"additionalProperties":false},"Setting":{"type":"object","properties":{"connector":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"policy":{"type":"string"},"version":{"type":"integer"}},"required":[],"additionalProperties":false}},"required":["connector"],"additionalProperties":false},"DomainCheck":{"type":"object","properties":{"schema":{"const":"zerohuman.domain-check.v1"},"checkedAt":{"type":"string"},"endings":{"type":"array","items":{"type":"string"}},"results":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"domain":{"type":"string"},"available":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"years":{"type":"integer"},"priceUsd":{"type":"string"},"code":{"type":"string"},"reason":{"type":"string"}},"required":[],"additionalProperties":false}}},"required":["schema","checkedAt","endings","results"],"additionalProperties":false},"Order":{"type":"object","properties":{"order":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"years":{"type":"integer"},"priceUsd":{"type":"string"},"priceMicroUsd":{"type":"integer"},"state":{"type":"string"},"settled":{"type":"boolean"},"paid":{"type":"boolean"},"customerPaid":{"type":"boolean"},"customerPriceUsd":{"type":"string"},"createdAt":{"type":"string"},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"nameServers":{"type":"array","items":{"type":"string"}},"failure":{"anyOf":[{"type":"string"},{"type":"null"}]},"hosting":{"type":"string","enum":["worker","none"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order_id":{"type":"string"},"at":{"type":"string"},"kind":{"type":"string"},"state":{"type":"string"}},"required":[],"additionalProperties":false}}},"required":[],"additionalProperties":false},"waiting":{"type":"boolean"},"checkoutUrl":{"type":"string"}},"required":["order"],"additionalProperties":false},"Orders":{"type":"object","properties":{"schema":{"type":"string"},"limits":{"type":"object","properties":{"quoteMinutes":{"type":"integer"},"endings":{"type":"array","items":{"type":"string"}},"maxYears":{"type":"integer"}},"required":[],"additionalProperties":false},"billing":{"$ref":"#/components/schemas/Billing"},"hosting":{"type":"string","enum":["worker","none"]},"orders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"years":{"type":"integer"},"priceUsd":{"type":"string"},"priceMicroUsd":{"type":"integer"},"state":{"type":"string"},"settled":{"type":"boolean"},"paid":{"type":"boolean"},"customerPaid":{"type":"boolean"},"customerPriceUsd":{"type":"string"},"createdAt":{"type":"string"},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"nameServers":{"type":"array","items":{"type":"string"}},"failure":{"anyOf":[{"type":"string"},{"type":"null"}]},"hosting":{"type":"string","enum":["worker","none"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order_id":{"type":"string"},"at":{"type":"string"},"kind":{"type":"string"},"state":{"type":"string"}},"required":[],"additionalProperties":false}}},"required":[],"additionalProperties":false}}},"required":["schema","limits","billing","hosting","orders"],"additionalProperties":false},"Quote":{"type":"object","properties":{"order":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"years":{"type":"integer"},"priceUsd":{"type":"string"},"priceMicroUsd":{"type":"integer"},"state":{"type":"string"},"settled":{"type":"boolean"},"paid":{"type":"boolean"},"customerPaid":{"type":"boolean"},"customerPriceUsd":{"type":"string"},"createdAt":{"type":"string"},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"nameServers":{"type":"array","items":{"type":"string"}},"failure":{"anyOf":[{"type":"string"},{"type":"null"}]},"hosting":{"type":"string","enum":["worker","none"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order_id":{"type":"string"},"at":{"type":"string"},"kind":{"type":"string"},"state":{"type":"string"}},"required":[],"additionalProperties":false}}},"required":[],"additionalProperties":false},"terms":{"type":"object","properties":{"registrant":{"type":"string"},"renewal":{"type":"string"},"privacy":{"type":"string"},"charge":{"type":"string"},"refund":{"type":"string"}},"required":[],"additionalProperties":false}},"required":["order","terms"],"additionalProperties":false},"Site":{"type":"object","properties":{"site":{"anyOf":[{"type":"object","properties":{"version":{"type":"integer"},"publishedRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"previousRevision":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false},{"type":"null"}]},"revisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"hash":{"type":"string"},"created_at":{"type":"string"}},"required":[],"additionalProperties":false}},"revision":{"type":"object","properties":{"id":{"type":"string"},"hash":{"type":"string"}},"required":[],"additionalProperties":false},"preview":{"type":"string"},"files":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false},"Agenthealth":{"type":"object","properties":{"ok":{"type":"boolean"},"commit":{"type":"string"},"agents":{"type":"string"},"pi":{"type":"string"},"capabilities":{"$ref":"#/components/schemas/Capabilities"}},"required":[],"additionalProperties":false},"Capabilities":{"type":"object","properties":{"schema":{"type":"string"},"limits":{"type":"object","properties":{"maxRequestBytes":{"type":"number"},"maxTools":{"type":"number"},"maxRunMs":{"type":"number"},"maxOutputTokens":{"type":"number"},"maxTurns":{"type":"number"},"modelTimeoutMs":{"type":"number"},"lifetimeCapMicroUsd":{"type":"number"},"dailyCapMicroUsd":{"type":"number"},"maxLiveRuns":{"type":"number"},"maxParallel":{"type":"number"},"maxAgents":{"type":"number"},"maxAskChars":{"type":"number"},"pollRunningMs":{"type":"number"},"pollEntriesFallbackMs":{"type":"number"},"swarmPollMs":{"type":"number"},"minBudgetUsd":{"type":"number"},"maxBudgetUsd":{"type":"number"},"defaultBudgetUsd":{"type":"number"},"maxFileBytes":{"type":"number"},"maxFiles":{"type":"number"},"maxAttachments":{"type":"number"},"maxAttachmentBytes":{"type":"number"},"maxAttachmentTotalBytes":{"type":"number"},"maxLaunchBytes":{"type":"number"}},"required":[],"additionalProperties":false},"supported":{"type":"object","properties":{"targets":{"type":"array","items":{"type":"string"}},"agentsPerLaunch":{"type":"integer"},"workspace":{"type":"string"},"webFetch":{"type":"boolean"},"webSearch":{"type":"boolean"},"brain":{"type":"boolean"},"brainLevel":{"type":"string"},"brainMcp":{"type":"boolean"},"swarms":{"type":"boolean"},"customModels":{"type":"boolean"},"recipes":{"type":"boolean"},"toolGrants":{"type":"boolean"},"council":{"type":"object","properties":{"minMembers":{"type":"integer"},"maxMembers":{"type":"integer"},"modes":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false},"routines":{"type":"boolean"},"machineAuth":{"const":true},"mcp":{"type":"boolean"},"cli":{"type":"boolean"},"publishing":{"type":"boolean"}},"required":[],"additionalProperties":false},"reservationPolicy":{"type":"string"}},"required":[],"additionalProperties":false},"Agentoverview":{"type":"object","properties":{"liveRuns":{"type":"integer"},"maxLiveRuns":{"type":"integer"},"agentsRunning":{"type":"integer"},"storageIndex":{"type":"object","properties":{"schema":{"type":"string"},"retainedRuns":{"type":"integer"},"bootstrapRuns":{"type":"integer"}},"required":[],"additionalProperties":false},"maxParallel":{"type":"integer"},"spentTodayUsd":{"type":"number"},"dailyCapUsd":{"type":"number"},"capabilities":{"$ref":"#/components/schemas/Capabilities"},"budget":{"type":"object","properties":{"day":{"type":"object","properties":{"billedUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"reservedMicroUsd":{"type":"integer"},"reservedUsd":{"type":"number"},"capUsd":{"type":"number"},"limitKind":{"type":"string","enum":["actual-spend-soft"]},"unresolvedUsd":{"type":"number"},"remainingActualUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"remainingReservationUsd":{"type":"number"}},"required":[],"additionalProperties":false},"lifetime":{"type":"object","properties":{"billedUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"reservedMicroUsd":{"type":"integer"},"reservedUsd":{"type":"number"},"capUsd":{"type":"number"},"limitKind":{"type":"string","enum":["actual-spend-soft"]},"unresolvedUsd":{"type":"number"},"remainingActualUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"remainingReservationUsd":{"type":"number"}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"github":{"type":"object","properties":{"connected":{"type":"boolean"},"login":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"anyOf":[{"type":"string"},{"type":"null"}]},"allowed":{"type":"array","items":{"type":"string"}},"repositories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"private":{"type":"boolean"}},"required":[],"additionalProperties":false}},"readOnly":{"type":"boolean"},"available":{"type":"boolean"},"kind":{"type":"string"},"proposals":{"type":"boolean"},"installationId":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":[],"additionalProperties":false},"nextRoutine":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"at":{"type":"string"}},"required":[],"additionalProperties":false},{"type":"null"}]},"tiers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"model":{"type":"string"}},"required":[],"additionalProperties":false}}},"required":[],"additionalProperties":false},"Agentlaunches":{"type":"object","properties":{"launches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"rootId":{"type":"string"},"parentId":{"type":"string"},"createdById":{"type":"string"},"context":{"type":"object","properties":{"kind":{"type":"string"},"version":{"type":"integer"},"title":{"type":"string"},"source":{"type":"string"},"observedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"configuredAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"authority":{"type":"string"}},"required":[],"additionalProperties":false},"contextVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"reading":{"anyOf":[{"type":"object","properties":{"version":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"chars":{"type":"integer"}},"required":[],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"name":{"type":"string"},"version":{"type":"string"},"enabled":{"type":"boolean"}},"required":[],"additionalProperties":false}}},"required":[],"additionalProperties":false},{"type":"null"}]},"grant":{"anyOf":[{"type":"object","properties":{"allows":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false},{"type":"null"}]},"origin":{"type":"object","properties":{"kind":{"type":"string","enum":["ui","slack","routine","api","handoff","agent","goal"]},"ref":{"type":"string"}},"required":[],"additionalProperties":false},"delegatedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"modelSlots":{"anyOf":[{"type":"object","description":"Step 14c: the three slots this run was admitted with (brain, hands, skills, each a model ref and an optional fallback, plus any fallback that stood in), copied at admission. Ids only; a later record change never alters a running launch."},{"type":"null"}]},"request":{"type":"object","properties":{"ask":{"type":"string"},"target":{"type":"object","properties":{"kind":{"type":"string"},"repository":{"type":"string"}},"required":[],"additionalProperties":false},"tier":{"type":"string"},"budgetUsd":{"type":"number"},"workers":{"type":"integer"},"council":{"type":"object","properties":{"mode":{"type":"string"},"members":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string"},"label":{"type":"string"},"budgetUsd":{"type":"number"},"tools":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false}},"synthesizer":{"type":"object","properties":{"model":{"type":"string"}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"attachments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"path":{"type":"string"},"bytes":{"type":"integer"}},"required":[],"additionalProperties":false}},"hours":{"type":"number"}},"required":[],"additionalProperties":false},"status":{"type":"string"},"failure":{"anyOf":[{"type":"string"},{"type":"null"}]},"actualModel":{"anyOf":[{"type":"string"},{"type":"null"}]},"spentUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"usageIncomplete":{"type":"boolean"},"budget":{"type":"object","properties":{"billedUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"reservedMicroUsd":{"type":"integer"},"reservedUsd":{"type":"number"},"capUsd":{"type":"number"},"limitKind":{"type":"string","enum":["actual-spend-soft"]},"unresolvedUsd":{"type":"number"},"remainingActualUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"remainingReservationUsd":{"type":"number"}},"required":[],"additionalProperties":false},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"result":{"type":"object","properties":{"summary":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"bytes":{"type":"integer"}},"required":[],"additionalProperties":false}},"council":{"anyOf":[{"type":"object","properties":{"answer":{"type":"string"},"consensus":{"type":"array","items":{"type":"object","properties":{"claim":{"type":"string"},"members":{"type":"array","items":{"type":"integer"}}},"required":[],"additionalProperties":false}},"disagreements":{"type":"array","items":{"type":"object","properties":{"topic":{"type":"string"},"positions":{"type":"array","items":{"type":"object","properties":{"members":{"type":"array","items":{"type":"integer"}},"position":{"type":"string"},"reasoning":{"type":"string"}},"required":[],"additionalProperties":false}}},"required":[],"additionalProperties":false}},"unique":{"type":"array","items":{"type":"object","properties":{"member":{"type":"integer"},"finding":{"type":"string"}},"required":[],"additionalProperties":false}},"citations":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"members":{"type":"array","items":{"type":"integer"}},"retrieved":{"type":"boolean"}},"required":[],"additionalProperties":false}},"gaps":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false},{"type":"null"}]},"councilNote":{"type":"string"}},"required":[],"additionalProperties":false},"agents":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"role":{"type":"string"},"title":{"type":"string"},"model":{"type":"string"},"budgetUsd":{"type":"number"},"tools":{"type":"integer"},"reserved":{"type":"integer"},"usageIncomplete":{"type":"boolean"},"actualModel":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"spentUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"tier":{"type":"string"},"toolCalls":{"type":"integer"},"caps":{"type":"object","properties":{"usd":{"type":"number"},"toolCalls":{"type":"integer"},"hours":{"type":"number"}},"required":[],"additionalProperties":false},"lastLine":{"type":"string"},"failure":{"type":"string"},"deliverable":{"type":"object","properties":{"summary":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"bytes":{"type":"integer"}},"required":[],"additionalProperties":false}},"council":{"anyOf":[{"type":"object","properties":{"answer":{"type":"string"},"consensus":{"type":"array","items":{"type":"object","properties":{"claim":{"type":"string"},"members":{"type":"array","items":{"type":"integer"}}},"required":[],"additionalProperties":false}},"disagreements":{"type":"array","items":{"type":"object","properties":{"topic":{"type":"string"},"positions":{"type":"array","items":{"type":"object","properties":{"members":{"type":"array","items":{"type":"integer"}},"position":{"type":"string"},"reasoning":{"type":"string"}},"required":[],"additionalProperties":false}}},"required":[],"additionalProperties":false}},"unique":{"type":"array","items":{"type":"object","properties":{"member":{"type":"integer"},"finding":{"type":"string"}},"required":[],"additionalProperties":false}},"citations":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"members":{"type":"array","items":{"type":"integer"}},"retrieved":{"type":"boolean"}},"required":[],"additionalProperties":false}},"gaps":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false},{"type":"null"}]},"councilNote":{"type":"string"}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false}}},"required":[],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["launches","nextCursor"],"additionalProperties":false},"AgentRuns":{"type":"object","properties":{"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tenant":{"type":"string"},"agent":{"type":"string"},"status":{"type":"string","enum":["done","failed","stopped","over_budget"]},"costMicroUsd":{"type":"integer"},"objectKey":{"type":"string"},"objectSha256":{"type":"string"},"objectBytes":{"type":"integer"},"jobId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"finishedAt":{"type":"string"},"recordedAt":{"type":"string"}},"required":["id","tenant","agent","status","costMicroUsd","objectKey","objectSha256","objectBytes","createdAt","finishedAt","recordedAt"],"additionalProperties":false}},"more":{"type":"boolean"}},"required":["runs","more"],"additionalProperties":false},"AgentRunArchive":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string"},"tenant":{"type":"string"},"agent":{"type":"string"},"status":{"type":"string","enum":["done","failed","stopped","over_budget"]},"costMicroUsd":{"type":"integer"},"objectKey":{"type":"string"},"objectSha256":{"type":"string"},"objectBytes":{"type":"integer"},"jobId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"finishedAt":{"type":"string"},"recordedAt":{"type":"string"}},"required":["id","tenant","agent","status","costMicroUsd","objectKey","objectSha256","objectBytes","createdAt","finishedAt","recordedAt"],"additionalProperties":false},"content":{"type":"object","description":"The run object: prompts, answers and tool results."}},"required":["run","content"],"additionalProperties":false},"AgentRunsExport":{"type":"object","properties":{"schema":{"type":"string"},"tenant":{"type":"string"},"exportedAt":{"type":"string"},"count":{"type":"integer"},"truncated":{"type":"boolean"},"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tenant":{"type":"string"},"agent":{"type":"string"},"status":{"type":"string","enum":["done","failed","stopped","over_budget"]},"costMicroUsd":{"type":"integer"},"objectKey":{"type":"string"},"objectSha256":{"type":"string"},"objectBytes":{"type":"integer"},"jobId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"finishedAt":{"type":"string"},"recordedAt":{"type":"string"},"content":{"type":"object","description":"The run object itself: prompts, answers and tool results. Never copied into the row."}},"required":["id","tenant","agent","status","costMicroUsd","objectKey","objectSha256","objectBytes","createdAt","finishedAt","recordedAt","content"],"additionalProperties":false}}},"required":["schema","tenant","exportedAt","count","truncated","runs"],"additionalProperties":false},"AgentRunsErased":{"type":"object","properties":{"erased":{"type":"object","properties":{"objects":{"type":"integer"},"runs":{"type":"integer"}},"required":["objects","runs"],"additionalProperties":false},"at":{"type":"string"}},"required":["erased","at"],"additionalProperties":false},"Agentmodels":{"type":"object","properties":{"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"builtin":{"type":"boolean"},"contextWindow":{"anyOf":[{"type":"integer"},{"type":"null"}]},"reasoning":{"type":"boolean"},"ceilingUsdPerMillion":{"type":"object","properties":{"prompt":{"type":"number"},"completion":{"type":"number"}},"required":[],"additionalProperties":false},"validatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpoints":{"anyOf":[{"type":"integer"},{"type":"null"}]},"search":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string"},"answerOnly":{"type":"boolean"},"usdPerSearch":{"type":"number"},"usdPerRequest":{"type":"number"},"reservedUsdPerRequest":{"type":"number"}},"required":[],"additionalProperties":false},{"type":"null"}]}},"required":[],"additionalProperties":false}},"limit":{"type":"integer"}},"required":["models","limit"],"additionalProperties":false},"Agentrecipes":{"type":"object","properties":{"recipes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"},"launch":{"type":"object","properties":{"tier":{"type":"string"},"budgetUsd":{"type":"number"},"agents":{"type":"integer"},"council":{"type":"object","properties":{"mode":{"type":"string"},"members":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string"},"label":{"type":"string"},"budgetUsd":{"type":"number"},"tools":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false}},"synthesizer":{"type":"object","properties":{"model":{"type":"string"}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"builtin":{"type":"boolean"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false}},"limit":{"type":"integer"}},"required":["recipes","limit"],"additionalProperties":false},"Run":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"rootId":{"type":"string"},"parentId":{"type":"string"},"createdById":{"type":"string"},"context":{"type":"object","properties":{"kind":{"type":"string"},"version":{"type":"integer"},"title":{"type":"string"},"source":{"type":"string"},"observedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"configuredAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"authority":{"type":"string"}},"required":[],"additionalProperties":false},"contextVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"reading":{"anyOf":[{"type":"object","properties":{"version":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"chars":{"type":"integer"}},"required":[],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"name":{"type":"string"},"version":{"type":"string"},"enabled":{"type":"boolean"}},"required":[],"additionalProperties":false}}},"required":[],"additionalProperties":false},{"type":"null"}]},"grant":{"anyOf":[{"type":"object","properties":{"allows":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false},{"type":"null"}]},"origin":{"type":"object","properties":{"kind":{"type":"string","enum":["ui","slack","routine","api","handoff","agent","goal"]},"ref":{"type":"string"}},"required":[],"additionalProperties":false},"delegatedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"modelSlots":{"anyOf":[{"type":"object","description":"Step 14c: the three slots this run was admitted with (brain, hands, skills, each a model ref and an optional fallback, plus any fallback that stood in), copied at admission. Ids only; a later record change never alters a running launch."},{"type":"null"}]},"request":{"type":"object","properties":{"ask":{"type":"string"},"target":{"type":"object","properties":{"kind":{"type":"string"},"repository":{"type":"string"}},"required":[],"additionalProperties":false},"tier":{"type":"string"},"budgetUsd":{"type":"number"},"workers":{"type":"integer"},"council":{"type":"object","properties":{"mode":{"type":"string"},"members":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string"},"label":{"type":"string"},"budgetUsd":{"type":"number"},"tools":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false}},"synthesizer":{"type":"object","properties":{"model":{"type":"string"}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"attachments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"path":{"type":"string"},"bytes":{"type":"integer"}},"required":[],"additionalProperties":false}},"hours":{"type":"number"}},"required":[],"additionalProperties":false},"status":{"type":"string"},"failure":{"anyOf":[{"type":"string"},{"type":"null"}]},"actualModel":{"anyOf":[{"type":"string"},{"type":"null"}]},"spentUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"usageIncomplete":{"type":"boolean"},"budget":{"type":"object","properties":{"billedUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"reservedMicroUsd":{"type":"integer"},"reservedUsd":{"type":"number"},"capUsd":{"type":"number"},"limitKind":{"type":"string","enum":["actual-spend-soft"]},"unresolvedUsd":{"type":"number"},"remainingActualUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"remainingReservationUsd":{"type":"number"}},"required":[],"additionalProperties":false},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"result":{"type":"object","properties":{"summary":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"bytes":{"type":"integer"}},"required":[],"additionalProperties":false}},"council":{"anyOf":[{"type":"object","properties":{"answer":{"type":"string"},"consensus":{"type":"array","items":{"type":"object","properties":{"claim":{"type":"string"},"members":{"type":"array","items":{"type":"integer"}}},"required":[],"additionalProperties":false}},"disagreements":{"type":"array","items":{"type":"object","properties":{"topic":{"type":"string"},"positions":{"type":"array","items":{"type":"object","properties":{"members":{"type":"array","items":{"type":"integer"}},"position":{"type":"string"},"reasoning":{"type":"string"}},"required":[],"additionalProperties":false}}},"required":[],"additionalProperties":false}},"unique":{"type":"array","items":{"type":"object","properties":{"member":{"type":"integer"},"finding":{"type":"string"}},"required":[],"additionalProperties":false}},"citations":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"members":{"type":"array","items":{"type":"integer"}},"retrieved":{"type":"boolean"}},"required":[],"additionalProperties":false}},"gaps":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false},{"type":"null"}]},"councilNote":{"type":"string"}},"required":[],"additionalProperties":false},"agents":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"role":{"type":"string"},"title":{"type":"string"},"model":{"type":"string"},"budgetUsd":{"type":"number"},"tools":{"type":"integer"},"reserved":{"type":"integer"},"usageIncomplete":{"type":"boolean"},"actualModel":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"spentUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"tier":{"type":"string"},"toolCalls":{"type":"integer"},"caps":{"type":"object","properties":{"usd":{"type":"number"},"toolCalls":{"type":"integer"},"hours":{"type":"number"}},"required":[],"additionalProperties":false},"lastLine":{"type":"string"},"failure":{"type":"string"},"deliverable":{"type":"object","properties":{"summary":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"bytes":{"type":"integer"}},"required":[],"additionalProperties":false}},"council":{"anyOf":[{"type":"object","properties":{"answer":{"type":"string"},"consensus":{"type":"array","items":{"type":"object","properties":{"claim":{"type":"string"},"members":{"type":"array","items":{"type":"integer"}}},"required":[],"additionalProperties":false}},"disagreements":{"type":"array","items":{"type":"object","properties":{"topic":{"type":"string"},"positions":{"type":"array","items":{"type":"object","properties":{"members":{"type":"array","items":{"type":"integer"}},"position":{"type":"string"},"reasoning":{"type":"string"}},"required":[],"additionalProperties":false}}},"required":[],"additionalProperties":false}},"unique":{"type":"array","items":{"type":"object","properties":{"member":{"type":"integer"},"finding":{"type":"string"}},"required":[],"additionalProperties":false}},"citations":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"members":{"type":"array","items":{"type":"integer"}},"retrieved":{"type":"boolean"}},"required":[],"additionalProperties":false}},"gaps":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false},{"type":"null"}]},"councilNote":{"type":"string"}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false}}},"required":[],"additionalProperties":false},"Model":{"type":"object","properties":{"model":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"builtin":{"type":"boolean"},"contextWindow":{"anyOf":[{"type":"integer"},{"type":"null"}]},"reasoning":{"type":"boolean"},"ceilingUsdPerMillion":{"type":"object","properties":{"prompt":{"type":"number"},"completion":{"type":"number"}},"required":[],"additionalProperties":false},"validatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpoints":{"anyOf":[{"type":"integer"},{"type":"null"}]},"search":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string"},"answerOnly":{"type":"boolean"},"usdPerSearch":{"type":"number"},"usdPerRequest":{"type":"number"},"reservedUsdPerRequest":{"type":"number"}},"required":[],"additionalProperties":false},{"type":"null"}]}},"required":[],"additionalProperties":false}},"required":["model"],"additionalProperties":false},"Recipe":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"},"launch":{"type":"object","properties":{"tier":{"type":"string"},"budgetUsd":{"type":"number"},"agents":{"type":"integer"},"council":{"type":"object","properties":{"mode":{"type":"string"},"members":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string"},"label":{"type":"string"},"budgetUsd":{"type":"number"},"tools":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false}},"synthesizer":{"type":"object","properties":{"model":{"type":"string"}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"builtin":{"type":"boolean"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false}},"required":["recipe"],"additionalProperties":false},"GitHub":{"type":"object","properties":{"connected":{"type":"boolean"},"login":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"anyOf":[{"type":"string"},{"type":"null"}]},"allowed":{"type":"array","items":{"type":"string"}},"repositories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"private":{"type":"boolean"}},"required":[],"additionalProperties":false}},"readOnly":{"type":"boolean"},"available":{"type":"boolean"},"kind":{"type":"string"},"proposals":{"type":"boolean"},"installationId":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":[],"additionalProperties":false},"ManagedAgent":{"type":"object","properties":{"id":{"type":"string"},"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"recipe":{"type":"string"},"version":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"role":{"type":"string"},"tools":{"type":"array","items":{"type":"string"}},"skills":{"type":"array","items":{"type":"string"}},"tier":{"type":"string"},"model":{"anyOf":[{"type":"string"},{"type":"null"}]},"models":{"anyOf":[{"type":"object","properties":{"brain":{"anyOf":[{"type":"object","properties":{"model":{"type":"string"},"fallback":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false},{"type":"null"}]},"hands":{"anyOf":[{"type":"object","properties":{"model":{"type":"string"},"fallback":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false},{"type":"null"}]},"skills":{"anyOf":[{"type":"object","properties":{"model":{"type":"string"},"fallback":{"anyOf":[{"type":"string"},{"type":"null"}]},"bySkill":{"anyOf":[{"type":"object","propertyNames":{"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"patternProperties":{"^[a-z0-9][a-z0-9-]{0,63}$":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,95}(\\/[a-z0-9][a-z0-9._:-]{0,95})?$"}},"additionalProperties":false,"maxProperties":12},{"type":"null"}]}},"required":[],"additionalProperties":false},{"type":"null"}]}},"required":[],"additionalProperties":false},{"type":"null"}]},"modelsVersion":{"type":"integer"},"budgetUsd":{"type":"number"},"dailyUsd":{"type":"number"},"brainTools":{"type":"boolean"},"reportChannel":{"anyOf":[{"type":"string"},{"type":"null"}]},"stallMinutes":{"anyOf":[{"type":"integer"},{"type":"null"}]},"dayAlertPct":{"anyOf":[{"type":"integer"},{"type":"null"}]},"manager":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"team":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lastRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","recipe","version","name","title","role","tools","skills","tier","budgetUsd","dailyUsd","state","createdBy","createdAt","updatedAt"],"additionalProperties":false},"ModelSlotDefaults":{"type":"object","properties":{"models":{"type":"object","properties":{"brain":{"anyOf":[{"type":"object","properties":{"model":{"type":"string"},"fallback":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false},{"type":"null"}]},"hands":{"anyOf":[{"type":"object","properties":{"model":{"type":"string"},"fallback":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false},{"type":"null"}]},"skills":{"anyOf":[{"type":"object","properties":{"model":{"type":"string"},"fallback":{"anyOf":[{"type":"string"},{"type":"null"}]},"bySkill":{"anyOf":[{"type":"object","propertyNames":{"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"patternProperties":{"^[a-z0-9][a-z0-9-]{0,63}$":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,95}(\\/[a-z0-9][a-z0-9._:-]{0,95})?$"}},"additionalProperties":false,"maxProperties":12},{"type":"null"}]}},"required":[],"additionalProperties":false},{"type":"null"}]}},"required":[],"additionalProperties":false},"version":{"type":"integer"},"updatedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["models","version"],"additionalProperties":false},"ManagedAgents":{"type":"object","properties":{"agents":{"type":"array","items":{"$ref":"#/components/schemas/ManagedAgent"}},"limit":{"type":"integer"},"recipes":{"type":"array","items":{"type":"string"}},"tools":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string"},"title":{"type":"string"},"always":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":[],"additionalProperties":false}},{"type":"null"}]},"skillLimit":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["agents","limit","recipes"],"additionalProperties":false},"ManagedAgentRemoved":{"type":"object","properties":{"ok":{"type":"boolean"},"id":{"type":"string"},"state":{"type":"string"}},"required":["ok","id","state"],"additionalProperties":false},"CompanyRecipeSkill":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"bytes":{"type":"integer"}},"required":["name","description","bytes"],"additionalProperties":false},"CompanyRecipe":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"role":{"type":"string"},"tools":{"type":"array","items":{"type":"string"}},"model":{"anyOf":[{"type":"string"},{"type":"null"}]},"tier":{"type":"string"},"budgetUsd":{"type":"number"},"dailyUsd":{"type":"number"},"skills":{"type":"array","items":{"$ref":"#/components/schemas/CompanyRecipeSkill"}},"handoffs":{"type":"array","items":{"type":"string"}},"state":{"type":"string"},"origin":{"type":"string"},"createdBy":{"type":"string"},"createdByAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","version","name","title","role","tools","tier","budgetUsd","dailyUsd","skills","handoffs","state","origin","createdBy","createdAt","updatedAt"],"additionalProperties":false},"CompanyRecipes":{"type":"object","properties":{"recipes":{"type":"array","items":{"$ref":"#/components/schemas/CompanyRecipe"}},"limit":{"type":"integer"},"firstParty":{"type":"array","items":{"type":"string"}}},"required":["recipes","limit","firstParty"],"additionalProperties":false},"CompanyRecipeDeploy":{"type":"object","properties":{"recipe":{"$ref":"#/components/schemas/CompanyRecipe"},"agents":{"type":"array","items":{"$ref":"#/components/schemas/ManagedAgent"}}},"required":["recipe","agents"],"additionalProperties":false},"CompanyRecipeExport":{"type":"object","properties":{"folder":{"type":"string"},"files":{"type":"object","patternProperties":{"^(recipe\\.json|skills/[a-z0-9][a-z0-9-]{0,39}/SKILL\\.md)$":{"type":"string"}},"additionalProperties":false}},"required":["folder","files"],"additionalProperties":false},"CompanyRecipeRemoved":{"type":"object","properties":{"ok":{"type":"boolean"},"recipe":{"anyOf":[{"$ref":"#/components/schemas/CompanyRecipe"},{"type":"null"}]},"agents":{"type":"array","items":{"$ref":"#/components/schemas/ManagedAgent"}}},"required":["ok","recipe","agents"],"additionalProperties":false},"AgentSetting":{"type":"object","properties":{"mode":{"type":"string","enum":["propose","allow"]},"by":{"type":"string"},"at":{"type":"string"}},"required":["mode","by","at"],"additionalProperties":false},"TenantLimitsMap":{"type":"object","properties":{"lifetimeCapMicroUsd":{"type":"integer"},"dailyCapMicroUsd":{"type":"integer"},"maxLiveRuns":{"type":"integer"},"maxParallel":{"type":"integer"},"minBudgetMicroUsd":{"type":"integer"},"maxBudgetMicroUsd":{"type":"integer"}},"required":["lifetimeCapMicroUsd","dailyCapMicroUsd","maxLiveRuns","maxParallel","minBudgetMicroUsd","maxBudgetMicroUsd"],"additionalProperties":false},"TenantLimits":{"type":"object","properties":{"limits":{"type":"object","properties":{"schema":{"const":"agentos.tenant-limits.v1"},"tenant":{"type":"string"},"configured":{"type":"boolean"},"version":{"type":"integer"},"effective":{"$ref":"#/components/schemas/TenantLimitsMap"},"defaults":{"$ref":"#/components/schemas/TenantLimitsMap"},"ceilings":{"anyOf":[{"$ref":"#/components/schemas/TenantLimitsMap"},{"type":"null"}]},"updatedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["schema","tenant","configured","version","effective","defaults","ceilings"],"additionalProperties":false}},"required":["limits"],"additionalProperties":false},"TenantLimitsSet":{"type":"object","properties":{"limits":{"type":"object","properties":{"version":{"type":"integer"},"effective":{"$ref":"#/components/schemas/TenantLimitsMap"}},"required":["version","effective"],"additionalProperties":false}},"required":["limits"],"additionalProperties":false},"AgentSettings":{"type":"object","properties":{"setting":{"anyOf":[{"$ref":"#/components/schemas/AgentSetting"},{"type":"null"}]}},"required":["setting"],"additionalProperties":false},"AgentProposalSpec":{"type":"object","properties":{"name":{"type":"string"},"title":{"type":"string"},"role":{"type":"string"},"tools":{"type":"array","items":{"type":"string"}},"skills":{"type":"array","items":{"type":"string"}},"budgetUsd":{"type":"number"},"dailyUsd":{"type":"number"},"model":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","title","role","tools","skills","budgetUsd","dailyUsd"],"additionalProperties":false},"AgentProposal":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string"},"spec":{"$ref":"#/components/schemas/AgentProposalSpec"},"kind":{"anyOf":[{"type":"string","enum":["create","pause"]},{"type":"null"}]},"pause":{"anyOf":[{"type":"object","properties":{"agentId":{"type":"string"},"agentKey":{"type":"string"},"reason":{"type":"string"},"spentTodayUsd":{"type":"number"},"dailyUsd":{"type":"number"}},"required":["agentId","agentKey","reason","spentTodayUsd","dailyUsd"],"additionalProperties":false},{"type":"null"}]},"byAgent":{"type":"string"},"byRecipe":{"type":"string"},"run":{"type":"string"},"createdAt":{"type":"string"},"decidedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"decidedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"recipe":{"anyOf":[{"type":"string"},{"type":"null"}]},"agent":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","state","spec","byAgent","byRecipe","run","createdAt"],"additionalProperties":false},"AgentProposals":{"type":"object","properties":{"proposals":{"type":"array","items":{"$ref":"#/components/schemas/AgentProposal"}},"limit":{"type":"integer"}},"required":["proposals","limit"],"additionalProperties":false},"AgentProposalDecided":{"type":"object","properties":{"proposal":{"$ref":"#/components/schemas/AgentProposal"},"agent":{"anyOf":[{"$ref":"#/components/schemas/ManagedAgent"},{"type":"null"}]}},"required":["proposal"],"additionalProperties":false},"SlackInstallApp":{"type":"object","properties":{"app":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"expiresAt":{"type":"string"}},"required":["app","name","url","expiresAt"],"additionalProperties":false},"SlackInstallRefused":{"type":"object","properties":{"app":{"type":"string"},"code":{"type":"string"}},"required":["app","code"],"additionalProperties":false},"SlackInstall":{"type":"object","properties":{"schema":{"type":"string"},"tenant":{"type":"string"},"apps":{"type":"array","items":{"$ref":"#/components/schemas/SlackInstallApp"}},"refused":{"type":"array","items":{"$ref":"#/components/schemas/SlackInstallRefused"}},"configured":{"type":"boolean"}},"required":["schema","tenant","apps","refused"],"additionalProperties":false},"SlackInstalledApp":{"type":"object","properties":{"app":{"type":"string"},"name":{"type":"string"},"recipe":{"anyOf":[{"type":"string"},{"type":"null"}]},"configured":{"type":"boolean"},"installed":{"type":"boolean"},"state":{"type":"string"},"workspace":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceName":{"anyOf":[{"type":"string"},{"type":"null"}]},"token":{"type":"string","enum":["present","absent"]},"installedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["app","name","configured","installed","state","token"],"additionalProperties":false},"SlackInstalls":{"type":"object","properties":{"schema":{"type":"string"},"tenantId":{"type":"string"},"checkedAt":{"type":"string"},"apps":{"type":"array","items":{"$ref":"#/components/schemas/SlackInstalledApp"}}},"required":["schema","tenantId","checkedAt","apps"],"additionalProperties":false},"FleetAgent":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"recipe":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"state":{"type":"string"},"budgetUsd":{"type":"number"},"dailyUsd":{"type":"number"},"spentTodayUsd":{"type":"number"},"reservedTodayUsd":{"type":"number"},"lastRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"reportChannel":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","key","recipe","name","title","state","budgetUsd","dailyUsd","spentTodayUsd","reservedTodayUsd"],"additionalProperties":false},"FleetLive":{"type":"object","properties":{"id":{"type":"string"},"agent":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"minutesSinceProgress":{"type":"integer"},"tools":{"type":"integer"},"spentUsd":{"type":"number"},"budgetUsd":{"type":"number"},"delegatedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastLine":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","status","minutesSinceProgress","tools","spentUsd","budgetUsd"],"additionalProperties":false},"FleetRecent":{"type":"object","properties":{"id":{"type":"string"},"agent":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"failure":{"anyOf":[{"type":"string"},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"spentUsd":{"type":"number"},"budgetUsd":{"type":"number"},"delegatedBy":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","status","spentUsd","budgetUsd"],"additionalProperties":false},"Fleet":{"type":"object","properties":{"agents":{"type":"array","items":{"$ref":"#/components/schemas/FleetAgent"}},"live":{"type":"array","items":{"$ref":"#/components/schemas/FleetLive"}},"recent":{"type":"array","items":{"$ref":"#/components/schemas/FleetRecent"}},"delegationRefusals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id"],"additionalProperties":false}},"asOf":{"type":"string"}},"required":["agents","live","recent","asOf"],"additionalProperties":false},"RosterMember":{"type":"object","properties":{"agentId":{"type":"string"},"recipe":{"type":"string"},"version":{"type":"string"}},"required":["agentId","recipe","version"],"additionalProperties":false},"RosterManifestEntry":{"type":"object","properties":{"recipe":{"type":"string"},"version":{"type":"string"}},"required":["recipe","version"],"additionalProperties":false},"RosterManifest":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"string"},"name":{"type":"string"},"agents":{"type":"array","items":{"$ref":"#/components/schemas/RosterManifestEntry"}},"dailyUsd":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","version","name","agents"],"additionalProperties":false},"Roster":{"type":"object","properties":{"id":{"type":"string"},"roster":{"type":"string"},"version":{"type":"string"},"name":{"type":"string"},"agents":{"type":"array","items":{"$ref":"#/components/schemas/RosterMember"}},"dailyUsd":{"type":"number"},"state":{"type":"string"},"manifest":{"$ref":"#/components/schemas/RosterManifest"},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","roster","version","name","agents","dailyUsd","state","manifest","createdBy","createdAt","updatedAt"],"additionalProperties":false},"Rosters":{"type":"object","properties":{"rosters":{"type":"array","items":{"$ref":"#/components/schemas/Roster"}},"limit":{"type":"integer"},"available":{"type":"array","items":{"type":"string"}}},"required":["rosters","limit","available"],"additionalProperties":false},"RosterDetail":{"type":"object","properties":{"roster":{"$ref":"#/components/schemas/Roster"},"agents":{"type":"array","items":{"$ref":"#/components/schemas/ManagedAgent"}},"cards":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string"},"path":{"type":"string"},"status":{"type":"string","enum":["live","proposed","unchanged","refused","unavailable"]},"version":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["recipe","path","status","version"],"additionalProperties":false}}},"required":["roster","agents"],"additionalProperties":false},"RosterRemoved":{"type":"object","properties":{"ok":{"type":"boolean"},"roster":{"$ref":"#/components/schemas/Roster"},"agents":{"type":"array","items":{"$ref":"#/components/schemas/ManagedAgent"}}},"required":["ok","roster","agents"],"additionalProperties":false},"Rules":{"type":"object","properties":{"rules":{"type":"object","properties":{"text":{"type":"string"},"build":{"type":"string"}},"required":[],"additionalProperties":false}},"required":["rules"],"additionalProperties":false},"AgentScorecard":{"type":"object","properties":{"schema":{"const":"agentos.scorecard.v1"},"agent":{"type":"string"},"engine":{"type":"string","enum":["postgres","clickhouse"]},"computedAt":{"type":"string"},"versions":{"type":"array","items":{"type":"object","properties":{"contextVersion":{"type":"string"},"firstAt":{"type":"string"},"lastAt":{"type":"string"},"asks":{"type":"integer"},"modelCalls":{"type":"integer"},"costMicroUsd":{"type":"integer"},"costPerAskMicroUsd":{"type":"integer"},"tokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"toolCalls":{"type":"integer"},"slots":{"type":"array","items":{"type":"object","properties":{"slot":{"type":"string"},"calls":{"type":"integer"},"costMicroUsd":{"type":"integer"},"tokens":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["slot","calls","costMicroUsd"],"additionalProperties":false}},"tools":{"type":"array","items":{"type":"object","properties":{"tool":{"type":"string"},"calls":{"type":"integer"},"failed":{"type":"integer"}},"required":["tool","calls","failed"],"additionalProperties":false}},"answers":{"type":"integer"},"p50Ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"p95Ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"labels":{"anyOf":[{"type":"object","properties":{"accepted":{"type":"integer"},"rejected":{"type":"integer"},"revised":{"type":"integer"}},"required":["accepted","rejected","revised"],"additionalProperties":false},{"type":"null"}]},"corrected":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["contextVersion","firstAt","lastAt","asks","modelCalls","costMicroUsd","costPerAskMicroUsd","tokens","toolCalls","slots","tools","answers","p50Ms","p95Ms","labels","corrected"],"additionalProperties":false}},"watch":{"anyOf":[{"type":"object","properties":{"version":{"type":"string"},"previous":{"type":"string"},"verdict":{"type":"string","enum":["waiting","unmeasured","keep","restore"]},"worse":{"type":"array","items":{"type":"string","enum":["accepted","corrected"]}},"accepted":{"type":"object","properties":{"before":{"anyOf":[{"type":"number"},{"type":"null"}]},"after":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["before","after"],"additionalProperties":false},"corrected":{"type":"object","properties":{"before":{"anyOf":[{"type":"number"},{"type":"null"}]},"after":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["before","after"],"additionalProperties":false},"costPerAskMicroUsd":{"type":"object","properties":{"before":{"type":"integer"},"after":{"type":"integer"}},"required":["before","after"],"additionalProperties":false}},"required":["version","previous","verdict","worse","accepted","corrected","costPerAskMicroUsd"],"additionalProperties":false},{"type":"null"}]}},"required":["schema","agent","engine","computedAt","versions","watch"],"additionalProperties":false},"PlatformSkills":{"type":"object","properties":{"skills":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"source":{"type":"string"},"version":{"type":"string"}},"required":[],"additionalProperties":false}},"limit":{"type":"integer"}},"required":["skills","limit"],"additionalProperties":false},"Accepted":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"replayed":{"type":"boolean"},"run":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"rootId":{"type":"string"},"parentId":{"type":"string"},"createdById":{"type":"string"},"context":{"type":"object","properties":{"kind":{"type":"string"},"version":{"type":"integer"},"title":{"type":"string"},"source":{"type":"string"},"observedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"configuredAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"authority":{"type":"string"}},"required":[],"additionalProperties":false},"contextVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"reading":{"anyOf":[{"type":"object","properties":{"version":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"chars":{"type":"integer"}},"required":[],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"name":{"type":"string"},"version":{"type":"string"},"enabled":{"type":"boolean"}},"required":[],"additionalProperties":false}}},"required":[],"additionalProperties":false},{"type":"null"}]},"grant":{"anyOf":[{"type":"object","properties":{"allows":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false},{"type":"null"}]},"origin":{"type":"object","properties":{"kind":{"type":"string","enum":["ui","slack","routine","api","handoff","agent","goal"]},"ref":{"type":"string"}},"required":[],"additionalProperties":false},"delegatedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"modelSlots":{"anyOf":[{"type":"object","description":"Step 14c: the three slots this run was admitted with (brain, hands, skills, each a model ref and an optional fallback, plus any fallback that stood in), copied at admission. Ids only; a later record change never alters a running launch."},{"type":"null"}]},"request":{"type":"object","properties":{"ask":{"type":"string"},"target":{"type":"object","properties":{"kind":{"type":"string"},"repository":{"type":"string"}},"required":[],"additionalProperties":false},"tier":{"type":"string"},"budgetUsd":{"type":"number"},"workers":{"type":"integer"},"council":{"type":"object","properties":{"mode":{"type":"string"},"members":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string"},"label":{"type":"string"},"budgetUsd":{"type":"number"},"tools":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false}},"synthesizer":{"type":"object","properties":{"model":{"type":"string"}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"attachments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"path":{"type":"string"},"bytes":{"type":"integer"}},"required":[],"additionalProperties":false}},"hours":{"type":"number"}},"required":[],"additionalProperties":false},"status":{"type":"string"},"failure":{"anyOf":[{"type":"string"},{"type":"null"}]},"actualModel":{"anyOf":[{"type":"string"},{"type":"null"}]},"spentUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"usageIncomplete":{"type":"boolean"},"budget":{"type":"object","properties":{"billedUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"reservedMicroUsd":{"type":"integer"},"reservedUsd":{"type":"number"},"capUsd":{"type":"number"},"limitKind":{"type":"string","enum":["actual-spend-soft"]},"unresolvedUsd":{"type":"number"},"remainingActualUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"remainingReservationUsd":{"type":"number"}},"required":[],"additionalProperties":false},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"result":{"type":"object","properties":{"summary":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"bytes":{"type":"integer"}},"required":[],"additionalProperties":false}},"council":{"anyOf":[{"type":"object","properties":{"answer":{"type":"string"},"consensus":{"type":"array","items":{"type":"object","properties":{"claim":{"type":"string"},"members":{"type":"array","items":{"type":"integer"}}},"required":[],"additionalProperties":false}},"disagreements":{"type":"array","items":{"type":"object","properties":{"topic":{"type":"string"},"positions":{"type":"array","items":{"type":"object","properties":{"members":{"type":"array","items":{"type":"integer"}},"position":{"type":"string"},"reasoning":{"type":"string"}},"required":[],"additionalProperties":false}}},"required":[],"additionalProperties":false}},"unique":{"type":"array","items":{"type":"object","properties":{"member":{"type":"integer"},"finding":{"type":"string"}},"required":[],"additionalProperties":false}},"citations":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"members":{"type":"array","items":{"type":"integer"}},"retrieved":{"type":"boolean"}},"required":[],"additionalProperties":false}},"gaps":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false},{"type":"null"}]},"councilNote":{"type":"string"}},"required":[],"additionalProperties":false},"agents":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"role":{"type":"string"},"title":{"type":"string"},"model":{"type":"string"},"budgetUsd":{"type":"number"},"tools":{"type":"integer"},"reserved":{"type":"integer"},"usageIncomplete":{"type":"boolean"},"actualModel":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"spentUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"tier":{"type":"string"},"toolCalls":{"type":"integer"},"caps":{"type":"object","properties":{"usd":{"type":"number"},"toolCalls":{"type":"integer"},"hours":{"type":"number"}},"required":[],"additionalProperties":false},"lastLine":{"type":"string"},"failure":{"type":"string"},"deliverable":{"type":"object","properties":{"summary":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"bytes":{"type":"integer"}},"required":[],"additionalProperties":false}},"council":{"anyOf":[{"type":"object","properties":{"answer":{"type":"string"},"consensus":{"type":"array","items":{"type":"object","properties":{"claim":{"type":"string"},"members":{"type":"array","items":{"type":"integer"}}},"required":[],"additionalProperties":false}},"disagreements":{"type":"array","items":{"type":"object","properties":{"topic":{"type":"string"},"positions":{"type":"array","items":{"type":"object","properties":{"members":{"type":"array","items":{"type":"integer"}},"position":{"type":"string"},"reasoning":{"type":"string"}},"required":[],"additionalProperties":false}}},"required":[],"additionalProperties":false}},"unique":{"type":"array","items":{"type":"object","properties":{"member":{"type":"integer"},"finding":{"type":"string"}},"required":[],"additionalProperties":false}},"citations":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"members":{"type":"array","items":{"type":"integer"}},"retrieved":{"type":"boolean"}},"required":[],"additionalProperties":false}},"gaps":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false},{"type":"null"}]},"councilNote":{"type":"string"}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false}}},"required":[],"additionalProperties":false}},"required":["id"],"additionalProperties":false},"Removed":{"type":"object","properties":{"ok":{"type":"boolean"},"id":{"type":"string"},"removed":{"type":"boolean"}},"required":[],"additionalProperties":false},"Control":{"type":"object","properties":{"ok":{"type":"boolean"},"id":{"type":"string"},"status":{"type":"string"}},"required":[],"additionalProperties":false},"Conversation":{"type":"object","properties":{"turns":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"text":{"type":"string"}},"required":["role","text"],"additionalProperties":false}}},"required":["turns"],"additionalProperties":false},"AgentDetail":{"type":"object","properties":{"agent":{"type":"object","properties":{"n":{"type":"integer"},"role":{"type":"string"},"title":{"type":"string"},"model":{"type":"string"},"budgetUsd":{"type":"number"},"tools":{"type":"integer"},"reserved":{"type":"integer"},"usageIncomplete":{"type":"boolean"},"actualModel":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"spentUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"tier":{"type":"string"},"toolCalls":{"type":"integer"},"caps":{"type":"object","properties":{"usd":{"type":"number"},"toolCalls":{"type":"integer"},"hours":{"type":"number"}},"required":[],"additionalProperties":false},"lastLine":{"type":"string"},"failure":{"type":"string"},"deliverable":{"type":"object","properties":{"summary":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"bytes":{"type":"integer"}},"required":[],"additionalProperties":false}},"council":{"anyOf":[{"type":"object","properties":{"answer":{"type":"string"},"consensus":{"type":"array","items":{"type":"object","properties":{"claim":{"type":"string"},"members":{"type":"array","items":{"type":"integer"}}},"required":[],"additionalProperties":false}},"disagreements":{"type":"array","items":{"type":"object","properties":{"topic":{"type":"string"},"positions":{"type":"array","items":{"type":"object","properties":{"members":{"type":"array","items":{"type":"integer"}},"position":{"type":"string"},"reasoning":{"type":"string"}},"required":[],"additionalProperties":false}}},"required":[],"additionalProperties":false}},"unique":{"type":"array","items":{"type":"object","properties":{"member":{"type":"integer"},"finding":{"type":"string"}},"required":[],"additionalProperties":false}},"citations":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"members":{"type":"array","items":{"type":"integer"}},"retrieved":{"type":"boolean"}},"required":[],"additionalProperties":false}},"gaps":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false},{"type":"null"}]},"councilNote":{"type":"string"}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"bytes":{"type":"integer"}},"required":[],"additionalProperties":false}},"entries":{"type":"array","items":{"x-legacy-output-only":true,"x-source":"agentos/src/agent.ts:detail","description":"Existing persisted session entries","type":["object","array","string","number","boolean","null"]}}},"required":[],"additionalProperties":false},"Proposal":{"type":"object","properties":{"proposal":{"type":"object","properties":{"schema":{"const":"agentos.github-proposal.v1"},"repository":{"type":"string"},"baseSha":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"text":{"type":"string"}},"required":[],"additionalProperties":false}}},"required":[],"additionalProperties":false},"artifactHash":{"type":"string"},"connectionVersion":{"type":"string"},"receipt":{"anyOf":[{"$ref":"#/components/schemas/ProposalReceipt"},{"type":"null"}]}},"required":[],"additionalProperties":false},"ProposalReceipt":{"type":"object","properties":{"status":{"type":"string"},"number":{"type":"integer"},"url":{"type":"string"},"branch":{"type":"string"},"commit":{"type":"string"},"bot":{"type":"string"},"artifactHash":{"type":"string"},"at":{"type":"string"}},"required":[],"additionalProperties":false},"BrowserSession":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string"},"mode":{"type":"string"},"domains":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"engine":{"type":"string"},"openedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastActivityAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"billedSeconds":{"type":"integer"},"billedMicroUsd":{"type":"integer"},"maxMinutes":{"type":"integer"},"maxUsd":{"type":"number"},"steps":{"type":"integer"},"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"bytes":{"type":"integer"},"kind":{"type":"string"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}]},"sha256":{"type":"string"}},"required":[],"additionalProperties":false}},"closeReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"profile":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"runId":{"anyOf":[{"type":"string"},{"type":"null"}]},"termsHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"permission":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboard":{"anyOf":[{"type":"string"},{"type":"null"}]},"receipt":{"type":"object","properties":{"sessionId":{"type":"string"},"minutes":{"type":"integer"},"microUsd":{"type":"integer"},"rate":{"type":"string"},"engine":{"type":"string"},"mode":{"type":"string"},"residentialMinutes":{"anyOf":[{"type":"integer"},{"type":"null"}]},"trafficMb":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["sessionId","minutes","microUsd","rate","engine","mode"],"additionalProperties":false}},"required":[],"additionalProperties":false},"BrowserProfile":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"domains":{"type":"array","items":{"type":"string"}},"version":{"type":"string"},"permission":{"anyOf":[{"type":"string"},{"type":"null"}]},"allowEval":{"type":"boolean"},"updatedAt":{"type":"string"}},"required":["id","name","domains","version","allowEval","updatedAt"],"additionalProperties":false},"BrowserProfiles":{"type":"object","properties":{"profiles":{"type":"array","items":{"$ref":"#/components/schemas/BrowserProfile"}}},"required":["profiles"],"additionalProperties":false},"BrowserView":{"type":"object","properties":{"url":{"type":"string"},"expiresInSeconds":{"type":"integer"},"state":{"type":"string"}},"required":["url","expiresInSeconds","state"],"additionalProperties":false},"BrowserAnswer":{"type":"object","properties":{"ok":{"type":"boolean"},"done":{"type":"integer"},"failed":{"anyOf":[{"type":"object","properties":{"step":{"type":"integer"},"code":{"type":"string"},"message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false},{"type":"null"}]},"url":{"type":"string"},"title":{"type":"string"},"snapshot":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"files":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"bytes":{"type":"integer"},"kind":{"type":"string"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}]},"sha256":{"type":"string"}},"required":[],"additionalProperties":false}},{"type":"null"}]},"notice":{"anyOf":[{"type":"string"},{"type":"null"}]},"refs":{"anyOf":[{"type":"integer"},{"type":"null"}]},"billedSeconds":{"type":"integer"},"billedMicroUsd":{"type":"integer"},"state":{"type":"string"},"receipt":{"type":"object","properties":{"sessionId":{"type":"string"},"minutes":{"type":"integer"},"microUsd":{"type":"integer"},"rate":{"type":"string"},"engine":{"type":"string"},"mode":{"type":"string"},"residentialMinutes":{"anyOf":[{"type":"integer"},{"type":"null"}]},"trafficMb":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["sessionId","minutes","microUsd","rate","engine","mode"],"additionalProperties":false}},"required":[],"additionalProperties":false},"BrowserSessions":{"type":"object","properties":{"sessions":{"type":"array","items":{"$ref":"#/components/schemas/BrowserSession"}}},"required":["sessions"],"additionalProperties":false},"Builtin":{"type":"object","properties":{"configured":{"type":"object","properties":{"web-search":{"type":"boolean"},"web-scrape":{"type":"boolean"},"browser":{"type":"boolean"},"domains":{"type":"boolean"}},"required":[],"additionalProperties":false}},"required":["configured"],"additionalProperties":false},"Billing":{"type":"object","properties":{"configured":{"type":"boolean"},"ready":{"type":"boolean"},"state":{"type":"string"},"reason":{"type":"string"}},"required":[],"additionalProperties":false},"Browser":{"type":"object","properties":{"email":{"type":"string"},"ok":{"type":"boolean"},"url":{"type":"string"},"state":{"type":"string"},"status":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Billing"}]},"configured":{"type":"boolean"},"ready":{"type":"boolean"},"reason":{"type":"string"},"connected":{"type":"boolean"},"company":{"type":"string"},"connection":{"type":"object","properties":{"connected":{"type":"boolean"},"login":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"anyOf":[{"type":"string"},{"type":"null"}]},"allowed":{"type":"array","items":{"type":"string"}},"repositories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"private":{"type":"boolean"}},"required":[],"additionalProperties":false}},"readOnly":{"type":"boolean"},"available":{"type":"boolean"},"kind":{"type":"string"},"proposals":{"type":"boolean"},"installationId":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false}},"securitySchemes":{"bearerKey":{"type":"http","scheme":"bearer","bearerFormat":"ac_live_<id>_<secret>","description":"Platform key. Wins over x-api-key and api-key when more than one is sent."},"xApiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"The same platform key, for a client that cannot set Authorization. Claude custom connectors are one."},"apiKey":{"type":"apiKey","in":"header","name":"api-key","description":"The same platform key, used when x-api-key is absent."}}},"paths":{"/v1/registry/submissions":{"post":{"operationId":"registry.submit","summary":"Manage tenant-private MCP metadata submissions only. Not listed, reviewed, ownership-verified, health-checked, executable or publication-eligible; no endpoint/provider call.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityWriteAck"}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"publisherLabel":{"type":"string","minLength":1,"maxLength":80},"server":{"$ref":"#/components/schemas/CommunityServer"},"contract":{"$ref":"#/components/schemas/CommunityContract"}},"required":["publisherLabel","server","contract"],"additionalProperties":false}}}}}},"/v1/registry/submissions/{submissionId}":{"get":{"operationId":"registry.status","summary":"Manage tenant-private MCP metadata submissions only. Not listed, reviewed, ownership-verified, health-checked, executable or publication-eligible; no endpoint/provider call.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"submissionId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}},{"name":"version","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityProjection"}}}}},"x-scope":"account:read","x-effect":"read"},"post":{"operationId":"registry.update","summary":"Manage tenant-private MCP metadata submissions only. Not listed, reviewed, ownership-verified, health-checked, executable or publication-eligible; no endpoint/provider call.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"submissionId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityWriteAck"}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":1,"maximum":9007199254740990},"server":{"$ref":"#/components/schemas/CommunityServer"},"contract":{"$ref":"#/components/schemas/CommunityContract"}},"required":["expectedVersion","server","contract"],"additionalProperties":false}}}}}},"/v1/registry/submissions/{submissionId}/validate":{"post":{"operationId":"registry.validate","summary":"Manage tenant-private MCP metadata submissions only. Not listed, reviewed, ownership-verified, health-checked, executable or publication-eligible; no endpoint/provider call.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"submissionId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityValidateAck"}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["expectedVersion"],"additionalProperties":false}}}}}},"/v1/signup":{"post":{"operationId":"account.signup","summary":"account signup","security":[],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{32,128}$"},"description":"Confidential cryptographically random value; retain for replay, never share or log."}],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"tenant":{"$ref":"#/components/schemas/Tenant"},"key":{"$ref":"#/components/schemas/Key"},"next":{"type":"object","properties":{"operations":{"const":"/v1/operations"}},"required":["operations"],"additionalProperties":false},"claim":{"type":"object","properties":{"kind":{"const":"claim"},"url":{"type":"string"},"token":{"type":"string","pattern":"^[a-f0-9]{64}$"},"expiresAt":{"type":"string","format":"date-time"}},"required":["kind","url","token","expiresAt"],"additionalProperties":false}},"required":["tenant","key","next"],"additionalProperties":false}}}}},"x-scope":null,"x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"agent":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"vendor":{"type":"string","minLength":1,"maxLength":80},"url":{"type":"string","maxLength":2048,"format":"uri","pattern":"^https://"}},"required":["name"],"additionalProperties":false},"terms":{"type":"object","properties":{"version":{"type":"string","minLength":1,"maxLength":128},"accepted":{"const":true}},"required":["version","accepted"],"additionalProperties":false},"invite":{"type":"string","pattern":"^[A-Za-z0-9_-]{32,128}$"}},"required":["agent","terms"],"additionalProperties":false}}}}}},"/v1/account/close":{"post":{"operationId":"account.close","summary":"account close","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"closed":{"const":true}},"required":["closed"],"additionalProperties":false}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/whoami":{"get":{"operationId":"account.whoami","summary":"account whoami","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"principal":{"$ref":"#/components/schemas/Principal"},"tenant":{"$ref":"#/components/schemas/Tenant"}},"required":["principal","tenant"],"additionalProperties":false}}}}},"x-scope":null,"x-effect":"read"}},"/v1/account":{"get":{"operationId":"account.get","summary":"account get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"tenant":{"$ref":"#/components/schemas/Tenant"},"humanTouches":{"type":"integer","minimum":0}},"required":["tenant","humanTouches"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read"}},"/v1/keys":{"get":{"operationId":"keys.list","summary":"keys list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/Key"}}},"required":["keys"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read"},"post":{"operationId":"keys.create","summary":"keys create","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Key"}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"scopes":{"type":"array","items":{"type":"string","enum":["agent:read","agent:create","agent:run","agent:stop","agent:retry","agent:delete","account:read","account:admin","finance:read","finance:sync","finance:connection","brain:read","brain:configure","brain:observe","brain:approve","brain:ingest","brain:export","brain:erase","connections:read","connections:configure","capabilities:read","domains:read","domains:purchase","foundry:read","foundry:refresh","billing:read","billing:fund","billing:admin","launch:read","launch:run","launch:decide","loops:read","loops:create","loops:mandate","browser:read","browser:use","browser:profiles","account:provision","registry:review","eval:read","eval:write","eval:decide","order:approve","suppliers:deliver","improve:contribute","contacts:read","contacts:write","channels:read","channels:configure","channels:send","uploads:read","uploads:write","uploads:erase","foundry:write","foundry:review","foundry:work","foundry:decide","foundry:configure","foundry:admit","platform:analyse","outcomes:read","outcomes:record","people:self","people:decide","telemetry:configure","marketing:read","marketing:act"]},"maxItems":67,"uniqueItems":true},"preset":{"type":"string","enum":["read","read-only","operate","spend","root"]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["name"],"additionalProperties":false,"not":{"required":["scopes","preset"]}}}}}}},"/v1/keys/{keyId}/revoke":{"post":{"operationId":"keys.revoke","summary":"keys revoke","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"keyId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z2-7]{8}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Key"}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/data":{"get":{"operationId":"foundry.dashboard.get","summary":"foundry dashboard get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard"}}}}},"x-scope":"foundry:read","x-effect":"read"}},"/v1/refresh":{"post":{"operationId":"foundry.dashboard.refresh","summary":"foundry dashboard refresh","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard"}}}}},"x-scope":"foundry:refresh","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/foundry/reviews":{"post":{"operationId":"foundry.reviews.create","summary":"Queue one Fusion round. The round budget is decided before any seat is called and a refused round costs nothing; the round runs under a durable job, so a client disconnect does not lose it. Billed as usage per round, priced per seat.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"202":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"review":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^review-[A-Za-z0-9_-]{8,200}$"},"state":{"type":"string","enum":["queued","running","done","failed","refused"]},"repository":{"type":"string"},"base":{"type":"string"},"head":{"type":"string"},"gate":{"type":"string"},"tier":{"type":"string"},"reviewRound":{"type":"string"},"createdAt":{"type":"string"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["PASS","FAIL","UNAVAILABLE"]},{"type":"null"}]},"evidenceHash":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]},"quorum":{"type":["object","null"],"additionalProperties":true},"parts":{"type":["object","null"],"additionalProperties":true},"failure":{"type":["object","null"],"additionalProperties":true},"drill":{"type":"boolean"}},"required":["id","state","repository","base","head","gate","tier","reviewRound","createdAt"],"additionalProperties":false},{"type":"null"}]},"price":{"anyOf":[{"type":"object","properties":{"schema":{"type":"string"},"meter":{"type":"string"},"mode":{"type":"string","enum":["usage"]},"unit":{"type":"string"},"seatCount":{"type":"integer","minimum":1,"maximum":8},"microUsd":{"type":"integer","minimum":0},"chargeMicroUsd":{"type":"integer","minimum":0},"pending":{"type":"boolean"},"card":{"type":"string"}},"required":["schema","meter","mode","unit","seatCount","microUsd"],"additionalProperties":false},{"type":"null"}]},"artifact":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","pattern":"^\\.fusion-gate/[a-f0-9]{7,40}\\.(json|md)$","maxLength":240},"content":{"type":"string","maxLength":1048576},"kind":{"type":"string","enum":["json","markdown"]}},"required":["path","content"],"additionalProperties":false},"maxItems":8},{"type":"null"}]},"evidence":{"anyOf":[{"type":"object","additionalProperties":true,"maxProperties":128,"properties":{"schema":{"type":"string"},"parts":{"type":"array","items":{"type":"object","properties":{"part":{"type":"integer","minimum":0},"files":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":5000},"status":{"type":"string"},"quorum":{"type":["object","null"],"additionalProperties":true},"seats":{"type":"array","items":{"type":"object","additionalProperties":true},"maxItems":64},"blockers":{"type":"array","items":{"type":"object","additionalProperties":true},"maxItems":64}},"required":["part","status"],"additionalProperties":false},"maxItems":16}}},{"type":"null"}]},"blockers":{"type":"array","items":{"type":"object","additionalProperties":true},"maxItems":64},"config":{"anyOf":[{"type":"object","properties":{"version":{"type":"integer","minimum":1},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"contractSha256":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]},"tiersSha256":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]},"source":{"type":"string","enum":["active","pinned","lkg"]}},"required":["version","sha256","source"],"additionalProperties":false},{"type":"null"}]},"classification":{"anyOf":[{"type":"object","properties":{"tier":{"type":"string"},"floor":{"type":"string"},"drivers":{"type":"array","items":{"type":"string"},"maxItems":5},"classes":{"type":"array","items":{"type":"string"},"maxItems":64},"overrides":{"type":"array","items":{"type":"object","additionalProperties":true},"maxItems":500}},"required":["tier","floor"],"additionalProperties":false},{"type":"null"}]},"seats":{"type":"array","items":{"type":"object","additionalProperties":true},"maxItems":256},"timings":{"type":"object","properties":{"queuedMs":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"wallMs":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["queuedMs","wallMs"],"additionalProperties":false},"queuePosition":{"type":"integer","minimum":0}},"required":["review"],"additionalProperties":false}}}}},"x-scope":"foundry:review","x-effect":"spend","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"repository":{"type":"string","pattern":"^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"},"base":{"type":"string","pattern":"^[a-f0-9]{7,40}$"},"head":{"type":"string","pattern":"^[a-f0-9]{7,40}$"},"gate":{"type":"string","enum":["gate-a","gate-b"]},"tier":{"type":"string","enum":["T0","T1","T2","T3","auto"]},"configVersion":{"type":"integer","minimum":1,"maximum":1000000},"files":{"type":"array","items":{"type":"string","minLength":1,"maxLength":500},"maxItems":5000},"labels":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500},"workKind":{"type":"string","enum":["code"]},"reviewRound":{"type":"string","enum":["full","targeted"]},"changeId":{"type":"string","minLength":1,"maxLength":120},"pullRequest":{"type":"integer","minimum":1,"maximum":1000000},"blockerIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":32},"businessGoal":{"type":"string","minLength":1,"maxLength":2000},"existingPattern":{"type":"string","minLength":1,"maxLength":2000},"minimumDiff":{"type":"string","minLength":1,"maxLength":2000},"exclusions":{"type":"string","minLength":1,"maxLength":2000},"verifyEvidence":{"type":"string","minLength":1,"maxLength":4000},"diff":{"type":"string","maxLength":99983616},"plan":{"type":"string","maxLength":99983616},"fileCapBytes":{"type":"integer","minimum":1024,"maximum":262144},"referenceFullRound":{"type":"integer","minimum":1,"maximum":99},"authorization":{"type":"object","properties":{"by":{"type":"string","minLength":1,"maxLength":200},"reason":{"type":"string","minLength":1,"maxLength":1000},"at":{"type":"string","format":"date-time"},"round":{"type":"integer","minimum":1,"maximum":999},"ordinal":{"type":"integer","minimum":1,"maximum":999}},"required":["by","reason","at","round"],"additionalProperties":false},"summary":{"type":"object","properties":{"ticket":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]{0,9}-[0-9]+$"},"url":{"type":"string","pattern":"^https?://\\S+$","maxLength":2000},"title":{"type":"string","maxLength":500}},"required":["key","url"],"additionalProperties":false},"checks":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"conclusion":{"type":"string","maxLength":60},"required":{"type":"boolean"}},"required":["name"],"additionalProperties":false},"minItems":1,"maxItems":200}},"required":["items"],"additionalProperties":false},"deploy":{"type":"object","properties":{"status":{"type":"string","enum":["verified","not-applicable"]},"environment":{"type":"string","minLength":1,"maxLength":120},"why":{"type":"string","maxLength":2000},"commitSha":{"type":"string","pattern":"^[a-f0-9]{7,40}$"},"sourceRef":{"type":"string","maxLength":2000},"confirmedAt":{"type":"string","format":"date-time"}},"required":["status","environment"],"additionalProperties":false},"media":{"type":"object","properties":{"status":{"type":"string","enum":["attached","none","unavailable"]},"why":{"type":"string","maxLength":2000},"dependency":{"type":"string","maxLength":2000},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":500},"kind":{"type":"string","enum":["screenshot","recording","log","manifest"]},"text":{"type":"string","maxLength":65536}},"required":["path","kind"],"additionalProperties":false},"maxItems":20}},"required":["status"],"additionalProperties":false},"visible":{"type":"boolean"},"flow":{"type":"string","maxLength":500},"reviewRequired":{"type":"boolean"}},"required":["ticket","checks","deploy","media"],"additionalProperties":false},"drill":{"type":"boolean"},"resolutions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$","maxLength":160},"note":{"type":"string","minLength":1,"maxLength":500}},"required":["id","note"],"additionalProperties":false},"maxItems":512},"patchId":{"type":"string","pattern":"^[a-f0-9]{40}$"},"touchedPaths":{"type":"array","items":{"type":"string","minLength":1,"maxLength":500},"maxItems":5000},"mainChangedPaths":{"type":"array","items":{"type":"string","minLength":1,"maxLength":500},"maxItems":5000},"carry":{"type":"boolean"}},"required":["repository","base","head","gate","tier"],"additionalProperties":false}}}}},"get":{"operationId":"foundry.reviews.head","summary":"Read the Gate B rounds recorded for one head of one repository: state, verdict, recorded base and published blocker ids. No artifact and no seat text. A pull query, with no head, reads that pull request's rounds so an unchanged diff can carry.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"head","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-f0-9]{40}$"}},{"name":"repository","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"}},{"name":"pull","in":"query","required":false,"schema":{"type":"string","pattern":"^[1-9][0-9]{0,6}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"reviews":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^review-[A-Za-z0-9_-]{8,200}$"},"state":{"type":"string"},"head":{"type":"string"},"gate":{"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"base":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"blockers":{"type":"array","items":{"type":"string"},"maxItems":32},"round":{"anyOf":[{"type":"string","enum":["full","targeted"]},{"type":"null"}]},"fullRound":{"anyOf":[{"type":"string"},{"type":"null"}]},"raised":{"type":"array","items":{"type":"string"},"maxItems":32},"rechecked":{"type":"array","items":{"type":"string"},"maxItems":32},"rejected":{"type":"array","items":{"type":"string"},"maxItems":32},"fullBlockers":{"anyOf":[{"type":"array","items":{"type":"string"},"maxItems":32},{"type":"null"}]},"patchId":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"touchedPaths":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":5000},"carriedFrom":{"anyOf":[{"type":"string","pattern":"^review-[A-Za-z0-9_-]{8,200}$"},{"type":"null"}]},"source":{"anyOf":[{"type":"string","enum":["hosted"]},{"type":"null"}]}},"required":["id","state","head","gate","status","blockers"],"additionalProperties":false},"maxItems":20}},"required":["reviews"],"additionalProperties":false}}}}},"x-scope":"foundry:read","x-effect":"read"}},"/v1/foundry/reviews/{reviewId}":{"get":{"operationId":"foundry.reviews.get","summary":"Read one Fusion round of your own tenant: state, quorum, each seat verdict and route, and the evidence hash.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"reviewId","in":"path","required":true,"schema":{"type":"string","pattern":"^review-[A-Za-z0-9_-]{8,200}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"review":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^review-[A-Za-z0-9_-]{8,200}$"},"state":{"type":"string","enum":["queued","running","done","failed","refused"]},"repository":{"type":"string"},"base":{"type":"string"},"head":{"type":"string"},"gate":{"type":"string"},"tier":{"type":"string"},"reviewRound":{"type":"string"},"createdAt":{"type":"string"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["PASS","FAIL","UNAVAILABLE"]},{"type":"null"}]},"evidenceHash":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]},"quorum":{"type":["object","null"],"additionalProperties":true},"parts":{"type":["object","null"],"additionalProperties":true},"failure":{"type":["object","null"],"additionalProperties":true},"drill":{"type":"boolean"}},"required":["id","state","repository","base","head","gate","tier","reviewRound","createdAt"],"additionalProperties":false},{"type":"null"}]},"price":{"anyOf":[{"type":"object","properties":{"schema":{"type":"string"},"meter":{"type":"string"},"mode":{"type":"string","enum":["usage"]},"unit":{"type":"string"},"seatCount":{"type":"integer","minimum":1,"maximum":8},"microUsd":{"type":"integer","minimum":0},"chargeMicroUsd":{"type":"integer","minimum":0},"pending":{"type":"boolean"},"card":{"type":"string"}},"required":["schema","meter","mode","unit","seatCount","microUsd"],"additionalProperties":false},{"type":"null"}]},"artifact":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","pattern":"^\\.fusion-gate/[a-f0-9]{7,40}\\.(json|md)$","maxLength":240},"content":{"type":"string","maxLength":1048576},"kind":{"type":"string","enum":["json","markdown"]}},"required":["path","content"],"additionalProperties":false},"maxItems":8},{"type":"null"}]},"evidence":{"anyOf":[{"type":"object","additionalProperties":true,"maxProperties":128,"properties":{"schema":{"type":"string"},"parts":{"type":"array","items":{"type":"object","properties":{"part":{"type":"integer","minimum":0},"files":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":5000},"status":{"type":"string"},"quorum":{"type":["object","null"],"additionalProperties":true},"seats":{"type":"array","items":{"type":"object","additionalProperties":true},"maxItems":64},"blockers":{"type":"array","items":{"type":"object","additionalProperties":true},"maxItems":64}},"required":["part","status"],"additionalProperties":false},"maxItems":16}}},{"type":"null"}]},"blockers":{"type":"array","items":{"type":"object","additionalProperties":true},"maxItems":64},"config":{"anyOf":[{"type":"object","properties":{"version":{"type":"integer","minimum":1},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"contractSha256":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]},"tiersSha256":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]},"source":{"type":"string","enum":["active","pinned","lkg"]}},"required":["version","sha256","source"],"additionalProperties":false},{"type":"null"}]},"classification":{"anyOf":[{"type":"object","properties":{"tier":{"type":"string"},"floor":{"type":"string"},"drivers":{"type":"array","items":{"type":"string"},"maxItems":5},"classes":{"type":"array","items":{"type":"string"},"maxItems":64},"overrides":{"type":"array","items":{"type":"object","additionalProperties":true},"maxItems":500}},"required":["tier","floor"],"additionalProperties":false},{"type":"null"}]},"seats":{"type":"array","items":{"type":"object","additionalProperties":true},"maxItems":256},"timings":{"type":"object","properties":{"queuedMs":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"wallMs":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["queuedMs","wallMs"],"additionalProperties":false},"queuePosition":{"type":"integer","minimum":0}},"required":["review"],"additionalProperties":false}}}}},"x-scope":"foundry:read","x-effect":"read"}},"/v1/finance":{"get":{"operationId":"finance.summary.get","summary":"finance summary get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinanceSummary"}}}}},"x-scope":"finance:read","x-effect":"read"}},"/v1/finance/status":{"get":{"operationId":"finance.status.get","summary":"finance status get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinanceStatus"}}}}},"x-scope":"finance:read","x-effect":"read"}},"/v1/finance/quickbooks/status":{"get":{"operationId":"finance.quickbooks.status","summary":"finance quickbooks status","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickBooksStatus"}}}}},"x-scope":"finance:read","x-effect":"read"}},"/v1/connections":{"get":{"operationId":"connections.references.list","summary":"connections references list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionReferences"}}}}},"x-scope":"finance:read","x-effect":"read"}},"/v1/finance/sync":{"post":{"operationId":"finance.sync.start","summary":"finance sync start","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"202":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sync"}}}}},"x-scope":"finance:sync","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/finance/quickbooks/profit":{"get":{"operationId":"finance.quickbooks.profit","summary":"finance quickbooks profit","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["last","mtd"]}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profit"}}}}},"x-scope":"finance:read","x-effect":"read"}},"/v1/keys/{keyId}/mandate":{"get":{"operationId":"keys.mandate.get","summary":"Read existing key usage policy and UTC settlement-window exposure plus all open reservations. No key, account or policy is created.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"keyId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z2-7]{8}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"mandate":{"type":"object","properties":{"keyId":{"type":"string","pattern":"^[a-z2-7]{8}$"},"configured":{"type":"boolean"},"usagePerRunMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"usagePerDayMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"usagePerMonthMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedBy":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"dayExposureMicroUsd":{"type":"string","pattern":"^[0-9]+$"},"monthExposureMicroUsd":{"type":"string","pattern":"^[0-9]+$"},"dayRemainingMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"monthRemainingMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["keyId","configured","usagePerRunMicroUsd","usagePerDayMicroUsd","usagePerMonthMicroUsd","version","updatedBy","updatedAt","dayExposureMicroUsd","monthExposureMicroUsd","dayRemainingMicroUsd","monthRemainingMicroUsd"],"additionalProperties":false}},"required":["mandate"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read"},"post":{"operationId":"keys.mandate.set","summary":"Owner/admin or active root key configures a nonroot agent key usage mandate with CAS. Missing/zero caps deny new prepaid holds; root policy cannot change. Does not enable billing.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"keyId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z2-7]{8}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["version"],"additionalProperties":false}}}}},"x-scope":"billing:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"usagePerRunMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"usagePerDayMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"usagePerMonthMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740990}},"required":["usagePerRunMicroUsd","usagePerDayMicroUsd","usagePerMonthMicroUsd","expectedVersion"],"additionalProperties":false}}}}}},"/v1/budgets":{"get":{"operationId":"budgets.get","summary":"Read the optional company usage budget. All open reservations plus captures settled in the UTC month count; no financial account is created.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"budget":{"type":"object","properties":{"configured":{"type":"boolean"},"usagePerMonthMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"exposureMicroUsd":{"type":"string","pattern":"^[0-9]+$"},"remainingMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"window":{"const":"UTC settlement month plus all open reservations"}},"required":["configured","usagePerMonthMicroUsd","version","exposureMicroUsd","remainingMicroUsd","window"],"additionalProperties":false}},"required":["budget"],"additionalProperties":false}}}}},"x-scope":"billing:read","x-effect":"read"},"post":{"operationId":"budgets.set","summary":"Restrict existing prepaid usage with a company budget. Owner/admin or active root key only; CAS required. Zero denies new holds; no new spending authority.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["version"],"additionalProperties":false}}}}},"x-scope":"billing:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"usagePerMonthMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740990}},"required":["usagePerMonthMicroUsd","expectedVersion"],"additionalProperties":false}}}}}},"/v1/balance":{"get":{"operationId":"balance.get","summary":"balance get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"credit.balance.v1"},"tenant":{"type":"string"},"card":{"const":"cost.v0"},"buckets":{"type":"object","properties":{"paid":{"type":"object","properties":{"available":{"type":"integer","minimum":0,"maximum":9007199254740991},"held":{"type":"integer","minimum":0,"maximum":9007199254740991},"spent":{"type":"integer","minimum":0,"maximum":9007199254740991},"expired":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["available","held","spent","expired"],"additionalProperties":false},"promo":{"type":"object","properties":{"available":{"type":"integer","minimum":0,"maximum":9007199254740991},"held":{"type":"integer","minimum":0,"maximum":9007199254740991},"spent":{"type":"integer","minimum":0,"maximum":9007199254740991},"expired":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["available","held","spent","expired"],"additionalProperties":false}},"required":["paid","promo"],"additionalProperties":false},"state":{"type":"string","enum":["empty","ok"]},"reconciliationNeeded":{"type":"boolean"}},"required":["schema","tenant","card","buckets","state","reconciliationNeeded"],"additionalProperties":false}}}}},"x-scope":"billing:read","x-effect":"read"}},"/v1/balance/entries":{"get":{"operationId":"balance.entries.list","summary":"balance entries list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"before","in":"query","required":false,"schema":{"type":"string","maxLength":256}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"bucket":{"type":"string","enum":["paid","promo"]},"debit":{"type":"string"},"credit":{"type":"string"},"amountMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"card":{"const":"cost.v0"},"at":{"type":"string"}},"required":["id","bucket","debit","credit","amountMicroUsd","card","at"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["entries","nextCursor"],"additionalProperties":false}}}}},"x-scope":"billing:read","x-effect":"read"}},"/v1/credits/topups":{"post":{"operationId":"credits.topups.create","summary":"credits topups create","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"topup":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"amountMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"const":"USD"},"method":{"const":"link"},"state":{"type":"string","enum":["pending","settled","failed","expired","reversed"]},"createdAt":{"type":"string"},"settledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"reconciliationNeeded":{"type":"boolean"}},"required":["id","amountMicroUsd","currency","method","state","createdAt","settledAt","reconciliationNeeded"],"additionalProperties":false},"handoff":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}},"required":["topup"],"additionalProperties":false}}}}},"x-scope":"billing:fund","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amountUsd":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,2})?$"},"method":{"type":"string","enum":["link","challenge"]}},"required":["amountUsd","method"],"additionalProperties":false}}}}}},"/v1/credits/topups/{id}":{"get":{"operationId":"credits.topups.get","summary":"credits topups get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"topup":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"amountMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"const":"USD"},"method":{"const":"link"},"state":{"type":"string","enum":["pending","settled","failed","expired","reversed"]},"createdAt":{"type":"string"},"settledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"reconciliationNeeded":{"type":"boolean"}},"required":["id","amountMicroUsd","currency","method","state","createdAt","settledAt","reconciliationNeeded"],"additionalProperties":false}},"required":["topup"],"additionalProperties":false}}}}},"x-scope":"billing:read","x-effect":"read"}},"/v1/handoffs":{"get":{"operationId":"handoffs.list","summary":"handoffs list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"handoffs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"topupId":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"kind":{"type":"string","enum":["fund","connect","decide"]},"purpose":{"type":"string","enum":["credits","connect","decide"]},"connector":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string","enum":["pending","done","cancelled","expired"]},"createdAt":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","topupId","kind","purpose","connector","url","state","createdAt","expiresAt"],"additionalProperties":false}}},"required":["handoffs"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read"},"post":{"operationId":"handoffs.create","summary":"Ask a person to decide an exact subject. Kind decide only: the subject hash, a title of at most 120 characters, the operation that would run on approval, and an optional expiry. Any principal of the tenant may ask; the ask carries no authority and runs nothing.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"handoff":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"kind":{"const":"decide"},"title":{"type":"string","minLength":1,"maxLength":120},"subjectHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"operation":{"type":"string","minLength":3,"maxLength":120},"askedBy":{"type":"string","maxLength":120},"askedByKind":{"type":"string","enum":["person","agent"]},"blocks":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}]},"costMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"reversible":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"state":{"type":"string","enum":["pending","done","cancelled","expired"]},"at":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"decided":{"anyOf":[{"type":"object","properties":{"decision":{"type":"string","enum":["approved","rejected"]},"by":{"type":"string","maxLength":120},"at":{"type":"string"}},"required":["decision","by","at"],"additionalProperties":false},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}},"required":["id","kind","title","subjectHash","operation","askedBy","askedByKind","blocks","costMicroUsd","reversible","state","at","expiresAt","decided","note"],"additionalProperties":false},"created":{"type":"boolean"}},"required":["handoff","created"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"const":"decide"},"subjectHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"title":{"type":"string","minLength":1,"maxLength":120},"operation":{"type":"string","minLength":3,"maxLength":120,"pattern":"^[a-z][a-z0-9]*(?:\\.[a-z0-9]+){1,5}$"},"blocks":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}]},"costMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"reversible":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["kind","subjectHash","title","operation"],"additionalProperties":false}}}}}},"/v1/handoffs/{id}":{"get":{"operationId":"handoffs.get","summary":"handoffs get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"handoff":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"topupId":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"kind":{"type":"string","enum":["fund","connect","decide"]},"purpose":{"type":"string","enum":["credits","connect","decide"]},"connector":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string","enum":["pending","done","cancelled","expired"]},"createdAt":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","topupId","kind","purpose","connector","url","state","createdAt","expiresAt"],"additionalProperties":false}},"required":["handoff"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read"}},"/v1/handoffs/{id}/cancel":{"post":{"operationId":"handoffs.cancel","summary":"handoffs cancel","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"handoff":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"topupId":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"kind":{"type":"string","enum":["fund","connect","decide"]},"purpose":{"type":"string","enum":["credits","connect","decide"]},"connector":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string","enum":["pending","done","cancelled","expired"]},"createdAt":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","topupId","kind","purpose","connector","url","state","createdAt","expiresAt"],"additionalProperties":false}},"required":["handoff"],"additionalProperties":false}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/brain":{"get":{"operationId":"brain.get","summary":"brain get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brain"}}}}},"x-scope":"brain:read","x-effect":"read"},"post":{"operationId":"brain.save","summary":"brain save","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainSaved"}}}}},"x-scope":"brain:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"setting":{"type":"object","properties":{"kind":{"type":"string","enum":["none","context"]},"text":{"type":"string","maxLength":12288},"title":{"type":"string","maxLength":128},"source":{"type":"string","maxLength":256},"observedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["kind","text","title","source","observedAt"],"additionalProperties":false,"allOf":[{"if":{"properties":{"kind":{"const":"none"}}},"then":{"properties":{"text":{"const":""},"title":{"const":""},"source":{"const":""},"observedAt":{"const":null}}},"else":{"properties":{"text":{"pattern":"\\S"}}}}],"x-runtime-constraints":["UTF-8 bytes text<=12288/title<=128/source<=256; observedAt is canonical Date.toISOString() or null."]}},"required":["expectedVersion","setting"],"additionalProperties":false}}}}}},"/v1/brain/health":{"get":{"operationId":"brain.health","summary":"brain health","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainHealth"}}}}},"x-scope":"brain:read","x-effect":"read"}},"/v1/brain/records":{"get":{"operationId":"brain.records.list","summary":"brain records list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"in","in":"query","required":false,"schema":{"type":"string","enum":["records","documents"]}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["decision","policy","fact","claim","commitment","lesson","preference","metric","result","profile","file","summary"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["tentative","observed","confirmed","disputed","superseded","retracted"]}},{"name":"source","in":"query","required":false,"schema":{"type":"string","pattern":"^SRC-[0-9]{4}$"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":256}},{"name":"limit","in":"query","required":false,"schema":{"type":"string","pattern":"^[1-9][0-9]{0,2}$"}},{"name":"history","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainRecords"}}}}},"x-scope":"brain:read","x-effect":"read"},"post":{"operationId":"brain.records.write","summary":"brain records write","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainRecordWritten"}}}}},"x-scope":"brain:observe","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["decision","policy","fact","claim","commitment","lesson","preference","metric","result","profile","file","summary"]},"title":{"type":"string","minLength":1,"maxLength":300},"body":{"type":"string","maxLength":8192},"evidence":{"type":"array","items":{"type":"object","properties":{"eid":{"type":"string","maxLength":64},"quote":{"type":"string","minLength":1,"maxLength":500},"range_start":{"type":"integer","minimum":0},"range_end":{"type":"integer","minimum":0}},"required":["eid","quote"],"additionalProperties":false},"maxItems":20},"status":{"type":"string","enum":["tentative","observed","confirmed","disputed","superseded","retracted"]},"supersedes":{"type":"string","pattern":"^[A-Z]{3}-[0-9]{4,}$"},"confirm":{"type":"string","pattern":"^[A-Z]{3}-[0-9]{4,}$"},"reason":{"type":"string","maxLength":1000},"terms":{"type":"string","maxLength":500},"entity_kind":{"type":"string","enum":["offer","product","customer","person","competitor","asset","experiment","goal"]},"about":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":8},"measure":{"type":"object","properties":{"metric":{"type":"string","minLength":1,"maxLength":80},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"unit":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"period":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["metric"],"additionalProperties":false},"dueAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"uses":{"type":"string","enum":["internal","public"]}},"required":[],"additionalProperties":false}}}}}},"/v1/brain/records/{id}/retraction":{"post":{"operationId":"brain.records.retract","summary":"brain records retract","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Z]{3}-[0-9]{4,}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainRecordWritten"}}}}},"x-scope":"brain:approve","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":1000}},"required":["reason"],"additionalProperties":false}}}}}},"/v1/brain/read":{"post":{"operationId":"brain.read","summary":"brain read","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainRead"}}}}},"x-scope":"brain:read","x-effect":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Z]{2,4}-[0-9]{4,}(?:\\.[0-9]+)?$"},"max_chars":{"type":"integer","minimum":1,"maximum":20000},"history":{"type":"boolean"},"evidence":{"type":"boolean"},"as_of":{"type":"string","format":"date-time"}},"required":[],"additionalProperties":false}}}}}},"/v1/brain/brief":{"post":{"operationId":"brain.brief","summary":"brain brief","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainBrief"}}}}},"x-scope":"brain:read","x-effect":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ask":{"type":"string","maxLength":2000},"task":{"type":"string","maxLength":300},"role":{"type":"string","enum":["plan","work","merge"]},"max_chars":{"type":"integer","minimum":1,"maximum":24000},"stable_chars":{"type":"integer","minimum":0,"maximum":7000},"agent":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"team":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"person":{"type":"string","pattern":"^[a-z0-9-]{2,64}$"},"since":{"type":"string","pattern":"^[0-9]{1,12}\\.[0-9]{1,12}$"},"entities":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":8},"uses":{"type":"string","enum":["internal","public"]},"explain":{"type":"boolean"}},"required":[],"additionalProperties":false}}}}}},"/v1/brain/entities":{"get":{"operationId":"brain.entities.list","summary":"brain entities list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["offer","product","customer","person","competitor","asset","experiment","goal"]}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainEntities"}}}}},"x-scope":"brain:read","x-effect":"read"}},"/v1/brain/search":{"post":{"operationId":"brain.search","summary":"brain search","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainSearch"}}}}},"x-scope":"brain:read","x-effect":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":500},"limit":{"type":"integer","minimum":1,"maximum":50},"include_history":{"type":"boolean"},"kinds":{"type":"array","items":{"type":"string","enum":["decision","policy","fact","claim","commitment","lesson","preference","metric","result","profile","file","summary"]},"maxItems":12},"uses":{"type":"string","enum":["internal","public"]},"entity":{"type":"string","maxLength":120},"since":{"type":"string","format":"date-time"},"until":{"type":"string","format":"date-time"},"in":{"type":"string","enum":["all","records","passages"]},"source":{"type":"string","maxLength":40}},"required":[],"additionalProperties":false}}}}}},"/v1/brain/sources":{"get":{"operationId":"brain.sources.list","summary":"List the tenant's registered sources. No credential is stored on a source row. sync_error says why a source's newest sync failed: a closed code and a short reason, never content.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^SRC-[0-9]{4}$"},"kind":{"type":"string"},"name":{"type":"string"},"mode":{"type":"string","enum":["mirror","feed"]},"trust":{"type":"string","enum":["owner","member","agent","external","system"]},"audience":{"type":"string","enum":["company","team","owner"]},"audience_team":{"anyOf":[{"type":"string"},{"type":"null"}]},"uses":{"type":"array","items":{"type":"string","enum":["internal","public"]}},"start_status":{"type":"string","enum":["tentative","observed","confirmed"]},"state":{"type":"string"},"places":{"type":"array","items":{"type":"string"}},"carries_files":{"type":"boolean"},"retention_days":{"anyOf":[{"type":"integer","minimum":0,"maximum":3650},{"type":"null"}]},"skip_rules":{"type":"string"},"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_sync_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"next_due_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"type":"string"},"loads":{"type":"integer","minimum":0},"items":{"type":"integer","minimum":0},"held_load":{"anyOf":[{"type":"string","pattern":"^LOD-[0-9]{4}$"},{"type":"null"}]},"sync_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"reason":{"type":"string"},"at":{"type":"string"},"attempts":{"type":"integer","minimum":0},"retrying":{"type":"boolean"}},"required":[],"additionalProperties":false},{"type":"null"}]}},"required":[],"additionalProperties":false}}},"required":["sources"],"additionalProperties":false}}}}},"x-scope":"brain:read","x-effect":"read"},"post":{"operationId":"brain.sources.save","summary":"Create or update a source. A key cannot raise trust to owner or a starting status to confirmed.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"object","properties":{"id":{"type":"string","pattern":"^SRC-[0-9]{4}$"},"kind":{"type":"string"},"name":{"type":"string"},"mode":{"type":"string","enum":["mirror","feed"]},"trust":{"type":"string","enum":["owner","member","agent","external","system"]},"audience":{"type":"string","enum":["company","team","owner"]},"audience_team":{"anyOf":[{"type":"string"},{"type":"null"}]},"uses":{"type":"array","items":{"type":"string","enum":["internal","public"]}},"start_status":{"type":"string","enum":["tentative","observed","confirmed"]},"state":{"type":"string"},"places":{"type":"array","items":{"type":"string"}},"carries_files":{"type":"boolean"},"retention_days":{"anyOf":[{"type":"integer","minimum":0,"maximum":3650},{"type":"null"}]},"skip_rules":{"type":"string"},"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_sync_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"next_due_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"type":"string"}},"required":[],"additionalProperties":false}},"required":["source"],"additionalProperties":false}}}}},"x-scope":"brain:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^SRC-[0-9]{4}$"},"kind":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,23}$"},"name":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"mode":{"type":"string","enum":["mirror","feed"]},"trust":{"type":"string","enum":["owner","member","agent","external","system"]},"audience":{"type":"string","enum":["company","team","owner"]},"audience_team":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"uses":{"type":"array","items":{"type":"string","enum":["internal","public"]},"minItems":1,"uniqueItems":true},"start_status":{"type":"string","enum":["tentative","observed","confirmed"]},"places":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":200},"skip_rules":{"type":"string","maxLength":2000},"retention_days":{"type":"integer","minimum":0,"maximum":3650},"carries_files":{"type":"boolean"},"connection_id":{"type":"string","maxLength":64},"state":{"type":"string","enum":["active","paused"]}},"required":["name"],"additionalProperties":false}}}}}},"/v1/brain/sources/{source}/removal":{"post":{"operationId":"brain.sources.remove","summary":"Stop a source. What it already sent stays readable.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"source","in":"path","required":true,"schema":{"type":"string","pattern":"^SRC-[0-9]{4}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean"},"id":{"type":"string","pattern":"^SRC-[0-9]{4}$"},"reason":{"type":"string"}},"required":["removed","id"],"additionalProperties":false}}}}},"x-scope":"brain:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}},"required":[],"additionalProperties":false}}}}}},"/v1/brain/sources/{source}/items":{"post":{"operationId":"brain.items.push","summary":"Push up to 100 items. Each is answered stored, duplicate, wanted, skipped or refused; a credential is refused and never stored. An item may carry `upload` in place of `text`: the upload's derived text becomes the document, and an upload with no text is refused with the reason.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"source","in":"path","required":true,"schema":{"type":"string","pattern":"^SRC-[0-9]{4}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"outcomes":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"status":{"type":"string","enum":["stored","duplicate","wanted","skipped","refused"]},"reason":{"type":"string"},"class":{"type":"string"},"id":{"type":"string"}},"required":["key","status"],"additionalProperties":false}},"dry_run":{"type":"boolean"},"load":{"anyOf":[{"type":"string","pattern":"^LOD-[0-9]{4}$"},{"type":"null"}]}},"required":["outcomes"],"additionalProperties":false}}}}},"x-scope":"brain:ingest","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"load":{"type":"string","pattern":"^LOD-[0-9]{4}$"},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":200},"hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"kind":{"type":"string","enum":["document","transcript","message","typed"]},"title":{"type":"string","maxLength":300},"text":{"type":"string","maxLength":2097152},"upload":{"type":"string","pattern":"^[a-f0-9]{32}$"},"at":{"type":"string","format":"date-time"},"author":{"type":"object","properties":{"label":{"type":"string","maxLength":200},"ref":{"type":"string","maxLength":200},"own":{"type":"boolean"}},"required":[],"additionalProperties":false},"audience":{"type":"string","enum":["company","team","owner"]},"audience_team":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"uses":{"type":"array","items":{"type":"string","enum":["internal","public"]},"minItems":1,"uniqueItems":true},"links":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50},"terms":{"type":"string","maxLength":1000},"typed":{"type":"object","properties":{"kind":{"type":"string","enum":["decision","policy","fact","commitment","lesson","metric","result","profile","role"]},"fields":{"type":"object","properties":{"title":{"type":"string","maxLength":300},"body":{"type":"string","maxLength":8192},"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"replaces":{"type":"string","maxLength":64}},"required":["key"],"additionalProperties":false},"minItems":1,"maxItems":100}},"required":["items"],"additionalProperties":false}}}}}},"/v1/brain/sources/{source}/withdrawals":{"post":{"operationId":"brain.items.withdraw","summary":"Withdraw named source items. A record resting on one alone becomes a tombstone; one citing more is listed for a person.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"source","in":"path","required":true,"schema":{"type":"string","pattern":"^SRC-[0-9]{4}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"withdrawn":{"type":"array","items":{"type":"string"}},"listed":{"type":"array","items":{"type":"string"}}},"required":["withdrawn"],"additionalProperties":false}}}}},"x-scope":"brain:ingest","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100},"reason":{"type":"string","maxLength":500}},"required":["keys"],"additionalProperties":false}}}}}},"/v1/brain/sources/{source}/loads":{"post":{"operationId":"brain.loads.create","summary":"Open a load. A dry run runs the checks and stores nothing.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"source","in":"path","required":true,"schema":{"type":"string","pattern":"^SRC-[0-9]{4}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"load":{"type":"object","properties":{"id":{"type":"string","pattern":"^LOD-[0-9]{4}$"},"source":{"type":"string","pattern":"^SRC-[0-9]{4}$"},"dry_run":{"type":"boolean"},"state":{"type":"string","enum":["open","finished","held"]},"complete":{"type":"boolean"},"named":{"type":"integer","minimum":0},"stored":{"type":"integer","minimum":0},"duplicate":{"type":"integer","minimum":0},"refused":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0},"opened_by":{"type":"string"},"opened_at":{"type":"string"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"receipt":{"type":["object","null"],"additionalProperties":true}},"required":["id","state"],"additionalProperties":false}},"required":["load"],"additionalProperties":false}}}}},"x-scope":"brain:ingest","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dry_run":{"type":"boolean"}},"required":[],"additionalProperties":false}}}}}},"/v1/brain/loads/{id}/finish":{"post":{"operationId":"brain.loads.finish","summary":"Finish a load and account for every item. A complete load that would withdraw more than a fifth withdraws none and is held; on a held load, confirm withdraws what it did not name and keep withdraws nothing.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^LOD-[0-9]{4}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"load":{"type":"object","properties":{"id":{"type":"string","pattern":"^LOD-[0-9]{4}$"},"source":{"type":"string","pattern":"^SRC-[0-9]{4}$"},"dry_run":{"type":"boolean"},"state":{"type":"string","enum":["open","finished","held"]},"complete":{"type":"boolean"},"named":{"type":"integer","minimum":0},"stored":{"type":"integer","minimum":0},"duplicate":{"type":"integer","minimum":0},"refused":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0},"opened_by":{"type":"string"},"opened_at":{"type":"string"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"receipt":{"type":["object","null"],"additionalProperties":true}},"required":["id","state"],"additionalProperties":false},"receipt":{"type":"object","additionalProperties":true}},"required":["load"],"additionalProperties":false}}}}},"x-scope":"brain:ingest","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"complete":{"type":"boolean"},"confirm":{"type":"boolean"},"keep":{"type":"boolean"}},"required":[],"additionalProperties":false}}}}}},"/v1/brain/loads/{id}":{"get":{"operationId":"brain.loads.get","summary":"Read one load and its receipt.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^LOD-[0-9]{4}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"load":{"type":"object","properties":{"id":{"type":"string","pattern":"^LOD-[0-9]{4}$"},"source":{"type":"string","pattern":"^SRC-[0-9]{4}$"},"dry_run":{"type":"boolean"},"state":{"type":"string","enum":["open","finished","held"]},"complete":{"type":"boolean"},"named":{"type":"integer","minimum":0},"stored":{"type":"integer","minimum":0},"duplicate":{"type":"integer","minimum":0},"refused":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0},"opened_by":{"type":"string"},"opened_at":{"type":"string"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"receipt":{"type":["object","null"],"additionalProperties":true}},"required":["id","state"],"additionalProperties":false}},"required":["load"],"additionalProperties":false}}}}},"x-scope":"brain:read","x-effect":"read"}},"/v1/brain/files":{"get":{"operationId":"brain.files.list","summary":"The company file tree.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"version":{"type":"integer","minimum":1},"status":{"type":"string"},"trust":{"type":"string","enum":["owner","member","agent","external","system"]},"updated_at":{"type":"string"},"head_chars":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"waiting":{"type":["object","null"],"additionalProperties":true}},"required":[],"additionalProperties":false}}},"required":["files"],"additionalProperties":false}}}}},"x-scope":"brain:read","x-effect":"read"}},"/v1/brain/files/{path}":{"get":{"operationId":"brain.files.get","summary":"One file, with an optional outline of tokens for DESIGN.md. With as_of, the version the file had at that time, whether or not a later one has superseded it; a path that held no file then is not found. With history, every version and who wrote it. The path is percent-encoded in the URL. A DESIGN.md may name a mark, an image or a font as upload:<id>; with tokens, `uploads` answers each one's type, size and state, and a removed upload is listed as state=missing with the file's own text unchanged.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9%._~-]+$","maxLength":200}},{"name":"as_of","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"history","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"tokens","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"},"version":{"type":"integer","minimum":1},"text":{"type":"string"},"status":{"type":"string"},"trust":{"type":"string","enum":["owner","member","agent","external","system"]},"updated_at":{"type":"string"},"id":{"type":"string"},"history":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer"},"status":{"type":"string"},"updated_at":{"type":"string"},"reason":{"type":"string"},"author":{"type":"string"}},"required":["version","status","updated_at","reason","author"],"additionalProperties":false}},"tokens":{"type":"object","properties":{"colors":{"type":"object","additionalProperties":{"type":"string"}},"typography":{"type":"object","additionalProperties":{"type":"string"}},"spacing":{"type":"object","additionalProperties":{"type":"string"}}},"required":[],"additionalProperties":false},"uploads":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"group":{"type":"string"},"id":{"type":"string"},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"state":{"type":"string"},"sha256":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["token","id","state"],"additionalProperties":false}},"errors":{"type":"array","items":{"type":"string"}}},"required":["path","version","text"],"additionalProperties":false}}}}},"x-scope":"brain:read","x-effect":"read"},"post":{"operationId":"brain.files.put","summary":"Write a file as a record and a document. A principal without brain:approve is refused needs_approval; a mandate takes a signed-in owner.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9%._~-]+$","maxLength":200}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["live","proposed"]},"path":{"type":"string"},"version":{"type":"integer","minimum":1},"id":{"type":"string"},"tokens":{"type":"object","properties":{},"required":[],"additionalProperties":false},"errors":{"type":"array","items":{"type":"string"}}},"required":["status","path","version"],"additionalProperties":false}}}}},"x-scope":"brain:observe","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":200000},"base":{"type":"integer","minimum":1},"reason":{"type":"string","maxLength":500}},"required":["text"],"additionalProperties":false}}}}}},"/v1/brain/files/{path}/removal":{"post":{"operationId":"brain.files.remove","summary":"Retract a file. A signed-in owner only.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9%._~-]+$","maxLength":200}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean"},"path":{"type":"string"},"version":{"type":"integer"}},"required":["removed","path"],"additionalProperties":false}}}}},"x-scope":"brain:approve","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}},"required":[],"additionalProperties":false}}}}}},"/v1/brain/audit":{"get":{"operationId":"brain.audit.list","summary":"The tenant audit log.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string","pattern":"^[1-9][0-9]{0,2}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"id":{"type":"string"},"operation":{"type":"string"},"principal":{"type":"string"},"objects":{"type":"array","items":{"type":"string"}},"request":{"type":"string"}},"required":[],"additionalProperties":false}},"next":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["entries"],"additionalProperties":false}}}}},"x-scope":"brain:configure","x-effect":"read"}},"/v1/brain/exports":{"post":{"operationId":"brain.exports.create","summary":"Start an export: a manifest with counts and a hash of each part.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^EXP-[0-9]{4}$"},"state":{"type":"string"},"created_at":{"type":"string"},"counts":{"type":"object","properties":{},"required":[],"additionalProperties":false},"parts":{"type":"array","items":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"manifest":{"type":"object","properties":{},"required":[],"additionalProperties":false},"note":{"type":"string"}},"required":["id","state"],"additionalProperties":false}}}}},"x-scope":"brain:export","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/brain/exports/{id}":{"get":{"operationId":"brain.exports.get","summary":"An export and its part hashes.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^EXP-[0-9]{4}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^EXP-[0-9]{4}$"},"state":{"type":"string"},"created_at":{"type":"string"},"counts":{"type":"object","properties":{},"required":[],"additionalProperties":false},"parts":{"type":"array","items":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"manifest":{"type":"object","properties":{},"required":[],"additionalProperties":false},"note":{"type":"string"}},"required":["id","state"],"additionalProperties":false}}}}},"x-scope":"brain:export","x-effect":"read"}},"/v1/brain/exports/{id}/parts/{n}":{"get":{"operationId":"brain.exports.part","summary":"One part of an export as line-delimited JSON, generated from the export's snapshot instant.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^EXP-[0-9]{4}$"}},{"name":"n","in":"path","required":true,"schema":{"type":"string","pattern":"^[1-9][0-9]{0,2}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^EXP-[0-9]{4}$"},"n":{"type":"integer","minimum":1},"name":{"type":"string"},"sha256":{"type":"string"},"text":{"type":"string"}},"required":["id","n","text"],"additionalProperties":false}}}}},"x-scope":"brain:export","x-effect":"read"}},"/v1/brain/erasures":{"post":{"operationId":"brain.erasures.create","summary":"Erase one evidence row, a source item, a source, a person's reference, or the whole brain (what=brain, id=the tenant). The receipt is issued only after a read-back finds nothing in the database or the bucket.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^ERA-[0-9]{4}$"},"state":{"type":"string"},"receipt":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"required":["id","state"],"additionalProperties":false}}}}},"x-scope":"brain:erase","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"what":{"type":"string","enum":["evidence","source_item","source","person","brain"]},"id":{"type":"string","maxLength":200},"reason":{"type":"string","maxLength":500}},"required":["what","id"],"additionalProperties":false}}}}}},"/v1/brain/erasures/{id}":{"get":{"operationId":"brain.erasures.get","summary":"An erasure receipt: the counts, the bucket objects deleted and verified, the read-back, and what erase cannot reach.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^ERA-[0-9]{4}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^ERA-[0-9]{4}$"},"state":{"type":"string"},"receipt":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"required":["id","state"],"additionalProperties":false}}}}},"x-scope":"brain:erase","x-effect":"read"}},"/v1/brain/librarian/proposals":{"get":{"operationId":"brain.librarian.proposals.list","summary":"brain librarian proposals list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"state","in":"query","required":false,"schema":{"type":"string","enum":["open","approved","rejected","expired"]}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["decision","policy","fact","claim","commitment","lesson","preference","metric","result","profile","file","summary"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"string","pattern":"^[1-9][0-9]?$"}},{"name":"id","in":"query","required":false,"schema":{"type":"string","pattern":"^PRP-[0-9]{4,}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainLibrarianProposals"}}}}},"x-scope":"brain:read","x-effect":"read"}},"/v1/brain/librarian/proposals/{id}/decision":{"post":{"operationId":"brain.librarian.proposals.decide","summary":"brain librarian proposals decide","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^PRP-[0-9]{4,}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainLibrarianProposalDecided"}}}}},"x-scope":"brain:approve","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","reject"]},"reason":{"type":"string","maxLength":1000}},"required":["decision"],"additionalProperties":false}}}}}},"/v1/brain/librarian":{"get":{"operationId":"brain.librarian.status","summary":"brain librarian status","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainLibrarian"}}}}},"x-scope":"brain:read","x-effect":"read"}},"/v1/brain/librarian/run":{"post":{"operationId":"brain.librarian.run","summary":"brain librarian run","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainLibrarianRun"}}}}},"x-scope":"brain:observe","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"repository":{"type":"string","minLength":3,"maxLength":201,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.-]{0,99}/[A-Za-z0-9_.-]{1,100}$"},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":200},"text":{"type":"string","maxLength":4000}},"required":["path","text"],"additionalProperties":false},"maxItems":12},"manifest":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500},"at":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"dailyBudgetUsd":{"type":"number","minimum":0,"maximum":50}},"required":["repository","commit","files"],"additionalProperties":false}}}}}},"/v1/connections/catalog":{"get":{"operationId":"connections.catalog.get","summary":"Every connector this company can use, in pages of 24. `q` is a search term: every word matches the start of a word in an app's name, summary or categories. `category` narrows to one category and `filter` to the recommended apps (`featured`) or the ones this company has connected (`connected`). A first read with none of them also carries `connected`, `featured` and `categories`, so a page paints from one answer. `cursor` is the `nextCursor` of the previous answer. The answer carries `needs`: the connectors this search matched that the company has not connected, so one call answers what must I connect for this task. Every connector, its tools and the count are the `connectors` and `connector_tools` rows the sync wrote, not a constant.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":80}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"category","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9&+ -]{1,40}$"}},{"name":"filter","in":"query","required":false,"schema":{"type":"string","enum":["all","featured","connected"]}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Catalog"}}}}},"x-scope":"connections:read","x-effect":"read"}},"/v1/connections/settings":{"post":{"operationId":"connections.settings.save","summary":"connections settings save","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"x-scope":"connections:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","enum":["web-search","web-scrape","domains"]},"enabled":{"type":"boolean"},"policy":{"const":"read-only"},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","enabled","expectedVersion"],"additionalProperties":false}}}}}},"/v1/domains/check":{"post":{"operationId":"domains.check","summary":"domains check","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainCheck"}}}}},"x-scope":"domains:read","x-effect":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"names":{"type":"array","items":{"type":"string","maxLength":80},"minItems":1,"maxItems":10}},"required":["names"],"additionalProperties":false}}}}}},"/v1/domains/orders":{"get":{"operationId":"domains.orders.list","summary":"domains orders list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Orders"}}}}},"x-scope":"domains:read","x-effect":"read"},"post":{"operationId":"domains.orders.quote","summary":"domains orders quote","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}}},"x-scope":"domains:purchase","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","maxLength":80},"years":{"type":"integer","minimum":1,"maximum":10},"sourceRun":{"type":"string","pattern":"^[a-f0-9-]{36}$"}},"required":["domain"],"additionalProperties":false}}}}}},"/v1/domains/orders/{id}":{"get":{"operationId":"domains.orders.get","summary":"domains orders get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}}},"x-scope":"domains:read","x-effect":"read"}},"/v1/domains/orders/{id}/approve":{"post":{"operationId":"domains.orders.approve","summary":"domains orders approve","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}}},"x-scope":"domains:purchase","x-effect":"spend","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","maxLength":80},"years":{"type":"integer","minimum":1,"maximum":10},"priceMicroUsd":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["domain","years","priceMicroUsd"],"additionalProperties":false}}}}}},"/v1/domains/orders/{id}/decline":{"post":{"operationId":"domains.orders.decline","summary":"domains orders decline","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}}},"x-scope":"domains:purchase","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/domains/orders/{id}/advance":{"post":{"operationId":"domains.orders.advance","summary":"domains orders advance","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}}},"x-scope":"domains:purchase","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/domains/orders/{id}/site":{"get":{"operationId":"domains.site.get","summary":"domains site get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Site"}}}}},"x-scope":"domains:read","x-effect":"read"}},"/v1/domains/orders/{id}/site/draft":{"post":{"operationId":"domains.site.draft","summary":"domains site draft","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Site"}}}}},"x-scope":"domains:purchase","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"assets":{"type":"object","minProperties":1,"maxProperties":40,"required":["/index.html"],"patternProperties":{"^/[a-zA-Z0-9_/-]+\\.(html|css|js|svg|txt|json)$":{"type":"string"}},"additionalProperties":false}},"required":["assets"],"additionalProperties":false},{"type":"object","properties":{"sourceRun":{"type":"string","pattern":"^[a-f0-9-]{36}$"}},"required":["sourceRun"],"additionalProperties":false}]}}}}}},"/v1/domains/orders/{id}/site/preview":{"post":{"operationId":"domains.site.preview","summary":"domains site preview","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Site"}}}}},"x-scope":"domains:purchase","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revisionId":{"type":"string","pattern":"^[a-f0-9-]{36}$"}},"required":["revisionId"],"additionalProperties":false}}}}}},"/v1/domains/orders/{id}/site/publish":{"post":{"operationId":"domains.site.publish","summary":"domains site publish","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Site"}}}}},"x-scope":"domains:purchase","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revisionId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["revisionId","hash","version"],"additionalProperties":false}}}}}},"/v1/agentos/health":{"get":{"operationId":"agentos.health.get","summary":"agentos health get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agenthealth"}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/agentos/overview":{"get":{"operationId":"agentos.overview.get","summary":"agentos overview get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agentoverview"}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/agentos/launches":{"get":{"operationId":"agentos.launches.list","summary":"agentos launches list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"before","in":"query","required":false,"schema":{"type":"string","maxLength":256}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agentlaunches"}}}}},"x-scope":"agent:read","x-effect":"read"},"post":{"operationId":"agentos.launches.create","summary":"agentos launches create","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"202":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Accepted"}}}}},"x-scope":"agent:create","x-effect":"spend","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ask":{"type":"string","minLength":1,"maxLength":8000,"pattern":"\\S"},"target":{"oneOf":[{"type":"object","properties":{"kind":{"const":"none"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"github"},"repository":{"type":"string","pattern":"^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"}},"required":["kind","repository"],"additionalProperties":false}]},"tier":{"type":"string","enum":["auto","coding","standard","strong","max"]},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500},"agents":{"type":"integer","enum":[1,3]},"attachments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f\\\\/]+$"},"text":{"type":"string"}},"required":["name","text"],"additionalProperties":false},"maxItems":10},"council":{"type":"object","properties":{"mode":{"type":"string","enum":["independent","planned"]},"members":{"type":"array","items":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]},"label":{"type":"string","minLength":1,"maxLength":40,"allOf":[{"pattern":"\\S"},{"pattern":"^[^\\x00-\\x1f]*$"}]},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500},"tools":{"type":"array","items":{"type":"string","enum":["workspace_write","workspace_read","workspace_edit","workspace_grep","github_read","librarian_pass","web_search","web_fetch","web_scrape","domain_check"]},"uniqueItems":true}},"required":["model"],"additionalProperties":false},"minItems":2,"maxItems":8},"synthesizer":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]}},"required":["model"],"additionalProperties":false}},"required":["members","synthesizer"],"additionalProperties":false},"browser":{"type":"object","properties":{"profile":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"domains":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9.-]{0,252}$"},"minItems":1,"maxItems":20},"mode":{"type":"string","enum":["act","read"]}},"required":["profile"],"additionalProperties":false},"goal":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"stop":{"type":"string","minLength":1,"maxLength":500,"pattern":"\\S"},"rounds":{"type":"integer","minimum":1,"maximum":3},"workers":{"type":"integer","minimum":1,"maximum":3}},"required":["key","stop"],"additionalProperties":false},"recipe":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"}},"required":["ask"],"additionalProperties":false,"allOf":[{"if":{"not":{"required":["recipe"]}},"then":{"required":["target"]}}],"not":{"required":["council","agents"],"properties":{"agents":{"const":3}}},"x-runtime-constraints":["Attachment names unique; UTF-8 text <=131072 bytes each and <=262144 total; no NUL. Recipe applied before runtime launch validation. Council budgets/models/tools validated by AgentOS. A goal takes one attachment slot, is refused with agents 3, a council or a repo target, and has at most ten seats: rounds*(1+workers)+1."]}}}}}},"/v1/agentos/models":{"get":{"operationId":"agentos.models.list","summary":"agentos models list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agentmodels"}}}}},"x-scope":"agent:read","x-effect":"read"},"post":{"operationId":"agentos.models.add","summary":"agentos models add","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model"}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"},"search":{"type":"boolean"}},"required":["id"],"additionalProperties":false}}}}}},"/v1/agentos/recipes":{"get":{"operationId":"agentos.recipes.list","summary":"agentos recipes list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agentrecipes"}}}}},"x-scope":"agent:read","x-effect":"read"},"post":{"operationId":"agentos.recipes.save","summary":"agentos recipes save","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Recipe"}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"name":{"type":"string","minLength":1,"maxLength":60,"pattern":"\\S"},"description":{"type":"string","maxLength":240},"instructions":{"type":"string","maxLength":2000},"launch":{"type":"object","properties":{"tier":{"type":"string","enum":["auto","coding","standard","strong","max"]},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500},"agents":{"type":"integer","enum":[1,3]},"council":{"type":"object","properties":{"mode":{"type":"string","enum":["independent","planned"]},"members":{"type":"array","items":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]},"label":{"type":"string","minLength":1,"maxLength":40,"allOf":[{"pattern":"\\S"},{"pattern":"^[^\\x00-\\x1f]*$"}]},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500},"tools":{"type":"array","items":{"type":"string","enum":["workspace_write","workspace_read","workspace_edit","workspace_grep","github_read","librarian_pass","web_search","web_fetch","web_scrape","domain_check"]},"uniqueItems":true}},"required":["model"],"additionalProperties":false},"minItems":2,"maxItems":8},"synthesizer":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]}},"required":["model"],"additionalProperties":false}},"required":["members","synthesizer"],"additionalProperties":false}},"required":[],"additionalProperties":false}},"required":["name"],"additionalProperties":false}}}}}},"/v1/agentos/launches/{id}":{"get":{"operationId":"agentos.launches.get","summary":"agentos launches get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"}}}}},"x-scope":"agent:read","x-effect":"read"},"delete":{"operationId":"agentos.launches.delete","summary":"agentos launches delete","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Removed"}}}}},"x-scope":"agent:delete","x-effect":"write"}},"/v1/agentos/launches/{id}/reply":{"post":{"operationId":"agentos.launches.reply","summary":"agentos launches reply","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"202":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Accepted"}}}}},"x-scope":"agent:create","x-effect":"spend","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ask":{"type":"string","minLength":1,"maxLength":8000,"pattern":"\\S"},"target":{"oneOf":[{"type":"object","properties":{"kind":{"const":"none"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"github"},"repository":{"type":"string","pattern":"^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"}},"required":["kind","repository"],"additionalProperties":false}]},"tier":{"type":"string","enum":["auto","coding","standard","strong","max"]},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500},"agents":{"type":"integer","enum":[1,3]},"attachments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f\\\\/]+$"},"text":{"type":"string"}},"required":["name","text"],"additionalProperties":false},"maxItems":10},"council":{"type":"object","properties":{"mode":{"type":"string","enum":["independent","planned"]},"members":{"type":"array","items":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]},"label":{"type":"string","minLength":1,"maxLength":40,"allOf":[{"pattern":"\\S"},{"pattern":"^[^\\x00-\\x1f]*$"}]},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500},"tools":{"type":"array","items":{"type":"string","enum":["workspace_write","workspace_read","workspace_edit","workspace_grep","github_read","librarian_pass","web_search","web_fetch","web_scrape","domain_check"]},"uniqueItems":true}},"required":["model"],"additionalProperties":false},"minItems":2,"maxItems":8},"synthesizer":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]}},"required":["model"],"additionalProperties":false}},"required":["members","synthesizer"],"additionalProperties":false}},"required":["ask","target"],"additionalProperties":false}}}}}},"/v1/agentos/launches/{id}/retry":{"post":{"operationId":"agentos.launches.retry","summary":"agentos launches retry","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"202":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Control"}}}}},"x-scope":"agent:retry","x-effect":"spend","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/agentos/launches/{id}/stop":{"post":{"operationId":"agentos.launches.stop","summary":"agentos launches stop","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"202":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Control"}}}}},"x-scope":"agent:stop","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/agentos/launches/{id}/conversation":{"get":{"operationId":"agentos.launches.conversation","summary":"agentos launches conversation","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/agentos/launches/{id}/agents/{n}":{"get":{"operationId":"agentos.launches.agent","summary":"agentos launches agent","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}},{"name":"n","in":"path","required":true,"schema":{"type":"string","pattern":"^(?:[1-9]|10)$"}},{"name":"before","in":"query","required":false,"schema":{"type":"string","maxLength":256}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDetail"}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/agentos/launches/{id}/agents/{n}/files/out/{name}":{"get":{"operationId":"agentos.launches.file","summary":"agentos launches file","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}},{"name":"n","in":"path","required":true,"schema":{"type":"string","pattern":"^(?:[1-9]|10)$"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,80}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/agentos/launches/{id}/proposal":{"get":{"operationId":"agentos.launches.proposal.get","summary":"agentos launches proposal get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proposal"}}}}},"x-scope":"agent:read","x-effect":"read"},"post":{"operationId":"agentos.launches.proposal.create","summary":"agentos launches proposal create","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalReceipt"}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approve":{"const":true},"artifactHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"connectionVersion":{"type":"string"}},"required":["approve","artifactHash","connectionVersion"],"additionalProperties":false}}}}}},"/v1/agentos/models/remove":{"post":{"operationId":"agentos.models.remove","summary":"agentos models remove","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Control"}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160}},"required":["id"],"additionalProperties":false}}}}}},"/v1/agentos/recipes/remove":{"post":{"operationId":"agentos.recipes.remove","summary":"agentos recipes remove","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Control"}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160}},"required":["id"],"additionalProperties":false}}}}}},"/v1/agentos/connections/github":{"get":{"operationId":"agentos.github.get","summary":"agentos github get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHub"}}}}},"x-scope":"agent:read","x-effect":"read"},"post":{"operationId":"agentos.github.configure","summary":"agentos github configure","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHub"}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"token":{"type":"string","pattern":"^github_pat_[A-Za-z0-9_]{20,240}$","writeOnly":true}},"required":["token"],"additionalProperties":false},{"type":"object","properties":{"allowed":{"type":"array","items":{"type":"string"},"maxItems":30}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"disconnect":{"const":true}},"required":["disconnect"],"additionalProperties":false}]}}}}}},"/v1/agentos/connections/builtin":{"get":{"operationId":"agentos.connectors.builtin","summary":"agentos connectors builtin","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Builtin"}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/members":{"get":{"operationId":"members.list","summary":"The company roster. Without a selector the legacy answer is returned unchanged. `view=active` returns effective role, grants, revision and a stable next cursor in pages of 25; `view=pending` returns open invitations, with the address only for a privileged reader.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"view","in":"query","required":false,"schema":{"type":"string","enum":["active","pending"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9]{1,20}:[a-f0-9-]{36}$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Browser"}}}}},"x-scope":"account:read","x-effect":"read"}},"/v1/membership/invitations":{"post":{"operationId":"members.invite","summary":"Invite a colleague by email. The role defaults to member. One open invitation per address: a new invite supersedes the previous one. The one-time link is returned once to the inviter and stored only as a hash; `email` delivery is answered as manual until a platform mail transport is configured.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Browser"}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254},"role":{"type":"string","enum":["owner","admin","member"]},"scopes":{"type":"array","items":{"type":"string","enum":["agent:read","agent:create","agent:run","agent:stop","agent:retry","agent:delete","account:read","account:admin","finance:read","finance:sync","finance:connection","brain:read","brain:configure","brain:observe","brain:approve","brain:ingest","brain:export","brain:erase","connections:read","connections:configure","capabilities:read","domains:read","domains:purchase","foundry:read","foundry:refresh","billing:read","billing:fund","billing:admin","launch:read","launch:run","launch:decide","loops:read","loops:create","loops:mandate","browser:read","browser:use","browser:profiles","account:provision","registry:review","eval:read","eval:write","eval:decide","order:approve","suppliers:deliver","improve:contribute","contacts:read","contacts:write","channels:read","channels:configure","channels:send","uploads:read","uploads:write","uploads:erase","foundry:write","foundry:review","foundry:work","foundry:decide","foundry:configure","foundry:admit","platform:analyse","outcomes:read","outcomes:record","people:self","people:decide","telemetry:configure","marketing:read","marketing:act"]},"maxItems":67,"uniqueItems":true},"teams":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"maxItems":16,"uniqueItems":true},"delivery":{"type":"string","enum":["email","manual"]}},"required":["email"],"additionalProperties":false}}}}}},"/v1/members/{id}":{"post":{"operationId":"members.update","summary":"Change one membership's role, scopes, teams or delegated responsibilities. A closed change with `expectedVersion`; a change someone else made first answers 409 stale_version. Only an owner may appoint an Executive, change another owner or delegate a responsibility; the last human owner can never be demoted.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Browser"}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","member"]},"scopes":{"type":"array","items":{"type":"string","enum":["agent:read","agent:create","agent:run","agent:stop","agent:retry","agent:delete","account:read","account:admin","finance:read","finance:sync","finance:connection","brain:read","brain:configure","brain:observe","brain:approve","brain:ingest","brain:export","brain:erase","connections:read","connections:configure","capabilities:read","domains:read","domains:purchase","foundry:read","foundry:refresh","billing:read","billing:fund","billing:admin","launch:read","launch:run","launch:decide","loops:read","loops:create","loops:mandate","browser:read","browser:use","browser:profiles","account:provision","registry:review","eval:read","eval:write","eval:decide","order:approve","suppliers:deliver","improve:contribute","contacts:read","contacts:write","channels:read","channels:configure","channels:send","uploads:read","uploads:write","uploads:erase","foundry:write","foundry:review","foundry:work","foundry:decide","foundry:configure","foundry:admit","platform:analyse","outcomes:read","outcomes:record","people:self","people:decide","telemetry:configure","marketing:read","marketing:act"]},"maxItems":67,"uniqueItems":true},"teams":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"maxItems":16,"uniqueItems":true},"grants":{"type":"array","items":{"type":"object","properties":{"responsibility":{"type":"string","enum":["review_brain_facts"]},"expiresAt":{"type":"string","format":"date-time"}},"required":["responsibility","expiresAt"],"additionalProperties":false},"maxItems":8},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/v1/members/{id}/removal":{"post":{"operationId":"members.remove","summary":"Remove one person from the workspace. One transaction disables the membership, revokes that person's sessions and the invitations they issued, and leaves an offboarding marker so a stale invite or JIT cannot recreate them. The last human owner can never be removed; a denied provider-side cleanup is owed, not hidden.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Browser"}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/v1/membership/accept":{"post":{"operationId":"members.accept","summary":"Accept one invitation as the address it names. A signed-in session that matches the invited address accepts directly and is opened into that workspace; otherwise a one-time code (or the legacy password shape) proves the address first. An expired invitation answers 410 once possession is shown; a different identity answers switch_account.","security":[],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Browser"}}}}},"x-scope":null,"x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","pattern":"^[a-f0-9]{64}$"},"email":{"type":"string","maxLength":254},"password":{"type":"string","writeOnly":true,"minLength":12,"maxLength":1024},"code":{"type":"string","pattern":"^[0-9]{6}$"}},"required":["token"],"additionalProperties":false}}}}}},"/v1/launch/entity/prepare":{"post":{"operationId":"launch.entity.prepare","summary":"Prepare immutable local reference-only formation planning; not eligibility, legal consent or provider submission.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"draft":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"launchId":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"revision":{"type":"integer","minimum":1,"maximum":9007199254740991},"baseLaunchVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"preparedLaunchVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"createdAt":{"type":"string"},"snapshot":{"type":"object","properties":{"schema":{"const":"formation.local-planning.v1"},"market":{"const":"us-wyoming"},"concept":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["id","contentHash"],"additionalProperties":false},{"type":"null"}]},"decisions":{"type":"object","properties":{"legal_name":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"confirmationHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["id","version","confirmationHash"],"additionalProperties":false},{"type":"null"}]},"jurisdiction":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"confirmationHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["id","version","confirmationHash"],"additionalProperties":false},{"type":"null"}]},"entity_type":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"confirmationHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["id","version","confirmationHash"],"additionalProperties":false},{"type":"null"}]},"service_choices":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"confirmationHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["id","version","confirmationHash"],"additionalProperties":false},{"type":"null"}]}},"required":["legal_name","jurisdiction","entity_type","service_choices"],"additionalProperties":false},"missing":{"type":"array","items":{"enum":["accepted_concept","confirmed_legal_name","confirmed_jurisdiction","confirmed_entity_type","confirmed_service_choices","secure_founder_ownership_intake","verified_provider_access_and_eligibility","approved_commercial_quote","provider_terms_and_signatures","exact_submission_authority"]},"minItems":0,"maxItems":10,"uniqueItems":true},"status":{"const":"local_draft"},"providerExecutionEnabled":{"const":false},"eligibilityVerified":{"const":false},"legalConsentCaptured":{"const":false},"submissionAuthorized":{"const":false},"providerCompanyCreated":{"const":false}},"required":["schema","market","concept","decisions","missing","status","providerExecutionEnabled","eligibilityVerified","legalConsentCaptured","submissionAuthorized","providerCompanyCreated"],"additionalProperties":false}},"required":["id","launchId","revision","baseLaunchVersion","preparedLaunchVersion","contentHash","createdAt","snapshot"],"additionalProperties":false},{"type":"null"}]},"currentVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"freshness":{"enum":["absent","current","stale"]},"staleReasons":{"type":"array","items":{"enum":["launch_changed","concept_changed","decision_changed","decision_authority_changed","launch_cancelled"]},"maxItems":5,"uniqueItems":true}},"required":["draft","currentVersion","freshness","staleReasons"],"additionalProperties":false}}}}},"x-scope":"launch:run","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":1,"maximum":9007199254740990}},"required":["expectedVersion"],"additionalProperties":false}}}}}},"/v1/launch/entity":{"get":{"operationId":"launch.entity.get","summary":"Read local planning with current reference freshness; absent launch404, no implicit creation.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"draft":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"launchId":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"revision":{"type":"integer","minimum":1,"maximum":9007199254740991},"baseLaunchVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"preparedLaunchVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"createdAt":{"type":"string"},"snapshot":{"type":"object","properties":{"schema":{"const":"formation.local-planning.v1"},"market":{"const":"us-wyoming"},"concept":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["id","contentHash"],"additionalProperties":false},{"type":"null"}]},"decisions":{"type":"object","properties":{"legal_name":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"confirmationHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["id","version","confirmationHash"],"additionalProperties":false},{"type":"null"}]},"jurisdiction":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"confirmationHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["id","version","confirmationHash"],"additionalProperties":false},{"type":"null"}]},"entity_type":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"confirmationHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["id","version","confirmationHash"],"additionalProperties":false},{"type":"null"}]},"service_choices":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"confirmationHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["id","version","confirmationHash"],"additionalProperties":false},{"type":"null"}]}},"required":["legal_name","jurisdiction","entity_type","service_choices"],"additionalProperties":false},"missing":{"type":"array","items":{"enum":["accepted_concept","confirmed_legal_name","confirmed_jurisdiction","confirmed_entity_type","confirmed_service_choices","secure_founder_ownership_intake","verified_provider_access_and_eligibility","approved_commercial_quote","provider_terms_and_signatures","exact_submission_authority"]},"minItems":0,"maxItems":10,"uniqueItems":true},"status":{"const":"local_draft"},"providerExecutionEnabled":{"const":false},"eligibilityVerified":{"const":false},"legalConsentCaptured":{"const":false},"submissionAuthorized":{"const":false},"providerCompanyCreated":{"const":false}},"required":["schema","market","concept","decisions","missing","status","providerExecutionEnabled","eligibilityVerified","legalConsentCaptured","submissionAuthorized","providerCompanyCreated"],"additionalProperties":false}},"required":["id","launchId","revision","baseLaunchVersion","preparedLaunchVersion","contentHash","createdAt","snapshot"],"additionalProperties":false},{"type":"null"}]},"currentVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"freshness":{"enum":["absent","current","stale"]},"staleReasons":{"type":"array","items":{"enum":["launch_changed","concept_changed","decision_changed","decision_authority_changed","launch_cancelled"]},"maxItems":5,"uniqueItems":true}},"required":["draft","currentVersion","freshness","staleReasons"],"additionalProperties":false}}}}},"x-scope":"launch:read","x-effect":"read"}},"/v1/launch/concept/import":{"post":{"operationId":"launch.concept.import","summary":"Import only an existing owned terminal single-agent concept text snapshot; also requires agent:read. No run or provider call.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"artifact":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"kind":{"type":"string","enum":["concept","names"]},"revision":{"type":"integer","minimum":1,"maximum":9007199254740991},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"sourceRunId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"sourceStatus":{"type":"string","enum":["done","failed","stopped","over_budget"]},"sourceCheckedAt":{"type":"string"}},"required":["id","kind","revision","contentHash","sourceRunId","sourceStatus","sourceCheckedAt"],"additionalProperties":false},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["artifact","version"],"additionalProperties":false}}}}},"x-scope":"launch:run","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"expectedVersion":{"type":"integer","minimum":1,"maximum":9007199254740990}},"required":["runId","expectedVersion"],"additionalProperties":false}}}}}},"/v1/launch/names/import":{"post":{"operationId":"launch.names.import","summary":"Import unverified agent name opinions bound to the accepted concept snapshot; also requires agent:read. No screening or domain claim.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"artifact":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"kind":{"type":"string","enum":["concept","names"]},"revision":{"type":"integer","minimum":1,"maximum":9007199254740991},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"sourceRunId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"sourceStatus":{"type":"string","enum":["done","failed","stopped","over_budget"]},"sourceCheckedAt":{"type":"string"}},"required":["id","kind","revision","contentHash","sourceRunId","sourceStatus","sourceCheckedAt"],"additionalProperties":false},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["artifact","version"],"additionalProperties":false}}}}},"x-scope":"launch:run","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"expectedVersion":{"type":"integer","minimum":1,"maximum":9007199254740990}},"required":["runId","expectedVersion"],"additionalProperties":false}}}}}},"/v1/launch/concept/accept":{"post":{"operationId":"launch.concept.accept","summary":"Accept this exact business concept snapshot and version, not a legal name, filing or founder consent.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"artifact":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"kind":{"type":"string","enum":["concept","names"]},"revision":{"type":"integer","minimum":1,"maximum":9007199254740991},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"sourceRunId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"sourceStatus":{"type":"string","enum":["done","failed","stopped","over_budget"]},"sourceCheckedAt":{"type":"string"}},"required":["id","kind","revision","contentHash","sourceRunId","sourceStatus","sourceCheckedAt"],"additionalProperties":false},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["artifact","version"],"additionalProperties":false}}}}},"x-scope":"launch:run","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"artifactId":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"expectedVersion":{"type":"integer","minimum":1,"maximum":9007199254740990}},"required":["artifactId","contentHash","expectedVersion"],"additionalProperties":false}}}}}},"/v1/launch/concept":{"get":{"operationId":"launch.concept.get","summary":"Read current local business draft; missing launch404 never creates records.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"artifact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"kind":{"type":"string","enum":["concept","names"]},"revision":{"type":"integer","minimum":1,"maximum":9007199254740991},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"sourceRunId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"sourceStatus":{"type":"string","enum":["done","failed","stopped","over_budget"]},"sourceCheckedAt":{"type":"string"}},"required":["id","kind","revision","contentHash","sourceRunId","sourceStatus","sourceCheckedAt"],"additionalProperties":false},{"type":"null"}]},"concept":{"anyOf":[{"type":"object","properties":{"business":{"type":"string","minLength":1,"pattern":"^[^<>\\x00-\\x1f\\x7f\\uFFFD]+$","maxLength":2000},"customer":{"type":"string","minLength":1,"pattern":"^[^<>\\x00-\\x1f\\x7f\\uFFFD]+$","maxLength":1000},"problem":{"type":"string","minLength":1,"pattern":"^[^<>\\x00-\\x1f\\x7f\\uFFFD]+$","maxLength":1000},"businessModel":{"type":"string","minLength":1,"pattern":"^[^<>\\x00-\\x1f\\x7f\\uFFFD]+$","maxLength":1000},"risks":{"type":"array","items":{"type":"string","minLength":1,"pattern":"^[^<>\\x00-\\x1f\\x7f\\uFFFD]+$","maxLength":500},"minItems":3,"maxItems":3},"questions":{"type":"array","items":{"type":"string","minLength":1,"pattern":"^[^<>\\x00-\\x1f\\x7f\\uFFFD]+$","maxLength":300},"minItems":0,"maxItems":5}},"required":["business","customer","problem","businessModel","risks","questions"],"additionalProperties":false,"$comment":"Delivered-text snapshot contract. Additional mandatory checks: trimmed plain text; no dedicated identity fields/intake. See02a-local-artifact-intake.md. Hashes/limits describe API-delivered text snapshot UTF-8 bytes, not original filesystem bytes. Reject any delivered or decoded-string U+FFFD; upstream utf8 reads may already have normalized invalid source bytes.","x-maxHttpUtf8Bytes":16384},{"type":"null"}]},"accepted":{"type":"boolean"},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["artifact","concept","accepted","version"],"additionalProperties":false}}}}},"x-scope":"launch:read","x-effect":"read"}},"/v1/launch/names":{"get":{"operationId":"launch.names.list","summary":"Read separate brand/legal agent opinions, not screening or domain availability; missing launch404.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"artifact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"kind":{"type":"string","enum":["concept","names"]},"revision":{"type":"integer","minimum":1,"maximum":9007199254740991},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"sourceRunId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"sourceStatus":{"type":"string","enum":["done","failed","stopped","over_budget"]},"sourceCheckedAt":{"type":"string"}},"required":["id","kind","revision","contentHash","sourceRunId","sourceStatus","sourceCheckedAt"],"additionalProperties":false},{"type":"null"}]},"brand":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9 '&-]{0,79}$"},"kind":{"type":"string","enum":["brand","legal"]},"rank":{"type":"integer","minimum":1,"maximum":40},"rationale":{"type":"string","minLength":1,"pattern":"^[^<>\\x00-\\x1f\\x7f\\uFFFD]+$","maxLength":500}},"required":["name","kind","rank","rationale"],"additionalProperties":false}},"legal":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9 '&-]{0,79}$"},"kind":{"type":"string","enum":["brand","legal"]},"rank":{"type":"integer","minimum":1,"maximum":40},"rationale":{"type":"string","minLength":1,"pattern":"^[^<>\\x00-\\x1f\\x7f\\uFFFD]+$","maxLength":500}},"required":["name","kind","rank","rationale"],"additionalProperties":false}},"provenance":{"const":"unverified_agent_opinion"},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["artifact","brand","legal","provenance","version"],"additionalProperties":false}}}}},"x-scope":"launch:read","x-effect":"read"}},"/v1/launch":{"post":{"operationId":"launch.create","summary":"launch create","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"launch":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"tenantId":{"type":"string"},"idea":{"type":"string"},"market":{"const":"us-wyoming"},"stage":{"type":"string"},"resources":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["concept","name","domain","entity","tax_id","banking","site","compliance"]},"status":{"type":"string","enum":["empty","drafting","drafted","accepted","candidates","screened","chosen","none","selected","order_open","registered","failed","not_started","planning","access_required","draft","validation","awaiting_approval","founder_action","provider_accepted","state_submitted","pending","incorporated","action_required","outcome_unknown","manual_review","not_ordered","waiting_for_entity","waiting_for_signature","provider_processing","submitted_to_irs","confirmed","active","rejected","restricted","building","published"]},"confirmedBy":{"anyOf":[{"type":"string","enum":["provider","founder_reported"]},{"type":"null"}]},"evidence":{"anyOf":[{"type":"object","properties":{"artifactId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["artifactId","contentHash"],"additionalProperties":false},{"type":"null"}]},"dependsOn":{"type":"array","items":{"type":"string","enum":["concept","name","domain","entity","tax_id","banking","site","compliance"]}},"updatedAt":{"type":"string"}},"required":["kind","status","confirmedBy","evidence","dependsOn","updatedAt"],"additionalProperties":false}},"pending":{"type":"array","items":{"type":"object","properties":{"resource":{"type":"string"},"on":{"type":"string","enum":["founder","provider","professional"]},"what":{"type":"string"}},"required":["resource","on","what"],"additionalProperties":false}},"createdAt":{"type":"string"},"createdBy":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","tenantId","idea","market","stage","resources","pending","createdAt","createdBy","version","cancelledAt"],"additionalProperties":false},"filingPartner":{"type":"object","properties":{"mode":{"type":"string","enum":["sandbox","live"]}},"required":["mode"],"additionalProperties":false}},"required":["launch"],"additionalProperties":false}}}}},"x-scope":"launch:run","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"idea":{"type":"string","minLength":1,"maxLength":2000,"pattern":"^[^\\x00-\\x1f]+$"},"market":{"const":"us-wyoming"}},"required":["idea","market"],"additionalProperties":false}}}}},"get":{"operationId":"launch.get","summary":"launch get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"launch":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"tenantId":{"type":"string"},"idea":{"type":"string"},"market":{"const":"us-wyoming"},"stage":{"type":"string"},"resources":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["concept","name","domain","entity","tax_id","banking","site","compliance"]},"status":{"type":"string","enum":["empty","drafting","drafted","accepted","candidates","screened","chosen","none","selected","order_open","registered","failed","not_started","planning","access_required","draft","validation","awaiting_approval","founder_action","provider_accepted","state_submitted","pending","incorporated","action_required","outcome_unknown","manual_review","not_ordered","waiting_for_entity","waiting_for_signature","provider_processing","submitted_to_irs","confirmed","active","rejected","restricted","building","published"]},"confirmedBy":{"anyOf":[{"type":"string","enum":["provider","founder_reported"]},{"type":"null"}]},"evidence":{"anyOf":[{"type":"object","properties":{"artifactId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["artifactId","contentHash"],"additionalProperties":false},{"type":"null"}]},"dependsOn":{"type":"array","items":{"type":"string","enum":["concept","name","domain","entity","tax_id","banking","site","compliance"]}},"updatedAt":{"type":"string"}},"required":["kind","status","confirmedBy","evidence","dependsOn","updatedAt"],"additionalProperties":false}},"pending":{"type":"array","items":{"type":"object","properties":{"resource":{"type":"string"},"on":{"type":"string","enum":["founder","provider","professional"]},"what":{"type":"string"}},"required":["resource","on","what"],"additionalProperties":false}},"createdAt":{"type":"string"},"createdBy":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","tenantId","idea","market","stage","resources","pending","createdAt","createdBy","version","cancelledAt"],"additionalProperties":false},"filingPartner":{"type":"object","properties":{"mode":{"type":"string","enum":["sandbox","live"]}},"required":["mode"],"additionalProperties":false}},"required":["launch"],"additionalProperties":false}}}}},"x-scope":"launch:read","x-effect":"read"}},"/v1/launch/actions":{"get":{"operationId":"launch.actions.list","summary":"launch actions list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"before","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9]{1,16}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"launchId":{"type":"string"},"tenantId":{"type":"string"},"actor":{"type":"string"},"tool":{"type":"string"},"type":{"type":"string"},"authority":{"type":"string"},"authorizationRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"inputRef":{"type":"string"},"idempotencyKey":{"type":"string"},"status":{"type":"string"},"providerOperationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"evidenceRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextAction":{"anyOf":[{"type":"string"},{"type":"null"}]},"at":{"type":"string"},"supersedes":{"anyOf":[{"type":"string"},{"type":"null"}]},"prevHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"hash":{"type":"string"}},"required":["id","launchId","tenantId","actor","tool","type","authority","authorizationRef","inputRef","idempotencyKey","status","providerOperationId","evidenceRef","errorCode","nextAction","at","supersedes","prevHash","hash"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["actions","nextCursor"],"additionalProperties":false}}}}},"x-scope":"launch:read","x-effect":"read"}},"/v1/launch/audit":{"get":{"operationId":"launch.audit.export","summary":"launch audit export","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"encoding":{"const":"utf8-length-prefix-v1"},"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"launchId":{"type":"string"},"tenantId":{"type":"string"},"actor":{"type":"string"},"tool":{"type":"string"},"type":{"type":"string"},"authority":{"type":"string"},"authorizationRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"inputRef":{"type":"string"},"idempotencyKey":{"type":"string"},"status":{"type":"string"},"providerOperationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"evidenceRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextAction":{"anyOf":[{"type":"string"},{"type":"null"}]},"at":{"type":"string"},"supersedes":{"anyOf":[{"type":"string"},{"type":"null"}]},"prevHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"hash":{"type":"string"}},"required":["id","launchId","tenantId","actor","tool","type","authority","authorizationRef","inputRef","idempotencyKey","status","providerOperationId","evidenceRef","errorCode","nextAction","at","supersedes","prevHash","hash"],"additionalProperties":false}}},"required":["encoding","actions"],"additionalProperties":false}}}}},"x-scope":"launch:read","x-effect":"read"}},"/v1/launch/decisions":{"get":{"operationId":"launch.decisions.list","summary":"launch decisions list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"decisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"launchId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"key":{"type":"string","enum":["legal_name","brand_name","jurisdiction","entity_type","founders","ownership","responsible_party","service_choices","name_options","vesting","tax_elections","designated_representative"]},"proposed":{"anyOf":[{"type":"object","properties":{"value":{"anyOf":[{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},{"const":"us-wyoming"},{"type":"string","enum":["LLC","CCorp"]},{"oneOf":[{"type":"object","properties":{"entityType":{"const":"LLC"},"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"roles":{"type":"array","items":{"type":"string","enum":["member","manager","director","president","secretary","treasurer","shareholder"]},"minItems":1,"maxItems":7,"uniqueItems":true},"ownershipPercent":{"type":"string","pattern":"^(?:100(?:\\.0{1,6})?|[0-9]{1,2}(?:\\.[0-9]{1,6})?)$"}},"required":["name","roles","ownershipPercent"],"additionalProperties":false},"minItems":1,"maxItems":20}},"required":["entityType","people"],"additionalProperties":false},{"type":"object","properties":{"entityType":{"const":"CCorp"},"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"roles":{"type":"array","items":{"type":"string","enum":["member","manager","director","president","secretary","treasurer","shareholder"]},"minItems":1,"maxItems":7,"uniqueItems":true},"shares":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["name","roles","shares"],"additionalProperties":false},"minItems":1,"maxItems":20},"authorizedShares":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["entityType","people","authorizedShares"],"additionalProperties":false}]},{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"ownershipPercent":{"type":"string","pattern":"^(?:100(?:\\.0{1,6})?|[0-9]{1,2}(?:\\.[0-9]{1,6})?)$"}},"required":["name","ownershipPercent"],"additionalProperties":false},"minItems":1,"maxItems":20},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"founderIndex":{"type":"integer","minimum":0,"maximum":19}},"required":["name","founderIndex"],"additionalProperties":false},{"type":"object","properties":{"ein":{"type":"string","enum":["none","standard","expedited"]},"registeredAgent":{"type":"boolean"}},"required":["ein","registeredAgent"],"additionalProperties":false},{"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"minItems":1,"maxItems":3,"uniqueItems":true},{"type":"object","properties":{"enabled":{"type":"boolean"},"months":{"type":"integer","minimum":0,"maximum":120},"cliffMonths":{"type":"integer","minimum":0,"maximum":120}},"required":["enabled","months","cliffMonths"],"additionalProperties":false},{"type":"object","properties":{"election":{"type":"string","enum":["none","s-corp","professional_review"]}},"required":["election"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"role":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\x00-\\x1f]+$"}},"required":["name","role"],"additionalProperties":false}]},"by":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"at":{"type":"string"},"rationale":{"type":"string"},"sources":{"type":"array","items":{"type":"string"}}},"required":["value","by","at","rationale","sources"],"additionalProperties":false},{"type":"null"}]},"confirmed":{"anyOf":[{"type":"object","properties":{"value":{"anyOf":[{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},{"const":"us-wyoming"},{"type":"string","enum":["LLC","CCorp"]},{"oneOf":[{"type":"object","properties":{"entityType":{"const":"LLC"},"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"roles":{"type":"array","items":{"type":"string","enum":["member","manager","director","president","secretary","treasurer","shareholder"]},"minItems":1,"maxItems":7,"uniqueItems":true},"ownershipPercent":{"type":"string","pattern":"^(?:100(?:\\.0{1,6})?|[0-9]{1,2}(?:\\.[0-9]{1,6})?)$"}},"required":["name","roles","ownershipPercent"],"additionalProperties":false},"minItems":1,"maxItems":20}},"required":["entityType","people"],"additionalProperties":false},{"type":"object","properties":{"entityType":{"const":"CCorp"},"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"roles":{"type":"array","items":{"type":"string","enum":["member","manager","director","president","secretary","treasurer","shareholder"]},"minItems":1,"maxItems":7,"uniqueItems":true},"shares":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["name","roles","shares"],"additionalProperties":false},"minItems":1,"maxItems":20},"authorizedShares":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["entityType","people","authorizedShares"],"additionalProperties":false}]},{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"ownershipPercent":{"type":"string","pattern":"^(?:100(?:\\.0{1,6})?|[0-9]{1,2}(?:\\.[0-9]{1,6})?)$"}},"required":["name","ownershipPercent"],"additionalProperties":false},"minItems":1,"maxItems":20},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"founderIndex":{"type":"integer","minimum":0,"maximum":19}},"required":["name","founderIndex"],"additionalProperties":false},{"type":"object","properties":{"ein":{"type":"string","enum":["none","standard","expedited"]},"registeredAgent":{"type":"boolean"}},"required":["ein","registeredAgent"],"additionalProperties":false},{"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"minItems":1,"maxItems":3,"uniqueItems":true},{"type":"object","properties":{"enabled":{"type":"boolean"},"months":{"type":"integer","minimum":0,"maximum":120},"cliffMonths":{"type":"integer","minimum":0,"maximum":120}},"required":["enabled","months","cliffMonths"],"additionalProperties":false},{"type":"object","properties":{"election":{"type":"string","enum":["none","s-corp","professional_review"]}},"required":["election"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"role":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\x00-\\x1f]+$"}},"required":["name","role"],"additionalProperties":false}]},"by":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"at":{"type":"string"}},"required":["value","by","at"],"additionalProperties":false},{"type":"null"}]},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","launchId","key","proposed","confirmed","version"],"additionalProperties":false}}},"required":["decisions"],"additionalProperties":false}}}}},"x-scope":"launch:read","x-effect":"read"}},"/v1/launch/decisions/{key}/propose":{"post":{"operationId":"launch.decisions.propose","summary":"launch decisions propose","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","enum":["legal_name","brand_name","jurisdiction","entity_type","founders","ownership","responsible_party","service_choices","name_options","vesting","tax_elections","designated_representative"]}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"launchId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"key":{"type":"string","enum":["legal_name","brand_name","jurisdiction","entity_type","founders","ownership","responsible_party","service_choices","name_options","vesting","tax_elections","designated_representative"]},"proposed":{"anyOf":[{"type":"object","properties":{"value":{"anyOf":[{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},{"const":"us-wyoming"},{"type":"string","enum":["LLC","CCorp"]},{"oneOf":[{"type":"object","properties":{"entityType":{"const":"LLC"},"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"roles":{"type":"array","items":{"type":"string","enum":["member","manager","director","president","secretary","treasurer","shareholder"]},"minItems":1,"maxItems":7,"uniqueItems":true},"ownershipPercent":{"type":"string","pattern":"^(?:100(?:\\.0{1,6})?|[0-9]{1,2}(?:\\.[0-9]{1,6})?)$"}},"required":["name","roles","ownershipPercent"],"additionalProperties":false},"minItems":1,"maxItems":20}},"required":["entityType","people"],"additionalProperties":false},{"type":"object","properties":{"entityType":{"const":"CCorp"},"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"roles":{"type":"array","items":{"type":"string","enum":["member","manager","director","president","secretary","treasurer","shareholder"]},"minItems":1,"maxItems":7,"uniqueItems":true},"shares":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["name","roles","shares"],"additionalProperties":false},"minItems":1,"maxItems":20},"authorizedShares":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["entityType","people","authorizedShares"],"additionalProperties":false}]},{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"ownershipPercent":{"type":"string","pattern":"^(?:100(?:\\.0{1,6})?|[0-9]{1,2}(?:\\.[0-9]{1,6})?)$"}},"required":["name","ownershipPercent"],"additionalProperties":false},"minItems":1,"maxItems":20},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"founderIndex":{"type":"integer","minimum":0,"maximum":19}},"required":["name","founderIndex"],"additionalProperties":false},{"type":"object","properties":{"ein":{"type":"string","enum":["none","standard","expedited"]},"registeredAgent":{"type":"boolean"}},"required":["ein","registeredAgent"],"additionalProperties":false},{"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"minItems":1,"maxItems":3,"uniqueItems":true},{"type":"object","properties":{"enabled":{"type":"boolean"},"months":{"type":"integer","minimum":0,"maximum":120},"cliffMonths":{"type":"integer","minimum":0,"maximum":120}},"required":["enabled","months","cliffMonths"],"additionalProperties":false},{"type":"object","properties":{"election":{"type":"string","enum":["none","s-corp","professional_review"]}},"required":["election"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"role":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\x00-\\x1f]+$"}},"required":["name","role"],"additionalProperties":false}]},"by":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"at":{"type":"string"},"rationale":{"type":"string"},"sources":{"type":"array","items":{"type":"string"}}},"required":["value","by","at","rationale","sources"],"additionalProperties":false},{"type":"null"}]},"confirmed":{"anyOf":[{"type":"object","properties":{"value":{"anyOf":[{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},{"const":"us-wyoming"},{"type":"string","enum":["LLC","CCorp"]},{"oneOf":[{"type":"object","properties":{"entityType":{"const":"LLC"},"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"roles":{"type":"array","items":{"type":"string","enum":["member","manager","director","president","secretary","treasurer","shareholder"]},"minItems":1,"maxItems":7,"uniqueItems":true},"ownershipPercent":{"type":"string","pattern":"^(?:100(?:\\.0{1,6})?|[0-9]{1,2}(?:\\.[0-9]{1,6})?)$"}},"required":["name","roles","ownershipPercent"],"additionalProperties":false},"minItems":1,"maxItems":20}},"required":["entityType","people"],"additionalProperties":false},{"type":"object","properties":{"entityType":{"const":"CCorp"},"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"roles":{"type":"array","items":{"type":"string","enum":["member","manager","director","president","secretary","treasurer","shareholder"]},"minItems":1,"maxItems":7,"uniqueItems":true},"shares":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["name","roles","shares"],"additionalProperties":false},"minItems":1,"maxItems":20},"authorizedShares":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["entityType","people","authorizedShares"],"additionalProperties":false}]},{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"ownershipPercent":{"type":"string","pattern":"^(?:100(?:\\.0{1,6})?|[0-9]{1,2}(?:\\.[0-9]{1,6})?)$"}},"required":["name","ownershipPercent"],"additionalProperties":false},"minItems":1,"maxItems":20},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"founderIndex":{"type":"integer","minimum":0,"maximum":19}},"required":["name","founderIndex"],"additionalProperties":false},{"type":"object","properties":{"ein":{"type":"string","enum":["none","standard","expedited"]},"registeredAgent":{"type":"boolean"}},"required":["ein","registeredAgent"],"additionalProperties":false},{"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"minItems":1,"maxItems":3,"uniqueItems":true},{"type":"object","properties":{"enabled":{"type":"boolean"},"months":{"type":"integer","minimum":0,"maximum":120},"cliffMonths":{"type":"integer","minimum":0,"maximum":120}},"required":["enabled","months","cliffMonths"],"additionalProperties":false},{"type":"object","properties":{"election":{"type":"string","enum":["none","s-corp","professional_review"]}},"required":["election"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"role":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\x00-\\x1f]+$"}},"required":["name","role"],"additionalProperties":false}]},"by":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"at":{"type":"string"}},"required":["value","by","at"],"additionalProperties":false},{"type":"null"}]},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","launchId","key","proposed","confirmed","version"],"additionalProperties":false}},"required":["decision"],"additionalProperties":false}}}}},"x-scope":"launch:run","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"anyOf":[{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},{"const":"us-wyoming"},{"type":"string","enum":["LLC","CCorp"]},{"oneOf":[{"type":"object","properties":{"entityType":{"const":"LLC"},"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"roles":{"type":"array","items":{"type":"string","enum":["member","manager","director","president","secretary","treasurer","shareholder"]},"minItems":1,"maxItems":7,"uniqueItems":true},"ownershipPercent":{"type":"string","pattern":"^(?:100(?:\\.0{1,6})?|[0-9]{1,2}(?:\\.[0-9]{1,6})?)$"}},"required":["name","roles","ownershipPercent"],"additionalProperties":false},"minItems":1,"maxItems":20}},"required":["entityType","people"],"additionalProperties":false},{"type":"object","properties":{"entityType":{"const":"CCorp"},"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"roles":{"type":"array","items":{"type":"string","enum":["member","manager","director","president","secretary","treasurer","shareholder"]},"minItems":1,"maxItems":7,"uniqueItems":true},"shares":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["name","roles","shares"],"additionalProperties":false},"minItems":1,"maxItems":20},"authorizedShares":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["entityType","people","authorizedShares"],"additionalProperties":false}]},{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"ownershipPercent":{"type":"string","pattern":"^(?:100(?:\\.0{1,6})?|[0-9]{1,2}(?:\\.[0-9]{1,6})?)$"}},"required":["name","ownershipPercent"],"additionalProperties":false},"minItems":1,"maxItems":20},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"founderIndex":{"type":"integer","minimum":0,"maximum":19}},"required":["name","founderIndex"],"additionalProperties":false},{"type":"object","properties":{"ein":{"type":"string","enum":["none","standard","expedited"]},"registeredAgent":{"type":"boolean"}},"required":["ein","registeredAgent"],"additionalProperties":false},{"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"minItems":1,"maxItems":3,"uniqueItems":true},{"type":"object","properties":{"enabled":{"type":"boolean"},"months":{"type":"integer","minimum":0,"maximum":120},"cliffMonths":{"type":"integer","minimum":0,"maximum":120}},"required":["enabled","months","cliffMonths"],"additionalProperties":false},{"type":"object","properties":{"election":{"type":"string","enum":["none","s-corp","professional_review"]}},"required":["election"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"role":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\x00-\\x1f]+$"}},"required":["name","role"],"additionalProperties":false}]},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"rationale":{"type":"string","maxLength":2000},"sources":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^[^\\x00-\\x1f]+$"},"maxItems":10}},"required":["value","expectedVersion","rationale","sources"],"additionalProperties":false}}}}}},"/v1/launch/decisions/{key}/confirm":{"post":{"operationId":"launch.decisions.confirm","summary":"launch decisions confirm","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","enum":["legal_name","brand_name","jurisdiction","entity_type","founders","ownership","responsible_party","service_choices","name_options","vesting","tax_elections","designated_representative"]}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"launchId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"key":{"type":"string","enum":["legal_name","brand_name","jurisdiction","entity_type","founders","ownership","responsible_party","service_choices","name_options","vesting","tax_elections","designated_representative"]},"proposed":{"anyOf":[{"type":"object","properties":{"value":{"anyOf":[{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},{"const":"us-wyoming"},{"type":"string","enum":["LLC","CCorp"]},{"oneOf":[{"type":"object","properties":{"entityType":{"const":"LLC"},"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"roles":{"type":"array","items":{"type":"string","enum":["member","manager","director","president","secretary","treasurer","shareholder"]},"minItems":1,"maxItems":7,"uniqueItems":true},"ownershipPercent":{"type":"string","pattern":"^(?:100(?:\\.0{1,6})?|[0-9]{1,2}(?:\\.[0-9]{1,6})?)$"}},"required":["name","roles","ownershipPercent"],"additionalProperties":false},"minItems":1,"maxItems":20}},"required":["entityType","people"],"additionalProperties":false},{"type":"object","properties":{"entityType":{"const":"CCorp"},"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"roles":{"type":"array","items":{"type":"string","enum":["member","manager","director","president","secretary","treasurer","shareholder"]},"minItems":1,"maxItems":7,"uniqueItems":true},"shares":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["name","roles","shares"],"additionalProperties":false},"minItems":1,"maxItems":20},"authorizedShares":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["entityType","people","authorizedShares"],"additionalProperties":false}]},{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"ownershipPercent":{"type":"string","pattern":"^(?:100(?:\\.0{1,6})?|[0-9]{1,2}(?:\\.[0-9]{1,6})?)$"}},"required":["name","ownershipPercent"],"additionalProperties":false},"minItems":1,"maxItems":20},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"founderIndex":{"type":"integer","minimum":0,"maximum":19}},"required":["name","founderIndex"],"additionalProperties":false},{"type":"object","properties":{"ein":{"type":"string","enum":["none","standard","expedited"]},"registeredAgent":{"type":"boolean"}},"required":["ein","registeredAgent"],"additionalProperties":false},{"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"minItems":1,"maxItems":3,"uniqueItems":true},{"type":"object","properties":{"enabled":{"type":"boolean"},"months":{"type":"integer","minimum":0,"maximum":120},"cliffMonths":{"type":"integer","minimum":0,"maximum":120}},"required":["enabled","months","cliffMonths"],"additionalProperties":false},{"type":"object","properties":{"election":{"type":"string","enum":["none","s-corp","professional_review"]}},"required":["election"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"role":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\x00-\\x1f]+$"}},"required":["name","role"],"additionalProperties":false}]},"by":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"at":{"type":"string"},"rationale":{"type":"string"},"sources":{"type":"array","items":{"type":"string"}}},"required":["value","by","at","rationale","sources"],"additionalProperties":false},{"type":"null"}]},"confirmed":{"anyOf":[{"type":"object","properties":{"value":{"anyOf":[{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},{"const":"us-wyoming"},{"type":"string","enum":["LLC","CCorp"]},{"oneOf":[{"type":"object","properties":{"entityType":{"const":"LLC"},"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"roles":{"type":"array","items":{"type":"string","enum":["member","manager","director","president","secretary","treasurer","shareholder"]},"minItems":1,"maxItems":7,"uniqueItems":true},"ownershipPercent":{"type":"string","pattern":"^(?:100(?:\\.0{1,6})?|[0-9]{1,2}(?:\\.[0-9]{1,6})?)$"}},"required":["name","roles","ownershipPercent"],"additionalProperties":false},"minItems":1,"maxItems":20}},"required":["entityType","people"],"additionalProperties":false},{"type":"object","properties":{"entityType":{"const":"CCorp"},"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"roles":{"type":"array","items":{"type":"string","enum":["member","manager","director","president","secretary","treasurer","shareholder"]},"minItems":1,"maxItems":7,"uniqueItems":true},"shares":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["name","roles","shares"],"additionalProperties":false},"minItems":1,"maxItems":20},"authorizedShares":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["entityType","people","authorizedShares"],"additionalProperties":false}]},{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"ownershipPercent":{"type":"string","pattern":"^(?:100(?:\\.0{1,6})?|[0-9]{1,2}(?:\\.[0-9]{1,6})?)$"}},"required":["name","ownershipPercent"],"additionalProperties":false},"minItems":1,"maxItems":20},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"founderIndex":{"type":"integer","minimum":0,"maximum":19}},"required":["name","founderIndex"],"additionalProperties":false},{"type":"object","properties":{"ein":{"type":"string","enum":["none","standard","expedited"]},"registeredAgent":{"type":"boolean"}},"required":["ein","registeredAgent"],"additionalProperties":false},{"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"minItems":1,"maxItems":3,"uniqueItems":true},{"type":"object","properties":{"enabled":{"type":"boolean"},"months":{"type":"integer","minimum":0,"maximum":120},"cliffMonths":{"type":"integer","minimum":0,"maximum":120}},"required":["enabled","months","cliffMonths"],"additionalProperties":false},{"type":"object","properties":{"election":{"type":"string","enum":["none","s-corp","professional_review"]}},"required":["election"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"role":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\x00-\\x1f]+$"}},"required":["name","role"],"additionalProperties":false}]},"by":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"at":{"type":"string"}},"required":["value","by","at"],"additionalProperties":false},{"type":"null"}]},"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","launchId","key","proposed","confirmed","version"],"additionalProperties":false}},"required":["decision"],"additionalProperties":false}}}}},"x-scope":"launch:decide","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"anyOf":[{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},{"const":"us-wyoming"},{"type":"string","enum":["LLC","CCorp"]},{"oneOf":[{"type":"object","properties":{"entityType":{"const":"LLC"},"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"roles":{"type":"array","items":{"type":"string","enum":["member","manager","director","president","secretary","treasurer","shareholder"]},"minItems":1,"maxItems":7,"uniqueItems":true},"ownershipPercent":{"type":"string","pattern":"^(?:100(?:\\.0{1,6})?|[0-9]{1,2}(?:\\.[0-9]{1,6})?)$"}},"required":["name","roles","ownershipPercent"],"additionalProperties":false},"minItems":1,"maxItems":20}},"required":["entityType","people"],"additionalProperties":false},{"type":"object","properties":{"entityType":{"const":"CCorp"},"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"roles":{"type":"array","items":{"type":"string","enum":["member","manager","director","president","secretary","treasurer","shareholder"]},"minItems":1,"maxItems":7,"uniqueItems":true},"shares":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["name","roles","shares"],"additionalProperties":false},"minItems":1,"maxItems":20},"authorizedShares":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["entityType","people","authorizedShares"],"additionalProperties":false}]},{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"ownershipPercent":{"type":"string","pattern":"^(?:100(?:\\.0{1,6})?|[0-9]{1,2}(?:\\.[0-9]{1,6})?)$"}},"required":["name","ownershipPercent"],"additionalProperties":false},"minItems":1,"maxItems":20},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"founderIndex":{"type":"integer","minimum":0,"maximum":19}},"required":["name","founderIndex"],"additionalProperties":false},{"type":"object","properties":{"ein":{"type":"string","enum":["none","standard","expedited"]},"registeredAgent":{"type":"boolean"}},"required":["ein","registeredAgent"],"additionalProperties":false},{"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"minItems":1,"maxItems":3,"uniqueItems":true},{"type":"object","properties":{"enabled":{"type":"boolean"},"months":{"type":"integer","minimum":0,"maximum":120},"cliffMonths":{"type":"integer","minimum":0,"maximum":120}},"required":["enabled","months","cliffMonths"],"additionalProperties":false},{"type":"object","properties":{"election":{"type":"string","enum":["none","s-corp","professional_review"]}},"required":["election"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f]+$"},"role":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\x00-\\x1f]+$"}},"required":["name","role"],"additionalProperties":false}]},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["value","version"],"additionalProperties":false}}}}}},"/v1/launch/cancel":{"post":{"operationId":"launch.cancel","summary":"launch cancel","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"launch":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"tenantId":{"type":"string"},"idea":{"type":"string"},"market":{"const":"us-wyoming"},"stage":{"type":"string"},"resources":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["concept","name","domain","entity","tax_id","banking","site","compliance"]},"status":{"type":"string","enum":["empty","drafting","drafted","accepted","candidates","screened","chosen","none","selected","order_open","registered","failed","not_started","planning","access_required","draft","validation","awaiting_approval","founder_action","provider_accepted","state_submitted","pending","incorporated","action_required","outcome_unknown","manual_review","not_ordered","waiting_for_entity","waiting_for_signature","provider_processing","submitted_to_irs","confirmed","active","rejected","restricted","building","published"]},"confirmedBy":{"anyOf":[{"type":"string","enum":["provider","founder_reported"]},{"type":"null"}]},"evidence":{"anyOf":[{"type":"object","properties":{"artifactId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["artifactId","contentHash"],"additionalProperties":false},{"type":"null"}]},"dependsOn":{"type":"array","items":{"type":"string","enum":["concept","name","domain","entity","tax_id","banking","site","compliance"]}},"updatedAt":{"type":"string"}},"required":["kind","status","confirmedBy","evidence","dependsOn","updatedAt"],"additionalProperties":false}},"pending":{"type":"array","items":{"type":"object","properties":{"resource":{"type":"string"},"on":{"type":"string","enum":["founder","provider","professional"]},"what":{"type":"string"}},"required":["resource","on","what"],"additionalProperties":false}},"createdAt":{"type":"string"},"createdBy":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","tenantId","idea","market","stage","resources","pending","createdAt","createdBy","version","cancelledAt"],"additionalProperties":false},"filingPartner":{"type":"object","properties":{"mode":{"type":"string","enum":["sandbox","live"]}},"required":["mode"],"additionalProperties":false}},"required":["launch"],"additionalProperties":false}}}}},"x-scope":"launch:run","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/connections/{connector}/start":{"post":{"operationId":"connections.start","summary":"Start connecting an outside account for a subject of this company. For Linear, `teams` (comma-separated team keys, e.g. AC) binds the connection to those teams of a shared workspace (row 07). Linear asks for read unless `write=1`, and a later flush writes only when the token response granted write. Returns a handoff: our own address for a signed-in member of the company to continue at the provider's consent screen. Read connections.list or connections.catalog.get to learn that it finished. No token is returned or stored. With `link=1` and `return=<your own https address>` asked by a key in the company, it instead returns `link`, one single-use address that opens the provider's consent page with no sign-in here and sends the browser back to your own return address, plus `consentUrl`, a provider page already minted; the client never sees this platform (AC-576).","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"connector","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"}},{"name":"subject","in":"query","required":false,"schema":{"type":"string","pattern":"^(company|team|person|agent):[A-Za-z0-9_-]{1,64}$"}},{"name":"teams","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":220,"pattern":"^[A-Za-z][A-Za-z0-9_]{0,9}(,[A-Za-z][A-Za-z0-9_]{0,9})*$"}},{"name":"write","in":"query","required":false,"schema":{"type":"string","const":"1"}},{"name":"link","in":"query","required":false,"schema":{"type":"string","const":"1"}},{"name":"return","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":2048}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"handoff":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"kind":{"const":"connect"},"purpose":{"const":"connect"},"connector":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"url":{"type":"string","format":"uri","pattern":"^https://"},"state":{"const":"pending"},"expiresAt":{"type":"string","format":"date-time"}},"required":["id","kind","purpose","connector","url","state","expiresAt"],"additionalProperties":false},"link":{"anyOf":[{"type":"string","format":"uri","pattern":"^https://"},{"type":"null"}]},"consentUrl":{"anyOf":[{"type":"string","format":"uri","pattern":"^https://"},{"type":"null"}]}},"required":["handoff"],"additionalProperties":false}}}}},"x-scope":"connections:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/brain/observations":{"post":{"operationId":"brain.observe","summary":"Tell the brain something. It is stored once as evidence at the sender's trust and never becomes a record directly. A learning, a correction or a decision becomes a proposal by its label; a run is evidence only; a save is a message a person kept from Slack and becomes a proposal to add a fact; gap says a search found nothing, or found something it could show was wrong, and is read by the nightly curator rather than proposed on its own. outside marks an author who is not a member: that evidence is external, waits for a person and is never quoted.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean"},"reason":{"type":"string"},"evidence":{"type":"string"},"proposal":{"type":"string","pattern":"^PRP-[0-9]{4,}$"},"state":{"type":"string","enum":["open","approved","rejected","expired","dropped"]},"record":{"type":"string"}},"required":["accepted"],"additionalProperties":false}}}}},"x-scope":"brain:observe","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\x21-\\x7e]+$"},"kind":{"type":"string","enum":["run","learning","correction","decision","save","gap"]},"text":{"type":"string","minLength":1,"maxLength":2000},"supersedes":{"type":"string","pattern":"^[A-Z]{3}-[0-9]{4,}$"},"outside":{"type":"boolean"},"provenance":{"type":"object","properties":{"tenant":{"type":"string","maxLength":40},"launch":{"type":"string","maxLength":200},"agent":{"type":"integer","minimum":0},"origin":{"type":"string","enum":["ui","slack","routine","api"]},"actor":{"type":"string","maxLength":200},"target":{"type":"object","properties":{"kind":{"type":"string","maxLength":40},"ref":{"type":"string","maxLength":300}},"required":[],"additionalProperties":false},"at":{"type":"string","maxLength":40},"links":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":20},"context_sources":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":50}},"required":[],"additionalProperties":false}},"required":["id","kind","text"],"additionalProperties":false}}}}}},"/v1/brain/proposals":{"get":{"operationId":"brain.proposals.list","summary":"The review queue, oldest first: what each proposal would change, the text it rests on, who or what proposed it, and whether the caller may decide it. pid reads one proposal, which is what a Slack message names. For a change to a company file, proposer_reason is the reason its proposer gave, empty when none was given; reason is the decision's.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"state","in":"query","required":false,"schema":{"type":"string","enum":["open","approved","rejected","expired","dropped"]}},{"name":"action","in":"query","required":false,"schema":{"type":"string","enum":["add","supersede","retract","file"]}},{"name":"pid","in":"query","required":false,"schema":{"type":"string","pattern":"^PRP-[0-9]{4,}$"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"limit","in":"query","required":false,"schema":{"type":"string","pattern":"^[1-9][0-9]{0,2}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"proposals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^PRP-[0-9]{4,}$"},"action":{"type":"string","enum":["add","supersede","retract","file"]},"kind":{"type":"string"},"state":{"type":"string","enum":["open","approved","rejected","expired","dropped"]},"label":{"type":"string"},"origin":{"type":"string","enum":["api","observation","file"]},"target":{"anyOf":[{"type":"string"},{"type":"null"}]},"base":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"title":{"type":"string"},"text":{"type":"string"},"quote":{"type":"string"},"evidence":{"anyOf":[{"type":"string"},{"type":"null"}]},"evidence_trust":{"anyOf":[{"type":"string"},{"type":"null"}]},"evidence_gone":{"type":"boolean"},"author":{"type":"object","properties":{"kind":{"type":"string","enum":["person","agent"]},"actor":{"type":"string"}},"required":["kind","actor"],"additionalProperties":false},"current":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":1},"title":{"type":"string"},"text":{"type":"string"},"status":{"type":"string"}},"required":["id","version","title","text","status"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"decided_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"decided_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"decided_how":{"anyOf":[{"type":"string","enum":["person","policy"]},{"type":"null"}]},"edited":{"type":"boolean"},"reason":{"type":"string"},"proposer_reason":{"type":"string"},"drop_reason":{"type":"string"},"result":{"anyOf":[{"type":"string"},{"type":"null"}]},"can_decide":{"type":"boolean"},"why_not":{"type":"string","enum":["","scope","person_required","proposer"]}},"required":["id","action","state","title","text","author","created_at","expires_at","can_decide","why_not"],"additionalProperties":false}},"open":{"type":"integer","minimum":0},"next":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["proposals","open","next"],"additionalProperties":false}}}}},"x-scope":"brain:read","x-effect":"read"},"post":{"operationId":"brain.proposals.create","summary":"Propose adding, superseding or retracting a record, or a change to a company file. Nothing changes until a person decides, unless the tenant's policy applies that class without one. The reason given with a file change is kept and shown to whoever decides it. company/MANDATE.md cannot be proposed to.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"proposal":{"type":"object","properties":{"id":{"type":"string","pattern":"^PRP-[0-9]{4,}$"},"state":{"type":"string","enum":["open","approved","rejected","expired","dropped"]},"reason":{"type":"string"},"record":{"type":"string"},"result":{"type":"string"}},"required":["id","state"],"additionalProperties":false}},"required":["proposal"],"additionalProperties":false}}}}},"x-scope":"brain:observe","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["add","supersede","retract","file"]},"kind":{"type":"string","enum":["decision","policy","fact","claim","commitment","lesson","preference","metric","result","profile","file","summary"]},"title":{"type":"string","minLength":1,"maxLength":300},"body":{"type":"string","maxLength":8000},"target":{"type":"string","minLength":1,"maxLength":200},"reason":{"type":"string","maxLength":1000}},"required":["action"],"additionalProperties":false}}}}}},"/v1/brain/proposals/{id}/decision":{"post":{"operationId":"brain.proposals.decide","summary":"Approve, edit and approve, or reject a proposal. A proposal is decided by a signed-in person: every key is refused with 403 person_required, whoever wrote the proposal and whatever scopes the key holds. Whoever proposed a change does not decide it, whatever scopes its principal holds. Deciding twice applies once.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^PRP-[0-9]{4,}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"proposal":{"type":"object","properties":{"id":{"type":"string","pattern":"^PRP-[0-9]{4,}$"},"state":{"type":"string","enum":["open","approved","rejected","expired","dropped"]},"reason":{"type":"string"},"record":{"type":"string"},"result":{"type":"string"}},"required":["id","state"],"additionalProperties":false}},"required":["proposal"],"additionalProperties":false}}}}},"x-scope":"brain:approve","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","reject"]},"reason":{"type":"string","maxLength":1000},"edit":{"type":"object","properties":{"title":{"type":"string","maxLength":300},"body":{"type":"string","maxLength":8000}},"required":[],"additionalProperties":false}},"required":["decision"],"additionalProperties":false}}}}}},"/v1/brain/policy":{"get":{"operationId":"brain.policy.get","summary":"What applies without a person, what never does and why, and whether Slack can be told a proposal is waiting.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":0},"policy":{"type":"object","properties":{"member_statements":{"type":"string","enum":["observed","person"]},"agent_lessons":{"type":"string","enum":["person","observed"]},"learning":{"type":"boolean"},"approvers":{"type":"object","properties":{"where":{"type":"string","enum":["review","slack","both"]}},"required":[],"additionalProperties":false},"models":{"type":"object","properties":{"decision":{"type":"boolean"}},"required":[],"additionalProperties":false},"selftest":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"string","minLength":3,"maxLength":200},"minItems":1,"maxItems":10}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"saved_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"saved_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaults":{"type":"object","properties":{"member_statements":{"type":"string","enum":["observed","person"]},"agent_lessons":{"type":"string","enum":["person","observed"]},"learning":{"type":"boolean"},"approvers":{"type":"object","properties":{"where":{"type":"string","enum":["review","slack","both"]}},"required":[],"additionalProperties":false},"models":{"type":"object","properties":{"decision":{"type":"boolean"}},"required":[],"additionalProperties":false},"selftest":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"string","minLength":3,"maxLength":200},"minItems":1,"maxItems":10}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"locked":{"type":"array","items":{"type":"object","properties":{"rule":{"type":"string"},"why":{"type":"string"}},"required":["rule","why"],"additionalProperties":false}},"slack":{"type":"object","properties":{"installed":{"type":"boolean"},"missing":{"type":"string"}},"required":["installed","missing"],"additionalProperties":false}},"required":["version","policy","defaults","locked","slack"],"additionalProperties":false}}}}},"x-scope":"brain:read","x-effect":"read"},"post":{"operationId":"brain.policy.save","summary":"Save a new version of the policy. Widening what applies without a person also needs brain:approve from a signed-in person.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":0},"policy":{"type":"object","properties":{"member_statements":{"type":"string","enum":["observed","person"]},"agent_lessons":{"type":"string","enum":["person","observed"]},"learning":{"type":"boolean"},"approvers":{"type":"object","properties":{"where":{"type":"string","enum":["review","slack","both"]}},"required":[],"additionalProperties":false},"models":{"type":"object","properties":{"decision":{"type":"boolean"}},"required":[],"additionalProperties":false},"selftest":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"string","minLength":3,"maxLength":200},"minItems":1,"maxItems":10}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"saved_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"saved_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaults":{"type":"object","properties":{"member_statements":{"type":"string","enum":["observed","person"]},"agent_lessons":{"type":"string","enum":["person","observed"]},"learning":{"type":"boolean"},"approvers":{"type":"object","properties":{"where":{"type":"string","enum":["review","slack","both"]}},"required":[],"additionalProperties":false},"models":{"type":"object","properties":{"decision":{"type":"boolean"}},"required":[],"additionalProperties":false},"selftest":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"string","minLength":3,"maxLength":200},"minItems":1,"maxItems":10}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"locked":{"type":"array","items":{"type":"object","properties":{"rule":{"type":"string"},"why":{"type":"string"}},"required":["rule","why"],"additionalProperties":false}},"slack":{"type":"object","properties":{"installed":{"type":"boolean"},"missing":{"type":"string"}},"required":["installed","missing"],"additionalProperties":false}},"required":["version","policy","defaults","locked","slack"],"additionalProperties":false}}}}},"x-scope":"brain:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"base":{"type":"integer","minimum":0},"policy":{"type":"object","properties":{"member_statements":{"type":"string","enum":["observed","person"]},"agent_lessons":{"type":"string","enum":["person","observed"]},"learning":{"type":"boolean"},"approvers":{"type":"object","properties":{"where":{"type":"string","enum":["review","slack","both"]}},"required":[],"additionalProperties":false},"models":{"type":"object","properties":{"decision":{"type":"boolean"}},"required":[],"additionalProperties":false},"selftest":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"string","minLength":3,"maxLength":200},"minItems":1,"maxItems":10}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false}},"required":["base","policy"],"additionalProperties":false}}}}}},"/v1/registry/submissions/{submissionId}/publication":{"post":{"operationId":"registry.publish","summary":"Make one of this company's own validated versions public: its own act, with no review and no person at 0human. Refused for a version whose metadata validation has not passed, and for a deprecated listing. A later update leaves the page absent until the new version is published too.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"submissionId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"submissionId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"slug":{"type":"string"},"version":{"type":"integer","minimum":1},"communityStatus":{"const":"listed"},"publishedAt":{"type":"string"}},"required":["submissionId","slug","version","communityStatus","publishedAt"],"additionalProperties":false}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/registry/submissions/{submissionId}/deprecation":{"post":{"operationId":"registry.deprecate","summary":"Take one of this company's own submissions out of the public read. The page disappears at once; the private record and every contract version stay, and no other tenant is touched.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"submissionId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"submissionId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"slug":{"type":"string"},"communityStatus":{"const":"deprecated"},"deprecatedAt":{"type":"string"},"reason":{"type":"string"}},"required":["submissionId","slug","communityStatus","deprecatedAt","reason"],"additionalProperties":false}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":200}},"required":["reason"],"additionalProperties":false}}}}}},"/v1/registry/submissions/{submissionId}/review":{"post":{"operationId":"registry.review.request","summary":"Step 09e review: the publisher requests a review of one validated version, the operator company's person evaluates the stored contract (its digest of tools, origins, scopes, destinations and prices) and approves it, and the operator can suspend a listing with a recorded reason. It grants nothing: executable stays false (G1).","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"submissionId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityReviewAck"}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/registry/reviews/{reviewId}/evaluate":{"post":{"operationId":"reviews.evaluate","summary":"Step 09e review: the publisher requests a review of one validated version, the operator company's person evaluates the stored contract (its digest of tools, origins, scopes, destinations and prices) and approves it, and the operator can suspend a listing with a recorded reason. It grants nothing: executable stays false (G1).","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"reviewId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityEvaluateAck"}}}}},"x-scope":"registry:review","x-effect":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/registry/reviews/{reviewId}/approve":{"post":{"operationId":"reviews.approve","summary":"Step 09e review: the publisher requests a review of one validated version, the operator company's person evaluates the stored contract (its digest of tools, origins, scopes, destinations and prices) and approves it, and the operator can suspend a listing with a recorded reason. It grants nothing: executable stays false (G1).","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"reviewId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityDecisionAck"}}}}},"x-scope":"registry:review","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"enum":["approve","refuse"]},"note":{"type":"string","maxLength":500}},"required":["decision"],"additionalProperties":false}}}}}},"/v1/registry/submissions/{submissionId}/suspension":{"post":{"operationId":"registry.suspend","summary":"Step 09e review: the publisher requests a review of one validated version, the operator company's person evaluates the stored contract (its digest of tools, origins, scopes, destinations and prices) and approves it, and the operator can suspend a listing with a recorded reason. It grants nothing: executable stays false (G1).","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"submissionId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunitySuspensionAck"}}}}},"x-scope":"registry:review","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"suspend":{"type":"boolean"},"reason":{"enum":["publisher_request","policy","security","ownership","inactive"]},"note":{"type":"string","maxLength":500}},"required":["suspend","reason"],"additionalProperties":false}}}}}},"/v1/recipes":{"post":{"operationId":"recipes.publish","summary":"Publish version 1 of a private, shared or public recipe, or add the next version with expectedVersion. Refused (422 with {path,code} findings) for a manifest with an unknown field, a scope outside the list, a maxSpend above the company budget, a public visibility without a licence, or an over-cap list. A replay of the same idempotency key returns the first version; a different manifest under that key is a 409. It executes nothing.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"recipeId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"version":{"type":"integer","minimum":1},"versionLabel":{"type":"string"},"slug":{"type":"string"},"displayName":{"type":"string"},"authorPublisherId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"visibility":{"type":"string","enum":["private","shared","public"]},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"previousHash":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]},"forkOf":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"forkOfVersion":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"createdAt":{"type":"string"},"review":{"const":"not_reviewed"},"manifest":{"type":"object","properties":{"identity":{"type":"object","properties":{"recipeId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"displayName":{"type":"string","minLength":1,"maxLength":80},"summary":{"type":"string","maxLength":500}},"required":["recipeId","slug","displayName"],"additionalProperties":false},"version":{"type":"object","properties":{"version":{"type":"integer","minimum":1},"versionLabel":{"type":"string","minLength":1,"maxLength":64}},"required":["version","versionLabel"],"additionalProperties":false},"author":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"license":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"url":{"type":"string","maxLength":2048}},"required":["id"],"additionalProperties":false},"maintainer":{"type":"string","minLength":1,"maxLength":120}},"required":["label","maintainer"],"additionalProperties":false},"inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_.-]{0,63}$"},"type":{"type":"string","minLength":1,"maxLength":64},"required":{"type":"boolean"}},"required":["name","type","required"],"additionalProperties":false},"maxItems":32},"outputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"kind":{"type":"string","enum":["text","artifact","record"]}},"required":["name","kind"],"additionalProperties":false},"maxItems":16},"requiredContext":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["company","file","connection"]}},"required":["kind"],"additionalProperties":false},"maxItems":16},"scopes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":32,"uniqueItems":true},"providerDependencies":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","minLength":1,"maxLength":64},"connectorId":{"type":"string","minLength":1,"maxLength":64}},"required":["provider","connectorId"],"additionalProperties":false},"maxItems":16},"estimatedCost":{"type":"object","properties":{"microUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"basis":{"type":"string","maxLength":32},"rateCard":{"type":"string","minLength":1,"maxLength":64}},"required":["microUsd","rateCard"],"additionalProperties":false},"maxSpend":{"type":"object","properties":{"microUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"perRun":{"type":"integer","minimum":0,"maximum":9007199254740991},"perDay":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["microUsd"],"additionalProperties":false},"timeout":{"type":"object","properties":{"seconds":{"type":"integer","minimum":60,"maximum":3600}},"required":["seconds"],"additionalProperties":false},"acceptanceCriteria":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300},"maxItems":16},"artifacts":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":8},"evaluationEvidence":{"type":"object","properties":{"runs":{"type":"integer","minimum":0},"accepted":{"type":"integer","minimum":0},"measuredAt":{"type":"string","minLength":1,"maxLength":64},"evidenceRef":{"type":"string","minLength":1,"maxLength":300}},"required":["evidenceRef"],"additionalProperties":false},"maintenancePolicy":{"type":"object","properties":{"owner":{"type":"string","minLength":1,"maxLength":120},"reviewEveryDays":{"type":"integer","minimum":1,"maximum":3650},"breakagePolicy":{"type":"string","enum":["stop","degrade"]},"supportedUntil":{"type":"string","minLength":1,"maxLength":32}},"required":["owner","breakagePolicy"],"additionalProperties":false},"outcome":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"system":{"type":"string","minLength":1,"maxLength":64},"read":{"type":"string","minLength":1,"maxLength":160},"dedupe":{"type":"string","minLength":1,"maxLength":64}},"required":["id","system","read","dedupe"],"additionalProperties":false},{"type":"null"}]},"visibility":{"type":"string","enum":["private","shared","public"]}},"required":["identity","version","author","inputs","outputs","requiredContext","scopes","providerDependencies","estimatedCost","maxSpend","timeout","acceptanceCriteria","artifacts","evaluationEvidence","maintenancePolicy","visibility"],"additionalProperties":false},"pin":{"anyOf":[{"type":"object","properties":{"version":{"type":"integer","minimum":1},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"scopes":{"type":"array","items":{"type":"string"}},"dataDestinations":{"type":"array","items":{"type":"string"}},"maxSpendMicroUsd":{"type":"integer","minimum":0},"pinnedAt":{"type":"string"}},"required":["version","contentHash","scopes","dataDestinations","maxSpendMicroUsd","pinnedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["recipeId","version","versionLabel","slug","displayName","authorPublisherId","visibility","contentHash","previousHash","createdAt","review","manifest"],"additionalProperties":false}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"manifest":{"type":"object","properties":{"identity":{"type":"object","properties":{"recipeId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"displayName":{"type":"string","minLength":1,"maxLength":80},"summary":{"type":"string","maxLength":500}},"required":["recipeId","slug","displayName"],"additionalProperties":false},"version":{"type":"object","properties":{"version":{"type":"integer","minimum":1},"versionLabel":{"type":"string","minLength":1,"maxLength":64}},"required":["version","versionLabel"],"additionalProperties":false},"author":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"license":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"url":{"type":"string","maxLength":2048}},"required":["id"],"additionalProperties":false},"maintainer":{"type":"string","minLength":1,"maxLength":120}},"required":["label","maintainer"],"additionalProperties":false},"inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_.-]{0,63}$"},"type":{"type":"string","minLength":1,"maxLength":64},"required":{"type":"boolean"}},"required":["name","type","required"],"additionalProperties":false},"maxItems":32},"outputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"kind":{"type":"string","enum":["text","artifact","record"]}},"required":["name","kind"],"additionalProperties":false},"maxItems":16},"requiredContext":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["company","file","connection"]}},"required":["kind"],"additionalProperties":false},"maxItems":16},"scopes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":32,"uniqueItems":true},"providerDependencies":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","minLength":1,"maxLength":64},"connectorId":{"type":"string","minLength":1,"maxLength":64}},"required":["provider","connectorId"],"additionalProperties":false},"maxItems":16},"estimatedCost":{"type":"object","properties":{"microUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"basis":{"type":"string","maxLength":32},"rateCard":{"type":"string","minLength":1,"maxLength":64}},"required":["microUsd","rateCard"],"additionalProperties":false},"maxSpend":{"type":"object","properties":{"microUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"perRun":{"type":"integer","minimum":0,"maximum":9007199254740991},"perDay":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["microUsd"],"additionalProperties":false},"timeout":{"type":"object","properties":{"seconds":{"type":"integer","minimum":60,"maximum":3600}},"required":["seconds"],"additionalProperties":false},"acceptanceCriteria":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300},"maxItems":16},"artifacts":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":8},"evaluationEvidence":{"type":"object","properties":{"runs":{"type":"integer","minimum":0},"accepted":{"type":"integer","minimum":0},"measuredAt":{"type":"string","minLength":1,"maxLength":64},"evidenceRef":{"type":"string","minLength":1,"maxLength":300}},"required":["evidenceRef"],"additionalProperties":false},"maintenancePolicy":{"type":"object","properties":{"owner":{"type":"string","minLength":1,"maxLength":120},"reviewEveryDays":{"type":"integer","minimum":1,"maximum":3650},"breakagePolicy":{"type":"string","enum":["stop","degrade"]},"supportedUntil":{"type":"string","minLength":1,"maxLength":32}},"required":["owner","breakagePolicy"],"additionalProperties":false},"outcome":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"system":{"type":"string","minLength":1,"maxLength":64},"read":{"type":"string","minLength":1,"maxLength":160},"dedupe":{"type":"string","minLength":1,"maxLength":64}},"required":["id","system","read","dedupe"],"additionalProperties":false},{"type":"null"}]},"visibility":{"type":"string","enum":["private","shared","public"]}},"required":["identity","version","author","inputs","outputs","requiredContext","scopes","providerDependencies","estimatedCost","maxSpend","timeout","acceptanceCriteria","artifacts","evaluationEvidence","maintenancePolicy","visibility"],"additionalProperties":false},"expectedVersion":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]}},"required":["manifest"],"additionalProperties":false}}}}},"get":{"operationId":"recipes.list","summary":"The caller's own recipes, plus what is shared with it, plus public ones. Never a private recipe from another company.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"recipes":{"type":"array","items":{"type":"object","properties":{"recipeId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"version":{"type":"integer","minimum":1},"slug":{"type":"string"},"displayName":{"type":"string"},"visibility":{"type":"string","enum":["private","shared","public"]}},"required":["recipeId","version","slug","displayName","visibility"],"additionalProperties":false}}},"required":["recipes"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read"}},"/v1/recipes/{recipeId}":{"get":{"operationId":"recipes.get","summary":"One version of one recipe: its manifest, its hash chain, the caller's pin state and its review state. A private recipe is visible only to its author; a shared one to its author and its grantees; a public one to everyone. Returns the newest visible version when no version is named.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"recipeId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}},{"name":"version","in":"query","required":false,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"recipeId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"version":{"type":"integer","minimum":1},"versionLabel":{"type":"string"},"slug":{"type":"string"},"displayName":{"type":"string"},"authorPublisherId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"visibility":{"type":"string","enum":["private","shared","public"]},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"previousHash":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]},"forkOf":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"forkOfVersion":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"createdAt":{"type":"string"},"review":{"const":"not_reviewed"},"manifest":{"type":"object","properties":{"identity":{"type":"object","properties":{"recipeId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"displayName":{"type":"string","minLength":1,"maxLength":80},"summary":{"type":"string","maxLength":500}},"required":["recipeId","slug","displayName"],"additionalProperties":false},"version":{"type":"object","properties":{"version":{"type":"integer","minimum":1},"versionLabel":{"type":"string","minLength":1,"maxLength":64}},"required":["version","versionLabel"],"additionalProperties":false},"author":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"license":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"url":{"type":"string","maxLength":2048}},"required":["id"],"additionalProperties":false},"maintainer":{"type":"string","minLength":1,"maxLength":120}},"required":["label","maintainer"],"additionalProperties":false},"inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_.-]{0,63}$"},"type":{"type":"string","minLength":1,"maxLength":64},"required":{"type":"boolean"}},"required":["name","type","required"],"additionalProperties":false},"maxItems":32},"outputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"kind":{"type":"string","enum":["text","artifact","record"]}},"required":["name","kind"],"additionalProperties":false},"maxItems":16},"requiredContext":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["company","file","connection"]}},"required":["kind"],"additionalProperties":false},"maxItems":16},"scopes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":32,"uniqueItems":true},"providerDependencies":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","minLength":1,"maxLength":64},"connectorId":{"type":"string","minLength":1,"maxLength":64}},"required":["provider","connectorId"],"additionalProperties":false},"maxItems":16},"estimatedCost":{"type":"object","properties":{"microUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"basis":{"type":"string","maxLength":32},"rateCard":{"type":"string","minLength":1,"maxLength":64}},"required":["microUsd","rateCard"],"additionalProperties":false},"maxSpend":{"type":"object","properties":{"microUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"perRun":{"type":"integer","minimum":0,"maximum":9007199254740991},"perDay":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["microUsd"],"additionalProperties":false},"timeout":{"type":"object","properties":{"seconds":{"type":"integer","minimum":60,"maximum":3600}},"required":["seconds"],"additionalProperties":false},"acceptanceCriteria":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300},"maxItems":16},"artifacts":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":8},"evaluationEvidence":{"type":"object","properties":{"runs":{"type":"integer","minimum":0},"accepted":{"type":"integer","minimum":0},"measuredAt":{"type":"string","minLength":1,"maxLength":64},"evidenceRef":{"type":"string","minLength":1,"maxLength":300}},"required":["evidenceRef"],"additionalProperties":false},"maintenancePolicy":{"type":"object","properties":{"owner":{"type":"string","minLength":1,"maxLength":120},"reviewEveryDays":{"type":"integer","minimum":1,"maximum":3650},"breakagePolicy":{"type":"string","enum":["stop","degrade"]},"supportedUntil":{"type":"string","minLength":1,"maxLength":32}},"required":["owner","breakagePolicy"],"additionalProperties":false},"outcome":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"system":{"type":"string","minLength":1,"maxLength":64},"read":{"type":"string","minLength":1,"maxLength":160},"dedupe":{"type":"string","minLength":1,"maxLength":64}},"required":["id","system","read","dedupe"],"additionalProperties":false},{"type":"null"}]},"visibility":{"type":"string","enum":["private","shared","public"]}},"required":["identity","version","author","inputs","outputs","requiredContext","scopes","providerDependencies","estimatedCost","maxSpend","timeout","acceptanceCriteria","artifacts","evaluationEvidence","maintenancePolicy","visibility"],"additionalProperties":false},"pin":{"anyOf":[{"type":"object","properties":{"version":{"type":"integer","minimum":1},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"scopes":{"type":"array","items":{"type":"string"}},"dataDestinations":{"type":"array","items":{"type":"string"}},"maxSpendMicroUsd":{"type":"integer","minimum":0},"pinnedAt":{"type":"string"}},"required":["version","contentHash","scopes","dataDestinations","maxSpendMicroUsd","pinnedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["recipeId","version","versionLabel","slug","displayName","authorPublisherId","visibility","contentHash","previousHash","createdAt","review","manifest"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read"}},"/v1/recipes/{recipeId}/sharing":{"post":{"operationId":"recipes.share","summary":"Share one version of the caller's own recipe with a named company, or revoke it. Only the author may share; a grant to an unknown company is 404. A shared recipe has no page.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"recipeId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"recipeId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"version":{"type":"integer","minimum":1},"granteeTenantId":{"type":"string"},"kind":{"type":"string","enum":["grant","revoke"]},"sharedAt":{"type":"string"}},"required":["recipeId","version","granteeTenantId","kind","sharedAt"],"additionalProperties":false}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"granteeTenantId":{"type":"string","minLength":1,"maxLength":40},"version":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"revoke":{"type":"boolean"}},"required":["granteeTenantId"],"additionalProperties":false}}}}}},"/v1/recipes/{recipeId}/pin":{"post":{"operationId":"recipes.pin","summary":"Pin one version for a recurring run, recording its hash, scopes, destinations and spend ceiling. A version that adds a scope or a ceiling above the pinned one is refused with 409 widening unless the body carries acceptWidening true, and that acceptance is a person's act: a key is refused with 403 person_only.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"recipeId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"recipeId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"version":{"type":"integer","minimum":1},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"scopes":{"type":"array","items":{"type":"string"}},"maxSpendMicroUsd":{"type":"integer","minimum":0},"pinnedBy":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"acceptWidening":{"type":"boolean"}},"required":["recipeId","version","contentHash","scopes","maxSpendMicroUsd","pinnedBy","acceptWidening"],"additionalProperties":false}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":1},"acceptWidening":{"type":"boolean"}},"required":["version"],"additionalProperties":false}}}}}},"/v1/recipes/{recipeId}/fork":{"post":{"operationId":"recipes.fork","summary":"Fork a readable recipe under the caller's publisher: a new recipeId, forkOf recorded, version 1, private. A later version of the source never appears in the fork. Forking a private recipe is 404.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"recipeId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"recipeId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"version":{"const":1},"forkOf":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"forkOfVersion":{"type":"integer","minimum":1},"slug":{"type":"string"},"visibility":{"const":"private"}},"required":["recipeId","version","forkOf","forkOfVersion","slug","visibility"],"additionalProperties":false}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":1}},"required":["version"],"additionalProperties":false}}}}}},"/v1/suppliers":{"get":{"operationId":"suppliers.list","summary":"The active suppliers and their active offers: price or band, turnaround, labour note, terms version and the related-party flag. An agent reads this to answer can this be done, by whom, how fast, at what price. Nothing here executes or charges.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"suppliers":{"type":"array","items":{"type":"object","properties":{"supplierId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"name":{"type":"string"},"legalEntity":{"type":"string"},"tenantId":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"relatedParty":{"type":"boolean"},"termsVersion":{"type":"string"},"state":{"type":"string","enum":["active","paused","retired"]},"offers":{"type":"array","items":{"type":"object","properties":{"offerId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"service":{"type":"string"},"summary":{"type":"string"},"unit":{"type":"string","enum":["engagement","item","hour","word"]},"priceMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"priceBandLowMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"priceBandHighMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"turnaroundHours":{"type":"integer","minimum":1,"maximum":8760},"labourNote":{"type":"string"},"deliverableKinds":{"type":"array","items":{"type":"string","enum":["document","placement","dataset","review"]},"maxItems":4},"termsVersion":{"type":"string"},"state":{"type":"string","enum":["active","retired"]}},"required":["offerId","service","unit","priceMicroUsd","priceBandLowMicroUsd","priceBandHighMicroUsd","turnaroundHours","labourNote","deliverableKinds","termsVersion","state"],"additionalProperties":false}}},"required":["supplierId","name","relatedParty","state","offers"],"additionalProperties":false}}},"required":["suppliers"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read"}},"/v1/suppliers/orders":{"post":{"operationId":"suppliers.order.quote","summary":"Quote a supplier order for a company: quantity of an offer, and the run that produced it if any. Refused for a retired offer, a paused supplier, an open order for the same offer and run, or a quantity outside the offer's bounds; an earlier open quote for the same offer expires first. No hold is taken and no credit row is written; a banded offer quotes its high end, the not-to-exceed price. The quote expires in 24 hours.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"tenantId":{"type":"string"},"offerId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"supplierId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"supplierName":{"type":"string"},"service":{"type":"string"},"unit":{"type":"string","enum":["engagement","item","hour","word"]},"summary":{"type":"string"},"relatedParty":{"type":"boolean"},"relatedPartySentence":{"type":"string"},"quantity":{"type":"integer","minimum":1,"maximum":10000},"unitPriceMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"const":"USD"},"priceBandLowMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"priceBandHighMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"turnaroundHours":{"type":"integer","minimum":1,"maximum":8760},"labourNote":{"type":"string"},"deliverableKinds":{"type":"array","items":{"type":"string","enum":["document","placement","dataset","review"]},"maxItems":4},"termsVersion":{"type":"string"},"state":{"type":"string","enum":["quoted","approved","paid","delivering","delivered","rejected","accepted","settled","declined","expired","failed","refunded"]},"version":{"type":"integer","minimum":1},"quoteExpiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"approvedBy":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"approvedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"paymentRef":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"sourceRun":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["orderId","tenantId","offerId","supplierId","supplierName","service","unit","summary","relatedParty","relatedPartySentence","quantity","unitPriceMicroUsd","totalMicroUsd","currency","priceBandLowMicroUsd","priceBandHighMicroUsd","turnaroundHours","labourNote","deliverableKinds","termsVersion","state","version","quoteExpiresAt","approvedBy","approvedAt","paymentRef","sourceRun","createdAt","updatedAt"],"additionalProperties":false}}}}},"x-scope":"agent:run","x-effect":"spend","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"offerId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"quantity":{"type":"integer","minimum":1,"maximum":10000},"sourceRun":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]}},"required":["offerId","quantity"],"additionalProperties":false}}}}}},"/v1/suppliers/orders/{orderId}/approval":{"post":{"operationId":"suppliers.order.approve","summary":"A person's approval of the exact quote: every field must match, and any difference is a new quote. A key is refused person_only, before the scope is read. The charge is created on the payer's saved method and the order stays approved until the provider's signed webhook says paid; an answer the provider has not given is reported as unknown and changes nothing.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"order":{"type":"object","properties":{"orderId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"tenantId":{"type":"string"},"offerId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"supplierId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"supplierName":{"type":"string"},"service":{"type":"string"},"unit":{"type":"string","enum":["engagement","item","hour","word"]},"summary":{"type":"string"},"relatedParty":{"type":"boolean"},"relatedPartySentence":{"type":"string"},"quantity":{"type":"integer","minimum":1,"maximum":10000},"unitPriceMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"const":"USD"},"priceBandLowMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"priceBandHighMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"turnaroundHours":{"type":"integer","minimum":1,"maximum":8760},"labourNote":{"type":"string"},"deliverableKinds":{"type":"array","items":{"type":"string","enum":["document","placement","dataset","review"]},"maxItems":4},"termsVersion":{"type":"string"},"state":{"type":"string","enum":["quoted","approved","paid","delivering","delivered","rejected","accepted","settled","declined","expired","failed","refunded"]},"version":{"type":"integer","minimum":1},"quoteExpiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"approvedBy":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"approvedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"paymentRef":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"sourceRun":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["orderId","tenantId","offerId","supplierId","supplierName","service","unit","summary","relatedParty","relatedPartySentence","quantity","unitPriceMicroUsd","totalMicroUsd","currency","priceBandLowMicroUsd","priceBandHighMicroUsd","turnaroundHours","labourNote","deliverableKinds","termsVersion","state","version","quoteExpiresAt","approvedBy","approvedAt","paymentRef","sourceRun","createdAt","updatedAt"],"additionalProperties":false},"waiting":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["order"],"additionalProperties":false}}}}},"x-scope":"order:approve","x-effect":"spend","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"offerId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"quantity":{"type":"integer","minimum":1,"maximum":10000},"unitPriceMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["offerId","quantity","unitPriceMicroUsd","totalMicroUsd"],"additionalProperties":false}}}}}},"/v1/suppliers/orders/{orderId}/delivery":{"post":{"operationId":"suppliers.order.deliver","summary":"The supplier's own act, recorded as such: only a principal of the supplier's tenant may call it, and only for the supplier's own order. started moves a paid order to delivering; the artifact hash moves it to delivered. The note is accepted and not stored: the event log carries paths, codes and amounts only.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"order":{"type":"object","properties":{"orderId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"tenantId":{"type":"string"},"offerId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"supplierId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"supplierName":{"type":"string"},"service":{"type":"string"},"unit":{"type":"string","enum":["engagement","item","hour","word"]},"summary":{"type":"string"},"relatedParty":{"type":"boolean"},"relatedPartySentence":{"type":"string"},"quantity":{"type":"integer","minimum":1,"maximum":10000},"unitPriceMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"const":"USD"},"priceBandLowMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"priceBandHighMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"turnaroundHours":{"type":"integer","minimum":1,"maximum":8760},"labourNote":{"type":"string"},"deliverableKinds":{"type":"array","items":{"type":"string","enum":["document","placement","dataset","review"]},"maxItems":4},"termsVersion":{"type":"string"},"state":{"type":"string","enum":["quoted","approved","paid","delivering","delivered","rejected","accepted","settled","declined","expired","failed","refunded"]},"version":{"type":"integer","minimum":1},"quoteExpiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"approvedBy":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"approvedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"paymentRef":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"sourceRun":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["orderId","tenantId","offerId","supplierId","supplierName","service","unit","summary","relatedParty","relatedPartySentence","quantity","unitPriceMicroUsd","totalMicroUsd","currency","priceBandLowMicroUsd","priceBandHighMicroUsd","turnaroundHours","labourNote","deliverableKinds","termsVersion","state","version","quoteExpiresAt","approvedBy","approvedAt","paymentRef","sourceRun","createdAt","updatedAt"],"additionalProperties":false}},"required":["order"],"additionalProperties":false}}}}},"x-scope":"suppliers:deliver","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"started":{"type":"boolean"},"artifactSha256":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":[],"additionalProperties":false}}}}}},"/v1/suppliers/orders/{orderId}/acceptance":{"post":{"operationId":"suppliers.order.accept","summary":"The buying company's person accepts or rejects the delivery, naming the delivered artifact hash; a hash the order does not hold is a mismatch and the order stays delivered. Never the same principal that delivered it, and never anyone but the buying company; a key is refused person_only. Acceptance settles the order and verifies the originating run in the record with verification_kind human; rejection is the input to a refund that is settled with the provider before it is recorded, and stays rejected while that answer is unknown.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"order":{"type":"object","properties":{"orderId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"tenantId":{"type":"string"},"offerId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"supplierId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"supplierName":{"type":"string"},"service":{"type":"string"},"unit":{"type":"string","enum":["engagement","item","hour","word"]},"summary":{"type":"string"},"relatedParty":{"type":"boolean"},"relatedPartySentence":{"type":"string"},"quantity":{"type":"integer","minimum":1,"maximum":10000},"unitPriceMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"const":"USD"},"priceBandLowMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"priceBandHighMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"turnaroundHours":{"type":"integer","minimum":1,"maximum":8760},"labourNote":{"type":"string"},"deliverableKinds":{"type":"array","items":{"type":"string","enum":["document","placement","dataset","review"]},"maxItems":4},"termsVersion":{"type":"string"},"state":{"type":"string","enum":["quoted","approved","paid","delivering","delivered","rejected","accepted","settled","declined","expired","failed","refunded"]},"version":{"type":"integer","minimum":1},"quoteExpiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"approvedBy":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"approvedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"paymentRef":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"sourceRun":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["orderId","tenantId","offerId","supplierId","supplierName","service","unit","summary","relatedParty","relatedPartySentence","quantity","unitPriceMicroUsd","totalMicroUsd","currency","priceBandLowMicroUsd","priceBandHighMicroUsd","turnaroundHours","labourNote","deliverableKinds","termsVersion","state","version","quoteExpiresAt","approvedBy","approvedAt","paymentRef","sourceRun","createdAt","updatedAt"],"additionalProperties":false},"refund":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["settled","pending","failed","unknown","not_charged"]}},"required":["state"],"additionalProperties":false},{"type":"null"}]}},"required":["order"],"additionalProperties":false}}}}},"x-scope":"order:approve","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accept":{"type":"boolean"},"artifactSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"note":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["accept","artifactSha256"],"additionalProperties":false}}}}}},"/v1/suppliers/orders/{orderId}":{"get":{"operationId":"suppliers.order.get","summary":"One order, its events and its artifacts, for the buying company and for the supplier's own tenant. Nothing for anyone else.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"order":{"type":"object","properties":{"orderId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"tenantId":{"type":"string"},"offerId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"supplierId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"supplierName":{"type":"string"},"service":{"type":"string"},"unit":{"type":"string","enum":["engagement","item","hour","word"]},"summary":{"type":"string"},"relatedParty":{"type":"boolean"},"relatedPartySentence":{"type":"string"},"quantity":{"type":"integer","minimum":1,"maximum":10000},"unitPriceMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"const":"USD"},"priceBandLowMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"priceBandHighMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"turnaroundHours":{"type":"integer","minimum":1,"maximum":8760},"labourNote":{"type":"string"},"deliverableKinds":{"type":"array","items":{"type":"string","enum":["document","placement","dataset","review"]},"maxItems":4},"termsVersion":{"type":"string"},"state":{"type":"string","enum":["quoted","approved","paid","delivering","delivered","rejected","accepted","settled","declined","expired","failed","refunded"]},"version":{"type":"integer","minimum":1},"quoteExpiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"approvedBy":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"approvedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"paymentRef":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"sourceRun":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["orderId","tenantId","offerId","supplierId","supplierName","service","unit","summary","relatedParty","relatedPartySentence","quantity","unitPriceMicroUsd","totalMicroUsd","currency","priceBandLowMicroUsd","priceBandHighMicroUsd","turnaroundHours","labourNote","deliverableKinds","termsVersion","state","version","quoteExpiresAt","approvedBy","approvedAt","paymentRef","sourceRun","createdAt","updatedAt"],"additionalProperties":false},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["quote_created","quote_expired","approved","paid","delivery_started","delivered","accepted","rejected","settled","refunded","failed"]},"actor":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"actorKind":{"anyOf":[{"type":"string","enum":["person","key","system"]},{"type":"null"}]},"state":{"type":"string","enum":["quoted","approved","paid","delivering","delivered","rejected","accepted","settled","declined","expired","failed","refunded"]},"artifactSha256":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]},"detail":{"type":"object","maxProperties":16},"at":{"type":"string"}},"required":["id","kind","state","at"],"additionalProperties":false}},"artifacts":{"type":"array","items":{"type":"object","properties":{"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"kind":{"const":"content"},"recordedAt":{"type":"string"}},"required":["sha256","kind","recordedAt"],"additionalProperties":false}}},"required":["order","events","artifacts"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read"}},"/v1/concierge/mandate":{"get":{"operationId":"concierge.mandate.get","summary":"The one bundled starter mandate text, its version and the review length bound. Read only; no person, tenant or secret argument.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"string"},"text":{"type":"string"},"maxChars":{"type":"integer"},"personId":{"type":"string"}},"required":["version","text","maxChars","personId"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read"}},"/v1/capabilities/search":{"get":{"operationId":"capabilities.search","summary":"Search every connector this company can use, in pages. `q` matches connector names, summaries and tool names; `cursor` is the previous answer's nextCursor. `needs` is the same search's connectors that are not connected yet, so one call also answers what must I connect. Read from the connector catalog, never a constant, and it enables nothing.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":80}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"0human.capabilities.v1"},"tenantId":{"type":"string"},"checkedAt":{"type":"string"},"query":{"anyOf":[{"type":"string"},{"type":"null"}]},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0},"capabilities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"summary":{"type":"string"},"shelf":{"type":"string","enum":["builtin","account"]},"state":{"type":"string"},"policy":{"type":"string"},"custodian":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectable":{"type":"boolean"},"needsConnection":{"type":"boolean"},"toolCount":{"type":"integer","minimum":0},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"effect":{"type":"string","enum":["read","write"]},"policy":{"anyOf":[{"type":"string"},{"type":"null"}]},"supplier":{"anyOf":[{"type":"string"},{"type":"null"}]},"capability":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","effect"],"additionalProperties":false}}},"required":["id","name","summary","shelf","state","policy","connectable","needsConnection","toolCount","tools"],"additionalProperties":false}},"needs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"state":{"type":"string"}},"required":["id","name","state"],"additionalProperties":false}},"ready":{"type":"boolean"}},"required":["schema","tenantId","checkedAt","count","total","capabilities","needs","ready"],"additionalProperties":false}}}}},"x-scope":"capabilities:read","x-effect":"read"}},"/v1/capabilities/inspect":{"get":{"operationId":"capabilities.inspect","summary":"One connector from the same catalog, with its tools, its policy, its custodian and whether this company still has to connect it. A capability that is not offered to this company is a 404, never a partial entry.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"0human.capability.v1"},"tenantId":{"type":"string"},"checkedAt":{"type":"string"},"capability":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"summary":{"type":"string"},"shelf":{"type":"string","enum":["builtin","account"]},"state":{"type":"string"},"policy":{"type":"string"},"custodian":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectable":{"type":"boolean"},"needsConnection":{"type":"boolean"},"toolCount":{"type":"integer","minimum":0},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"effect":{"type":"string","enum":["read","write"]},"policy":{"anyOf":[{"type":"string"},{"type":"null"}]},"supplier":{"anyOf":[{"type":"string"},{"type":"null"}]},"capability":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","effect"],"additionalProperties":false}}},"required":["id","name","summary","shelf","state","policy","connectable","needsConnection","toolCount","tools"],"additionalProperties":false}},"required":["schema","tenantId","checkedAt","capability"],"additionalProperties":false}}}}},"x-scope":"capabilities:read","x-effect":"read"}},"/v1/capabilities/estimate":{"get":{"operationId":"capabilities.estimate","summary":"One total with its parts -- execution, third-party charge, creator fee -- from the stored price and policy columns of the connector catalog. It never calls the publisher: an estimate is arithmetic over rows. A tool with no stored price is refused rather than quoted at zero.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"}},{"name":"tools","in":"query","required":false,"schema":{"type":"string","maxLength":512,"pattern":"^[A-Za-z_][A-Za-z0-9_.-]{0,63}(,[A-Za-z_][A-Za-z0-9_.-]{0,63}){0,15}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"0human.capability-estimate.v1"},"tenantId":{"type":"string"},"checkedAt":{"type":"string"},"capabilityId":{"type":"string"},"currency":{"const":"USD"},"totalMicroUsd":{"type":"integer","minimum":0},"parts":{"type":"object","properties":{"executionMicroUsd":{"type":"integer","minimum":0},"thirdPartyMicroUsd":{"type":"integer","minimum":0},"creatorFeeMicroUsd":{"type":"integer","minimum":0}},"required":["executionMicroUsd","thirdPartyMicroUsd","creatorFeeMicroUsd"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"tool":{"type":"string"},"effect":{"type":"string","enum":["read","write"]},"state":{"type":"string"},"microUsd":{"type":"integer","minimum":0}},"required":["tool","effect","state","microUsd"],"additionalProperties":false}},"basis":{"type":"object","properties":{"execution":{"type":"string"},"thirdParty":{"type":"string"},"creatorFee":{"type":"string"}},"required":["execution","thirdParty","creatorFee"],"additionalProperties":false}},"required":["schema","tenantId","checkedAt","capabilityId","currency","totalMicroUsd","parts","lines","basis"],"additionalProperties":false}}}}},"x-scope":"capabilities:read","x-effect":"read"}},"/v1/capabilities/run":{"post":{"operationId":"capabilities.run","summary":"The one run entry point a discovery result can reach. It refuses every call with `enablement_required` until a company has enabled and connected the capability (step 09g). G1: a listing grants nothing, and no result can be run without an enablement.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"ran":{"const":false},"capabilityId":{"type":"string"},"tool":{"type":"string"},"reason":{"type":"string"}},"required":["ran","capabilityId","tool","reason"],"additionalProperties":false}}}}},"x-scope":"capabilities:read","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"tool":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_.-]{0,63}$"}},"required":["id","tool"],"additionalProperties":false}}}}}},"/v1/keys/{keyId}/teams":{"post":{"operationId":"keys.teams.set","summary":"Place one active key (an agent seat) in teams, replacing its list, with compare-and-swap on expectedVersion. A signed-in owner places a seat in any team; an admin adds or removes only teams the admin is in; a key never places a seat. Audited. The seat then reads the team rows open to agents, and never an owner or a people-only row.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"keyId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z2-7]{8}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z2-7]{8}$"},"teams":{"type":"array","items":{"type":"string"}},"version":{"type":"integer","minimum":1}},"required":["id","teams","version"],"additionalProperties":false}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"teams":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"maxItems":16,"uniqueItems":true},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740990}},"required":["teams","expectedVersion"],"additionalProperties":false}}}}}},"/v1/org/directory":{"get":{"operationId":"org.directory.get","summary":"org directory get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"departments":{"type":"array","items":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"levels":{"type":"array","items":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"assignments":{"type":"array","items":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"reporting":{"type":"array","items":{"type":"object","properties":{},"required":[],"additionalProperties":false}}},"required":["departments","levels","assignments","reporting"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read"}},"/v1/org/departments":{"post":{"operationId":"org.department.set","summary":"Create or rename a department, or move it under another parent. Revision-checked; audited. Cycle rejection runs in the database transaction.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"department":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"required":["department"],"additionalProperties":false}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":120},"parentId":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"effectiveFrom":{"anyOf":[{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},{"type":"null"}]},"effectiveTo":{"anyOf":[{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},{"type":"null"}]},"expectedVersion":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}}}}},"/v1/org/levels":{"post":{"operationId":"org.level.set","summary":"Create or change an ordered level in a ladder. Revision-checked; audited.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"level":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"required":["level"],"additionalProperties":false}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"ladder":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"name":{"type":"string","minLength":1,"maxLength":80},"rank":{"type":"integer","minimum":1},"effectiveFrom":{"anyOf":[{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},{"type":"null"}]},"effectiveTo":{"anyOf":[{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},{"type":"null"}]},"expectedVersion":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]}},"required":["ladder","name","rank"],"additionalProperties":false}}}}}},"/v1/org/assignments":{"post":{"operationId":"org.assignment.set","summary":"Place a verified member in a department and level for an effective interval. The previous open interval closes in the same transaction. Audited.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"assignment":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"required":["assignment"],"additionalProperties":false}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"departmentId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"levelId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"effectiveFrom":{"anyOf":[{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},{"type":"null"}]},"effectiveTo":{"anyOf":[{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},{"type":"null"}]}},"required":["userId","departmentId","levelId"],"additionalProperties":false}}}}}},"/v1/org/reporting":{"post":{"operationId":"org.reporting.set","summary":"Record a primary manager for an effective interval, or end the current line with a null manager. Cycle rejection runs in the database transaction. Audited.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"reporting":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"required":["reporting"],"additionalProperties":false}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"managerId":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"effectiveFrom":{"anyOf":[{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},{"type":"null"}]},"effectiveTo":{"anyOf":[{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},{"type":"null"}]}},"required":["userId"],"additionalProperties":false}}}}}},"/v1/jobs/parked":{"get":{"operationId":"jobs.parked.get","summary":"The parked jobs of this company, one row per queue, with the oldest park and its last error. A parked job failed past its attempts and is not retried again; this read is how it is found.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"parked":{"type":"array","items":{"type":"object","properties":{"queue":{"type":"string","maxLength":32},"parked":{"type":"integer","minimum":0},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["queue","parked","oldest","lastError"],"additionalProperties":false}}},"required":["parked"],"additionalProperties":false}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/jobs/parked/items":{"get":{"operationId":"jobs.parked.list","summary":"The parked jobs of this company, one row each, so an owner can name a job to retry. A parked job is not retried until an owner asks.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"jobs":{"type":"array","items":{"type":"object","properties":{"queue":{"type":"string","maxLength":32},"id":{"type":"string","maxLength":200},"kind":{"type":"string","maxLength":80},"attempts":{"type":"integer","minimum":0},"maxAttempts":{"type":"integer","minimum":0},"parkedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["queue","id","kind","attempts","maxAttempts","parkedAt","lastError"],"additionalProperties":false}}},"required":["jobs"],"additionalProperties":false}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/account/tenants":{"get":{"operationId":"account.tenants.list","summary":"The companies under the caller's account, each with its own budget and this month's usage. Numbers and ids only.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"payer":{"type":"string"},"relatedParty":{"type":"boolean"},"tenants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"enum":["sandbox","active","suspended","closed"]},"payer":{"type":"boolean"},"budgetMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"openMicroUsd":{"type":"string","pattern":"^[0-9]+$"},"capturedMicroUsd":{"type":"string","pattern":"^[0-9]+$"}},"required":[],"additionalProperties":false}}},"required":["account","payer","relatedParty","tenants"],"additionalProperties":false}}}}},"x-scope":"account:provision","x-effect":"read"},"post":{"operationId":"account.tenants.create","summary":"Create an ordinary company under the caller's account, with its first root key. It has its own brain, keys and budget; nothing of it is visible to another company. A signed-in owner also receives a one-time claim token, the same handoff signup returns; a key does not.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"tenant":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"const":"sandbox"},"billing":{"const":"prepaid"},"claimed":{"type":"boolean"},"createdAt":{"type":"string"},"account":{"type":"string","pattern":"^[a-f0-9-]{36}$"}},"required":["id","name","status","billing","claimed","createdAt","account"],"additionalProperties":false},"key":{"$ref":"#/components/schemas/Key"},"claim":{"type":"object","properties":{"kind":{"const":"claim"},"url":{"type":"string"},"token":{"type":"string","pattern":"^[a-f0-9]{64}$"},"expiresAt":{"type":"string","format":"date-time"}},"required":["kind","url","token","expiresAt"],"additionalProperties":false}},"required":["tenant","key"],"additionalProperties":false}}}}},"x-scope":"account:provision","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"budgetMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}}}}},"/v1/account/tenants/{tenantId}/claim":{"post":{"operationId":"account.tenants.claim","summary":"Issue a one-time claim token for an unclaimed sandbox company under the caller's account. Owner only; the token is returned once like a key, and only its hash is kept. Already-claimed companies are refused.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,40}$"}}],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"claim":{"type":"object","properties":{"kind":{"const":"claim"},"url":{"type":"string"},"token":{"type":"string","pattern":"^[a-f0-9]{64}$"},"expiresAt":{"type":"string","format":"date-time"}},"required":["kind","url","token","expiresAt"],"additionalProperties":false}},"required":["claim"],"additionalProperties":false}}}}},"x-scope":"account:provision","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/account/tenants/{tenantId}/close":{"post":{"operationId":"account.tenants.close","summary":"Close a company under the account. Refused while it has an open reservation. Returns a receipt and says what was removed at the custodian and what was not.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,40}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"closed":{"const":true},"receipt":{"type":"object","properties":{"schema":{"const":"credit.tenant-close.v1"},"tenant":{"type":"string"},"account":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"payer":{"type":"string"},"closedAt":{"type":"string"},"capturedMicroUsd":{"type":"string","pattern":"^[0-9]+$"},"keysRevoked":{"type":"integer","minimum":0},"removedAtCustodian":{"type":"integer","minimum":0},"custodianNote":{"type":"string"}},"required":["schema","tenant","account","payer","closedAt","capturedMicroUsd","keysRevoked","removedAtCustodian","custodianNote"],"additionalProperties":false}},"required":["closed","receipt"],"additionalProperties":false}}}}},"x-scope":"account:provision","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/account/tenants/{tenantId}/keys":{"post":{"operationId":"account.tenants.keys.create","summary":"Create a key for a company under the account. It cannot carry a scope the provisioning key does not hold itself, and never a brain:* scope.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,40}$"}}],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Key"}}}}},"x-scope":"account:provision","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"scopes":{"type":"array","items":{"type":"string","enum":["agent:read","agent:create","agent:run","agent:stop","agent:retry","agent:delete","account:read","account:admin","finance:read","finance:sync","finance:connection","brain:read","brain:configure","brain:observe","brain:approve","brain:ingest","brain:export","brain:erase","connections:read","connections:configure","capabilities:read","domains:read","domains:purchase","foundry:read","foundry:refresh","billing:read","billing:fund","billing:admin","launch:read","launch:run","launch:decide","loops:read","loops:create","loops:mandate","browser:read","browser:use","browser:profiles","account:provision","registry:review","eval:read","eval:write","eval:decide","order:approve","suppliers:deliver","improve:contribute","contacts:read","contacts:write","channels:read","channels:configure","channels:send","uploads:read","uploads:write","uploads:erase","foundry:write","foundry:review","foundry:work","foundry:decide","foundry:configure","foundry:admit","platform:analyse","outcomes:read","outcomes:record","people:self","people:decide","telemetry:configure","marketing:read","marketing:act"]},"maxItems":67,"uniqueItems":true},"preset":{"type":"string","enum":["read","read-only","operate","spend","root"]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["name"],"additionalProperties":false,"not":{"required":["scopes","preset"]}}}}}}},"/v1/account/tenants/{tenantId}/keys/{keyId}/revoke":{"post":{"operationId":"account.tenants.keys.revoke","summary":"Revoke a company's key under the account.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,40}$"}},{"name":"keyId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z2-7]{8}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Key"}}}}},"x-scope":"account:provision","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/account/tenants/{tenantId}/budget":{"get":{"operationId":"account.tenants.budget.get","summary":"Read a company's own budget and this month's usage. A company's budget is its own and can only be lower than the account's.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,40}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"budget":{"type":"object","properties":{"configured":{"type":"boolean"},"usagePerMonthMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"exposureMicroUsd":{"type":"string","pattern":"^[0-9]+$"},"remainingMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"window":{"const":"UTC settlement month plus all open reservations"}},"required":["configured","usagePerMonthMicroUsd","version","exposureMicroUsd","remainingMicroUsd","window"],"additionalProperties":false}},"required":["budget"],"additionalProperties":false}}}}},"x-scope":"billing:read","x-effect":"read"},"post":{"operationId":"account.tenants.budget.set","summary":"Set a company's own budget under the account. CAS required; zero denies new holds.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]{1,40}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["version"],"additionalProperties":false}}}}},"x-scope":"billing:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"usagePerMonthMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740990}},"required":["usagePerMonthMicroUsd","expectedVersion"],"additionalProperties":false}}}}}},"/v1/account/usage":{"get":{"operationId":"account.usage.get","summary":"The account's spend this month and each company's share of it. The companies' numbers sum to the account's; a related-party account prints on its own line.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"credit.account-usage.v1"},"account":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"payer":{"type":"string"},"relatedParty":{"type":"boolean"},"capturedMicroUsd":{"type":"string","pattern":"^[0-9]+$"},"companiesCapturedMicroUsd":{"type":"string","pattern":"^[0-9]+$"},"sumMatches":{"type":"boolean"},"companies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"enum":["sandbox","active","suspended","closed"]},"payer":{"type":"boolean"},"budgetMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"openMicroUsd":{"type":"string","pattern":"^[0-9]+$"},"capturedMicroUsd":{"type":"string","pattern":"^[0-9]+$"}},"required":[],"additionalProperties":false}}},"required":["schema","account","payer","relatedParty","capturedMicroUsd","companiesCapturedMicroUsd","sumMatches","companies"],"additionalProperties":false}}}}},"x-scope":"billing:read","x-effect":"read"}},"/v1/billing/invoices":{"get":{"operationId":"billing.invoices.list","summary":"Every Stripe invoice of this payer's billing customer: its date, amount, tax and a link to the document. Read from the billing merchant, never from a copy. A company with no merchant or no funding reads an empty list and the state that says why.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"credit.invoices.v1"},"state":{"type":"string","enum":["ok","unfunded","unconfigured"]},"merchant":{"anyOf":[{"type":"string"},{"type":"null"}]},"mode":{"anyOf":[{"type":"string","enum":["test","live"]},{"type":"null"}]},"invoices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^in_[A-Za-z0-9]+$"},"number":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"status":{"type":"string","enum":["draft","open","paid","void","uncollectible"]},"createdAt":{"type":"string"},"amountMicroUsd":{"type":"string","pattern":"^[0-9]{1,19}$"},"paidMicroUsd":{"type":"string","pattern":"^[0-9]{1,19}$"},"taxMicroUsd":{"type":"string","pattern":"^[0-9]{1,19}$"},"currency":{"const":"USD"},"hostedUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"pdfUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","status","createdAt","amountMicroUsd","paidMicroUsd","taxMicroUsd","currency","hostedUrl","pdfUrl"],"additionalProperties":false}}},"required":["schema","state","merchant","mode","invoices"],"additionalProperties":false}}}}},"x-scope":"billing:read","x-effect":"read"}},"/v1/billing/method":{"get":{"operationId":"billing.method.get","summary":"Whether the payer has a saved payment method at the billing merchant. That is the whole answer: no digit, brand, expiry or fingerprint is stored, returned or displayed.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"credit.method.v1"},"state":{"type":"string","enum":["ok","unfunded","unconfigured"]},"saved":{"type":"boolean"}},"required":["schema","state","saved"],"additionalProperties":false}}}}},"x-scope":"billing:read","x-effect":"read"},"post":{"operationId":"billing.method.save","summary":"Start saving a payment method: a setup-mode Checkout session the person completes at the merchant. The card is entered there, never here, and only a default method can result.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"handoff":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}},"required":["handoff"],"additionalProperties":false}}}}},"x-scope":"billing:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/billing/autotopup":{"get":{"operationId":"billing.autotopup.get","summary":"This payer's auto top-up: off by default, with its trigger, amount and monthly ceiling, and whether a saved method exists to charge. Read only.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"credit.autotopup.v1"},"config":{"type":"object","properties":{"enabled":{"type":"boolean"},"triggerMicroUsd":{"type":"string","pattern":"^[0-9]{1,19}$"},"amountMicroUsd":{"type":"string","pattern":"^[0-9]{1,19}$"},"monthlyCeilingMicroUsd":{"type":"string","pattern":"^[0-9]{1,19}$"},"version":{"type":"integer","minimum":0},"configured":{"type":"boolean"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["enabled","triggerMicroUsd","amountMicroUsd","monthlyCeilingMicroUsd","version","configured"],"additionalProperties":false},"savedMethod":{"type":"boolean"},"minTopupMicroUsd":{"anyOf":[{"type":"string","pattern":"^[0-9]{1,19}$"},{"type":"null"}]},"maxTopupMicroUsd":{"anyOf":[{"type":"string","pattern":"^[0-9]{1,19}$"},{"type":"null"}]},"dailyTopupMicroUsd":{"anyOf":[{"type":"string","pattern":"^[0-9]{1,19}$"},{"type":"null"}]}},"required":["schema","config","savedMethod"],"additionalProperties":false}}}}},"x-scope":"billing:read","x-effect":"read"},"post":{"operationId":"billing.autotopup.set","summary":"Turn auto top-up on or off with CAS. Enabling needs a saved method and an amount between the account's own top-up bounds, a ceiling no larger than the daily limit, and a trigger below the amount. One purchase per crossing, at most one an hour.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","properties":{"enabled":{"type":"boolean"},"triggerMicroUsd":{"type":"string","pattern":"^[0-9]{1,19}$"},"amountMicroUsd":{"type":"string","pattern":"^[0-9]{1,19}$"},"monthlyCeilingMicroUsd":{"type":"string","pattern":"^[0-9]{1,19}$"},"version":{"type":"integer","minimum":0},"configured":{"type":"boolean"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["enabled","triggerMicroUsd","amountMicroUsd","monthlyCeilingMicroUsd","version","configured"],"additionalProperties":false}},"required":["config"],"additionalProperties":false}}}}},"x-scope":"billing:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"triggerUsd":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,2})?$"},"amountUsd":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,2})?$"},"monthlyCeilingUsd":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,2})?$"},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740990}},"required":["enabled","triggerUsd","amountUsd","monthlyCeilingUsd","expectedVersion"],"additionalProperties":false}}}}}},"/v1/stakeholders/inbox":{"get":{"operationId":"stakeholders.inbox","summary":"Everything waiting on the signed-in person in one company, from every OS, in one list: open decide handoffs and what each OS reports through its own pending(tenant). Summaries only; evidence is read per item through the owning OS. count=true answers the count alone, cheap enough to drive a badge; os=<name> filters one source.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"os","in":"query","required":false,"schema":{"type":"string","enum":["all","brainos","foundryos","agentos","launchos","domains","loops","platform"]}},{"name":"view","in":"query","required":false,"schema":{"type":"string","enum":["waiting","decided"]}},{"name":"count","in":"query","required":false,"schema":{"type":"string","enum":["true"]}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"company.inbox.v1"},"os":{"type":"string","maxLength":20},"countOnly":{"type":"boolean"},"count":{"type":"integer","minimum":0},"items":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"os":{"type":"string","enum":["brainos","foundryos","agentos","launchos","domains","loops","platform"]},"kind":{"type":"string","maxLength":40},"title":{"type":"string","maxLength":160},"askedBy":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"blocks":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}]},"costMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"reversible":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"operation":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"href":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"subjectHash":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]},"state":{"type":"string","maxLength":20},"summary":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"approves":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"rejects":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"preview":{"anyOf":[{"type":"object","properties":{"read":{"type":"string","maxLength":200},"pick":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"path":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["read","pick","path"],"additionalProperties":false},{"type":"null"}]},"test":{"type":"boolean"},"decided":{"anyOf":[{"type":"object","properties":{"decision":{"anyOf":[{"type":"string","enum":["approved","rejected"]},{"type":"null"}]},"by":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["decision","by","at"],"additionalProperties":false},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"decide":{"anyOf":[{"type":"object","properties":{"approve":{"type":"object","properties":{"path":{"type":"string","maxLength":200},"body":{"type":"object","additionalProperties":true}},"required":["path"],"additionalProperties":false},"reject":{"type":"object","properties":{"path":{"type":"string","maxLength":200},"body":{"type":"object","additionalProperties":true},"needsReason":{"type":"boolean"}},"required":["path"],"additionalProperties":false},"edit":{"type":"object","properties":{"path":{"type":"string","maxLength":200},"body":{"type":"object","additionalProperties":true},"read":{"type":"string","maxLength":200},"title":{"type":"boolean"}},"required":["path","read","title"],"additionalProperties":false}},"required":["approve","reject"],"additionalProperties":false},{"type":"null"}]}},"required":["id","os","kind","title","state"],"additionalProperties":false}},"sources":{"type":"array","items":{"type":"object","properties":{"os":{"type":"string","maxLength":40},"status":{"type":"string","enum":["ok","empty","not_configured","not_permitted","unavailable"]},"scope":{"type":"string","maxLength":40}},"required":["os","status"],"additionalProperties":false}},"complete":{"type":"boolean"},"hiddenTests":{"type":"integer","minimum":0}},"required":["schema","os","countOnly","count","items","sources","complete"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read"}},"/v1/handoffs/{id}/decide":{"post":{"operationId":"handoffs.decide","summary":"Record the signed-in owner's decision on a decide handoff. A key is refused whatever scopes it holds, and so is any principal that is not a person's own session. The subject hash in the body is the one in front of the decider: a subject that changed since the ask is refused with subject_changed, and an approval satisfies only that hash.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"handoff":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"kind":{"const":"decide"},"title":{"type":"string","minLength":1,"maxLength":120},"subjectHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"operation":{"type":"string","minLength":3,"maxLength":120},"askedBy":{"type":"string","maxLength":120},"askedByKind":{"type":"string","enum":["person","agent"]},"blocks":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}]},"costMicroUsd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"reversible":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"state":{"type":"string","enum":["pending","done","cancelled","expired"]},"at":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"decided":{"anyOf":[{"type":"object","properties":{"decision":{"type":"string","enum":["approved","rejected"]},"by":{"type":"string","maxLength":120},"at":{"type":"string"}},"required":["decision","by","at"],"additionalProperties":false},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}},"required":["id","kind","title","subjectHash","operation","askedBy","askedByKind","blocks","costMicroUsd","reversible","state","at","expiresAt","decided","note"],"additionalProperties":false}},"required":["handoff"],"additionalProperties":false}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","reject"]},"subjectHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"note":{"type":"string","maxLength":1000}},"required":["decision","subjectHash"],"additionalProperties":false}}}}}},"/v1/connections/{connector}/tools":{"get":{"operationId":"connections.tools.list","summary":"One connector's tools in pages of 50, each with what it does (`read` or `write`), whether its supplier marks it destructive, its price a call, and the policy in force for this company with where that policy came from: the platform, the default, the company's default, the connector's, the tool's own, or `destructive` when a tool keeps asking under a connector set to act without asking. `q` narrows by title or name.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"connector","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":80}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[1-9][0-9]{0,5}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"zerohuman.connector-tools.v1"},"tenantId":{"type":"string"},"connector":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"query":{"anyOf":[{"type":"string"},{"type":"null"}]},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"title":{"type":"string"},"effect":{"type":"string","enum":["read","write"]},"destructive":{"type":"boolean"},"usdPerCall":{"type":"number","minimum":0},"policy":{"type":"string","enum":["off","read-only","ask-first","automatic"]},"from":{"type":"string","enum":["platform","default","company","connector","tool","destructive"]}},"required":["name","title","effect","destructive","usdPerCall","policy","from"],"additionalProperties":false}},"count":{"type":"integer","minimum":0},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["schema","tenantId","connector","tools","count","nextCursor"],"additionalProperties":false}}}}},"x-scope":"connections:read","x-effect":"read"}},"/v1/connections/policy":{"get":{"operationId":"connections.policy.get","summary":"What this company lets its agents do with connected apps: the company's default and every connector or tool it has set. With nothing set a read runs and a write asks a person first.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"zerohuman.tool-policies.v1"},"tenantId":{"type":"string"},"policies":{"type":"array","items":{"type":"string","enum":["off","read-only","ask-first","automatic"]}},"default":{"type":"object","properties":{"connector":{"type":"string","maxLength":40},"tool":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"policy":{"type":"string","enum":["off","read-only","ask-first","automatic"]},"version":{"type":"integer","minimum":0},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["connector","tool","policy","version"],"additionalProperties":false},"rows":{"type":"array","items":{"type":"object","properties":{"connector":{"type":"string","maxLength":40},"tool":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"policy":{"type":"string","enum":["off","read-only","ask-first","automatic"]},"version":{"type":"integer","minimum":0},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["connector","tool","policy","version"],"additionalProperties":false}}},"required":["schema","tenantId","policies","default","rows"],"additionalProperties":false}}}}},"x-scope":"connections:read","x-effect":"read"},"post":{"operationId":"connections.policy.save","summary":"Set what agents may do: for every connected app (`connector` is `*`), for one connector, or for one of its tools. `off` withholds a tool, `read-only` allows reads, `ask-first` sends each write to Decisions for a person to approve, and `automatic` lets agents act without asking. `automatic` is a widening and needs a signed-in person holding account:admin. A tool its supplier marks destructive keeps asking under a connector's `automatic` until that tool is set itself. `expectedVersion` is the row's version, 0 for a row that does not exist yet; a row someone else changed first answers version_conflict.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"policy":{"type":"object","properties":{"connector":{"type":"string","maxLength":40},"tool":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"policy":{"type":"string","enum":["off","read-only","ask-first","automatic"]},"version":{"type":"integer","minimum":0},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["connector","tool","policy","version"],"additionalProperties":false}},"required":["policy"],"additionalProperties":false}}}}},"x-scope":"connections:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connector":{"type":"string","pattern":"^(\\*|[a-z0-9][a-z0-9-]{0,39})$"},"tool":{"anyOf":[{"type":"string","maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.-]{0,79}$"},{"type":"null"}]},"policy":{"type":"string","enum":["off","read-only","ask-first","automatic"]},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["connector","policy","expectedVersion"],"additionalProperties":false}}}}}},"/v1/catalog/status":{"get":{"operationId":"catalog.status","summary":"Whether the catalog is current. For each supplier: when its list last succeeded and how long ago, the apps it lists, the ones chosen and connectable here, the ones that need an OAuth app of ours, its tools, and the apps whose tools are still to be read or keep failing. `featured.skipped` names recommended apps the catalog does not hold. Counted from the rows, not a constant.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"zerohuman.catalog-status.v1"},"checkedAt":{"type":"string"},"suppliers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"listEvery":{"type":"string"},"lastSuccessAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lagSeconds":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"stale":{"type":"boolean"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"listed":{"type":"integer","minimum":0},"apps":{"type":"integer","minimum":0},"chosen":{"type":"integer","minimum":0},"connectable":{"type":"integer","minimum":0},"ownApp":{"type":"integer","minimum":0},"ownAppIds":{"type":"array","items":{"type":"string"}},"tools":{"type":"integer","minimum":0},"toolsPending":{"type":"integer","minimum":0},"toolsFailed":{"type":"integer","minimum":0},"models":{"type":"integer","minimum":0},"kinds":{"type":"object","additionalProperties":{"type":"integer","minimum":0}}},"required":["id","kind","stale","apps","chosen","connectable","tools"],"additionalProperties":false}},"featured":{"type":"object","properties":{"configured":{"type":"integer","minimum":0},"skipped":{"type":"array","items":{"type":"string"}}},"required":["configured","skipped"],"additionalProperties":false},"featuredModels":{"type":"object","properties":{"configured":{"type":"integer","minimum":0},"skipped":{"type":"array","items":{"type":"string"}}},"required":["configured","skipped"],"additionalProperties":false}},"required":["schema","checkedAt","suppliers","featured"],"additionalProperties":false}}}}},"x-scope":"capabilities:read","x-effect":"read"}},"/v1/members/me":{"get":{"operationId":"members.me","summary":"The signed-in person's own setup in this company: company, human id, role, revision, active grants, capabilities, allowed actions, profile path and revision, personal and workspace connection summaries, and next actions. No secret, raw proof or profile content.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Browser"}}}}},"x-scope":"people:self","x-effect":"read"}},"/v1/people/me/profile":{"get":{"operationId":"people.profile.get","summary":"The signed-in person's own human.md: the canonical path derived from the verified membership, the Markdown text, its version and the 400-character preview an agent receives. A person with no profile answers empty, never 404.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Browser"}}}}},"x-scope":"people:self","x-effect":"read"},"post":{"operationId":"people.profile.set","summary":"Publish the signed-in person's own human.md. The path and the front-matter id are derived from the session, so a caller cannot name another person's file and a declared id that is not their own is refused. Only the described human may write it, and the profile grants no scope, mandate or approval.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Browser"}}}}},"x-scope":"people:self","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","maxLength":20000}},"required":["text"],"additionalProperties":false}}}}}},"/v1/people/me/profile/removal":{"post":{"operationId":"people.profile.remove","summary":"Withdraw the signed-in person's own human.md. The file is removed under the brain's own remove path with an audit row, and the brief stops carrying it.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Browser"}}}}},"x-scope":"people:self","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/membership/invitations/{id}/resend":{"post":{"operationId":"members.invitations.resend","summary":"Rotate an open invitation: a new one-time link, a new generation and a fresh expiry. Every earlier link stops working.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Browser"}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/membership/invitations/{id}/revocation":{"post":{"operationId":"members.invitations.revoke","summary":"End an open invitation. It becomes terminal and cannot be accepted.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Browser"}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/membership/policy":{"get":{"operationId":"members.policy.get","summary":"The company's one versioned team policy: invitation TTL and allowed domains, available providers, sharing ceiling, lookback, grant duration, fresh-proof window and whether a second approver is required.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Browser"}}}}},"x-scope":"account:read","x-effect":"read"},"post":{"operationId":"members.policy.set","summary":"Write the company's team policy. Owner only, compare-and-swap on `expectedVersion`; a partial document is merged onto the current effective policy and validated whole. `allowExternal:false` with no allowed domains admits only the domain an existing member already uses.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Browser"}}}}},"x-scope":"account:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"policy":{"type":"object","properties":{"inviteTtlDays":{"type":"integer","minimum":1,"maximum":30},"allowExternal":{"type":"boolean"},"allowedDomains":{"type":"array","items":{"type":"string","maxLength":253},"maxItems":32},"providers":{"type":"array","items":{"type":"string","enum":["fathom","gmail"]}},"sharingCeiling":{"type":"string","enum":["internal","team","company"]},"maxLookbackDays":{"type":"integer","minimum":1,"maximum":365},"grantMaxDays":{"type":"integer","minimum":1,"maximum":90},"freshProofMinutes":{"type":"integer","minimum":1,"maximum":1440},"secondApprover":{"type":"boolean"}},"required":[],"additionalProperties":false},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["policy"],"additionalProperties":false}}}}}},"/v1/membership/accept/start":{"post":{"operationId":"members.accept.start","summary":"Begin joining from an invitation link. Returns which proof is required -- the company's required SSO, or a one-time code sent to the invited address -- and the operation that completes it. Inert for mail scanners: it consumes nothing and reveals no address.","security":[],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Browser"}}}}},"x-scope":null,"x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["token"],"additionalProperties":false}}}}}},"/v1/oauth/token":{"post":{"operationId":"oauth.token","summary":"oauth token","security":[],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Browser"}}}}},"x-scope":null,"x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/oauth/register":{"post":{"operationId":"oauth.register","summary":"oauth register","security":[],"parameters":[],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Browser"}}}}},"x-scope":null,"x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"client_name":{"type":"string","maxLength":120},"redirect_uris":{"type":"array","items":{"type":"string","maxLength":2048},"maxItems":8},"client_uri":{"type":"string","maxLength":2048}},"required":["client_name","redirect_uris"],"additionalProperties":false}}}}}},"/v1/oauth/revoke":{"post":{"operationId":"oauth.revoke","summary":"oauth revoke","security":[],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Browser"}}}}},"x-scope":null,"x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/connections/{connector}/call":{"post":{"operationId":"connections.call","summary":"One read-only call to a connected app for this company: a tool the connection offers, its arguments, and a receipt naming the tool and the digest of what came back. The company's own tool policy is applied and the credential stays inside the custodian, so no token reaches the caller. A write tool is refused (read_only); writes still travel an agent's run and its approval path.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"connector","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"}},{"name":"subject","in":"query","required":false,"schema":{"type":"string","pattern":"^(company|team|person|agent):[A-Za-z0-9_-]{1,64}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"receipt":{"type":"object","properties":{"schema":{"const":"0human.connection-call.v1"},"tenantId":{"type":"string"},"connector":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"tool":{"type":"string"},"actor":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"resultSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"at":{"type":"string","format":"date-time"}},"required":["schema","tenantId","connector","tool","actor","resultSha256","at"],"additionalProperties":false},"data":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"required":["receipt","data"],"additionalProperties":false}}}}},"x-scope":"connections:read","x-effect":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.-]{0,79}$"},"args":{"type":"object","additionalProperties":true,"description":"Arguments of the named tool, checked against that tool's stored schema before the supplier is asked."}},"required":["tool","args"],"additionalProperties":false}}}}}},"/v1/connections/{connector}/resource":{"post":{"operationId":"connections.resource","summary":"Choose the property, site or pipeline this company's connection reads (Search Console, Plausible, the CMS, the CRM). The value is read once with the connected account, a three-day window and one row, and is saved only if that read succeeds, on the account that was read. An agent that asked for this connector is then told it is ready. AEO Engine keeps connections.bind.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"connector","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"chosen":{"const":true},"connector":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"resource":{"type":"string","enum":["property","site","pipeline"]},"value":{"type":"string","maxLength":200}},"required":["chosen","connector","resource","value"],"additionalProperties":false}}}}},"x-scope":"connections:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":200}},"required":["value"],"additionalProperties":false}}}}}},"/v1/connections/list":{"get":{"operationId":"connections.list","summary":"List the connected accounts of one subject of this company. The tenant comes from the verified principal; a subject narrows it and never selects it.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"connector","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"}},{"name":"subject","in":"query","required":false,"schema":{"type":"string","pattern":"^(company|team|person|agent):[A-Za-z0-9_-]{1,64}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"connector":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"custodian":{"type":"string","enum":["composio","pipedream","mcp","native","aeo-engine"]},"subjectKind":{"type":"string","enum":["company","team","person","agent"]},"subjectId":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string","enum":["connected","expired","needs_setup","unknown"]},"detail":{"type":"object","properties":{},"required":[],"additionalProperties":false},"connectedAt":{"type":"string"},"checkedAt":{"type":"string"}},"required":["id","connector","custodian","subjectKind","subjectId","label","state","connectedAt","checkedAt"],"additionalProperties":false}}},"required":["connections"],"additionalProperties":false}}}}},"x-scope":"connections:read","x-effect":"read"}},"/v1/connections/{id}/removal":{"post":{"operationId":"connections.remove","summary":"Remove one connection, named by its row id or by its connector (this company's own company-level row for it). The provider is asked to revoke first; if it refuses, the row stays and the answer says so. One operation for every connector.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([a-z0-9][a-z0-9-]{0,39}|[a-f0-9-]{36})$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"const":true},"connector":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"custodian":{"type":"string","enum":["composio","pipedream","mcp","native","aeo-engine"]}},"required":["removed","connector","custodian"],"additionalProperties":false}}}}},"x-scope":"connections:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/audit/export":{"get":{"operationId":"audit.export","summary":"Export this company's own audit record for a date range: sign-ins, key use, setting changes, connections and proposal approvals. The tenant comes from the principal, never the request. At most 366 days and 10,000 events per response; page with the manifest's next_after. format=jsonl returns the manifest line followed by one JSON event per line.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date-time"}},{"name":"after","in":"query","required":false,"schema":{"type":"string","maxLength":120}},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["json","jsonl"]}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"manifest":{"type":"object","properties":{"schema":{"const":"0human.audit-export.v1"},"tenant":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"generated_at":{"type":"string"},"counts":{"type":"object","properties":{"sign_in":{"type":"integer","minimum":0},"key":{"type":"integer","minimum":0},"setting":{"type":"integer","minimum":0},"connection":{"type":"integer","minimum":0},"approval":{"type":"integer","minimum":0}},"required":["sign_in","key","setting","connection","approval"],"additionalProperties":false},"coverage_start":{"type":"object","properties":{"platform":{"type":"string"},"approval":{"type":"string"}},"required":["platform","approval"],"additionalProperties":false},"note":{"type":"string"},"truncated":{"type":"boolean"},"next_after":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["schema","tenant","from","to","generated_at","counts","coverage_start","note","truncated","next_after"],"additionalProperties":false},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"at":{"type":"string"},"kind":{"type":"string","enum":["sign_in","key","setting","connection","approval"]},"actor":{"type":"string"},"subject":{"type":"array","items":{"type":"string"}},"request_id":{"type":"string"},"detail":{"type":"object","description":"Identifiers and outcomes only; never content."},"source":{"type":"string","enum":["platform","brain"]}},"required":["id","at","kind","actor","subject","request_id","detail","source"],"additionalProperties":false}}},"required":["manifest","events"],"additionalProperties":false}}}}},"x-scope":"account:admin","x-effect":"read"}},"/v1/ledger":{"get":{"operationId":"ledger.list","summary":"One job's execution-record events, oldest first, after a cursor. Ids, closed enumerations, integers and hashes only; never text from a run.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"job","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}},{"name":"after","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"ord":{"type":"integer","minimum":1},"at":{"type":"string"},"writer":{"type":"string","enum":["platform","run"]},"seq":{"type":"integer","minimum":1},"kind":{"type":"string"},"product":{"type":"string","enum":["platform","agentos","brainos","foundryos","marketingos","launchos","financeos"]},"operation":{"anyOf":[{"type":"string"},{"type":"null"}]},"actor":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"anyOf":[{"type":"string"},{"type":"null"}]},"agent":{"anyOf":[{"type":"string"},{"type":"null"}]},"run":{"anyOf":[{"type":"string"},{"type":"null"}]},"recipe":{"anyOf":[{"type":"string"},{"type":"null"}]},"recipe_version":{"anyOf":[{"type":"string"},{"type":"null"}]},"build":{"anyOf":[{"type":"string"},{"type":"null"}]},"context_version":{"anyOf":[{"type":"string"},{"type":"null"}]},"route_tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"route_provider":{"anyOf":[{"type":"string"},{"type":"null"}]},"route_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"tokens_in":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"tokens_out":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"tool_calls":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"duration_ms":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"cost_micro_usd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"charge_micro_usd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"hold_id":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"rate_card":{"anyOf":[{"type":"string"},{"type":"null"}]},"result":{"anyOf":[{"type":"string"},{"type":"null"}]},"verification_kind":{"anyOf":[{"type":"string"},{"type":"null"}]},"verification_pass":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"verification_ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"intervention":{"anyOf":[{"type":"string"},{"type":"null"}]},"content_store":{"anyOf":[{"type":"string"},{"type":"null"}]},"content_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"content_sha256":{"anyOf":[{"type":"string"},{"type":"null"}]},"prev":{"anyOf":[{"type":"string"},{"type":"null"}]},"hash":{"type":"string"}},"required":["ord","at","writer","seq","kind","product","prev","hash"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["events","nextCursor"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read"}},"/v1/ledger/jobs/{id}":{"get":{"operationId":"ledger.job","summary":"One job and every event of it in chain order, with the chain verification. The tenant comes from the principal, never the request.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"events":{"type":"integer","minimum":0},"verification":{"type":"object","properties":{"holds":{"type":"boolean"},"events":{"type":"integer","minimum":0},"gaps":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"late":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"head":{"anyOf":[{"type":"string"},{"type":"null"}]},"at":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["holds","events"],"additionalProperties":false}},"required":["id","events","verification"],"additionalProperties":false},"events":{"type":"array","items":{"type":"object","properties":{"ord":{"type":"integer","minimum":1},"at":{"type":"string"},"writer":{"type":"string","enum":["platform","run"]},"seq":{"type":"integer","minimum":1},"kind":{"type":"string"},"product":{"type":"string","enum":["platform","agentos","brainos","foundryos","marketingos","launchos","financeos"]},"operation":{"anyOf":[{"type":"string"},{"type":"null"}]},"actor":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"anyOf":[{"type":"string"},{"type":"null"}]},"agent":{"anyOf":[{"type":"string"},{"type":"null"}]},"run":{"anyOf":[{"type":"string"},{"type":"null"}]},"recipe":{"anyOf":[{"type":"string"},{"type":"null"}]},"recipe_version":{"anyOf":[{"type":"string"},{"type":"null"}]},"build":{"anyOf":[{"type":"string"},{"type":"null"}]},"context_version":{"anyOf":[{"type":"string"},{"type":"null"}]},"route_tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"route_provider":{"anyOf":[{"type":"string"},{"type":"null"}]},"route_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"tokens_in":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"tokens_out":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"tool_calls":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"duration_ms":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"cost_micro_usd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"charge_micro_usd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"hold_id":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"rate_card":{"anyOf":[{"type":"string"},{"type":"null"}]},"result":{"anyOf":[{"type":"string"},{"type":"null"}]},"verification_kind":{"anyOf":[{"type":"string"},{"type":"null"}]},"verification_pass":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"verification_ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"intervention":{"anyOf":[{"type":"string"},{"type":"null"}]},"content_store":{"anyOf":[{"type":"string"},{"type":"null"}]},"content_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"content_sha256":{"anyOf":[{"type":"string"},{"type":"null"}]},"prev":{"anyOf":[{"type":"string"},{"type":"null"}]},"hash":{"type":"string"}},"required":["ord","at","writer","seq","kind","product","prev","hash"],"additionalProperties":false}}},"required":["job","events"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read"}},"/v1/ledger/jobs/{id}/verification":{"get":{"operationId":"ledger.verify","summary":"Recompute one job's chain from the stored events and say whether it holds. Fails when one event was removed, changed or reordered.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"holds":{"type":"boolean"},"events":{"type":"integer","minimum":0},"gaps":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"late":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"head":{"anyOf":[{"type":"string"},{"type":"null"}]},"at":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["holds","events"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read"}},"/v1/ledger/query":{"post":{"operationId":"ledger.query","summary":"One of a fixed list of questions about this company's own execution record: cost and charge by agent, recipe, context_version, operation or UTC day; failures by result code; time to a result; interventions per job; an agent's asks, cost, tools and time to answer by context version; and the factory's landed changes, verified releases and rollbacks by repository and by review gate. `usage_lines` answers the billing page: every settled charge of every company under the payer, one row per cost line with its day, company, system, agent, key, model-or-tool, unit, quantity, rate and amount, filtered by any of those and by `billedElsewhere`. Those filters are refused for every other question. Written once for Postgres and once for ClickHouse and tested equal on one fixture. The tenant comes from the principal, never the request. No caller SQL and no company content: the record holds neither.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"0human.ledger.query.v1"},"question":{"type":"string","enum":["cost_by_agent","cost_by_recipe","cost_by_context_version","cost_by_operation","cost_by_day","cost_by_agent_slot","failures_by_result_code","time_to_result","interventions_per_job","agent_version_asks","agent_version_cost","agent_version_tools","agent_version_time","agent_version_slots","foundry_quality_by_repository","foundry_gate_calibration","fleet_daily","usage_lines"]},"describes":{"type":"string"},"from":{"anyOf":[{"type":"string"},{"type":"null"}]},"to":{"anyOf":[{"type":"string"},{"type":"null"}]},"engine":{"type":"string","enum":["postgres","clickhouse"]},"fallback":{"anyOf":[{"type":"string"},{"type":"null"}]},"rows":{"type":"array","items":{"type":"object","properties":{"bucket":{"anyOf":[{"type":"string"},{"type":"null"}]},"bucket2":{"anyOf":[{"type":"string"},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"a":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"b":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"day":{"anyOf":[{"type":"string"},{"type":"null"}]},"company":{"anyOf":[{"type":"string"},{"type":"null"}]},"system":{"anyOf":[{"type":"string"},{"type":"null"}]},"agent":{"anyOf":[{"type":"string"},{"type":"null"}]},"keyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"model":{"anyOf":[{"type":"string"},{"type":"null"}]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"anyOf":[{"type":"string"},{"type":"null"}]},"costMicroUsd":{"anyOf":[{"type":"string"},{"type":"null"}]},"amountMicroUsd":{"anyOf":[{"type":"string"},{"type":"null"}]},"rateMicroUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"lineId":{"anyOf":[{"type":"string"},{"type":"null"}]},"holdId":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"estimate":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["bucket","bucket2","n","a","b"],"additionalProperties":false}},"total":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"truncated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"computedAt":{"type":"string"}},"required":["schema","question","describes","engine","rows","computedAt"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","enum":["cost_by_agent","cost_by_recipe","cost_by_context_version","cost_by_operation","cost_by_day","cost_by_agent_slot","failures_by_result_code","time_to_result","interventions_per_job","agent_version_asks","agent_version_cost","agent_version_tools","agent_version_time","agent_version_slots","foundry_quality_by_repository","foundry_gate_calibration","fleet_daily","usage_lines"]},"from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"system":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"agent":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"key":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"model":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"day":{"anyOf":[{"type":"string","pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$"},{"type":"null"}]},"billedElsewhere":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["question"],"additionalProperties":false}}}}}},"/v1/outcomes":{"get":{"operationId":"outcomes.list","summary":"The outcomes recorded for this company in a period, each with its count net of corrections, the jobs it was proved on and the read-back from the connected system that proves it: the system, its reference and the hash of what it answered. Ids, counts, hashes and instants only — never a conversation, a prompt or an answer, because the record has no column that could hold one.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"0human.outcomes.list.v1"},"tenant":{"type":"string"},"from":{"anyOf":[{"type":"string"},{"type":"null"}]},"to":{"anyOf":[{"type":"string"},{"type":"null"}]},"outcomes":{"type":"array","items":{"type":"object","properties":{"outcome":{"type":"string","minLength":1,"maxLength":160},"count":{"type":"integer","minimum":0},"jobs":{"type":"integer","minimum":0},"proofs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","minLength":1,"maxLength":160},"reference":{"type":"string","minLength":1,"maxLength":160},"hash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["system","reference","hash"],"additionalProperties":false}},"recipe":{"anyOf":[{"type":"string"},{"type":"null"}]},"recipeVersion":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["outcome","count","jobs","proofs"],"additionalProperties":false}}},"required":["schema","tenant","from","to","outcomes"],"additionalProperties":false}}}}},"x-scope":"outcomes:read","x-effect":"read"}},"/v1/outcomes/statement":{"post":{"operationId":"outcomes.statement","summary":"One statement for one client company and one period: the work done, each outcome with its count and the proof read back from the connected system, the spend by rate card, the decisions taken, and each job's chain head recomputed by `ledger.verify`. Assembled from saved questions over `ledger.query`; it holds no query code of its own. The tenant is the caller's own company, so a statement is always read in the company it is about.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"0human.statement.v1"},"tenant":{"type":"string"},"from":{"anyOf":[{"type":"string"},{"type":"null"}]},"to":{"anyOf":[{"type":"string"},{"type":"null"}]},"engine":{"enum":["postgres","clickhouse"]},"work":{"type":"object","properties":{"jobs":{"type":"integer","minimum":0},"events":{"type":"integer","minimum":0},"durationMs":{"type":"integer","minimum":0},"truncated":{"type":"boolean"},"hashesHold":{"type":"boolean"},"list":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"operation":{"anyOf":[{"type":"string"},{"type":"null"}]},"events":{"type":"integer","minimum":0},"durationMs":{"type":"integer","minimum":0},"chain":{"type":"object","properties":{"holds":{"type":"boolean"},"events":{"type":"integer","minimum":0},"head":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]}},"required":["holds","events","head"],"additionalProperties":false}},"required":["id","operation","events","durationMs","chain"],"additionalProperties":false}}},"required":["jobs","events","durationMs","truncated","hashesHold","list"],"additionalProperties":false},"outcomes":{"type":"array","items":{"type":"object","properties":{"outcome":{"type":"string","minLength":1,"maxLength":160},"count":{"type":"integer","minimum":0},"jobs":{"type":"integer","minimum":0},"proofs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","minLength":1,"maxLength":160},"reference":{"type":"string","minLength":1,"maxLength":160},"hash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["system","reference","hash"],"additionalProperties":false}},"recipe":{"anyOf":[{"type":"string"},{"type":"null"}]},"recipeVersion":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["outcome","count","jobs","proofs"],"additionalProperties":false}},"spend":{"type":"object","properties":{"supplierMicroUsd":{"type":"integer","minimum":0},"retailMicroUsd":{"type":"integer","minimum":0},"byRateCard":{"type":"array","items":{"type":"object","properties":{"rateCard":{"anyOf":[{"type":"string"},{"type":"null"}]},"events":{"type":"integer","minimum":0},"supplierMicroUsd":{"type":"integer","minimum":0},"retailMicroUsd":{"type":"integer","minimum":0}},"required":["rateCard","events","supplierMicroUsd","retailMicroUsd"],"additionalProperties":false}}},"required":["supplierMicroUsd","retailMicroUsd","byRateCard"],"additionalProperties":false},"decisions":{"type":"array","items":{"type":"object","properties":{"decision":{"type":"string","minLength":1,"maxLength":160},"count":{"type":"integer","minimum":0}},"required":["decision","count"],"additionalProperties":false}},"computedAt":{"type":"string"}},"required":["schema","tenant","from","to","engine","work","outcomes","spend","decisions","computedAt"],"additionalProperties":false}}}}},"x-scope":"outcomes:read","x-effect":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":[],"additionalProperties":false}}}}}},"/v1/outcomes/statement/export":{"post":{"operationId":"outcomes.export","summary":"The same statement as one CSV file an operator attaches to its own invoice: counts, hashes, ids and dates, and no column that could hold content. The digest is over the bytes in `body`, so a recipient can prove the file it was given is the file that was read.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"0human.statement.export.v1"},"filename":{"type":"string"},"mediaType":{"const":"text/csv"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"rows":{"type":"integer","minimum":0},"body":{"type":"string"}},"required":["schema","filename","mediaType","sha256","rows","body"],"additionalProperties":false}}}}},"x-scope":"outcomes:read","x-effect":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":[],"additionalProperties":false}}}}}},"/v1/ledger/analysis":{"post":{"operationId":"ledger.analysis","summary":"One of the same eight fixed questions `ledger.query` answers for one company, answered across every company: cost and charge by agent, recipe, context_version, operation or UTC day; failures by result code; time to a result; interventions per job. Read only, and the only values are counts, costs and closed result codes. Each company is named by a stable pseudonym (co- and sixteen hex characters of a domain-separated hash of its id) and never by its id, which no operation of this path reverses. Refused for every principal that is not in Autonomous Companies' own company, whatever scopes it holds. Every accepted read is recorded in public.analysis_reads before a row is returned.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"0human.ledger.analysis.v1"},"question":{"type":"string","enum":["cost_by_agent","cost_by_recipe","cost_by_context_version","cost_by_operation","cost_by_day","failures_by_result_code","time_to_result","interventions_per_job"]},"describes":{"type":"string"},"from":{"anyOf":[{"type":"string"},{"type":"null"}]},"to":{"anyOf":[{"type":"string"},{"type":"null"}]},"engine":{"type":"string","enum":["postgres","clickhouse"]},"fallback":{"anyOf":[{"type":"string"},{"type":"null"}]},"companies":{"type":"integer","minimum":0},"rows":{"type":"array","items":{"type":"object","properties":{"company":{"type":"string","pattern":"^co-[a-f0-9]{16}$"},"bucket":{"anyOf":[{"type":"string"},{"type":"null"}]},"bucket2":{"anyOf":[{"type":"string"},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"a":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"b":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["company","bucket","bucket2","n","a","b"],"additionalProperties":false}},"computedAt":{"type":"string"}},"required":["schema","question","describes","engine","companies","rows","computedAt"],"additionalProperties":false}}}}},"x-scope":"platform:analyse","x-effect":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","enum":["cost_by_agent","cost_by_recipe","cost_by_context_version","cost_by_operation","cost_by_day","failures_by_result_code","time_to_result","interventions_per_job"]},"from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["question"],"additionalProperties":false}}}}}},"/v1/analytics/health":{"get":{"operationId":"analytics.health.get","summary":"How old the analytics copy of the ledger is: the cursor and the last run of each stream, the rows the copy holds, and the age of the newest copied event. Counts and times only, never an event and never a company's content. With no ClickHouse configured it answers mode=postgres-only and nothing is broken.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"0human.analytics.health.v1"},"configured":{"type":"boolean"},"database":{"type":"string"},"mode":{"type":"string","enum":["clickhouse","postgres-only"]},"reachable":{"type":"boolean"},"streams":{"type":"object","additionalProperties":{"type":"object","properties":{"cursorAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"cursorOrd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"lastRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"inserted":{"type":"integer","minimum":0},"runs":{"type":"integer","minimum":0},"failures":{"type":"integer","minimum":0},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["cursorAt","cursorOrd","lastRunAt","inserted","runs","failures","lastError"],"additionalProperties":false}},"rows":{"type":"object","additionalProperties":{"type":"integer","minimum":0}},"newestCopiedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lagMs":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["schema","configured","mode","reachable"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read"}},"/v1/telemetry/destinations":{"post":{"operationId":"telemetry.destinations.save","summary":"Name the OpenTelemetry endpoint this company's own events are sent to, under step 11's rules for an address a tenant supplies: https only on port 443, a host name and not an address literal, no user, password or fragment, and not one of our own hosts. One active destination per company: a save over an existing one replaces its address in place. `content` is off by default; the ledger is content-free so a destination today carries no content whatever it says. `token` is the company's own bearer token for its receiver: it is sealed for this company and this address, stored only as ciphertext and never returned (the answer says `hasToken`). A destination can never name or reach a platform secret: a save that names a secret, references one or carries an unknown field is refused, and no credential is ever resolved by a name.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"destination":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"url":{"type":"string"},"content":{"type":"boolean"},"hasToken":{"type":"boolean"},"state":{"type":"string","enum":["active","removed"]},"createdAt":{"type":"string"}},"required":["id","url","content","state","createdAt"],"additionalProperties":false}},"required":["destination"],"additionalProperties":false}}}}},"x-scope":"telemetry:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":12,"maxLength":2048},"content":{"type":"boolean"},"token":{"type":"string","writeOnly":true,"minLength":16,"maxLength":1024,"pattern":"^[\\x21-\\x7e]{16,1024}$"}},"required":["url"],"additionalProperties":false}}}}},"get":{"operationId":"telemetry.destinations.get","summary":"The company's own telemetry destination, or null when it has none. Never returns the secret, only its name. `telemetry:configure` is the company's own consent.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"destination":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"url":{"type":"string"},"content":{"type":"boolean"},"hasToken":{"type":"boolean"},"state":{"type":"string","enum":["active","removed"]},"createdAt":{"type":"string"}},"required":["id","url","content","state","createdAt"],"additionalProperties":false},{"type":"null"}]}},"required":["destination"],"additionalProperties":false}}}}},"x-scope":"telemetry:configure","x-effect":"read"}},"/v1/telemetry/destinations/removal":{"post":{"operationId":"telemetry.destinations.remove","summary":"Remove the company's own telemetry destination. The state change is the removal: future events stop being sent at once, the row and its delivery history stay for the erasure and the audit, and the company's events are still in its own ledger because a destination was never the only copy (T22, E17).","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean"}},"required":["removed"],"additionalProperties":false}}}}},"x-scope":"telemetry:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/platform/overview":{"get":{"operationId":"platform.overview.get","summary":"The platform's own admin view in one read: companies, people and agents total, new and active; sessions and sign-ins by surface; calls by OS, by surface and by caller kind; tokens by model and by OS; spend, credits funded and balance held; jobs running now and failures by result code; and one row per company with its own totals. Each company is named by a stable pseudonym; a signed-in person's own session also gets a names map, and an agent never does. Read only, refused for every principal that is not in Autonomous Companies' own company whatever scopes it holds, and every accepted read is recorded in public.analysis_reads. The record half answers from ClickHouse when it is configured and from Postgres when it is not; the table half is always Postgres.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["today","7d","30d"]}},{"name":"company","in":"query","required":false,"schema":{"type":"string","pattern":"^co-[a-f0-9]{16}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"platform.admin.view.v1"},"period":{"type":"object","properties":{"id":{"type":"string","enum":["today","7d","30d"]},"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":1}},"required":["id","from","to","days"],"additionalProperties":false},"company":{"anyOf":[{"type":"string","pattern":"^co-[a-f0-9]{16}$"},{"type":"null"}]},"engine":{"type":"object","properties":{"record":{"type":"string","enum":["postgres","clickhouse"]},"tables":{"const":"postgres"}},"required":["record","tables"],"additionalProperties":false},"fallback":{"anyOf":[{"type":"string"},{"type":"null"}]},"totals":{"type":"object","properties":{"companies":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"new":{"type":"integer","minimum":0},"active":{"type":"integer","minimum":0}},"required":["total","new","active"],"additionalProperties":false},"people":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"new":{"type":"integer","minimum":0},"active":{"type":"integer","minimum":0}},"required":["total","new","active"],"additionalProperties":false},"agents":{"type":"object","properties":{"managed":{"type":"integer","minimum":0},"keys":{"type":"integer","minimum":0},"oauthClients":{"type":"integer","minimum":0}},"required":["managed","keys","oauthClients"],"additionalProperties":false},"sessions":{"type":"object","properties":{"signIns":{"type":"integer","minimum":0},"sessions":{"type":"integer","minimum":0},"bySurface":{"type":"array","items":{"type":"object","properties":{"surface":{"type":"string"},"label":{"type":"string"},"n":{"type":"integer","minimum":0}},"required":["surface","n"],"additionalProperties":false}}},"required":["signIns","sessions","bySurface"],"additionalProperties":false},"money":{"type":"object","properties":{"spendMicroUsd":{"type":"integer"},"creditsFundedMicroUsd":{"type":"integer"},"balanceHeldMicroUsd":{"type":"integer"},"supplierVolume":{"type":"object","properties":{"relatedParty":{"type":"object","properties":{"orders":{"type":"integer","minimum":0},"volumeMicroUsd":{"type":"integer","minimum":0}},"required":["orders","volumeMicroUsd"],"additionalProperties":false},"thirdParty":{"type":"object","properties":{"orders":{"type":"integer","minimum":0},"volumeMicroUsd":{"type":"integer","minimum":0}},"required":["orders","volumeMicroUsd"],"additionalProperties":false},"grossMicroUsd":{"type":"integer","minimum":0},"refundsMicroUsd":{"type":"integer","minimum":0},"retainedMicroUsd":{"type":"integer","minimum":0},"tenants":{"type":"integer","minimum":0}},"required":["relatedParty","thirdParty","grossMicroUsd","refundsMicroUsd","retainedMicroUsd","tenants"],"additionalProperties":false}},"required":["spendMicroUsd","creditsFundedMicroUsd","balanceHeldMicroUsd","supplierVolume"],"additionalProperties":false},"calls":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"byOs":{"type":"array","items":{"type":"object","properties":{"bucket":{"anyOf":[{"type":"string"},{"type":"null"}]},"n":{"type":"integer","minimum":0}},"required":["bucket","n"],"additionalProperties":false}},"bySurface":{"type":"array","items":{"type":"object","properties":{"surface":{"type":"string"},"label":{"type":"string"},"n":{"type":"integer","minimum":0}},"required":["surface","n"],"additionalProperties":false}},"byCallerKind":{"type":"array","items":{"type":"object","properties":{"bucket":{"anyOf":[{"type":"string"},{"type":"null"}]},"n":{"type":"integer","minimum":0}},"required":["bucket","n"],"additionalProperties":false}}},"required":["total","byOs","bySurface","byCallerKind"],"additionalProperties":false},"tokens":{"type":"object","properties":{"in":{"type":"integer","minimum":0},"out":{"type":"integer","minimum":0},"byModel":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string"},"tokensIn":{"type":"integer","minimum":0},"tokensOut":{"type":"integer","minimum":0},"calls":{"type":"integer","minimum":0}},"required":["model","tokensIn","tokensOut"],"additionalProperties":false}},"byOs":{"type":"array","items":{"type":"object","properties":{"bucket":{"anyOf":[{"type":"string"},{"type":"null"}]},"tokensIn":{"type":"integer","minimum":0},"tokensOut":{"type":"integer","minimum":0},"calls":{"type":"integer","minimum":0}},"required":["bucket","tokensIn","tokensOut"],"additionalProperties":false}}},"required":["in","out","byModel","byOs"],"additionalProperties":false}},"required":["companies","people","agents","sessions","money","calls","tokens"],"additionalProperties":false},"companies":{"type":"array","items":{"type":"object","properties":{"company":{"type":"string","pattern":"^co-[a-f0-9]{16}$"},"people":{"type":"integer","minimum":0},"peopleNew":{"type":"integer","minimum":0},"peopleActive":{"type":"integer","minimum":0},"agents":{"type":"integer","minimum":0},"keys":{"type":"integer","minimum":0},"oauthClients":{"type":"integer","minimum":0},"signIns":{"type":"integer","minimum":0},"sessions":{"type":"integer","minimum":0},"sessionsBySurface":{"type":"array","items":{"type":"object","properties":{"surface":{"type":"string"},"label":{"type":"string"},"n":{"type":"integer","minimum":0}},"required":["surface","n"],"additionalProperties":false}},"createdInPeriod":{"type":"boolean"},"calls":{"type":"integer","minimum":0},"tokensIn":{"type":"integer","minimum":0},"tokensOut":{"type":"integer","minimum":0},"spendMicroUsd":{"type":"integer","minimum":0},"creditsFundedMicroUsd":{"type":"integer","minimum":0},"balanceHeldMicroUsd":{"type":"integer","minimum":0},"lastActiveAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"callsBySurface":{"type":"array","items":{"type":"object","properties":{"surface":{"type":"string"},"label":{"type":"string"},"n":{"type":"integer","minimum":0}},"required":["surface","label","n"],"additionalProperties":false}}},"required":["company","people","agents","calls","tokensIn","tokensOut","spendMicroUsd","lastActiveAt"],"additionalProperties":false}},"health":{"type":"object","properties":{"jobsRunning":{"type":"integer","minimum":0},"byOs":{"type":"array","items":{"type":"object","properties":{"bucket":{"anyOf":[{"type":"string"},{"type":"null"}]},"n":{"type":"integer","minimum":0}},"required":["bucket","n"],"additionalProperties":false}},"failures":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}]},"n":{"type":"integer","minimum":0}},"required":["code","n"],"additionalProperties":false}}},"required":["jobsRunning","byOs","failures"],"additionalProperties":false},"quality":{"type":"object","properties":{"timeToResult":{"type":"object","properties":{"measured":{"type":"boolean"},"jobsMeasured":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"companiesMeasured":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"p50Ms":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"p95Ms":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["measured","jobsMeasured","companiesMeasured","p50Ms","p95Ms"],"additionalProperties":false},"interventions":{"type":"object","properties":{"measured":{"type":"boolean"},"events":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"jobs":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["measured","events","jobs"],"additionalProperties":false},"costByOs":{"type":"array","items":{"type":"object","properties":{"bucket":{"anyOf":[{"type":"string"},{"type":"null"}]},"costMicroUsd":{"type":"integer","minimum":0},"chargeMicroUsd":{"type":"integer","minimum":0}},"required":["bucket","costMicroUsd","chargeMicroUsd"],"additionalProperties":false}},"releases":{"type":"object","properties":{"measured":{"type":"boolean"},"scope":{"type":"string","enum":["company"]},"verified":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"rollbacks":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"companiesOrRepositories":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["measured","scope","verified","rollbacks","companiesOrRepositories"],"additionalProperties":false}},"required":["timeToResult","interventions","costByOs","releases"],"additionalProperties":false},"names":{"type":"object","additionalProperties":{"type":"string"}},"computedAt":{"type":"string"}},"required":["schema","period","engine","totals","companies","health","quality","computedAt"],"additionalProperties":false}}}}},"x-scope":"platform:analyse","x-effect":"read"}},"/v1/sso/start":{"get":{"operationId":"sso.start","summary":"Public. Answers a redirect to the company's provider for a proven domain, and one page that says the company has not set up single sign-on otherwise. Writes no session.","security":[],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"type":"string","maxLength":253}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"redirect":{"type":"string","maxLength":2048}},"required":["redirect"],"additionalProperties":false}}}}},"x-scope":null,"x-effect":"read"}},"/v1/sso/callback":{"post":{"operationId":"sso.callback","summary":"Public. The ACS and the OIDC return: takes the provider's signed response, writes the ordinary session or refuses. Nothing a caller sends selects a tenant.","security":[],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"tenant":{"type":"string"},"role":{"type":"string"},"email":{"type":"string"}},"required":["tenant","role","email"],"additionalProperties":false}}}}},"x-scope":null,"x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/sso/recovery/complete":{"post":{"operationId":"sso.recovery.complete","summary":"Public. A recovery code and the owner's own confirmed email, in exchange for one one-hour session. Single use.","security":[],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"tenant":{"type":"string"},"role":{"type":"string"},"email":{"type":"string"}},"required":["tenant","role","email"],"additionalProperties":false}}}}},"x-scope":null,"x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-f0-9]{64}$"},"email":{"type":"string","maxLength":254}},"required":["code","email"],"additionalProperties":false}}}}}},"/v1/events":{"get":{"operationId":"events.list","summary":"The company's ordered event list: at most 200 rows after the cursor `after`, oldest first, and only the event types whose object scope this principal holds. `next` is the last id returned and is null at the end; the same `after` always returns the same rows. An event carries ids, a closed type and a new state where the type has one, and no content.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"after","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9]{1,19}$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":1},"type":{"type":"string","maxLength":80},"at":{"type":"string","format":"date-time"},"object":{"type":"object","properties":{"kind":{"type":"string","maxLength":40},"id":{"type":"string","maxLength":80}},"required":["kind","id"],"additionalProperties":false},"state":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["id","type","at","object","state"],"additionalProperties":false}},"next":{"anyOf":[{"type":"string","pattern":"^[0-9]{1,19}$"},{"type":"null"}]}},"required":["events","next"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read"}},"/v1/pricing":{"get":{"operationId":"pricing.get","summary":"The rate card in force, the next one if scheduled, the approved margins and the charging policy. Served without a key: a price a company cannot read before it spends is not a price.","security":[],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"0human.pricing.v1"},"at":{"type":"string","format":"date-time"},"card":{"type":"object","properties":{"version":{"type":"string"},"effectiveAt":{"type":"string"},"identity":{"type":"boolean"},"note":{"type":"string"},"rates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"string","enum":["variable","tool","persistent","write"]},"unit":{"type":"string"},"summary":{"type":"string"},"microUsd":{"type":"integer","minimum":0},"multiplierBps":{"type":"integer","minimum":0},"rounding":{"type":"string"},"failure":{"type":"string"},"pending":{"type":"boolean"}},"required":[],"additionalProperties":false}}},"required":["version","effectiveAt","rates"],"additionalProperties":false},"next":{"anyOf":[{"type":"object","properties":{"version":{"type":"string"},"effectiveAt":{"type":"string"},"chargeable":{"type":"boolean"}},"required":["version","effectiveAt","chargeable"],"additionalProperties":false},{"type":"null"}]},"margins":{"type":"object"},"charging":{"type":"object"},"noticeDays":{"type":"integer","minimum":0}},"required":["schema","card"],"additionalProperties":false}}}}},"x-scope":null,"x-effect":"read"}},"/v1/quotes":{"post":{"operationId":"quotes.create","summary":"An estimate before a job: a range and an expiry, computed in code from the rate card and the ceiling the caller names. Calls no provider, costs nothing and moves no money. The high end is the maximum the work is held at, and a receipt can never exceed it. A range-shaped operation needs `maximumMicroUsd`; a fixed-shaped one carries its own price and refuses a maximum, so `agentos.rosters.deploy` quotes the roster at zero before it is deployed. Shaped input (a measured distribution per kind of work) arrives with D05a-2, because an estimate that pretends to a number nobody measured is not an estimate.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"quote":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"operation":{"type":"string","maxLength":80},"kind":{"type":"string","enum":["range","fixed"]},"rateCard":{"type":"string"},"lowMicroUsd":{"type":"integer","minimum":0},"highMicroUsd":{"type":"integer","minimum":0},"createdAt":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}},"required":["id","operation","kind","rateCard","lowMicroUsd","highMicroUsd","createdAt","expiresAt"],"additionalProperties":false},"estimate":{"type":"object","properties":{"basis":{"type":"string"},"unit":{"type":"string"},"rates":{"type":"array","items":{"type":"string"}},"note":{"type":"string"}},"required":["basis","unit","rates","note"],"additionalProperties":false}},"required":["quote","estimate"],"additionalProperties":false}}}}},"x-scope":null,"x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"string","maxLength":80},"maximumMicroUsd":{"type":"integer","minimum":1,"maximum":9007199254740991},"tier":{"type":"string","enum":["auto","coding"]}},"required":["operation"],"additionalProperties":false}}}}}},"/v1/receipts":{"get":{"operationId":"receipts.list","summary":"The last ten receipts for this company, newest first. Each is the same itemised receipt receipts.get returns; one that does not add up is marked unavailable rather than shown short.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"0human.receipts.v1"},"receipts":{"type":"array","items":{"type":"object","properties":{"schema":{"const":"0human.receipt.v1"},"holdId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"state":{"type":"string"},"authorisedMicroUsd":{"type":"integer","minimum":0},"chargedMicroUsd":{"type":"integer","minimum":0},"costMicroUsd":{"type":"integer","minimum":0},"absorbedMicroUsd":{"type":"integer","minimum":0},"releasedMicroUsd":{"type":"integer","minimum":0},"remainingMicroUsd":{"type":"integer","minimum":0},"withinAuthorised":{"type":"boolean"},"operation":{"type":"string"},"reference":{"type":"string"},"runId":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"card":{"type":"string"},"createdAt":{"type":"string"},"settledAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object"}}},"required":["schema","holdId","state"],"additionalProperties":false}}},"required":["schema","receipts"],"additionalProperties":false}}}}},"x-scope":"billing:read","x-effect":"read"}},"/v1/receipts/{id}":{"get":{"operationId":"receipts.get","summary":"The itemised receipt for one hold: the authorised maximum, what was charged, what it cost 0human, what was absorbed, and one line per rate. Readable with billing:read or by the key that started the work. If the lines do not sum to the charge the answer is refused, never shown.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"0human.receipt.v1"},"holdId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"operation":{"type":"string"},"reference":{"type":"string"},"runId":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"card":{"type":"string"},"state":{"type":"string","enum":["provisional","final","open","released"]},"authorisedMicroUsd":{"type":"integer","minimum":0},"chargedMicroUsd":{"type":"integer","minimum":0},"costMicroUsd":{"type":"integer","minimum":0},"absorbedMicroUsd":{"type":"integer","minimum":0},"releasedMicroUsd":{"type":"integer","minimum":0},"remainingMicroUsd":{"type":"integer","minimum":0},"withinAuthorised":{"type":"boolean"},"lines":{"type":"array","items":{"type":"object","properties":{"rate":{"type":"string"},"unit":{"type":"string"},"quantity":{"type":"integer","minimum":0},"costMicroUsd":{"type":"integer","minimum":0},"chargedMicroUsd":{"type":"integer","minimum":0},"outcome":{"type":"string","enum":["consumed","operator_fault","failed","cancelled"]},"absorbedReason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["rate","unit","quantity","costMicroUsd","chargedMicroUsd","outcome","absorbedReason"],"additionalProperties":false}},"createdAt":{"type":"string"},"settledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["schema","holdId","operation","state","authorisedMicroUsd","chargedMicroUsd","lines"],"additionalProperties":false}}}}},"x-scope":null,"x-effect":"read"}},"/v1/explore":{"get":{"operationId":"explore.get","summary":"Whether this company is on its free start, and the limits that apply while it is. $50 of promotional credit for 30 days, one company, two open runs, the economical tiers, three tools, $2 a run. The first settled purchase lifts all five.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"credit.explore.v1"},"tenant":{"type":"string"},"active":{"type":"boolean"},"state":{"type":"string","enum":["active","expired","lapsed","absent"]},"grantId":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"grantedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"grantedMicroUsd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"availableMicroUsd":{"type":"integer","minimum":0},"limits":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["schema","tenant","active","state","availableMicroUsd"],"additionalProperties":false}}}}},"x-scope":"billing:read","x-effect":"read"}},"/v1/purchases/limits":{"get":{"operationId":"purchases.limits.get","summary":"This company  purchase ceiling, this month approved purchases, and what remains. Unset means uncapped: the finite quote is still the authority.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"credit.purchase-ceiling.v1"},"tenant":{"type":"string"},"configured":{"type":"boolean"},"purchasePerMonthMicroUsd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"version":{"type":"integer","minimum":0},"exposureMicroUsd":{"type":"string"},"remainingMicroUsd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"window":{"type":"string"}},"required":["schema","tenant","configured","version","exposureMicroUsd","window"],"additionalProperties":false}}}}},"x-scope":"billing:read","x-effect":"read"},"post":{"operationId":"purchases.limits.set","summary":"Set the ceiling a month of purchases must stay under, against the version the caller last read.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":1}},"required":["version"],"additionalProperties":false}}}}},"x-scope":"billing:admin","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"purchasePerMonthMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740000},"expectedVersion":{"type":"integer","minimum":0}},"required":["purchasePerMonthMicroUsd","expectedVersion"],"additionalProperties":false}}}}}},"/v1/models/policy":{"get":{"operationId":"models.policy.get","summary":"The model policy in force for this company: allowed providers and models, the fixed no-training rule, zero retention, region, route and price ceiling, with the version and who saved it. No credential is ever part of it.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"policy":{"type":"object","properties":{"schema":{"type":"string"},"version":{"type":"integer","minimum":0},"policy":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"},"maxItems":32,"uniqueItems":true},"models":{"type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:/+-]{0,159}$"},"maxItems":64,"uniqueItems":true},"noTraining":{"const":true,"description":"Not a switch: every allowed endpoint must commit not to train."},"zeroRetention":{"type":"boolean"},"region":{"anyOf":[{"type":"string","pattern":"^[a-z]{2}(?:-[a-z0-9]{1,16})?$"},{"type":"null"}]},"route":{"type":"string","enum":["router","own-key","cloud-account"]},"ownKey":{"anyOf":[{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"},{"type":"null"}]},"maxUsdPerMillion":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1000,"description":"The dearest price, in dollars per million tokens, a model may publish and still be run for this company. Null means the platform ceiling of 1000. It can only lower that ceiling."},{"type":"null"}]}},"required":[],"additionalProperties":false},"savedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"savedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaults":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"},"maxItems":32,"uniqueItems":true},"models":{"type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:/+-]{0,159}$"},"maxItems":64,"uniqueItems":true},"noTraining":{"const":true,"description":"Not a switch: every allowed endpoint must commit not to train."},"zeroRetention":{"type":"boolean"},"region":{"anyOf":[{"type":"string","pattern":"^[a-z]{2}(?:-[a-z0-9]{1,16})?$"},{"type":"null"}]},"route":{"type":"string","enum":["router","own-key","cloud-account"]},"ownKey":{"anyOf":[{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"},{"type":"null"}]},"maxUsdPerMillion":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1000,"description":"The dearest price, in dollars per million tokens, a model may publish and still be run for this company. Null means the platform ceiling of 1000. It can only lower that ceiling."},{"type":"null"}]}},"required":[],"additionalProperties":false},"source":{"type":"string","enum":["default","stored"],"description":"Which policy is in force: a saved version, or the defaults the runtime uses when no row is saved."},"wideningNeeds":{"type":"array","items":{"type":"string"}}},"required":["schema","version","policy","defaults","source","wideningNeeds"],"additionalProperties":false}},"required":["policy"],"additionalProperties":false}}}}},"x-scope":"connections:read","x-effect":"read"},"post":{"operationId":"models.policy.save","summary":"Save a new version of the model policy against the version read. A change that widens what agents may reach also needs account:admin from a signed-in person; a key can never widen it.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"policy":{"type":"object","properties":{"schema":{"type":"string"},"version":{"type":"integer","minimum":0},"policy":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"},"maxItems":32,"uniqueItems":true},"models":{"type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:/+-]{0,159}$"},"maxItems":64,"uniqueItems":true},"noTraining":{"const":true,"description":"Not a switch: every allowed endpoint must commit not to train."},"zeroRetention":{"type":"boolean"},"region":{"anyOf":[{"type":"string","pattern":"^[a-z]{2}(?:-[a-z0-9]{1,16})?$"},{"type":"null"}]},"route":{"type":"string","enum":["router","own-key","cloud-account"]},"ownKey":{"anyOf":[{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"},{"type":"null"}]},"maxUsdPerMillion":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1000,"description":"The dearest price, in dollars per million tokens, a model may publish and still be run for this company. Null means the platform ceiling of 1000. It can only lower that ceiling."},{"type":"null"}]}},"required":[],"additionalProperties":false},"savedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"savedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaults":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"},"maxItems":32,"uniqueItems":true},"models":{"type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:/+-]{0,159}$"},"maxItems":64,"uniqueItems":true},"noTraining":{"const":true,"description":"Not a switch: every allowed endpoint must commit not to train."},"zeroRetention":{"type":"boolean"},"region":{"anyOf":[{"type":"string","pattern":"^[a-z]{2}(?:-[a-z0-9]{1,16})?$"},{"type":"null"}]},"route":{"type":"string","enum":["router","own-key","cloud-account"]},"ownKey":{"anyOf":[{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"},{"type":"null"}]},"maxUsdPerMillion":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1000,"description":"The dearest price, in dollars per million tokens, a model may publish and still be run for this company. Null means the platform ceiling of 1000. It can only lower that ceiling."},{"type":"null"}]}},"required":[],"additionalProperties":false},"source":{"type":"string","enum":["default","stored"],"description":"Which policy is in force: a saved version, or the defaults the runtime uses when no row is saved."},"wideningNeeds":{"type":"array","items":{"type":"string"}}},"required":["schema","version","policy","defaults","source","wideningNeeds"],"additionalProperties":false}},"required":["policy"],"additionalProperties":false}}}}},"x-scope":"connections:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"base":{"type":"integer","minimum":0,"maximum":9007199254740991},"policy":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"},"maxItems":32,"uniqueItems":true},"models":{"type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:/+-]{0,159}$"},"maxItems":64,"uniqueItems":true},"noTraining":{"const":true,"description":"Not a switch: every allowed endpoint must commit not to train."},"zeroRetention":{"type":"boolean"},"region":{"anyOf":[{"type":"string","pattern":"^[a-z]{2}(?:-[a-z0-9]{1,16})?$"},{"type":"null"}]},"route":{"type":"string","enum":["router","own-key","cloud-account"]},"ownKey":{"anyOf":[{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"},{"type":"null"}]},"maxUsdPerMillion":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1000,"description":"The dearest price, in dollars per million tokens, a model may publish and still be run for this company. Null means the platform ceiling of 1000. It can only lower that ceiling."},{"type":"null"}]}},"required":[],"additionalProperties":false}},"required":["base","policy"],"additionalProperties":false}}}}}},"/v1/models/catalog":{"get":{"operationId":"models.catalog.get","summary":"Every model the router lists, in pages of 50: text, image, video, speech and every other kind. `q` is a search term: every word matches the start of a word in a model's id, name or provider. `kind` narrows to what a model produces (`text`, `image`, `video`, ...) and `supports` to a parameter it takes (`tools`, `reasoning`, ...). `filter` is `featured` for the recommended models or `allowed` for the ones this company's model policy allows. Each model carries its published prices as the router publishes them, whether this company's policy allows it, and the refusal code when it does not. A model is named by its id anywhere a model is asked for; there is no list to add one to.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":80}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,39}$"}},{"name":"supports","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,39}$"}},{"name":"filter","in":"query","required":false,"schema":{"type":"string","enum":["all","featured","allowed"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[1-9][0-9]{0,4}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"zerohuman.models.v1"},"tenantId":{"type":"string"},"checkedAt":{"type":"string"},"policyVersion":{"type":"integer","minimum":0},"query":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string"},{"type":"null"}]},"supports":{"anyOf":[{"type":"string"},{"type":"null"}]},"filter":{"type":"string","enum":["all","featured","allowed"]},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"kinds":{"type":"array","items":{"type":"string"}},"inputs":{"type":"array","items":{"type":"string"}},"contextLength":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"maxOutput":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"pricing":{"type":"object","additionalProperties":{"type":"string"}},"supports":{"type":"array","items":{"type":"string"}},"featured":{"type":"boolean"},"availability":{"type":"string","enum":["listed","unavailable"]},"firstSeenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"allowed":{"type":"boolean"},"refusal":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","provider","kinds","allowed","refusal"],"additionalProperties":false}},"count":{"type":"integer","minimum":0},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["schema","tenantId","models","count","nextCursor"],"additionalProperties":false}}}}},"x-scope":"connections:read","x-effect":"read"}},"/v1/models/detail":{"get":{"operationId":"models.get","summary":"One model of the catalog by its id (`id` is a query parameter, because a model id contains a slash): what it produces and takes, its limits, its published prices, and whether this company's model policy allows it, with the refusal code when it does not.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":160,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:/+-]{0,159}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"zerohuman.model.v1"},"tenantId":{"type":"string"},"policyVersion":{"type":"integer","minimum":0},"model":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"kinds":{"type":"array","items":{"type":"string"}},"inputs":{"type":"array","items":{"type":"string"}},"contextLength":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"maxOutput":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"pricing":{"type":"object","additionalProperties":{"type":"string"}},"supports":{"type":"array","items":{"type":"string"}},"featured":{"type":"boolean"},"availability":{"type":"string","enum":["listed","unavailable"]},"firstSeenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"allowed":{"type":"boolean"},"refusal":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","provider","kinds","allowed","refusal"],"additionalProperties":false}},"required":["schema","tenantId","model"],"additionalProperties":false}}}}},"x-scope":"connections:read","x-effect":"read"}},"/v1/models/connections":{"get":{"operationId":"models.connections.list","summary":"Every model connection this company may use, in the public shape only: id, kind, base URL, fingerprint and its declarations. Never a bearer, never a ciphertext. A row that is not a sealed record of this schema is left out rather than listed wrong.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["gateway","api_key"]},"baseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"provider":{"anyOf":[{"type":"string"},{"type":"null"}]},"fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasSecret":{"type":"boolean"},"noTraining":{"type":"boolean"},"zeroRetention":{"type":"boolean"},"region":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","hasSecret"],"additionalProperties":false}}},"required":["connections"],"additionalProperties":false}}}}},"x-scope":"connections:read","x-effect":"read"},"post":{"operationId":"models.connections.set","summary":"Add or repoint one of this company's own model connections. The URL always travels with its bearer and both are sealed in one record, so a connection can never be repointed to leak a stored key. A signed-in person stores it at once; a key or an agent is answered with a decide handoff for {id, kind, host} and nothing is stored until a person approves, after which the same call goes through. A body that carries what looks like a credential anywhere but bearer is refused.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"stored":{"type":"boolean"},"connection":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["gateway","api_key"]},"baseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"provider":{"anyOf":[{"type":"string"},{"type":"null"}]},"fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasSecret":{"type":"boolean"},"noTraining":{"type":"boolean"},"zeroRetention":{"type":"boolean"},"region":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","hasSecret"],"additionalProperties":false},{"type":"null"}]},"handoff":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"state":{"type":"string"},"subjectHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"title":{"type":"string"},"operation":{"type":"string"}},"required":["id","state"],"additionalProperties":false},{"type":"null"}]}},"required":["stored"],"additionalProperties":false}}}}},"x-scope":"connections:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"},"kind":{"type":"string","enum":["gateway","api_key"]},"baseUrl":{"type":"string","format":"uri","pattern":"^https://","maxLength":2048,"description":"Required for every connection but the company's own router key (id openrouter-own): that one may leave it out and is sealed with the router's own address, and it is refused with any other address."},"bearer":{"type":"string","writeOnly":true,"minLength":8,"maxLength":8192,"description":"Sealed with its URL in one record and never returned."},"provider":{"anyOf":[{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"},{"type":"null"}]},"noTraining":{"type":"boolean"},"zeroRetention":{"type":"boolean"},"region":{"anyOf":[{"type":"string","pattern":"^[a-z]{2}(?:-[a-z0-9]{1,16})?$"},{"type":"null"}]}},"required":["id","kind","bearer"],"additionalProperties":false}}}}}},"/v1/models/connections/{id}/removal":{"post":{"operationId":"models.connections.remove","summary":"Remove one of this company's own model connections from the one key store. Removal narrows what agents may reach, so a key may do it. The sealed row and its ciphertext are deleted; nothing else of the company is touched.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean"},"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,31}$"}},"required":["removed","id"],"additionalProperties":false}}}}},"x-scope":"connections:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/loops":{"get":{"operationId":"loops.list","summary":"loops list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}},"x-scope":"loops:read","x-effect":"read"},"post":{"operationId":"loops.create","summary":"Create a loop from its declaration: a clock, an event or a no-model check, one action, one budget across runs, a metric from the record and a stopping rule. An agent with no person is checked against the company's saved loop mandate; outside it the act is refused with the limit it hit and a decision the owner may take. A loop holds no credential and fires only a launch or an operation that already exists.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}},"x-scope":"loops:create","x-effect":"spend","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":80},"objective":{"type":"string","maxLength":500},"hypothesis":{"type":"string","maxLength":500},"ownerOs":{"type":"string","enum":["agentos","brainos","marketingos","foundryos","financeos","launchos","platform"]},"trigger":{"type":"object","properties":{"kind":{"type":"string","enum":["clock","event","check"]},"schedule":{"type":"object","properties":{"every":{"type":"string","enum":["hour","day","week"]},"at":{"type":"string"},"weekday":{"type":"integer","minimum":0,"maximum":6},"timezone":{"type":"string"}},"required":["every","timezone"],"additionalProperties":false},"events":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":20,"uniqueItems":true},"checkRef":{"type":"string","maxLength":80},"checkSource":{"type":"string","maxLength":2048},"everyMinutes":{"type":"integer","minimum":5,"maximum":1440}},"required":["kind"],"additionalProperties":false},"actions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["launch","operation"]},"launch":{"type":"object","properties":{"ask":{"type":"string","maxLength":2000},"recipe":{"type":"string"}},"required":["ask"],"additionalProperties":false},"operation":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"input":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"required":["id"],"additionalProperties":false},"effect":{"type":"string","enum":["send","post","publish","pay","change-account"]}},"required":["kind"],"additionalProperties":false},"minItems":1,"maxItems":8},"window":{"type":"object","properties":{"length":{"type":"integer","minimum":1,"maximum":90},"unit":{"type":"string","enum":["hour","day","week","month"]}},"required":["length","unit"],"additionalProperties":false},"metric":{"type":"object","properties":{"label":{"type":"string","enum":["accepted","rejected","revised","rolled_back","escaped_defect","refunded","replied","booked","converted","retained"]},"measure":{"type":"string","enum":["count","rate","value_microusd"]},"of":{"type":"string"},"direction":{"type":"string","enum":["up","down"]},"minimumWindow":{"type":"object","properties":{"length":{"type":"integer","minimum":1,"maximum":90},"unit":{"type":"string","enum":["hour","day","week","month"]}},"required":["length","unit"],"additionalProperties":false}},"required":["label","measure","direction","minimumWindow"],"additionalProperties":false},"budget":{"type":"object","properties":{"microUsd":{"type":"integer","minimum":1},"perRunMicroUsd":{"type":"integer","minimum":1},"period":{"type":"string","enum":["week","month","quarter","life"]}},"required":["microUsd","period"],"additionalProperties":false},"downside":{"type":"object","properties":{"actionsPerRun":{"type":"integer","minimum":1,"maximum":50},"outboundPerDay":{"type":"integer","minimum":0,"maximum":500},"never":{"type":"array","items":{"type":"string","enum":["send","post","publish","pay","change-account"]},"maxItems":5,"uniqueItems":true}},"required":["actionsPerRun"],"additionalProperties":false},"stopping":{"type":"object","properties":{"afterRunsWithoutImprovement":{"type":"integer","minimum":1,"maximum":50},"afterConsecutiveRefusals":{"type":"integer","minimum":1,"maximum":50},"escalate":{"type":"object","properties":{"afterRunsWithoutImprovement":{"type":"integer","minimum":1,"maximum":50},"to":{"type":"string","enum":["owner","stakeholder"]}},"required":["afterRunsWithoutImprovement","to"],"additionalProperties":false}},"required":["escalate"],"additionalProperties":false},"variants":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","maxLength":24},"action":{"type":"object","properties":{"kind":{"type":"string","enum":["launch","operation"]},"launch":{"type":"object","properties":{"ask":{"type":"string","maxLength":2000},"recipe":{"type":"string"}},"required":["ask"],"additionalProperties":false},"operation":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"input":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"required":["id"],"additionalProperties":false},"effect":{"type":"string","enum":["send","post","publish","pay","change-account"]}},"required":["kind"],"additionalProperties":false},"share":{"type":"integer","minimum":1,"maximum":100}},"required":["key","action"],"additionalProperties":false},"minItems":2,"maxItems":8},"minimumSample":{"type":"integer","minimum":2,"maximum":100000}},"required":["name","objective","trigger","actions","window","metric","budget","downside","stopping"],"additionalProperties":false}}}}}},"/v1/loops/{id}":{"get":{"operationId":"loops.read","summary":"loops read","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}},"x-scope":"loops:read","x-effect":"read"},"post":{"operationId":"loops.update","summary":"Any subset of a loop's declaration, as a new version. A growth of budget, metric or trigger kind is refused with a handoff: no loop widens its own authority.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}},"x-scope":"loops:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":80},"objective":{"type":"string","maxLength":500},"hypothesis":{"type":"string","maxLength":500},"ownerOs":{"type":"string","enum":["agentos","brainos","marketingos","foundryos","financeos","launchos","platform"]},"trigger":{"type":"object","properties":{"kind":{"type":"string","enum":["clock","event","check"]},"schedule":{"type":"object","properties":{"every":{"type":"string","enum":["hour","day","week"]},"at":{"type":"string"},"weekday":{"type":"integer","minimum":0,"maximum":6},"timezone":{"type":"string"}},"required":["every","timezone"],"additionalProperties":false},"events":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":20,"uniqueItems":true},"checkRef":{"type":"string","maxLength":80},"checkSource":{"type":"string","maxLength":2048},"everyMinutes":{"type":"integer","minimum":5,"maximum":1440}},"required":["kind"],"additionalProperties":false},"actions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["launch","operation"]},"launch":{"type":"object","properties":{"ask":{"type":"string","maxLength":2000},"recipe":{"type":"string"}},"required":["ask"],"additionalProperties":false},"operation":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"input":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"required":["id"],"additionalProperties":false},"effect":{"type":"string","enum":["send","post","publish","pay","change-account"]}},"required":["kind"],"additionalProperties":false},"minItems":1,"maxItems":8},"window":{"type":"object","properties":{"length":{"type":"integer","minimum":1,"maximum":90},"unit":{"type":"string","enum":["hour","day","week","month"]}},"required":["length","unit"],"additionalProperties":false},"metric":{"type":"object","properties":{"label":{"type":"string","enum":["accepted","rejected","revised","rolled_back","escaped_defect","refunded","replied","booked","converted","retained"]},"measure":{"type":"string","enum":["count","rate","value_microusd"]},"of":{"type":"string"},"direction":{"type":"string","enum":["up","down"]},"minimumWindow":{"type":"object","properties":{"length":{"type":"integer","minimum":1,"maximum":90},"unit":{"type":"string","enum":["hour","day","week","month"]}},"required":["length","unit"],"additionalProperties":false}},"required":["label","measure","direction","minimumWindow"],"additionalProperties":false},"budget":{"type":"object","properties":{"microUsd":{"type":"integer","minimum":1},"perRunMicroUsd":{"type":"integer","minimum":1},"period":{"type":"string","enum":["week","month","quarter","life"]}},"required":["microUsd","period"],"additionalProperties":false},"downside":{"type":"object","properties":{"actionsPerRun":{"type":"integer","minimum":1,"maximum":50},"outboundPerDay":{"type":"integer","minimum":0,"maximum":500},"never":{"type":"array","items":{"type":"string","enum":["send","post","publish","pay","change-account"]},"maxItems":5,"uniqueItems":true}},"required":["actionsPerRun"],"additionalProperties":false},"stopping":{"type":"object","properties":{"afterRunsWithoutImprovement":{"type":"integer","minimum":1,"maximum":50},"afterConsecutiveRefusals":{"type":"integer","minimum":1,"maximum":50},"escalate":{"type":"object","properties":{"afterRunsWithoutImprovement":{"type":"integer","minimum":1,"maximum":50},"to":{"type":"string","enum":["owner","stakeholder"]}},"required":["afterRunsWithoutImprovement","to"],"additionalProperties":false}},"required":["escalate"],"additionalProperties":false},"variants":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","maxLength":24},"action":{"type":"object","properties":{"kind":{"type":"string","enum":["launch","operation"]},"launch":{"type":"object","properties":{"ask":{"type":"string","maxLength":2000},"recipe":{"type":"string"}},"required":["ask"],"additionalProperties":false},"operation":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"input":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"required":["id"],"additionalProperties":false},"effect":{"type":"string","enum":["send","post","publish","pay","change-account"]}},"required":["kind"],"additionalProperties":false},"share":{"type":"integer","minimum":1,"maximum":100}},"required":["key","action"],"additionalProperties":false},"minItems":2,"maxItems":8},"minimumSample":{"type":"integer","minimum":2,"maximum":100000}},"required":["name","objective","trigger","actions","window","metric","budget","downside","stopping"],"additionalProperties":false}}}}}},"/v1/loops/{id}/runs":{"get":{"operationId":"loops.runs","summary":"loops runs","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}},"x-scope":"loops:read","x-effect":"read"}},"/v1/loops/{id}/result":{"get":{"operationId":"loops.result","summary":"loops result","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}},"x-scope":"loops:read","x-effect":"read"}},"/v1/loops/{id}/pause":{"post":{"operationId":"loops.pause","summary":"loops pause","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}},"x-scope":"loops:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/loops/{id}/resume":{"post":{"operationId":"loops.resume","summary":"loops resume","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}},"x-scope":"loops:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/loops/{id}/stop":{"post":{"operationId":"loops.stop","summary":"loops stop","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}},"x-scope":"loops:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/loops/mandate":{"get":{"operationId":"loops.mandate.read","summary":"loops mandate read","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}},"x-scope":"loops:read","x-effect":"read"}},"/v1/ablation/run":{"post":{"operationId":"platform.ablation.run","summary":"Bind one harness part's on/off comparison to real AgentOS launches. Without `runId` the operation freezes the declared roster (task-set version, each task's real ask, target and fixture from the evaluation mapping, the part, the arms and the repetitions) and starts every planned cell through the supported launch contract under one retry-stable identity, answering 202 with the plan, what each launch answered (its real launch id, status and effective harness setting) and the five counts kept separately: attempted, started, failed, completed and independently graded. With `runId` it reads that frozen roster back; with `runId` and `grades` every grade must name a launch this run started, in that launch's own arm and repetition, with an independent grader and the launch's settled cost. A duplicate, missing, mismatched, unstarted, unfinished, ungraded or same-setting arm — or an unsupported target — keeps the verdict `incomplete` and opens nothing. Opens a retirement candidate under TELEMETRY.md T10 only on a complete roster whose off arm is no worse across all three runs. Refused for a part marked not ablatable, for a part whose switch the runtime does not apply, and for the concerns that are never ablated. A grade's grader is the verified caller. A check grade is refused: approving a check hash does not show that the check evaluated this launch. A read of a graded run returns that saved judgment. A pre-migration row with no run id stays in the report with its candidate suppressed and its evidence incomplete. Nothing is removed, and the run that proposed a candidate never promotes it.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"0human.ablation.run.v1"},"os":{"type":"string"},"runId":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"evaluation":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"part":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","maxLength":80},"os":{"type":"string","maxLength":40},"taskSet":{"type":"string","maxLength":120},"ablatable":{"type":"boolean"},"concern":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["id","os","taskSet","ablatable"],"additionalProperties":false},{"type":"null"}]},"sampleSize":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"roster":{"anyOf":[{"type":"object","properties":{"schema":{"const":"0human.ablation.roster.v1"},"runId":{"type":"string","pattern":"^[0-9a-f-]{36}$"},"evaluation":{"type":"string","maxLength":40},"os":{"type":"string","maxLength":40},"part":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"os":{"type":"string","maxLength":40},"taskSet":{"type":"string","maxLength":120},"ablatable":{"type":"boolean"},"concern":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"off":{"type":"string","maxLength":240},"arms":{"anyOf":[{"type":"object","properties":{"on":{"type":"object","properties":{"escalationRetry":{"type":"boolean"},"checkpointMinutes":{"type":"integer","minimum":0},"toolCallCap":{"type":"integer","minimum":1}},"required":[],"additionalProperties":false},"off":{"type":"object","properties":{"escalationRetry":{"type":"boolean"},"checkpointMinutes":{"type":"integer","minimum":0},"toolCallCap":{"type":"integer","minimum":1}},"required":[],"additionalProperties":false}},"required":["on","off"],"additionalProperties":false},{"type":"null"}]}},"required":["id","os","taskSet","ablatable","off"],"additionalProperties":false},"arms":{"type":"array","items":{"type":"string","enum":["on","off"]}},"repetitions":{"type":"integer","minimum":1,"maximum":3},"budgetUsd":{"type":"number"},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":120},"target":{"type":"string","enum":["none","site","repo","supabase"]},"ask":{"type":"string","maxLength":8000},"request":{"type":"object","properties":{"ask":{"type":"string","maxLength":8000},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["none","github","repo"]},"repository":{"type":"string","maxLength":200},"branch":{"type":"string","maxLength":200},"ref":{"type":"string","maxLength":120}},"required":["kind"],"additionalProperties":false},"tier":{"type":"string","maxLength":20},"agents":{"type":"integer","minimum":1,"maximum":3}},"required":["ask","target","tier","agents"],"additionalProperties":false}},"required":["id","target","ask","request"],"additionalProperties":false}},"unsupported":{"type":"array","items":{"type":"object","properties":{"task":{"type":"string","maxLength":120},"code":{"type":"string","maxLength":40},"detail":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}]}},"required":["task","code"],"additionalProperties":false}},"cells":{"type":"array","items":{"type":"object","properties":{"cell":{"type":"string","maxLength":200},"task":{"type":"string","maxLength":120},"arm":{"type":"string","enum":["on","off"]},"repetition":{"type":"integer","minimum":1,"maximum":3},"key":{"type":"string","maxLength":128},"setting":{"anyOf":[{"type":"object","properties":{"escalationRetry":{"type":"boolean"},"checkpointMinutes":{"type":"integer","minimum":0},"toolCallCap":{"type":"integer","minimum":1}},"required":[],"additionalProperties":false},{"type":"null"}]},"signature":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["cell","task","arm","repetition","key"],"additionalProperties":false}}},"required":["schema","runId","evaluation","os","part","arms","repetitions","cells"],"additionalProperties":false},{"type":"null"}]},"cells":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"cell":{"type":"string","maxLength":200},"task":{"type":"string","maxLength":120},"arm":{"type":"string","enum":["on","off"]},"repetition":{"type":"integer","minimum":1,"maximum":3},"key":{"type":"string","maxLength":128},"launchId":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"status":{"type":"string","maxLength":40},"settled":{"type":"boolean"},"spentUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"effective":{"anyOf":[{"type":"object","properties":{"part":{"type":"string","maxLength":80},"arm":{"type":"string","enum":["on","off"]},"setting":{"type":"object","properties":{"escalationRetry":{"type":"boolean"},"checkpointMinutes":{"type":"integer","minimum":0},"toolCallCap":{"type":"integer","minimum":1}},"required":[],"additionalProperties":false}},"required":["part","arm","setting"],"additionalProperties":false},{"type":"null"}]},"applied":{"anyOf":[{"type":"object","properties":{"part":{"type":"string","maxLength":80},"arm":{"type":"string","enum":["on","off"]},"escalationRetry":{"type":"boolean"},"checkpointMinutes":{"type":"number"},"toolCallCap":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]}},"required":["part","arm","escalationRetry","checkpointMinutes"],"additionalProperties":false},{"type":"null"}]},"actor":{"type":"string","maxLength":120},"failure":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]}},"required":["cell","task","arm","repetition","launchId","status"],"additionalProperties":false}},{"type":"null"}]},"counts":{"anyOf":[{"type":"object","properties":{"attempted":{"type":"integer","minimum":0},"started":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"independentlyGraded":{"type":"integer","minimum":0},"awaitingGrading":{"type":"integer","minimum":0},"unsupported":{"type":"integer","minimum":0}},"required":["attempted","started","failed","completed","independentlyGraded","awaitingGrading","unsupported"],"additionalProperties":false},{"type":"null"}]},"grades":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"cell":{"type":"string","maxLength":200},"launchId":{"type":"string","maxLength":40},"arm":{"type":"string","enum":["on","off"]},"repetition":{"type":"integer","minimum":1,"maximum":3},"pass":{"type":"boolean"},"grader":{"type":"object","properties":{"kind":{"type":"string","enum":["person","check"]},"id":{"type":"string","minLength":1,"maxLength":120}},"required":["kind","id"],"additionalProperties":false},"costMicroUsd":{"type":"integer","minimum":0}},"required":["launchId","arm","repetition","pass","grader"],"additionalProperties":false}},{"type":"null"}]},"reasons":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","maxLength":60},"cell":{"type":"string","maxLength":200},"launchId":{"type":"string","maxLength":40},"task":{"type":"string","maxLength":120},"pair":{"type":"string","maxLength":200},"status":{"type":"string","maxLength":40},"detail":{"type":"string","maxLength":240}},"required":[],"additionalProperties":false}},{"type":"null"}]},"events":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"submitted":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"partId":{"type":"string","maxLength":80},"runId":{"type":"string","maxLength":40},"evaluation":{"type":"string","maxLength":40},"planned":{"type":"integer","minimum":0},"counts":{"type":"object","properties":{"attempted":{"type":"integer","minimum":0},"started":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"independentlyGraded":{"type":"integer","minimum":0},"awaitingGrading":{"type":"integer","minimum":0},"unsupported":{"type":"integer","minimum":0}},"required":["attempted","started","failed","completed","independentlyGraded","awaitingGrading","unsupported"],"additionalProperties":false},"unsupported":{"type":"array","items":{"type":"object","properties":{"task":{"type":"string","maxLength":120},"code":{"type":"string","maxLength":40},"detail":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}]}},"required":["task","code"],"additionalProperties":false}}},"required":["partId","runId","planned","counts"],"additionalProperties":false}},{"type":"null"}]},"row":{"anyOf":[{"type":"object","properties":{"part":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"os":{"type":"string","maxLength":40},"taskSet":{"type":"string","maxLength":120},"ablatable":{"type":"boolean"},"concern":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["id","os","taskSet","ablatable"],"additionalProperties":false},"on":{"type":"object","properties":{"runs":{"type":"integer","minimum":0},"passed":{"type":"integer","minimum":0},"passRate":{"type":"number"},"costMicroUsd":{"type":"integer","minimum":0},"costPerPassedTaskMicrousd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["runs","passed","passRate","costMicroUsd","costPerPassedTaskMicrousd"],"additionalProperties":false},"off":{"type":"object","properties":{"runs":{"type":"integer","minimum":0},"passed":{"type":"integer","minimum":0},"passRate":{"type":"number"},"costMicroUsd":{"type":"integer","minimum":0},"costPerPassedTaskMicrousd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["runs","passed","passRate","costMicroUsd","costPerPassedTaskMicrousd"],"additionalProperties":false},"perRun":{"type":"array","items":{"type":"object","properties":{"run":{"type":"integer","minimum":1,"maximum":3},"on":{"anyOf":[{"type":"number"},{"type":"null"}]},"off":{"anyOf":[{"type":"number"},{"type":"null"}]},"complete":{"type":"boolean"}},"required":["run","complete"],"additionalProperties":false}},"complete":{"type":"boolean"},"holdsAcrossRuns":{"type":"boolean"},"difference":{"type":"number"},"verdict":{"type":"string","enum":["earns_its_place","off_no_worse","noise","not_run","submitted","incomplete"]},"candidate":{"anyOf":[{"type":"object","properties":{"schema":{"const":"0human.ablation.candidate.v1"},"partId":{"type":"string"},"os":{"type":"string"},"taskSet":{"type":"string"},"rule":{"const":"telemetry.T10"},"sink":{"type":"string"},"state":{"type":"string","enum":["open","promoted","rejected"]},"proposedBy":{"type":"string"},"on":{"type":"object","properties":{"runs":{"type":"integer","minimum":0},"passed":{"type":"integer","minimum":0},"passRate":{"type":"number"},"costMicroUsd":{"type":"integer","minimum":0},"costPerPassedTaskMicrousd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["runs","passed","passRate","costMicroUsd","costPerPassedTaskMicrousd"],"additionalProperties":false},"off":{"type":"object","properties":{"runs":{"type":"integer","minimum":0},"passed":{"type":"integer","minimum":0},"passRate":{"type":"number"},"costMicroUsd":{"type":"integer","minimum":0},"costPerPassedTaskMicrousd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["runs","passed","passRate","costMicroUsd","costPerPassedTaskMicrousd"],"additionalProperties":false},"perRun":{"type":"array","items":{"type":"object","properties":{"run":{"type":"integer","minimum":1,"maximum":3},"on":{"anyOf":[{"type":"number"},{"type":"null"}]},"off":{"anyOf":[{"type":"number"},{"type":"null"}]},"complete":{"type":"boolean"}},"required":["run","complete"],"additionalProperties":false}}},"required":["schema","partId","os","rule","sink","state","proposedBy","on","off","perRun"],"additionalProperties":false},{"type":"null"}]},"evidence":{"type":"string","enum":["incomplete","launch-bound"]},"sample":{"type":"object","properties":{"complete":{"type":"boolean"},"reason":{"type":"string","maxLength":40},"cases":{"type":"array","items":{"type":"string","maxLength":120}},"sampleSize":{"type":"integer","minimum":0}},"required":["complete","reason"],"additionalProperties":false},"roster":{"type":"object","properties":{"schema":{"const":"0human.ablation.roster.v1"},"runId":{"type":"string","pattern":"^[0-9a-f-]{36}$"},"evaluation":{"type":"string","maxLength":40},"os":{"type":"string","maxLength":40},"part":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"os":{"type":"string","maxLength":40},"taskSet":{"type":"string","maxLength":120},"ablatable":{"type":"boolean"},"concern":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"off":{"type":"string","maxLength":240},"arms":{"anyOf":[{"type":"object","properties":{"on":{"type":"object","properties":{"escalationRetry":{"type":"boolean"},"checkpointMinutes":{"type":"integer","minimum":0},"toolCallCap":{"type":"integer","minimum":1}},"required":[],"additionalProperties":false},"off":{"type":"object","properties":{"escalationRetry":{"type":"boolean"},"checkpointMinutes":{"type":"integer","minimum":0},"toolCallCap":{"type":"integer","minimum":1}},"required":[],"additionalProperties":false}},"required":["on","off"],"additionalProperties":false},{"type":"null"}]}},"required":["id","os","taskSet","ablatable","off"],"additionalProperties":false},"arms":{"type":"array","items":{"type":"string","enum":["on","off"]}},"repetitions":{"type":"integer","minimum":1,"maximum":3},"budgetUsd":{"type":"number"},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":120},"target":{"type":"string","enum":["none","site","repo","supabase"]},"ask":{"type":"string","maxLength":8000},"request":{"type":"object","properties":{"ask":{"type":"string","maxLength":8000},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["none","github","repo"]},"repository":{"type":"string","maxLength":200},"branch":{"type":"string","maxLength":200},"ref":{"type":"string","maxLength":120}},"required":["kind"],"additionalProperties":false},"tier":{"type":"string","maxLength":20},"agents":{"type":"integer","minimum":1,"maximum":3}},"required":["ask","target","tier","agents"],"additionalProperties":false}},"required":["id","target","ask","request"],"additionalProperties":false}},"unsupported":{"type":"array","items":{"type":"object","properties":{"task":{"type":"string","maxLength":120},"code":{"type":"string","maxLength":40},"detail":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}]}},"required":["task","code"],"additionalProperties":false}},"cells":{"type":"array","items":{"type":"object","properties":{"cell":{"type":"string","maxLength":200},"task":{"type":"string","maxLength":120},"arm":{"type":"string","enum":["on","off"]},"repetition":{"type":"integer","minimum":1,"maximum":3},"key":{"type":"string","maxLength":128},"setting":{"anyOf":[{"type":"object","properties":{"escalationRetry":{"type":"boolean"},"checkpointMinutes":{"type":"integer","minimum":0},"toolCallCap":{"type":"integer","minimum":1}},"required":[],"additionalProperties":false},{"type":"null"}]},"signature":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["cell","task","arm","repetition","key"],"additionalProperties":false}}},"required":["schema","runId","evaluation","os","part","arms","repetitions","cells"],"additionalProperties":false},"cells":{"type":"array","items":{"type":"object","properties":{"cell":{"type":"string","maxLength":200},"task":{"type":"string","maxLength":120},"arm":{"type":"string","enum":["on","off"]},"repetition":{"type":"integer","minimum":1,"maximum":3},"key":{"type":"string","maxLength":128},"launchId":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"status":{"type":"string","maxLength":40},"settled":{"type":"boolean"},"spentUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"effective":{"anyOf":[{"type":"object","properties":{"part":{"type":"string","maxLength":80},"arm":{"type":"string","enum":["on","off"]},"setting":{"type":"object","properties":{"escalationRetry":{"type":"boolean"},"checkpointMinutes":{"type":"integer","minimum":0},"toolCallCap":{"type":"integer","minimum":1}},"required":[],"additionalProperties":false}},"required":["part","arm","setting"],"additionalProperties":false},{"type":"null"}]},"applied":{"anyOf":[{"type":"object","properties":{"part":{"type":"string","maxLength":80},"arm":{"type":"string","enum":["on","off"]},"escalationRetry":{"type":"boolean"},"checkpointMinutes":{"type":"number"},"toolCallCap":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]}},"required":["part","arm","escalationRetry","checkpointMinutes"],"additionalProperties":false},{"type":"null"}]},"actor":{"type":"string","maxLength":120},"failure":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]}},"required":["cell","task","arm","repetition","launchId","status"],"additionalProperties":false}},"counts":{"type":"object","properties":{"attempted":{"type":"integer","minimum":0},"started":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"independentlyGraded":{"type":"integer","minimum":0},"awaitingGrading":{"type":"integer","minimum":0},"unsupported":{"type":"integer","minimum":0}},"required":["attempted","started","failed","completed","independentlyGraded","awaitingGrading","unsupported"],"additionalProperties":false},"grades":{"type":"array","items":{"type":"object","properties":{"cell":{"type":"string","maxLength":200},"launchId":{"type":"string","maxLength":40},"arm":{"type":"string","enum":["on","off"]},"repetition":{"type":"integer","minimum":1,"maximum":3},"pass":{"type":"boolean"},"grader":{"type":"object","properties":{"kind":{"type":"string","enum":["person","check"]},"id":{"type":"string","minLength":1,"maxLength":120}},"required":["kind","id"],"additionalProperties":false},"costMicroUsd":{"type":"integer","minimum":0}},"required":["launchId","arm","repetition","pass","grader"],"additionalProperties":false}},"reasons":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","maxLength":60},"cell":{"type":"string","maxLength":200},"launchId":{"type":"string","maxLength":40},"task":{"type":"string","maxLength":120},"pair":{"type":"string","maxLength":200},"status":{"type":"string","maxLength":40},"detail":{"type":"string","maxLength":240}},"required":[],"additionalProperties":false}},"runId":{"type":"string","maxLength":40},"evaluation":{"type":"string","maxLength":40},"os":{"type":"string","maxLength":40},"schema":{"type":"string","maxLength":60},"sampleSize":{"type":"integer","minimum":0},"repetitions":{"type":"integer","minimum":1,"maximum":3}},"required":["part","on","off","perRun","complete","holdsAcrossRuns","difference","verdict","candidate"],"additionalProperties":false},{"type":"null"}]},"rows":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"part":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"os":{"type":"string","maxLength":40},"taskSet":{"type":"string","maxLength":120},"ablatable":{"type":"boolean"},"concern":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["id","os","taskSet","ablatable"],"additionalProperties":false},"on":{"type":"object","properties":{"runs":{"type":"integer","minimum":0},"passed":{"type":"integer","minimum":0},"passRate":{"type":"number"},"costMicroUsd":{"type":"integer","minimum":0},"costPerPassedTaskMicrousd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["runs","passed","passRate","costMicroUsd","costPerPassedTaskMicrousd"],"additionalProperties":false},"off":{"type":"object","properties":{"runs":{"type":"integer","minimum":0},"passed":{"type":"integer","minimum":0},"passRate":{"type":"number"},"costMicroUsd":{"type":"integer","minimum":0},"costPerPassedTaskMicrousd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["runs","passed","passRate","costMicroUsd","costPerPassedTaskMicrousd"],"additionalProperties":false},"perRun":{"type":"array","items":{"type":"object","properties":{"run":{"type":"integer","minimum":1,"maximum":3},"on":{"anyOf":[{"type":"number"},{"type":"null"}]},"off":{"anyOf":[{"type":"number"},{"type":"null"}]},"complete":{"type":"boolean"}},"required":["run","complete"],"additionalProperties":false}},"complete":{"type":"boolean"},"holdsAcrossRuns":{"type":"boolean"},"difference":{"type":"number"},"verdict":{"type":"string","enum":["earns_its_place","off_no_worse","noise","not_run","submitted","incomplete"]},"candidate":{"anyOf":[{"type":"object","properties":{"schema":{"const":"0human.ablation.candidate.v1"},"partId":{"type":"string"},"os":{"type":"string"},"taskSet":{"type":"string"},"rule":{"const":"telemetry.T10"},"sink":{"type":"string"},"state":{"type":"string","enum":["open","promoted","rejected"]},"proposedBy":{"type":"string"},"on":{"type":"object","properties":{"runs":{"type":"integer","minimum":0},"passed":{"type":"integer","minimum":0},"passRate":{"type":"number"},"costMicroUsd":{"type":"integer","minimum":0},"costPerPassedTaskMicrousd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["runs","passed","passRate","costMicroUsd","costPerPassedTaskMicrousd"],"additionalProperties":false},"off":{"type":"object","properties":{"runs":{"type":"integer","minimum":0},"passed":{"type":"integer","minimum":0},"passRate":{"type":"number"},"costMicroUsd":{"type":"integer","minimum":0},"costPerPassedTaskMicrousd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["runs","passed","passRate","costMicroUsd","costPerPassedTaskMicrousd"],"additionalProperties":false},"perRun":{"type":"array","items":{"type":"object","properties":{"run":{"type":"integer","minimum":1,"maximum":3},"on":{"anyOf":[{"type":"number"},{"type":"null"}]},"off":{"anyOf":[{"type":"number"},{"type":"null"}]},"complete":{"type":"boolean"}},"required":["run","complete"],"additionalProperties":false}}},"required":["schema","partId","os","rule","sink","state","proposedBy","on","off","perRun"],"additionalProperties":false},{"type":"null"}]},"evidence":{"type":"string","enum":["incomplete","launch-bound"]},"sample":{"type":"object","properties":{"complete":{"type":"boolean"},"reason":{"type":"string","maxLength":40},"cases":{"type":"array","items":{"type":"string","maxLength":120}},"sampleSize":{"type":"integer","minimum":0}},"required":["complete","reason"],"additionalProperties":false},"roster":{"type":"object","properties":{"schema":{"const":"0human.ablation.roster.v1"},"runId":{"type":"string","pattern":"^[0-9a-f-]{36}$"},"evaluation":{"type":"string","maxLength":40},"os":{"type":"string","maxLength":40},"part":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"os":{"type":"string","maxLength":40},"taskSet":{"type":"string","maxLength":120},"ablatable":{"type":"boolean"},"concern":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"off":{"type":"string","maxLength":240},"arms":{"anyOf":[{"type":"object","properties":{"on":{"type":"object","properties":{"escalationRetry":{"type":"boolean"},"checkpointMinutes":{"type":"integer","minimum":0},"toolCallCap":{"type":"integer","minimum":1}},"required":[],"additionalProperties":false},"off":{"type":"object","properties":{"escalationRetry":{"type":"boolean"},"checkpointMinutes":{"type":"integer","minimum":0},"toolCallCap":{"type":"integer","minimum":1}},"required":[],"additionalProperties":false}},"required":["on","off"],"additionalProperties":false},{"type":"null"}]}},"required":["id","os","taskSet","ablatable","off"],"additionalProperties":false},"arms":{"type":"array","items":{"type":"string","enum":["on","off"]}},"repetitions":{"type":"integer","minimum":1,"maximum":3},"budgetUsd":{"type":"number"},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":120},"target":{"type":"string","enum":["none","site","repo","supabase"]},"ask":{"type":"string","maxLength":8000},"request":{"type":"object","properties":{"ask":{"type":"string","maxLength":8000},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["none","github","repo"]},"repository":{"type":"string","maxLength":200},"branch":{"type":"string","maxLength":200},"ref":{"type":"string","maxLength":120}},"required":["kind"],"additionalProperties":false},"tier":{"type":"string","maxLength":20},"agents":{"type":"integer","minimum":1,"maximum":3}},"required":["ask","target","tier","agents"],"additionalProperties":false}},"required":["id","target","ask","request"],"additionalProperties":false}},"unsupported":{"type":"array","items":{"type":"object","properties":{"task":{"type":"string","maxLength":120},"code":{"type":"string","maxLength":40},"detail":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}]}},"required":["task","code"],"additionalProperties":false}},"cells":{"type":"array","items":{"type":"object","properties":{"cell":{"type":"string","maxLength":200},"task":{"type":"string","maxLength":120},"arm":{"type":"string","enum":["on","off"]},"repetition":{"type":"integer","minimum":1,"maximum":3},"key":{"type":"string","maxLength":128},"setting":{"anyOf":[{"type":"object","properties":{"escalationRetry":{"type":"boolean"},"checkpointMinutes":{"type":"integer","minimum":0},"toolCallCap":{"type":"integer","minimum":1}},"required":[],"additionalProperties":false},{"type":"null"}]},"signature":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["cell","task","arm","repetition","key"],"additionalProperties":false}}},"required":["schema","runId","evaluation","os","part","arms","repetitions","cells"],"additionalProperties":false},"cells":{"type":"array","items":{"type":"object","properties":{"cell":{"type":"string","maxLength":200},"task":{"type":"string","maxLength":120},"arm":{"type":"string","enum":["on","off"]},"repetition":{"type":"integer","minimum":1,"maximum":3},"key":{"type":"string","maxLength":128},"launchId":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"status":{"type":"string","maxLength":40},"settled":{"type":"boolean"},"spentUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"effective":{"anyOf":[{"type":"object","properties":{"part":{"type":"string","maxLength":80},"arm":{"type":"string","enum":["on","off"]},"setting":{"type":"object","properties":{"escalationRetry":{"type":"boolean"},"checkpointMinutes":{"type":"integer","minimum":0},"toolCallCap":{"type":"integer","minimum":1}},"required":[],"additionalProperties":false}},"required":["part","arm","setting"],"additionalProperties":false},{"type":"null"}]},"applied":{"anyOf":[{"type":"object","properties":{"part":{"type":"string","maxLength":80},"arm":{"type":"string","enum":["on","off"]},"escalationRetry":{"type":"boolean"},"checkpointMinutes":{"type":"number"},"toolCallCap":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]}},"required":["part","arm","escalationRetry","checkpointMinutes"],"additionalProperties":false},{"type":"null"}]},"actor":{"type":"string","maxLength":120},"failure":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]}},"required":["cell","task","arm","repetition","launchId","status"],"additionalProperties":false}},"counts":{"type":"object","properties":{"attempted":{"type":"integer","minimum":0},"started":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"independentlyGraded":{"type":"integer","minimum":0},"awaitingGrading":{"type":"integer","minimum":0},"unsupported":{"type":"integer","minimum":0}},"required":["attempted","started","failed","completed","independentlyGraded","awaitingGrading","unsupported"],"additionalProperties":false},"grades":{"type":"array","items":{"type":"object","properties":{"cell":{"type":"string","maxLength":200},"launchId":{"type":"string","maxLength":40},"arm":{"type":"string","enum":["on","off"]},"repetition":{"type":"integer","minimum":1,"maximum":3},"pass":{"type":"boolean"},"grader":{"type":"object","properties":{"kind":{"type":"string","enum":["person","check"]},"id":{"type":"string","minLength":1,"maxLength":120}},"required":["kind","id"],"additionalProperties":false},"costMicroUsd":{"type":"integer","minimum":0}},"required":["launchId","arm","repetition","pass","grader"],"additionalProperties":false}},"reasons":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","maxLength":60},"cell":{"type":"string","maxLength":200},"launchId":{"type":"string","maxLength":40},"task":{"type":"string","maxLength":120},"pair":{"type":"string","maxLength":200},"status":{"type":"string","maxLength":40},"detail":{"type":"string","maxLength":240}},"required":[],"additionalProperties":false}},"runId":{"type":"string","maxLength":40},"evaluation":{"type":"string","maxLength":40},"os":{"type":"string","maxLength":40},"schema":{"type":"string","maxLength":60},"sampleSize":{"type":"integer","minimum":0},"repetitions":{"type":"integer","minimum":1,"maximum":3}},"required":["part","on","off","perRun","complete","holdsAcrossRuns","difference","verdict","candidate"],"additionalProperties":false}},{"type":"null"}]},"verdict":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"candidate":{"anyOf":[{"type":"object","properties":{"schema":{"const":"0human.ablation.candidate.v1"},"partId":{"type":"string"},"os":{"type":"string"},"taskSet":{"type":"string"},"rule":{"const":"telemetry.T10"},"sink":{"type":"string"},"state":{"type":"string","enum":["open","promoted","rejected"]},"proposedBy":{"type":"string"},"on":{"type":"object","properties":{"runs":{"type":"integer","minimum":0},"passed":{"type":"integer","minimum":0},"passRate":{"type":"number"},"costMicroUsd":{"type":"integer","minimum":0},"costPerPassedTaskMicrousd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["runs","passed","passRate","costMicroUsd","costPerPassedTaskMicrousd"],"additionalProperties":false},"off":{"type":"object","properties":{"runs":{"type":"integer","minimum":0},"passed":{"type":"integer","minimum":0},"passRate":{"type":"number"},"costMicroUsd":{"type":"integer","minimum":0},"costPerPassedTaskMicrousd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["runs","passed","passRate","costMicroUsd","costPerPassedTaskMicrousd"],"additionalProperties":false},"perRun":{"type":"array","items":{"type":"object","properties":{"run":{"type":"integer","minimum":1,"maximum":3},"on":{"anyOf":[{"type":"number"},{"type":"null"}]},"off":{"anyOf":[{"type":"number"},{"type":"null"}]},"complete":{"type":"boolean"}},"required":["run","complete"],"additionalProperties":false}}},"required":["schema","partId","os","rule","sink","state","proposedBy","on","off","perRun"],"additionalProperties":false},{"type":"null"}]}},"required":["schema","os"],"additionalProperties":false}}}}},"x-scope":"loops:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"os":{"type":"string","enum":["agentos","brainos","marketingos","foundryos","financeos","launchos","platform"]},"partId":{"type":"string","minLength":3,"maxLength":80},"tasks":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"minItems":1,"maxItems":20,"uniqueItems":true},"repetitions":{"type":"integer","minimum":1,"maximum":3},"evaluation":{"type":"string","pattern":"^[A-Za-z0-9_-]{4,40}$"},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500},"runId":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"grades":{"type":"array","items":{"type":"object","properties":{"launchId":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"arm":{"type":"string","enum":["on","off"]},"repetition":{"type":"integer","minimum":1,"maximum":3},"pass":{"type":"boolean"},"grader":{"type":"object","properties":{"kind":{"type":"string","enum":["person","check"]},"id":{"type":"string","minLength":1,"maxLength":120}},"required":["kind","id"],"additionalProperties":false}},"required":["launchId","arm","repetition","pass","grader"],"additionalProperties":false},"minItems":1,"maxItems":6000}},"required":["os"],"additionalProperties":false}}}}}},"/v1/ablation/report":{"get":{"operationId":"platform.ablation.report","summary":"Per part of one OS's registered harness: pass rate and cost per passed task for each arm, the three runs beside each other, and whether the off arm is no better or worse across all three. A difference that does not hold across runs is reported as noise, and the parts with an open retirement candidate are listed separately. Without `os`, every OS with a registered harness is reported and `os` answers all.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"os","in":"query","required":false,"schema":{"type":"string","enum":["agentos","brainos","marketingos","foundryos","financeos","launchos","platform"]}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"0human.ablation.report.v1"},"os":{"type":"string"},"parts":{"type":"array","items":{"type":"object","properties":{"part":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"os":{"type":"string","maxLength":40},"taskSet":{"type":"string","maxLength":120},"ablatable":{"type":"boolean"},"concern":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["id","os","taskSet","ablatable"],"additionalProperties":false},"on":{"type":"object","properties":{"runs":{"type":"integer","minimum":0},"passed":{"type":"integer","minimum":0},"passRate":{"type":"number"},"costMicroUsd":{"type":"integer","minimum":0},"costPerPassedTaskMicrousd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["runs","passed","passRate","costMicroUsd","costPerPassedTaskMicrousd"],"additionalProperties":false},"off":{"type":"object","properties":{"runs":{"type":"integer","minimum":0},"passed":{"type":"integer","minimum":0},"passRate":{"type":"number"},"costMicroUsd":{"type":"integer","minimum":0},"costPerPassedTaskMicrousd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["runs","passed","passRate","costMicroUsd","costPerPassedTaskMicrousd"],"additionalProperties":false},"perRun":{"type":"array","items":{"type":"object","properties":{"run":{"type":"integer","minimum":1,"maximum":3},"on":{"anyOf":[{"type":"number"},{"type":"null"}]},"off":{"anyOf":[{"type":"number"},{"type":"null"}]},"complete":{"type":"boolean"}},"required":["run","complete"],"additionalProperties":false}},"complete":{"type":"boolean"},"holdsAcrossRuns":{"type":"boolean"},"difference":{"type":"number"},"verdict":{"type":"string","enum":["earns_its_place","off_no_worse","noise","not_run","submitted","incomplete"]},"candidate":{"anyOf":[{"type":"object","properties":{"schema":{"const":"0human.ablation.candidate.v1"},"partId":{"type":"string"},"os":{"type":"string"},"taskSet":{"type":"string"},"rule":{"const":"telemetry.T10"},"sink":{"type":"string"},"state":{"type":"string","enum":["open","promoted","rejected"]},"proposedBy":{"type":"string"},"on":{"type":"object","properties":{"runs":{"type":"integer","minimum":0},"passed":{"type":"integer","minimum":0},"passRate":{"type":"number"},"costMicroUsd":{"type":"integer","minimum":0},"costPerPassedTaskMicrousd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["runs","passed","passRate","costMicroUsd","costPerPassedTaskMicrousd"],"additionalProperties":false},"off":{"type":"object","properties":{"runs":{"type":"integer","minimum":0},"passed":{"type":"integer","minimum":0},"passRate":{"type":"number"},"costMicroUsd":{"type":"integer","minimum":0},"costPerPassedTaskMicrousd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["runs","passed","passRate","costMicroUsd","costPerPassedTaskMicrousd"],"additionalProperties":false},"perRun":{"type":"array","items":{"type":"object","properties":{"run":{"type":"integer","minimum":1,"maximum":3},"on":{"anyOf":[{"type":"number"},{"type":"null"}]},"off":{"anyOf":[{"type":"number"},{"type":"null"}]},"complete":{"type":"boolean"}},"required":["run","complete"],"additionalProperties":false}}},"required":["schema","partId","os","rule","sink","state","proposedBy","on","off","perRun"],"additionalProperties":false},{"type":"null"}]},"evidence":{"type":"string","enum":["incomplete","launch-bound"]},"sample":{"type":"object","properties":{"complete":{"type":"boolean"},"reason":{"type":"string","maxLength":40},"cases":{"type":"array","items":{"type":"string","maxLength":120}},"sampleSize":{"type":"integer","minimum":0}},"required":["complete","reason"],"additionalProperties":false},"roster":{"type":"object","properties":{"schema":{"const":"0human.ablation.roster.v1"},"runId":{"type":"string","pattern":"^[0-9a-f-]{36}$"},"evaluation":{"type":"string","maxLength":40},"os":{"type":"string","maxLength":40},"part":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"os":{"type":"string","maxLength":40},"taskSet":{"type":"string","maxLength":120},"ablatable":{"type":"boolean"},"concern":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"off":{"type":"string","maxLength":240},"arms":{"anyOf":[{"type":"object","properties":{"on":{"type":"object","properties":{"escalationRetry":{"type":"boolean"},"checkpointMinutes":{"type":"integer","minimum":0},"toolCallCap":{"type":"integer","minimum":1}},"required":[],"additionalProperties":false},"off":{"type":"object","properties":{"escalationRetry":{"type":"boolean"},"checkpointMinutes":{"type":"integer","minimum":0},"toolCallCap":{"type":"integer","minimum":1}},"required":[],"additionalProperties":false}},"required":["on","off"],"additionalProperties":false},{"type":"null"}]}},"required":["id","os","taskSet","ablatable","off"],"additionalProperties":false},"arms":{"type":"array","items":{"type":"string","enum":["on","off"]}},"repetitions":{"type":"integer","minimum":1,"maximum":3},"budgetUsd":{"type":"number"},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":120},"target":{"type":"string","enum":["none","site","repo","supabase"]},"ask":{"type":"string","maxLength":8000},"request":{"type":"object","properties":{"ask":{"type":"string","maxLength":8000},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["none","github","repo"]},"repository":{"type":"string","maxLength":200},"branch":{"type":"string","maxLength":200},"ref":{"type":"string","maxLength":120}},"required":["kind"],"additionalProperties":false},"tier":{"type":"string","maxLength":20},"agents":{"type":"integer","minimum":1,"maximum":3}},"required":["ask","target","tier","agents"],"additionalProperties":false}},"required":["id","target","ask","request"],"additionalProperties":false}},"unsupported":{"type":"array","items":{"type":"object","properties":{"task":{"type":"string","maxLength":120},"code":{"type":"string","maxLength":40},"detail":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}]}},"required":["task","code"],"additionalProperties":false}},"cells":{"type":"array","items":{"type":"object","properties":{"cell":{"type":"string","maxLength":200},"task":{"type":"string","maxLength":120},"arm":{"type":"string","enum":["on","off"]},"repetition":{"type":"integer","minimum":1,"maximum":3},"key":{"type":"string","maxLength":128},"setting":{"anyOf":[{"type":"object","properties":{"escalationRetry":{"type":"boolean"},"checkpointMinutes":{"type":"integer","minimum":0},"toolCallCap":{"type":"integer","minimum":1}},"required":[],"additionalProperties":false},{"type":"null"}]},"signature":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["cell","task","arm","repetition","key"],"additionalProperties":false}}},"required":["schema","runId","evaluation","os","part","arms","repetitions","cells"],"additionalProperties":false},"cells":{"type":"array","items":{"type":"object","properties":{"cell":{"type":"string","maxLength":200},"task":{"type":"string","maxLength":120},"arm":{"type":"string","enum":["on","off"]},"repetition":{"type":"integer","minimum":1,"maximum":3},"key":{"type":"string","maxLength":128},"launchId":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"status":{"type":"string","maxLength":40},"settled":{"type":"boolean"},"spentUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"effective":{"anyOf":[{"type":"object","properties":{"part":{"type":"string","maxLength":80},"arm":{"type":"string","enum":["on","off"]},"setting":{"type":"object","properties":{"escalationRetry":{"type":"boolean"},"checkpointMinutes":{"type":"integer","minimum":0},"toolCallCap":{"type":"integer","minimum":1}},"required":[],"additionalProperties":false}},"required":["part","arm","setting"],"additionalProperties":false},{"type":"null"}]},"applied":{"anyOf":[{"type":"object","properties":{"part":{"type":"string","maxLength":80},"arm":{"type":"string","enum":["on","off"]},"escalationRetry":{"type":"boolean"},"checkpointMinutes":{"type":"number"},"toolCallCap":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]}},"required":["part","arm","escalationRetry","checkpointMinutes"],"additionalProperties":false},{"type":"null"}]},"actor":{"type":"string","maxLength":120},"failure":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]}},"required":["cell","task","arm","repetition","launchId","status"],"additionalProperties":false}},"counts":{"type":"object","properties":{"attempted":{"type":"integer","minimum":0},"started":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"independentlyGraded":{"type":"integer","minimum":0},"awaitingGrading":{"type":"integer","minimum":0},"unsupported":{"type":"integer","minimum":0}},"required":["attempted","started","failed","completed","independentlyGraded","awaitingGrading","unsupported"],"additionalProperties":false},"grades":{"type":"array","items":{"type":"object","properties":{"cell":{"type":"string","maxLength":200},"launchId":{"type":"string","maxLength":40},"arm":{"type":"string","enum":["on","off"]},"repetition":{"type":"integer","minimum":1,"maximum":3},"pass":{"type":"boolean"},"grader":{"type":"object","properties":{"kind":{"type":"string","enum":["person","check"]},"id":{"type":"string","minLength":1,"maxLength":120}},"required":["kind","id"],"additionalProperties":false},"costMicroUsd":{"type":"integer","minimum":0}},"required":["launchId","arm","repetition","pass","grader"],"additionalProperties":false}},"reasons":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","maxLength":60},"cell":{"type":"string","maxLength":200},"launchId":{"type":"string","maxLength":40},"task":{"type":"string","maxLength":120},"pair":{"type":"string","maxLength":200},"status":{"type":"string","maxLength":40},"detail":{"type":"string","maxLength":240}},"required":[],"additionalProperties":false}},"runId":{"type":"string","maxLength":40},"evaluation":{"type":"string","maxLength":40},"os":{"type":"string","maxLength":40},"schema":{"type":"string","maxLength":60},"sampleSize":{"type":"integer","minimum":0},"repetitions":{"type":"integer","minimum":1,"maximum":3}},"required":["part","on","off","perRun","complete","holdsAcrossRuns","difference","verdict","candidate"],"additionalProperties":false}},"candidates":{"type":"array","items":{"type":"object","properties":{"schema":{"const":"0human.ablation.candidate.v1"},"partId":{"type":"string"},"os":{"type":"string"},"taskSet":{"type":"string"},"rule":{"const":"telemetry.T10"},"sink":{"type":"string"},"state":{"type":"string","enum":["open","promoted","rejected"]},"proposedBy":{"type":"string"},"on":{"type":"object","properties":{"runs":{"type":"integer","minimum":0},"passed":{"type":"integer","minimum":0},"passRate":{"type":"number"},"costMicroUsd":{"type":"integer","minimum":0},"costPerPassedTaskMicrousd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["runs","passed","passRate","costMicroUsd","costPerPassedTaskMicrousd"],"additionalProperties":false},"off":{"type":"object","properties":{"runs":{"type":"integer","minimum":0},"passed":{"type":"integer","minimum":0},"passRate":{"type":"number"},"costMicroUsd":{"type":"integer","minimum":0},"costPerPassedTaskMicrousd":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["runs","passed","passRate","costMicroUsd","costPerPassedTaskMicrousd"],"additionalProperties":false},"perRun":{"type":"array","items":{"type":"object","properties":{"run":{"type":"integer","minimum":1,"maximum":3},"on":{"anyOf":[{"type":"number"},{"type":"null"}]},"off":{"anyOf":[{"type":"number"},{"type":"null"}]},"complete":{"type":"boolean"}},"required":["run","complete"],"additionalProperties":false}}},"required":["schema","partId","os","rule","sink","state","proposedBy","on","off","perRun"],"additionalProperties":false}}},"required":["schema","os","parts","candidates"],"additionalProperties":false}}}}},"x-scope":"loops:read","x-effect":"read"}},"/v1/home":{"get":{"operationId":"home.get","summary":"One read of the company: what is running, what has been spent and committed, what is blocked and what is waiting on a decision, from the records each OS already writes. A source that is unavailable is reported as that beside the rest. The screen and an agent read the same answer.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"company.home.v1"},"generatedAt":{"type":"string"},"company":{"type":"object","properties":{"state":{"type":"string","enum":["running","paused","unknown"]},"reason":{"type":"string","maxLength":280},"since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"version":{"type":"integer","minimum":0}},"required":["state","reason","version"],"additionalProperties":false},"goals":{"type":"object","properties":{"count":{"type":"integer","minimum":0},"items":{"type":"array","items":{"type":"object","properties":{"os":{"type":"string","maxLength":40},"id":{"type":"string","maxLength":60},"title":{"type":"string","maxLength":200},"detail":{"type":"string","maxLength":500},"status":{"type":"string","maxLength":40},"kind":{"type":"string","maxLength":40},"at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"progress":{"anyOf":[{"type":"object","properties":{"measure":{"anyOf":[{"type":"object","properties":{"metric":{"type":"string","maxLength":80},"target":{"anyOf":[{"type":"number"},{"type":"null"}]},"unit":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"period":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"definition":{"anyOf":[{"type":"string","maxLength":800},{"type":"null"}]},"definedBy":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"definedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":[],"additionalProperties":false},{"type":"null"}]},"current":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":60},"kind":{"type":"string","maxLength":40},"title":{"type":"string","maxLength":200},"at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":[],"additionalProperties":false}},"truncated":{"type":"boolean"}},"required":[],"additionalProperties":false},{"type":"null"}]}},"required":[],"additionalProperties":false}},"sources":{"type":"array","items":{"type":"object","properties":{"os":{"type":"string","maxLength":40},"status":{"type":"string","enum":["ok","empty","unavailable","not_configured","not_permitted"]},"scope":{"type":"string","maxLength":40},"spentTodayUsd":{"type":"number"}},"required":[],"additionalProperties":false}},"complete":{"type":"boolean"}},"required":["count","items","sources","complete"],"additionalProperties":false},"work":{"type":"object","properties":{"running":{"type":"integer","minimum":0},"items":{"type":"array","items":{"type":"object","properties":{"os":{"type":"string","maxLength":40},"id":{"type":"string","maxLength":60},"title":{"type":"string","maxLength":200},"detail":{"type":"string","maxLength":500},"status":{"type":"string","maxLength":40},"kind":{"type":"string","maxLength":40},"at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"progress":{"anyOf":[{"type":"object","properties":{"measure":{"anyOf":[{"type":"object","properties":{"metric":{"type":"string","maxLength":80},"target":{"anyOf":[{"type":"number"},{"type":"null"}]},"unit":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"period":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"definition":{"anyOf":[{"type":"string","maxLength":800},{"type":"null"}]},"definedBy":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"definedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":[],"additionalProperties":false},{"type":"null"}]},"current":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":60},"kind":{"type":"string","maxLength":40},"title":{"type":"string","maxLength":200},"at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":[],"additionalProperties":false}},"truncated":{"type":"boolean"}},"required":[],"additionalProperties":false},{"type":"null"}]}},"required":[],"additionalProperties":false}},"sources":{"type":"array","items":{"type":"object","properties":{"os":{"type":"string","maxLength":40},"status":{"type":"string","enum":["ok","empty","unavailable","not_configured","not_permitted"]},"scope":{"type":"string","maxLength":40},"spentTodayUsd":{"type":"number"}},"required":[],"additionalProperties":false}},"complete":{"type":"boolean"}},"required":["running","items","sources","complete"],"additionalProperties":false},"money":{"type":"object","properties":{"currency":{"const":"USD"},"heldMicroUsd":{"type":"integer","minimum":0},"spent30dMicroUsd":{"type":"integer","minimum":0},"spentFrom":{"type":"string","enum":["ledger","runs","none"]},"committedMicroUsd":{"type":"integer","minimum":0},"truncated":{"type":"boolean"},"supplierVolume":{"type":"object","properties":{"relatedParty":{"type":"object","properties":{"orders":{"type":"integer","minimum":0},"volumeMicroUsd":{"type":"integer","minimum":0}},"required":["orders","volumeMicroUsd"],"additionalProperties":false},"thirdParty":{"type":"object","properties":{"orders":{"type":"integer","minimum":0},"volumeMicroUsd":{"type":"integer","minimum":0}},"required":["orders","volumeMicroUsd"],"additionalProperties":false},"grossMicroUsd":{"type":"integer","minimum":0},"refundsMicroUsd":{"type":"integer","minimum":0},"retainedMicroUsd":{"type":"integer","minimum":0}},"required":["relatedParty","thirdParty","grossMicroUsd","refundsMicroUsd","retainedMicroUsd"],"additionalProperties":false},"sources":{"type":"array","items":{"type":"object","properties":{"os":{"type":"string","maxLength":40},"status":{"type":"string","enum":["ok","empty","unavailable","not_configured","not_permitted"]},"scope":{"type":"string","maxLength":40},"spentTodayUsd":{"type":"number"}},"required":[],"additionalProperties":false}}},"required":["currency","heldMicroUsd","spent30dMicroUsd","committedMicroUsd","truncated","supplierVolume","sources"],"additionalProperties":false},"blocked":{"type":"object","properties":{"count":{"type":"integer","minimum":0},"items":{"type":"array","items":{"type":"object","properties":{"os":{"type":"string","maxLength":40},"id":{"type":"string","maxLength":60},"title":{"type":"string","maxLength":200},"detail":{"type":"string","maxLength":500},"status":{"type":"string","maxLength":40},"kind":{"type":"string","maxLength":40},"at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"progress":{"anyOf":[{"type":"object","properties":{"measure":{"anyOf":[{"type":"object","properties":{"metric":{"type":"string","maxLength":80},"target":{"anyOf":[{"type":"number"},{"type":"null"}]},"unit":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"period":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"definition":{"anyOf":[{"type":"string","maxLength":800},{"type":"null"}]},"definedBy":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"definedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":[],"additionalProperties":false},{"type":"null"}]},"current":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":60},"kind":{"type":"string","maxLength":40},"title":{"type":"string","maxLength":200},"at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":[],"additionalProperties":false}},"truncated":{"type":"boolean"}},"required":[],"additionalProperties":false},{"type":"null"}]}},"required":[],"additionalProperties":false}},"sources":{"type":"array","items":{"type":"object","properties":{"os":{"type":"string","maxLength":40},"status":{"type":"string","enum":["ok","empty","unavailable","not_configured","not_permitted"]},"scope":{"type":"string","maxLength":40},"spentTodayUsd":{"type":"number"}},"required":[],"additionalProperties":false}},"complete":{"type":"boolean"}},"required":["count","items","sources","complete"],"additionalProperties":false},"decisions":{"type":"object","properties":{"count":{"type":"integer","minimum":0},"items":{"type":"array","items":{"type":"object","properties":{"os":{"type":"string","maxLength":40},"id":{"type":"string","maxLength":60},"title":{"type":"string","maxLength":200},"detail":{"type":"string","maxLength":500},"status":{"type":"string","maxLength":40},"kind":{"type":"string","maxLength":40},"at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"progress":{"anyOf":[{"type":"object","properties":{"measure":{"anyOf":[{"type":"object","properties":{"metric":{"type":"string","maxLength":80},"target":{"anyOf":[{"type":"number"},{"type":"null"}]},"unit":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"period":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"definition":{"anyOf":[{"type":"string","maxLength":800},{"type":"null"}]},"definedBy":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"definedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":[],"additionalProperties":false},{"type":"null"}]},"current":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":60},"kind":{"type":"string","maxLength":40},"title":{"type":"string","maxLength":200},"at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":[],"additionalProperties":false}},"truncated":{"type":"boolean"}},"required":[],"additionalProperties":false},{"type":"null"}]}},"required":[],"additionalProperties":false}},"sources":{"type":"array","items":{"type":"object","properties":{"os":{"type":"string","maxLength":40},"status":{"type":"string","enum":["ok","empty","unavailable","not_configured","not_permitted"]},"scope":{"type":"string","maxLength":40},"spentTodayUsd":{"type":"number"}},"required":[],"additionalProperties":false}},"complete":{"type":"boolean"}},"required":["count","items","sources","complete"],"additionalProperties":false},"pauseHistory":{"type":"array","items":{"type":"object","properties":{"seq":{"type":"integer","minimum":1},"from":{"type":"string","enum":["running","paused"]},"to":{"type":"string","enum":["running","paused"]},"reason":{"type":"string","maxLength":280},"actor":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"at":{"type":"string"}},"required":["seq","from","to","reason","actor","at"],"additionalProperties":false}}},"required":["schema","generatedAt","company","goals","work","money","blocked","decisions","pauseHistory"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read"}},"/v1/search":{"get":{"operationId":"company.search","summary":"Search this company: permitted pages, the people on its member list, the work this person may see, and the documents and results their audience may read. `q` is words to match (every word must appear); an empty query answers the categories and their indexes without listing records. Each category says whether it is `indexed` for this company, so a caller names only what it can actually search, and a category that could not be read is reported with its own status and scope rather than drawn as empty. Results never cross companies: each category is read through the owning system's own tenant-bound read.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":120}},{"name":"limit","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9]{1,2}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"company.search.v1"},"query":{"type":"string","maxLength":120},"generatedAt":{"type":"string"},"limit":{"type":"integer","minimum":1,"maximum":20},"categories":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","maxLength":20},"label":{"type":"string","maxLength":20},"indexed":{"type":"boolean"},"status":{"type":"string","enum":["ok","empty","unavailable","not_configured","not_permitted"]},"scope":{"type":"string","maxLength":40},"count":{"type":"integer","minimum":0},"items":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string","maxLength":20},"id":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"title":{"type":"string","maxLength":200},"detail":{"type":"string","maxLength":300},"href":{"type":"string","maxLength":300}},"required":["category","id","title","detail","href"],"additionalProperties":false},"maxItems":20}},"required":["key","label","indexed","status","count","items"],"additionalProperties":false},"minItems":5,"maxItems":5},"searchable":{"type":"array","items":{"type":"string","maxLength":20}},"sources":{"type":"array","items":{"type":"object","properties":{"os":{"type":"string","maxLength":20},"status":{"type":"string","maxLength":20},"scope":{"type":"string","maxLength":40}},"required":["os","status","scope"],"additionalProperties":false}}},"required":["schema","query","generatedAt","limit","categories","searchable","sources"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read"}},"/v1/speech/transcribe":{"post":{"operationId":"speech.transcribe","summary":"Turn a short piece of audio into text. Audio in, text out; nothing is stored, and the company is charged by the second of audio it sent. If the company's model policy cannot serve the speech route, the call is refused with the reason and the text path still works. The limits (one call, one company a day, one interview) are rows, not constants in a caller.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"seconds":{"type":"integer","minimum":1},"secondsMeasured":{"type":"boolean"},"words":{"type":"integer","minimum":0},"model":{"type":"string"},"chargedMicroUsd":{"type":"integer","minimum":0},"charged":{"type":"boolean"},"stored":{"type":"boolean"}},"required":["text","seconds","secondsMeasured","words","model","chargedMicroUsd","charged","stored"],"additionalProperties":false}}}}},"x-scope":"agent:create","x-effect":"spend","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"audioBase64":{"type":"string","minLength":4,"maxLength":8388608},"contentType":{"type":"string","enum":["audio/webm","audio/ogg","audio/mp4","audio/mpeg","audio/wav","audio/x-wav","audio/flac","audio/aac","audio/opus"]},"language":{"type":"string","pattern":"^[a-zA-Z]{2,3}(?:-[a-zA-Z0-9]{2,8})?$"},"interview":{"type":"string","pattern":"^[a-f0-9-]{36}$"}},"required":["audioBase64","contentType"],"additionalProperties":false}}}}}},"/v1/uploads":{"post":{"operationId":"uploads.create","summary":"Declare a file before sending it: name, type, size and SHA-256, checked against the limits and the allowed types. The same hash in the same company answers the existing upload. A small file may come inside the declaration as base64; otherwise the answer says where to send the bytes.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"upload":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"name":{"type":"string","maxLength":200},"type":{"type":"string"},"detectedType":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"type":"integer","minimum":0},"sha256":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]},"state":{"type":"string","enum":["waiting","ready","refused","removed"]},"hasText":{"type":"boolean"},"textReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"inline":{"type":"boolean"},"holders":{"type":"array","items":{"type":"object","properties":{"os":{"type":"string","maxLength":40},"kind":{"type":"string","maxLength":40},"ref":{"type":"string","maxLength":200}},"required":["os","kind","ref"],"additionalProperties":false}},"createdAt":{"type":"string"},"readyAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"removedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"duplicate":{"type":"boolean"}},"required":["id","name","type","bytes","state"],"additionalProperties":false},"sendTo":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["upload"],"additionalProperties":false}}}}},"x-scope":"uploads:write","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"type":{"type":"string","minLength":3,"maxLength":120,"pattern":"^[a-z0-9][a-z0-9.+/-]{1,118}$"},"bytes":{"type":"integer","minimum":0,"maximum":268435456},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"content":{"anyOf":[{"type":"string","maxLength":2097152,"description":"A small file sent inside the declaration, base64. At most 1 MiB before encoding."},{"type":"null"}]}},"required":["name","type","bytes","sha256"],"additionalProperties":false}}}}},"get":{"operationId":"uploads.list","summary":"The company's uploads, newest first, with a filter by type, by holder and by state. Removed tombstones answer only when state=removed.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string","minLength":3,"maxLength":120,"pattern":"^[a-z0-9][a-z0-9.+/-]{1,118}$"}},{"name":"holder","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"state","in":"query","required":false,"schema":{"type":"string","enum":["waiting","ready","refused","removed"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"string","pattern":"^[1-9][0-9]{0,2}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"uploads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"name":{"type":"string","maxLength":200},"type":{"type":"string"},"detectedType":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"type":"integer","minimum":0},"sha256":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]},"state":{"type":"string","enum":["waiting","ready","refused","removed"]},"hasText":{"type":"boolean"},"textReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"inline":{"type":"boolean"},"holders":{"type":"array","items":{"type":"object","properties":{"os":{"type":"string","maxLength":40},"kind":{"type":"string","maxLength":40},"ref":{"type":"string","maxLength":200}},"required":["os","kind","ref"],"additionalProperties":false}},"createdAt":{"type":"string"},"readyAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"removedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"duplicate":{"type":"boolean"}},"required":["id","name","type","bytes","state"],"additionalProperties":false}}},"required":["uploads"],"additionalProperties":false}}}}},"x-scope":"uploads:read","x-effect":"read"}},"/v1/uploads/{id}/content":{"put":{"operationId":"uploads.content.put","summary":"Send the bytes. Size, SHA-256 and the type read from the first bytes are checked as they arrive; a file that fails any check is refused and nothing is kept. The upload becomes ready.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"upload":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"name":{"type":"string","maxLength":200},"type":{"type":"string"},"detectedType":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"type":"integer","minimum":0},"sha256":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]},"state":{"type":"string","enum":["waiting","ready","refused","removed"]},"hasText":{"type":"boolean"},"textReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"inline":{"type":"boolean"},"holders":{"type":"array","items":{"type":"object","properties":{"os":{"type":"string","maxLength":40},"kind":{"type":"string","maxLength":40},"ref":{"type":"string","maxLength":200}},"required":["os","kind","ref"],"additionalProperties":false}},"createdAt":{"type":"string"},"readyAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"removedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"duplicate":{"type":"boolean"}},"required":["id","name","type","bytes","state"],"additionalProperties":false}},"required":["upload"],"additionalProperties":false}}}}},"x-scope":"uploads:write","x-effect":"write"},"get":{"operationId":"uploads.content.get","summary":"The bytes, as a download. Content-Disposition is attachment and X-Content-Type-Options is nosniff on every answer; an SVG is answered as text and rendered by no screen.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"name":{"type":"string"},"type":{"type":"string"},"bytes":{"type":"integer","minimum":0}},"required":["id"],"additionalProperties":false}}}}},"x-scope":"uploads:read","x-effect":"read"}},"/v1/uploads/{id}":{"get":{"operationId":"uploads.get","summary":"One upload: name, declared and detected type, size, hash, state, whether it has text, and the OS objects that hold it.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"upload":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"name":{"type":"string","maxLength":200},"type":{"type":"string"},"detectedType":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"type":"integer","minimum":0},"sha256":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]},"state":{"type":"string","enum":["waiting","ready","refused","removed"]},"hasText":{"type":"boolean"},"textReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"inline":{"type":"boolean"},"holders":{"type":"array","items":{"type":"object","properties":{"os":{"type":"string","maxLength":40},"kind":{"type":"string","maxLength":40},"ref":{"type":"string","maxLength":200}},"required":["os","kind","ref"],"additionalProperties":false}},"createdAt":{"type":"string"},"readyAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"removedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"duplicate":{"type":"boolean"}},"required":["id","name","type","bytes","state"],"additionalProperties":false}},"required":["upload"],"additionalProperties":false}}}}},"x-scope":"uploads:read","x-effect":"read"}},"/v1/uploads/{id}/text":{"get":{"operationId":"uploads.text.get","summary":"The text derived from the upload as Markdown, or null with the reason there is none (an image gives no text in this release). Text is derived once and kept beside the bytes.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","text","reason"],"additionalProperties":false}}}}},"x-scope":"uploads:read","x-effect":"read"}},"/v1/uploads/{id}/removal":{"post":{"operationId":"uploads.remove","summary":"Erase an upload: every OS that holds it is told first, then its bytes and its text are deleted and the row stays as a tombstone carrying a keyed fingerprint. A holder that fails stops the removal and nothing is deleted.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"const":true},"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"at":{"type":"string"},"receipt":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"required":["removed","id","at","receipt"],"additionalProperties":false}}}}},"x-scope":"uploads:erase","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}},"required":[],"additionalProperties":false}}}}}},"/v1/contacts":{"get":{"operationId":"contacts.list","summary":"The contacts of this company, with their addresses and consent per kind. The tenant comes from the verified principal; a kind narrows the list and never selects the tenant.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["slack","telegram","email","whatsapp"]}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"displayName":{"type":"string","maxLength":200},"optedOutAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"addresses":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["slack","telegram","email","whatsapp"]},"address":{"type":"string","minLength":3,"maxLength":320},"source":{"type":"string","enum":["person","verified_match"]}},"required":["kind","address","source"],"additionalProperties":false}},"consent":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["slack","telegram","email","whatsapp","all"]},"state":{"type":"string","enum":["unknown","granted","withdrawn"]},"words":{"type":"string","maxLength":500},"source":{"anyOf":[{"type":"string","enum":["person","import","inbound_message","verified_match"]},{"type":"null"}]},"givenAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"withdrawnAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["kind","state","words","source","givenAt","withdrawnAt"],"additionalProperties":false}},"createdAt":{"type":"string"}},"required":["id","displayName","optedOutAt","addresses","consent","createdAt"],"additionalProperties":false}}},"required":["contacts"],"additionalProperties":false}}}}},"x-scope":"contacts:read","x-effect":"read"},"post":{"operationId":"contacts.create","summary":"Create a contact: a person or business outside the company. It carries no address until one is linked, and no identity is inferred.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"contact":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"displayName":{"type":"string","maxLength":200},"optedOutAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"addresses":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["slack","telegram","email","whatsapp"]},"address":{"type":"string","minLength":3,"maxLength":320},"source":{"type":"string","enum":["person","verified_match"]}},"required":["kind","address","source"],"additionalProperties":false}},"consent":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["slack","telegram","email","whatsapp","all"]},"state":{"type":"string","enum":["unknown","granted","withdrawn"]},"words":{"type":"string","maxLength":500},"source":{"anyOf":[{"type":"string","enum":["person","import","inbound_message","verified_match"]},{"type":"null"}]},"givenAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"withdrawnAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["kind","state","words","source","givenAt","withdrawnAt"],"additionalProperties":false}},"createdAt":{"type":"string"}},"required":["id","displayName","optedOutAt","addresses","consent","createdAt"],"additionalProperties":false}},"required":["contact"],"additionalProperties":false}}}}},"x-scope":"contacts:write","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/v1/contacts/{contactId}":{"get":{"operationId":"contacts.get","summary":"One contact of this company: its addresses and its consent state for each kind. Another company's contact is not found.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"contact":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"displayName":{"type":"string","maxLength":200},"optedOutAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"addresses":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["slack","telegram","email","whatsapp"]},"address":{"type":"string","minLength":3,"maxLength":320},"source":{"type":"string","enum":["person","verified_match"]}},"required":["kind","address","source"],"additionalProperties":false}},"consent":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["slack","telegram","email","whatsapp","all"]},"state":{"type":"string","enum":["unknown","granted","withdrawn"]},"words":{"type":"string","maxLength":500},"source":{"anyOf":[{"type":"string","enum":["person","import","inbound_message","verified_match"]},{"type":"null"}]},"givenAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"withdrawnAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["kind","state","words","source","givenAt","withdrawnAt"],"additionalProperties":false}},"createdAt":{"type":"string"}},"required":["id","displayName","optedOutAt","addresses","consent","createdAt"],"additionalProperties":false}},"required":["contact"],"additionalProperties":false}}}}},"x-scope":"contacts:read","x-effect":"read"}},"/v1/contacts/{contactId}/addresses":{"post":{"operationId":"contacts.link","summary":"Join one address to a contact, by a signed-in person's act or by a verified match that names its provider and subject. A key cannot claim a person's act, and an address that already belongs to another contact is refused, never merged.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"contact":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"displayName":{"type":"string","maxLength":200},"optedOutAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"addresses":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["slack","telegram","email","whatsapp"]},"address":{"type":"string","minLength":3,"maxLength":320},"source":{"type":"string","enum":["person","verified_match"]}},"required":["kind","address","source"],"additionalProperties":false}},"consent":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["slack","telegram","email","whatsapp","all"]},"state":{"type":"string","enum":["unknown","granted","withdrawn"]},"words":{"type":"string","maxLength":500},"source":{"anyOf":[{"type":"string","enum":["person","import","inbound_message","verified_match"]},{"type":"null"}]},"givenAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"withdrawnAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["kind","state","words","source","givenAt","withdrawnAt"],"additionalProperties":false}},"createdAt":{"type":"string"}},"required":["id","displayName","optedOutAt","addresses","consent","createdAt"],"additionalProperties":false}},"required":["contact"],"additionalProperties":false}}}}},"x-scope":"contacts:write","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["slack","telegram","email","whatsapp"]},"address":{"type":"string","minLength":3,"maxLength":320},"by":{"type":"string","enum":["person","verified_match"]},"evidence":{"type":"object","properties":{"provider":{"type":"string","maxLength":80},"subject":{"type":"string","maxLength":200}},"required":[],"additionalProperties":false}},"required":["kind","address","by"],"additionalProperties":false}}}}}},"/v1/contacts/{contactId}/consent":{"get":{"operationId":"contacts.consent.get","summary":"The consent state for every kind, including one with no recorded answer (unknown). An opt-out stamps the contact and stops every kind.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"contactId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"optedOutAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"consent":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["slack","telegram","email","whatsapp","all"]},"state":{"type":"string","enum":["unknown","granted","withdrawn"]},"words":{"type":"string","maxLength":500},"source":{"anyOf":[{"type":"string","enum":["person","import","inbound_message","verified_match"]},{"type":"null"}]},"givenAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"withdrawnAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["kind","state","words","source","givenAt","withdrawnAt"],"additionalProperties":false}}},"required":["contactId","optedOutAt","consent"],"additionalProperties":false}}}}},"x-scope":"contacts:read","x-effect":"read"},"post":{"operationId":"contacts.consent.set","summary":"Record a consent for one kind, in the words the person was shown, or withdraw it. A withdrawal stops every channel: the contact is stamped and nothing is sent again on any kind.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"contactId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"optedOutAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"consent":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["slack","telegram","email","whatsapp","all"]},"state":{"type":"string","enum":["unknown","granted","withdrawn"]},"words":{"type":"string","maxLength":500},"source":{"anyOf":[{"type":"string","enum":["person","import","inbound_message","verified_match"]},{"type":"null"}]},"givenAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"withdrawnAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["kind","state","words","source","givenAt","withdrawnAt"],"additionalProperties":false}}},"required":["contactId","optedOutAt","consent"],"additionalProperties":false}}}}},"x-scope":"contacts:write","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["slack","telegram","email","whatsapp","all"]},"state":{"type":"string","enum":["unknown","granted","withdrawn"]},"words":{"type":"string","maxLength":500},"source":{"type":"string","enum":["person","import","inbound_message","verified_match"]}},"required":["kind","state"],"additionalProperties":false}}}}}},"/v1/contacts/{contactId}/export":{"get":{"operationId":"contacts.export","summary":"Everything this company holds about one contact: the contact, its addresses, its consent and its delivery records. No message text is held anywhere, so none is exported.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"zerohuman.contact-export.v1"},"exportedAt":{"type":"string"},"contact":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"displayName":{"type":"string","maxLength":200},"optedOutAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"addresses":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["slack","telegram","email","whatsapp"]},"address":{"type":"string","minLength":3,"maxLength":320},"source":{"type":"string","enum":["person","verified_match"]}},"required":["kind","address","source"],"additionalProperties":false}},"consent":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["slack","telegram","email","whatsapp","all"]},"state":{"type":"string","enum":["unknown","granted","withdrawn"]},"words":{"type":"string","maxLength":500},"source":{"anyOf":[{"type":"string","enum":["person","import","inbound_message","verified_match"]},{"type":"null"}]},"givenAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"withdrawnAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["kind","state","words","source","givenAt","withdrawnAt"],"additionalProperties":false}},"createdAt":{"type":"string"}},"required":["id","displayName","optedOutAt","addresses","consent","createdAt"],"additionalProperties":false},"deliveries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"kind":{"type":"string","enum":["slack","telegram","email","whatsapp"]},"direction":{"type":"string","enum":["inbound","outbound"]},"state":{"type":"string","enum":["sent","refused","received"]},"refused_check":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"checks":{"type":"array","items":{"type":"string","maxLength":40}},"template":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"content_bytes":{"type":"integer","minimum":0},"created_at":{"type":"string"}},"required":["id","kind","direction","state","refused_check","checks","template","content_bytes","created_at"],"additionalProperties":false}}},"required":["schema","exportedAt","contact","deliveries"],"additionalProperties":false}}}}},"x-scope":"contacts:read","x-effect":"read"}},"/v1/contacts/{contactId}/erase":{"post":{"operationId":"contacts.erase","summary":"Erase one contact: its consent, addresses and delivery records go in one transaction and the contact is stamped. Nothing can reattach to the old id.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"erased":{"const":true},"contactId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"deliveries":{"type":"integer","minimum":0}},"required":["erased","contactId","deliveries"],"additionalProperties":false}}}}},"x-scope":"contacts:write","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/channels":{"get":{"operationId":"channels.list","summary":"The addresses of this company, one row per kind, each bound to an agent, with its state. No credential is returned; a row names the Worker secret, never its value.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"kind":{"type":"string","enum":["slack","telegram","email","whatsapp"]},"address":{"type":"string","minLength":3,"maxLength":320},"state":{"type":"string","enum":["connected","revoked","expired"]},"agentId":{"type":"string","maxLength":100},"connectionId":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"createdAt":{"type":"string"},"secretNames":{"type":"object","properties":{"send":{"type":"string","maxLength":100},"verify":{"type":"string","maxLength":100}},"required":["send","verify"],"additionalProperties":false}},"required":["id","kind","address","state","agentId","connectionId","createdAt","secretNames"],"additionalProperties":false}}},"required":["channels"],"additionalProperties":false}}}}},"x-scope":"channels:read","x-effect":"read"},"post":{"operationId":"channels.connect","summary":"Connect one of the company's own addresses of one kind to an agent. The two Worker secret names (the provider that sends, the value that authenticates an inbound delivery) are derived by the platform from the company, kind and address and returned; a caller cannot name them, so one company cannot point a channel at another's credential. No credential is stored in a column.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"kind":{"type":"string","enum":["slack","telegram","email","whatsapp"]},"address":{"type":"string","minLength":3,"maxLength":320},"state":{"type":"string","enum":["connected","revoked","expired"]},"agentId":{"type":"string","maxLength":100},"connectionId":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"createdAt":{"type":"string"},"secretNames":{"type":"object","properties":{"send":{"type":"string","maxLength":100},"verify":{"type":"string","maxLength":100}},"required":["send","verify"],"additionalProperties":false}},"required":["id","kind","address","state","agentId","connectionId","createdAt","secretNames"],"additionalProperties":false}},"required":["channel"],"additionalProperties":false}}}}},"x-scope":"channels:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["slack","telegram","email","whatsapp"]},"address":{"type":"string","minLength":3,"maxLength":320},"agentId":{"type":"string","minLength":1,"maxLength":100},"connectionId":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"detail":{"type":"object","properties":{"channel":{"type":"string","maxLength":200},"phoneNumberId":{"type":"string","maxLength":200},"language":{"type":"string","maxLength":20},"approvedTemplates":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":50}},"required":[],"additionalProperties":false}},"required":["kind","address","agentId"],"additionalProperties":false}}}}}},"/v1/channels/{channelId}/disconnect":{"post":{"operationId":"channels.disconnect","summary":"Revoke one address. The row and its delivery history stay; a revoked address sends nothing because the channel_active check refuses.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"channelId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"kind":{"type":"string","enum":["slack","telegram","email","whatsapp"]},"address":{"type":"string","minLength":3,"maxLength":320},"state":{"type":"string","enum":["connected","revoked","expired"]},"agentId":{"type":"string","maxLength":100},"connectionId":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"createdAt":{"type":"string"},"secretNames":{"type":"object","properties":{"send":{"type":"string","maxLength":100},"verify":{"type":"string","maxLength":100}},"required":["send","verify"],"additionalProperties":false}},"required":["id","kind","address","state","agentId","connectionId","createdAt","secretNames"],"additionalProperties":false}},"required":["channel"],"additionalProperties":false}}}}},"x-scope":"channels:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/channels/send":{"post":{"operationId":"channels.send","summary":"The one way any OS sends a message. Every check of the kind is evaluated in order before the adapter is called: consent, opt-out, the provider window and its approved templates, quiet hours, rate and an open human takeover. A refusal names the check that refused it, as code channel_refused with the check name. No message text is stored.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"sent":{"const":true},"deliveryId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"checkSet":{"type":"array","items":{"type":"string","maxLength":40}}},"required":["sent","deliveryId","checkSet"],"additionalProperties":false}}}}},"x-scope":"channels:send","x-effect":"spend","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channelId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"contactId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"kind":{"type":"string","enum":["slack","telegram","email","whatsapp"]},"text":{"type":"string","minLength":1,"maxLength":4096},"subject":{"type":"string","maxLength":200},"template":{"type":"string","maxLength":120},"reply":{"type":"boolean"},"takenOver":{"type":"boolean"}},"required":[],"additionalProperties":false}}}}}},"/v1/evals/sets":{"get":{"operationId":"evals.sets.list","summary":"Every evaluation set version of this company, with its task counts, its task-list digest and whether it is open or closed. No task content is held, so none is returned.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"sets":{"type":"array","items":{"type":"object","properties":{"setId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"version":{"type":"integer","minimum":1},"product":{"anyOf":[{"type":"string"},{"type":"null"}]},"recipe":{"anyOf":[{"type":"string"},{"type":"null"}]},"recipeVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"tasks":{"type":"integer","minimum":0},"heldOutTasks":{"type":"integer","minimum":0},"heldOut":{"type":"boolean"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"state":{"type":"string","enum":["open","closed"]},"createdAt":{"type":"string"},"createdBy":{"type":"string","pattern":"^[a-f0-9-]{36}$"}},"required":["setId","version","tasks","heldOutTasks","heldOut","sha256","state","createdAt","createdBy"],"additionalProperties":false}}},"required":["sets"],"additionalProperties":false}}}}},"x-scope":"eval:read","x-effect":"read"},"post":{"operationId":"evals.sets.create","summary":"Create one version of an evaluation set. A set declares whether it has a held-out part; its tasks are added separately and its digest moves with them, so a promotion binds to the exact list it was measured on.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["created","exists"]},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["outcome"],"additionalProperties":false}}}}},"x-scope":"eval:write","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"setId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"version":{"type":"integer","minimum":1},"product":{"anyOf":[{"type":"string"},{"type":"null"}]},"recipe":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},{"type":"null"}]},"recipeVersion":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},{"type":"null"}]},"heldOut":{"type":"boolean"}},"required":["setId","version"],"additionalProperties":false}}}}}},"/v1/evals/sets/{setId}/tasks":{"post":{"operationId":"evals.tasks.add","summary":"Add tasks to an open set version: the closed target and criterion kinds, the check that decides a check task, and the pointer and hash of the content, never the content. A closed set accepts none, and a check task with no check is refused.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"setId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"}}],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["added"]},"added":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0},"tasks":{"type":"integer","minimum":0},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["outcome","added","skipped"],"additionalProperties":false}}}}},"x-scope":"eval:write","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":1},"tasks":{"type":"array","items":{"type":"object","properties":{"taskId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"target":{"type":"string","enum":["none","site","repo","supabase"]},"criterion":{"type":"string","enum":["check","person"]},"check":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},{"type":"null"}]},"contentRef":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"heldOut":{"type":"boolean"}},"required":["taskId","target","criterion","contentRef","contentSha256"],"additionalProperties":false},"minItems":1,"maxItems":200}},"required":["version","tasks"],"additionalProperties":false}}}}},"get":{"operationId":"evals.tasks.list","summary":"The tasks of one set version, with the held-out part withheld from a principal that proposed a candidate on that set: the tasks are absent and only their count is returned. A candidate's author cannot read its own exam.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"setId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"}},{"name":"version","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9]{1,9}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"tasks":{"type":"array","items":{"type":"object","properties":{"taskId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"target":{"type":"string","enum":["none","site","repo","supabase"]},"criterion":{"type":"string","enum":["check","person"]},"check":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},{"type":"null"}]},"contentRef":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"heldOut":{"type":"boolean"}},"required":["taskId","target","criterion","contentRef","contentSha256","heldOut"],"additionalProperties":false}},"withheld":{"type":"integer","minimum":0}},"required":["tasks","withheld"],"additionalProperties":false}}}}},"x-scope":"eval:read","x-effect":"read"}},"/v1/evals/sets/{setId}/close":{"post":{"operationId":"evals.sets.close","summary":"Close a set version: its task list becomes final. A set that declares a held-out part and has none is refused, because a promotion would then rest on nothing.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"setId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["closed"]},"tasks":{"type":"integer","minimum":0},"heldOutTasks":{"type":"integer","minimum":0},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["outcome"],"additionalProperties":false}}}}},"x-scope":"eval:write","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":1}},"required":["version"],"additionalProperties":false}}}}}},"/v1/evals/runs":{"post":{"operationId":"evals.run.create","summary":"Register the launches an evaluation made: one job, its task, its tier, and the product and subject its candidate belongs to. A candidate is measured on its own subject, so a run registered for recipe a at 1.0.0 can never decide a change to recipe b at 1.0.0, another product, or a platform change. The launches themselves are submitted by the runner through the launch API (agentos/evals/run.mjs); this records the join a label and the terminal eval.run need. A task outside the set version stores nothing.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["registered"]},"registered":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0}},"required":["outcome","registered","skipped"],"additionalProperties":false}}}}},"x-scope":"eval:write","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"setId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"version":{"type":"integer","minimum":1},"product":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},{"type":"null"}]},"candidate":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},{"type":"null"}]},"tier":{"anyOf":[{"type":"string","enum":["auto","coding","fast","deep"]},{"type":"null"}]},"runs":{"type":"array","items":{"type":"object","properties":{"task_id":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"job":{"type":"string","pattern":"^[a-f0-9-]{36}$"}},"required":["task_id","job"],"additionalProperties":false},"minItems":1,"maxItems":200}},"required":["setId","version","runs"],"additionalProperties":false}}}}}},"/v1/evals/labels":{"post":{"operationId":"evals.labels.write","summary":"A label: one decision about one result, from a person's decision, a provider's read-back or a FinanceOS fact, with the evidence it rests on. Refused when the job is not terminal, when the actor is the run's own principal, when the task is not the job's, or without evidence. A run cannot write one.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["labelled"]},"task":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"label":{"type":"string"},"set":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"version":{"type":"integer"},"event":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"required":["outcome","task","label"],"additionalProperties":false}}}}},"x-scope":"eval:decide","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"task":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},{"type":"null"}]},"label":{"type":"string","enum":["pass","fail","no_opinion","disagree"]},"evidenceRef":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"}},"required":["job","label","evidenceRef"],"additionalProperties":false}}}}}},"/v1/evals/scorecard":{"get":{"operationId":"evals.scorecard","summary":"The score of one set version, read from the labels: pass rate per set and per context version, with the counts behind every number. Nothing is stored, so a score can never disagree with its labels.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"set","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"}},{"name":"version","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9]{1,9}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"setId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"version":{"type":"integer","minimum":1},"scorecard":{"type":"object","properties":{"sets":{"type":"array","items":{"type":"object","properties":{"set":{"type":"string"},"pass":{"type":"integer","minimum":0},"fail":{"type":"integer","minimum":0},"no_opinion":{"type":"integer","minimum":0},"disagree":{"type":"integer","minimum":0},"labels":{"type":"integer","minimum":0},"decided":{"type":"integer","minimum":0},"rate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["set","pass","fail","no_opinion","disagree","labels","decided","rate"],"additionalProperties":false}},"contexts":{"type":"array","items":{"type":"object","properties":{"contextVersion":{"type":"string"},"pass":{"type":"integer","minimum":0},"fail":{"type":"integer","minimum":0},"no_opinion":{"type":"integer","minimum":0},"disagree":{"type":"integer","minimum":0},"labels":{"type":"integer","minimum":0},"decided":{"type":"integer","minimum":0},"rate":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["contextVersion","pass","fail","no_opinion","disagree","labels","decided","rate"],"additionalProperties":false}}},"required":["sets","contexts"],"additionalProperties":false}},"required":["setId","version","scorecard"],"additionalProperties":false}}}}},"x-scope":"eval:read","x-effect":"read"}},"/v1/evals/changes":{"get":{"operationId":"evals.changes.list","summary":"Every proposal, promotion and rollback of this company, with the set version and digest it was measured on, its held-out result and both principals.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"changes":{"type":"array","items":{"type":"object","properties":{"changeId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"product":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"candidate":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"previous":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},{"type":"null"}]},"setId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"version":{"type":"integer","minimum":1},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"heldOutResult":{"type":"string","enum":["pass","fail","not_measured"]},"state":{"type":"string","enum":["proposed","promoted","rolled_back","rejected"]},"proposer":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"decider":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"evidenceRef":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"createdAt":{"type":"string"},"decidedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["changeId","subject","candidate","setId","version","sha256","heldOutResult","state","proposer","createdAt"],"additionalProperties":false}}},"required":["changes"],"additionalProperties":false}}}}},"x-scope":"eval:read","x-effect":"read"},"post":{"operationId":"evals.changes.propose","summary":"Propose a change to a recipe version, a prompt, a route tier or a build, naming the set version it is measured on. The held-out result is read from the labels and never supplied here, and the set's digest is stored so a later edit cannot be promoted.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"changeId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"product":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"candidate":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"previous":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},{"type":"null"}]},"setId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"version":{"type":"integer","minimum":1},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"heldOutResult":{"type":"string","enum":["pass","fail","not_measured"]},"state":{"type":"string","enum":["proposed","promoted","rolled_back","rejected"]},"proposer":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"decider":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"evidenceRef":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"createdAt":{"type":"string"},"decidedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["changeId","subject","candidate","setId","version","sha256","heldOutResult","state","proposer","createdAt"],"additionalProperties":false}}}}},"x-scope":"eval:write","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"changeId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"product":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"candidate":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"previous":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},{"type":"null"}]},"setId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"version":{"type":"integer","minimum":1},"evidenceRef":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},{"type":"null"}]}},"required":["changeId","subject","candidate","setId","version"],"additionalProperties":false}}}}}},"/v1/evals/changes/{changeId}/{action}":{"post":{"operationId":"evals.changes.decide","summary":"Promote, reject or roll back a change. The decider is always the caller, so the proposer cannot promote their own change; promotion is refused unless the held-out part passed and the set's digest still matches; rollback accepts a promoted change only and records the previous value it restores. A change whose id is foundry.items:<item id> promotes what that factory ticket shipped: where your FoundryOS policy sets improvement.mode commit it is also refused (same_person, no_held_out_set, measure_not_read, measure_not_improved) unless the ticket is a finding whose measure was read again and came down.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"changeId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"}},{"name":"action","in":"path","required":true,"schema":{"type":"string","pattern":"^(promote|reject|rollback)$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"changeId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"product":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"candidate":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"previous":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},{"type":"null"}]},"setId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"version":{"type":"integer","minimum":1},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"heldOutResult":{"type":"string","enum":["pass","fail","not_measured"]},"state":{"type":"string","enum":["proposed","promoted","rolled_back","rejected"]},"proposer":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"decider":{"anyOf":[{"type":"string","pattern":"^[a-f0-9-]{36}$"},{"type":"null"}]},"evidenceRef":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"createdAt":{"type":"string"},"decidedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["changeId","subject","candidate","setId","version","sha256","heldOutResult","state","proposer","createdAt"],"additionalProperties":false}}}}},"x-scope":"eval:decide","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"evidenceRef":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},{"type":"null"}]}},"required":[],"additionalProperties":false}}}}}},"/v1/evals/trials":{"get":{"operationId":"evals.trials.list","summary":"Every recipe improvement trial of this company: the pins taken before the result, its state, and for a settled trial the comparison and the receipt it was settled with. No task content is held, so none is returned.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"trials":{"type":"array","items":{"type":"object","properties":{"trialId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"tenant":{"type":"string","pattern":"^[a-z0-9-]{1,40}$"},"subject":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"incumbent":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"candidate":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"incumbentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"candidateSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"dimension":{"type":"string","enum":["model","effort","instructions","tier","tools","skills","budget","route"]},"mode":{"type":"string","enum":["quality_led","cost_led"]},"set":{"type":"object","properties":{"setId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"version":{"type":"integer","minimum":1},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["setId","version","sha256"],"additionalProperties":false},"evaluator":{"type":"object","properties":{"version":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"}},"required":["version"],"additionalProperties":false},"repetitions":{"type":"integer","minimum":1,"maximum":10},"requiredHeldOutTasks":{"type":"integer","minimum":1},"minimumSample":{"type":"integer","minimum":2},"budgetMicroUsd":{"type":"integer","minimum":1},"minimumImprovementPoints":{"type":"integer","minimum":1},"maxCostIncreasePercent":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"qualityFloorPoints":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"absoluteBoundMicroUsd":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"tasks":{"type":"array","items":{"type":"object","properties":{"taskId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["taskId","sha256"],"additionalProperties":false}},"frozen":{"type":"object","properties":{},"required":[],"additionalProperties":false},"proposal":{"type":"object","properties":{},"required":[],"additionalProperties":false},"state":{"type":"string","enum":["open","settled","abandoned"]},"comparison":{"anyOf":[{"type":"object","properties":{},"required":[],"additionalProperties":false},{"type":"null"}]},"receipt":{"anyOf":[{"type":"object","properties":{},"required":[],"additionalProperties":false},{"type":"null"}]},"proposer":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"createdAt":{"type":"string"},"settledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["trialId","tenant","subject","incumbent","candidate","dimension","mode","set","evaluator","repetitions","requiredHeldOutTasks","minimumSample","budgetMicroUsd","minimumImprovementPoints","tasks","state","proposer","createdAt"],"additionalProperties":false}}},"required":["trials"],"additionalProperties":false}}}}},"x-scope":"eval:read","x-effect":"read"},"post":{"operationId":"evals.trials.create","summary":"Open one recipe improvement trial: the company, the version in use and the proposed version with the digest of each recorded body, the one dimension that changes with every other setting frozen, the set version and its digest, the held-out tasks it must measure, the evaluator, the tasks and their input snapshots, the repetitions, the minimum sample, the metric thresholds and the budget, all pinned before a result is read. One active trial per subject and incumbent version; a company with no trial keeps the decision path it already had.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"trialId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"tenant":{"type":"string","pattern":"^[a-z0-9-]{1,40}$"},"subject":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"incumbent":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"candidate":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"incumbentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"candidateSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"dimension":{"type":"string","enum":["model","effort","instructions","tier","tools","skills","budget","route"]},"mode":{"type":"string","enum":["quality_led","cost_led"]},"set":{"type":"object","properties":{"setId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"version":{"type":"integer","minimum":1},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["setId","version","sha256"],"additionalProperties":false},"evaluator":{"type":"object","properties":{"version":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"}},"required":["version"],"additionalProperties":false},"repetitions":{"type":"integer","minimum":1,"maximum":10},"requiredHeldOutTasks":{"type":"integer","minimum":1},"minimumSample":{"type":"integer","minimum":2},"budgetMicroUsd":{"type":"integer","minimum":1},"minimumImprovementPoints":{"type":"integer","minimum":1},"maxCostIncreasePercent":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"qualityFloorPoints":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"absoluteBoundMicroUsd":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"tasks":{"type":"array","items":{"type":"object","properties":{"taskId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["taskId","sha256"],"additionalProperties":false}},"frozen":{"type":"object","properties":{},"required":[],"additionalProperties":false},"proposal":{"type":"object","properties":{},"required":[],"additionalProperties":false},"state":{"type":"string","enum":["open","settled","abandoned"]},"comparison":{"anyOf":[{"type":"object","properties":{},"required":[],"additionalProperties":false},{"type":"null"}]},"receipt":{"anyOf":[{"type":"object","properties":{},"required":[],"additionalProperties":false},{"type":"null"}]},"proposer":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"createdAt":{"type":"string"},"settledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["trialId","tenant","subject","incumbent","candidate","dimension","mode","set","evaluator","repetitions","requiredHeldOutTasks","minimumSample","budgetMicroUsd","minimumImprovementPoints","tasks","state","proposer","createdAt"],"additionalProperties":false}}}}},"x-scope":"eval:write","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"trialId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"tenant":{"type":"string","pattern":"^[a-z0-9-]{1,40}$"},"subject":{"type":"string","pattern":"^recipe:[A-Za-z0-9][A-Za-z0-9_.-]{0,39}$"},"incumbent":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"candidate":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"incumbentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"candidateSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"dimension":{"type":"string","enum":["model","effort","instructions","tier","tools","skills","budget","route"]},"change":{"type":"string","minLength":1,"maxLength":500},"measure":{"type":"string","minLength":1,"maxLength":500},"predictedEffect":{"type":"string","minLength":1,"maxLength":500},"rollback":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"set":{"type":"object","properties":{"setId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"version":{"type":"integer","minimum":1},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["setId","version","sha256"],"additionalProperties":false},"evaluator":{"type":"object","properties":{"version":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"}},"required":["version"],"additionalProperties":false},"tasks":{"type":"array","items":{"type":"object","properties":{"taskId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["taskId","sha256"],"additionalProperties":false},"minItems":1,"maxItems":200},"repetitions":{"type":"integer","minimum":1,"maximum":10},"requiredHeldOutTasks":{"type":"integer","minimum":1,"maximum":200},"minimumSample":{"type":"integer","minimum":2,"maximum":100000},"mode":{"type":"string","enum":["quality_led","cost_led"]},"minimumImprovementPoints":{"type":"integer","minimum":1,"maximum":100},"maxCostIncreasePercent":{"type":"integer","minimum":0,"maximum":10},"qualityFloorPoints":{"type":"integer","minimum":0,"maximum":100},"absoluteBoundMicroUsd":{"type":"integer","minimum":1,"maximum":2000000000000},"budgetMicroUsd":{"type":"integer","minimum":1,"maximum":2000000000000},"frozen":{"type":"object","properties":{"model":{"type":"string","maxLength":160},"effort":{"type":"string","maxLength":160},"instructions":{"type":"string","maxLength":160},"tier":{"type":"string","maxLength":160},"tools":{"type":"string","maxLength":160},"skills":{"type":"string","maxLength":160},"budget":{"type":"string","maxLength":160},"route":{"type":"string","maxLength":160}},"required":[],"additionalProperties":false}},"required":["trialId","tenant","subject","incumbent","candidate","incumbentSha256","candidateSha256","dimension","change","measure","predictedEffect","rollback","set","evaluator","tasks","repetitions","requiredHeldOutTasks","minimumSample","mode","minimumImprovementPoints","budgetMicroUsd","frozen"],"additionalProperties":false}}}}}},"/v1/evals/trials/{trialId}/settle":{"post":{"operationId":"evals.trials.settle","summary":"Settle one trial with the observations its two arms produced: real launch ids, an independent person grader, settled cost, and every planned task, arm and repetition. The comparison is computed from the pins the trial stored and settled once: a missing, duplicated, foreign, wrong-version or unpriced observation cannot win, a short sample is inconclusive, and a failed held-out repetition refuses the candidate.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"trialId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"trialId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"tenant":{"type":"string","pattern":"^[a-z0-9-]{1,40}$"},"subject":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"incumbent":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"candidate":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"incumbentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"candidateSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"dimension":{"type":"string","enum":["model","effort","instructions","tier","tools","skills","budget","route"]},"mode":{"type":"string","enum":["quality_led","cost_led"]},"set":{"type":"object","properties":{"setId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"version":{"type":"integer","minimum":1},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["setId","version","sha256"],"additionalProperties":false},"evaluator":{"type":"object","properties":{"version":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"}},"required":["version"],"additionalProperties":false},"repetitions":{"type":"integer","minimum":1,"maximum":10},"requiredHeldOutTasks":{"type":"integer","minimum":1},"minimumSample":{"type":"integer","minimum":2},"budgetMicroUsd":{"type":"integer","minimum":1},"minimumImprovementPoints":{"type":"integer","minimum":1},"maxCostIncreasePercent":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"qualityFloorPoints":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"absoluteBoundMicroUsd":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"tasks":{"type":"array","items":{"type":"object","properties":{"taskId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["taskId","sha256"],"additionalProperties":false}},"frozen":{"type":"object","properties":{},"required":[],"additionalProperties":false},"proposal":{"type":"object","properties":{},"required":[],"additionalProperties":false},"state":{"type":"string","enum":["open","settled","abandoned"]},"comparison":{"anyOf":[{"type":"object","properties":{},"required":[],"additionalProperties":false},{"type":"null"}]},"receipt":{"anyOf":[{"type":"object","properties":{},"required":[],"additionalProperties":false},{"type":"null"}]},"proposer":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"createdAt":{"type":"string"},"settledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["trialId","tenant","subject","incumbent","candidate","dimension","mode","set","evaluator","repetitions","requiredHeldOutTasks","minimumSample","budgetMicroUsd","minimumImprovementPoints","tasks","state","proposer","createdAt"],"additionalProperties":false}}}}},"x-scope":"eval:write","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"observations":{"type":"array","items":{"type":"object","properties":{"task":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"arm":{"type":"string","enum":["incumbent","candidate"]},"repetition":{"type":"integer","minimum":1,"maximum":10},"launchId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"pass":{"type":"boolean"},"costMicroUsd":{"type":"integer","minimum":0},"settled":{"const":true},"heldOut":{"type":"boolean"},"grader":{"type":"object","properties":{"kind":{"const":"person"},"id":{"type":"string","minLength":1,"maxLength":160}},"required":["kind","id"],"additionalProperties":false},"corrections":{"type":"integer","minimum":0,"maximum":1000}},"required":["task","arm","repetition","launchId","pass","costMicroUsd","settled","heldOut","grader"],"additionalProperties":false},"minItems":1,"maxItems":2000}},"required":["observations"],"additionalProperties":false}}}}}},"/v1/evals/trials/{trialId}/abandon":{"post":{"operationId":"evals.trials.abandon","summary":"Abandon one open trial with a reason. Nothing is promoted, the incumbent stays, and the row keeps the reason as an inconclusive result; a settled trial cannot be abandoned.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"trialId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"trialId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"tenant":{"type":"string","pattern":"^[a-z0-9-]{1,40}$"},"subject":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"incumbent":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"candidate":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"incumbentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"candidateSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"dimension":{"type":"string","enum":["model","effort","instructions","tier","tools","skills","budget","route"]},"mode":{"type":"string","enum":["quality_led","cost_led"]},"set":{"type":"object","properties":{"setId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"version":{"type":"integer","minimum":1},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["setId","version","sha256"],"additionalProperties":false},"evaluator":{"type":"object","properties":{"version":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"}},"required":["version"],"additionalProperties":false},"repetitions":{"type":"integer","minimum":1,"maximum":10},"requiredHeldOutTasks":{"type":"integer","minimum":1},"minimumSample":{"type":"integer","minimum":2},"budgetMicroUsd":{"type":"integer","minimum":1},"minimumImprovementPoints":{"type":"integer","minimum":1},"maxCostIncreasePercent":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"qualityFloorPoints":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"absoluteBoundMicroUsd":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"tasks":{"type":"array","items":{"type":"object","properties":{"taskId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["taskId","sha256"],"additionalProperties":false}},"frozen":{"type":"object","properties":{},"required":[],"additionalProperties":false},"proposal":{"type":"object","properties":{},"required":[],"additionalProperties":false},"state":{"type":"string","enum":["open","settled","abandoned"]},"comparison":{"anyOf":[{"type":"object","properties":{},"required":[],"additionalProperties":false},{"type":"null"}]},"receipt":{"anyOf":[{"type":"object","properties":{},"required":[],"additionalProperties":false},{"type":"null"}]},"proposer":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"createdAt":{"type":"string"},"settledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["trialId","tenant","subject","incumbent","candidate","dimension","mode","set","evaluator","repetitions","requiredHeldOutTasks","minimumSample","budgetMicroUsd","minimumImprovementPoints","tasks","state","proposer","createdAt"],"additionalProperties":false}}}}},"x-scope":"eval:write","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"],"additionalProperties":false}}}}}},"/v1/improve/setting":{"get":{"operationId":"improve.setting.get","summary":"This company's contribution setting: off or on, the kinds it names, its version and the published Terms version it was turned on under. A company with no row is off, which is every company until its owner turns sharing on.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"setting":{"type":"object","properties":{"state":{"type":"string","enum":["off","on"]},"kinds":{"type":"array","items":{"type":"string","enum":["ask","criterion","result"]}},"version":{"type":"integer","minimum":0},"termsVersion":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["state","kinds","version"],"additionalProperties":false}},"required":["setting"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read"},"post":{"operationId":"improve.setting.set","summary":"Turn sharing on or off. On names the kinds of example this company shares and is refused with the contribution terms are not published while the Terms carry no contribution section; off names nothing and takes effect at the next read, so no sweep has to remove anything. A stale expectedVersion is refused rather than overwriting another owner's change. A key and an OAuth token are both refused: this is the owner's own choice.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"setting":{"type":"object","properties":{"state":{"type":"string","enum":["off","on"]},"kinds":{"type":"array","items":{"type":"string","enum":["ask","criterion","result"]}},"version":{"type":"integer","minimum":0},"termsVersion":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["state","kinds","version"],"additionalProperties":false}},"required":["setting"],"additionalProperties":false}}}}},"x-scope":"improve:contribute","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["off","on"]},"kinds":{"type":"array","items":{"type":"string","enum":["ask","criterion","result"]}},"termsVersion":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"expectedVersion":{"type":"integer","minimum":0}},"required":["state","kinds","expectedVersion"],"additionalProperties":false}}}}}},"/v1/improve/contributions":{"get":{"operationId":"improve.contributions.list","summary":"This company's own contributed examples: their kinds, states, receipts and digests, and the rules redaction applied. Never another company's, and never the content.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"contributions":{"type":"array","items":{"type":"object","properties":{"contributionId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"setId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"version":{"type":"integer","minimum":1},"taskId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"kind":{"type":"string","enum":["ask","criterion","result"]},"sourceUses":{"type":"string","enum":["internal","public"]},"contentRef":{"type":"string","maxLength":200},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"sourceSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"redactions":{"type":"integer","minimum":0},"redactionRules":{"type":"array","items":{"type":"string","maxLength":80}},"receiptKind":{"type":"string","enum":["none","service_credit","lower_rate","better_recipes"]},"state":{"type":"string","enum":["active","revoked"]},"createdAt":{"type":"string"},"revokedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["contributionId","setId","version","taskId","kind","contentSha256","state"],"additionalProperties":false}}},"required":["contributions"],"additionalProperties":false}}}}},"x-scope":"account:read","x-effect":"read"},"post":{"operationId":"improve.contributions.add","summary":"Contribute one example from this company's own evaluation set to shared improvement. Redaction runs in this request and only the redacted bytes are written under the improvement prefix; the answer carries the digest of the redacted bytes, how many lines were rewritten and which rules fired. Refused when sharing is off, when the kind is not one the setting names, when the task is not in this company's own set version, and when the source does not declare public permitted uses (B10). A key and an OAuth token are both refused.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"contribution":{"type":"object","properties":{"outcome":{"type":"string","enum":["created","exists"]},"contributionId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"contentRef":{"type":"string","maxLength":200}},"required":["outcome","contributionId","contentSha256"],"additionalProperties":false},"redacted":{"type":"object","properties":{"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"redactions":{"type":"integer","minimum":0},"rules":{"type":"array","items":{"type":"string","maxLength":80}}},"required":["sha256","redactions","rules"],"additionalProperties":false}},"required":["contribution","redacted"],"additionalProperties":false}}}}},"x-scope":"improve:contribute","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"setId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"version":{"type":"integer","minimum":1},"taskId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"kind":{"type":"string","enum":["ask","criterion","result"]},"sourceUses":{"type":"string","enum":["internal","public"]},"content":{"type":"string","minLength":1,"maxLength":262144},"receiptKind":{"anyOf":[{"type":"string","enum":["none","service_credit","lower_rate","better_recipes"]},{"type":"null"}]}},"required":["setId","version","taskId","kind","content"],"additionalProperties":false}}}}}},"/v1/improve/contributions/{contributionId}/revoke":{"post":{"operationId":"improve.contributions.revoke","summary":"Stop sharing one example. The row stays as the record that it was once shared and the shared read stops returning it at once, because that read filters on the row's state and on the company's setting when it is asked. The copy under the improvement prefix is removed. Revoked twice is refused.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"contributionId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"contribution":{"type":"object","properties":{"contributionId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"state":{"type":"string","enum":["revoked"]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"contentRef":{"type":"string","maxLength":200}},"required":["contributionId","state"],"additionalProperties":false}},"required":["contribution"],"additionalProperties":false}}}}},"x-scope":"improve:contribute","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/improve/shared":{"get":{"operationId":"improve.shared.list","summary":"The shared set: every active contribution of every company whose setting is on at this instant and names the contribution's kind. Authorised personnel of Autonomous Companies only — a customer's owner, a customer's key with every scope and a customer's OAuth token are each refused. No company id is answered; a stable pseudonym stands in. No content is answered, only the improvement-prefix key and the digest.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"shared":{"type":"array","items":{"type":"object","properties":{"contributionRef":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"company":{"type":"string","pattern":"^[a-f0-9]{64}$"},"kind":{"type":"string","enum":["ask","criterion","result"]},"setId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"version":{"type":"integer","minimum":1},"taskId":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"contentRef":{"type":"string","maxLength":200},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"redactions":{"type":"integer","minimum":0},"redactionRules":{"type":"array","items":{"type":"string","maxLength":80}},"receiptKind":{"type":"string","enum":["none","service_credit","lower_rate","better_recipes"]}},"required":["contributionRef","company","kind","setId","version","taskId","contentRef","contentSha256"],"additionalProperties":false}}},"required":["shared"],"additionalProperties":false}}}}},"x-scope":"platform:analyse","x-effect":"read"}},"/v1/connections/{connector}/bind":{"post":{"operationId":"connections.bind","summary":"Bind a connection that has no consent screen, on the company subject, so every agent of the company can read it. AEO Engine takes {project} and the Worker-wide key; a key field on that connector is refused. An authKind=key connector (Plausible) takes {key, site?}: the key is posted to the custodian and is not stored on the connection row or in a log. Search Console takes a Google service-account JSON file ({type, client_email, private_key, ...}) or {credential, property?}; the file is sealed in the connection vault and the call uses webmasters.readonly only. Supabase takes {project, key, role} for a read-only role and refuses a service-role key. Nothing here adds a paid plan.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"connector","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"connected":{"const":true},"connector":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"}},"required":["connected","connector"],"additionalProperties":false}}}}},"x-scope":"connections:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9._:-]{1,200}$"},"key":{"type":"string","minLength":8,"maxLength":4000,"pattern":"^[\\x21-\\x7e]{8,4000}$"},"site":{"type":"string","minLength":1,"maxLength":200},"role":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-z_][a-z0-9_]{0,62}$"},"property":{"type":"string","minLength":1,"maxLength":200},"type":{"type":"string","const":"service_account"},"client_email":{"type":"string","minLength":3,"maxLength":200},"private_key":{"type":"string","minLength":200,"maxLength":8000},"project_id":{"type":"string","maxLength":200},"private_key_id":{"type":"string","maxLength":200},"client_id":{"type":"string","maxLength":200},"auth_uri":{"type":"string","maxLength":300},"token_uri":{"type":"string","maxLength":300},"auth_provider_x509_cert_url":{"type":"string","maxLength":300},"client_x509_cert_url":{"type":"string","maxLength":300},"universe_domain":{"type":"string","maxLength":80},"credential":{"type":"object","properties":{"type":{"type":"string","const":"service_account"},"client_email":{"type":"string","minLength":3,"maxLength":200},"private_key":{"type":"string","minLength":200,"maxLength":8000},"project_id":{"type":"string","maxLength":200},"private_key_id":{"type":"string","maxLength":200},"client_id":{"type":"string","maxLength":200},"auth_uri":{"type":"string","maxLength":300},"token_uri":{"type":"string","maxLength":300},"auth_provider_x509_cert_url":{"type":"string","maxLength":300},"client_x509_cert_url":{"type":"string","maxLength":300},"universe_domain":{"type":"string","maxLength":80}},"required":["type","client_email","private_key"],"additionalProperties":false}},"required":[],"additionalProperties":false}}}}}},"/v1/operations/search":{"get":{"operationId":"operations.search","summary":"Search the operations this key may call, by words. Every word must match an id, name, summary, scope or effect; an exact id or tool name comes first. Returns only operations the caller's own scopes allow, exactly as the full listing filters them, with their scope, effect and rates. It is a list, never a permission check.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"operations.index.v1"},"query":{"type":"string"},"count":{"type":"integer","minimum":0},"operations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"summary":{"type":"string"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}]},"effect":{"type":"string","enum":["read","write","spend"]},"rates":{"type":"array","items":{"type":"string"}}},"required":["id","name","summary","scope","effect","rates"],"additionalProperties":false}}},"required":["schema","query","count","operations"],"additionalProperties":false}}}}},"x-scope":null,"x-effect":"read"}},"/v1/operations/describe/{id}":{"get":{"operationId":"operations.describe","summary":"Describe one operation by id: its summary, scope, effect, price class and the full input and output schema a caller fills in and receives. An operation outside the caller's scopes is refused with the same code a call to it is; the answer never widens that authority.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]*(?:\\.[a-z0-9]+){0,6}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"operations.describe.v1"},"id":{"type":"string"},"name":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}]},"effect":{"type":"string","enum":["read","write","spend"]},"callable":{"type":"boolean"},"pricing":{"type":"object","properties":{"status":{"type":"string"},"rates":{"type":"array","items":{"type":"string"}},"estimate":{"type":"string"},"onFailure":{"type":"string"}},"required":["status","rates","estimate","onFailure"],"additionalProperties":false},"input":{"type":"object","additionalProperties":true},"output":{"type":"object","additionalProperties":true}},"required":["schema","id","name","summary","description","scope","effect","callable","pricing","input","output"],"additionalProperties":false}}}}},"x-scope":null,"x-effect":"read"}},"/v1/foundry/changes":{"get":{"operationId":"foundry.changes.list","summary":"List completed changes in one window (7, 14 or 30 UTC days), newest first, optionally one repository. Cursor paged: pass back `nextCursor`. A window the source covers only in part says so and is never counted as complete.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"window","in":"query","required":false,"schema":{"type":"string","pattern":"^(?:7|14|30)$"}},{"name":"repository","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}(?:/[A-Za-z0-9_.-]{1,100})?$"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9]{1,12}$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string","pattern":"^(?:[1-9][0-9]?|100)$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"changes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"identifier":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"state":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false},"team":{"type":"string"},"repositories":{"type":"array","items":{"type":"string"},"maxItems":50},"updatedAt":{"type":"string"},"completedAt":{"type":"string"}},"required":["id","identifier","title","state","completedAt"],"additionalProperties":false},"maxItems":100},"nextCursor":{"anyOf":[{"type":"string","pattern":"^[0-9]{1,12}$"},{"type":"null"}]},"total":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"window":{"type":"object","properties":{"days":{"type":"integer","minimum":1,"maximum":30},"from":{"type":"string"},"to":{"type":"string"},"coveredDays":{"anyOf":[{"type":"integer","minimum":0,"maximum":30},{"type":"null"}]},"complete":{"type":"boolean"}},"required":["days","from","to","complete"],"additionalProperties":false},"error":{"type":"string"}},"required":["ok","changes","nextCursor","window"],"additionalProperties":false}}}}},"x-scope":"foundry:read","x-effect":"read"}},"/v1/foundry/changes/aggregate":{"get":{"operationId":"foundry.changes.aggregate","summary":"The time-window aggregate of completed changes for agent clients: total, per UTC day (a day with none is zero), per repository and per team, with the window the source actually covered.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"window","in":"query","required":false,"schema":{"type":"string","pattern":"^(?:7|14|30)$"}},{"name":"repository","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}(?:/[A-Za-z0-9_.-]{1,100})?$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"window":{"type":"object","properties":{"days":{"type":"integer","minimum":1,"maximum":30},"from":{"type":"string"},"to":{"type":"string"},"coveredDays":{"anyOf":[{"type":"integer","minimum":0,"maximum":30},{"type":"null"}]},"complete":{"type":"boolean"}},"required":["days","from","to","complete"],"additionalProperties":false},"total":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"byDay":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"count":{"type":"integer","minimum":0}},"required":["day","count"],"additionalProperties":false},"maxItems":31},"byRepository":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer","minimum":0}},"required":["key","count"],"additionalProperties":false},"maxItems":100},"byTeam":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer","minimum":0}},"required":["key","count"],"additionalProperties":false},"maxItems":100},"error":{"type":"string"}},"required":["ok","window","byDay"],"additionalProperties":false}}}}},"x-scope":"foundry:read","x-effect":"read"}},"/v1/foundry/changes/{changeId}":{"get":{"operationId":"foundry.changes.get","summary":"One change by its Linear id or ticket identifier, as the dashboard snapshot shows it. Answers only what that snapshot holds; an unknown change is 404.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"changeId","in":"path","required":true,"schema":{"type":"string","pattern":"^(?:item_[A-Za-z0-9_-]{1,76}|[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[A-Z][A-Z0-9]{0,9}-[0-9]{1,9})$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"change":{"type":"object","properties":{"id":{"type":"string"},"identifier":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"state":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false},"team":{"type":"string"},"repositories":{"type":"array","items":{"type":"string"},"maxItems":50},"updatedAt":{"type":"string"},"completedAt":{"type":"string"}},"required":["id","identifier","title","state","completedAt"],"additionalProperties":false},"window":{"type":"object","properties":{"days":{"type":"integer","minimum":1,"maximum":30},"from":{"type":"string"},"to":{"type":"string"},"coveredDays":{"anyOf":[{"type":"integer","minimum":0,"maximum":30},{"type":"null"}]},"complete":{"type":"boolean"}},"required":["days","from","to","complete"],"additionalProperties":false}},"required":["change"],"additionalProperties":false}}}}},"x-scope":"foundry:read","x-effect":"read"}},"/v1/foundry/items":{"post":{"operationId":"foundry.items.create","summary":"Create one item from the four-field ticket contract (label, spec, acceptance, and one exact Risk tier line) or from prose. A contract missing a required field is refused by field name and is not claimable. REST, the ac command and the MCP tool are this same call. Optional needs names the worker capabilities the item requires; leave it out and the item requires none. The idempotency key makes a retry the same item. Its Linear issue is queued in the outbox, never sent from this call.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"201":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"},"state":{"type":"string"},"returnTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["deliverable","outcome"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"team":{"anyOf":[{"type":"string"},{"type":"null"}]},"repository":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"anyOf":[{"type":"integer","minimum":1,"maximum":4},{"type":"null"}]},"labels":{"type":"array","items":{"type":"string"}},"tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"head":{"anyOf":[{"type":"string"},{"type":"null"}]},"pull":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contract":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contractBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"waits":{"type":"array","items":{"type":"object","additionalProperties":true}},"decisions":{"type":"array","items":{"type":"object","additionalProperties":true}},"reviews":{"type":"array","items":{"type":"object","additionalProperties":true}},"linear":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"qualification":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"routingProposal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"landed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"processException":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"rework":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"admittedBy":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"scopeAmendments":{"type":"array","items":{"type":"object","additionalProperties":true}},"enqueued":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"mergeFailed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"roundBlocked":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"release":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"needs":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9._-]{0,63}$"},"maxItems":16},"unread":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["id","state","version","kind"],"additionalProperties":false},"extraction":{"type":"object","additionalProperties":true}},"required":["item"],"additionalProperties":false}}}}},"x-scope":"foundry:write","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":65536},"kind":{"type":"string","enum":["deliverable","outcome"]},"team":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$"},"parent":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"},"labels":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_./:@#+ -]{1,120}$"},"maxItems":50},"linearTeamId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"needs":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9._-]{0,63}$"},"maxItems":16}},"required":["title"],"additionalProperties":false}}}}},"get":{"operationId":"foundry.items.list","summary":"List the items of your company, filtered by state, repository, team or tier. Cursor paged. scope=1 adds each item's declared paths and the resource keys live leases hold, so a lane can skip a ticket whose paths are already held.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"state","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z_]{1,20}$"}},{"name":"repository","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"}},{"name":"team","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$"}},{"name":"tier","in":"query","required":false,"schema":{"type":"string","enum":["T0","T1","T2","T3"]}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","enum":["1"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9]{1,12}$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string","pattern":"^(?:[1-9][0-9]?|100)$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true},"maxItems":100},"nextCursor":{"anyOf":[{"type":"string","pattern":"^[0-9]{1,12}$"},{"type":"null"}]},"held":{"type":"array","items":{"type":"string"},"maxItems":5000},"groups":{"type":"object","additionalProperties":true}},"required":["items","nextCursor"],"additionalProperties":false}}}}},"x-scope":"foundry:read","x-effect":"read"}},"/v1/foundry/items/{itemId}":{"get":{"operationId":"foundry.items.get","summary":"Read one item of your own company: state, contract, lease, waits, decisions and review records.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"},"state":{"type":"string"},"returnTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["deliverable","outcome"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"team":{"anyOf":[{"type":"string"},{"type":"null"}]},"repository":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"anyOf":[{"type":"integer","minimum":1,"maximum":4},{"type":"null"}]},"labels":{"type":"array","items":{"type":"string"}},"tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"head":{"anyOf":[{"type":"string"},{"type":"null"}]},"pull":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contract":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contractBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"waits":{"type":"array","items":{"type":"object","additionalProperties":true}},"decisions":{"type":"array","items":{"type":"object","additionalProperties":true}},"reviews":{"type":"array","items":{"type":"object","additionalProperties":true}},"linear":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"qualification":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"routingProposal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"landed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"processException":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"rework":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"admittedBy":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"scopeAmendments":{"type":"array","items":{"type":"object","additionalProperties":true}},"enqueued":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"mergeFailed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"roundBlocked":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"release":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"needs":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9._-]{0,63}$"},"maxItems":16},"unread":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["id","state","version","kind"],"additionalProperties":false}},"required":["item"],"additionalProperties":false}}}}},"x-scope":"foundry:read","x-effect":"read"},"post":{"operationId":"foundry.items.update","summary":"Add one section to an item, against the version you read. Insert-only: existing text is never edited or removed.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"},"state":{"type":"string"},"returnTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["deliverable","outcome"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"team":{"anyOf":[{"type":"string"},{"type":"null"}]},"repository":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"anyOf":[{"type":"integer","minimum":1,"maximum":4},{"type":"null"}]},"labels":{"type":"array","items":{"type":"string"}},"tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"head":{"anyOf":[{"type":"string"},{"type":"null"}]},"pull":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contract":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contractBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"waits":{"type":"array","items":{"type":"object","additionalProperties":true}},"decisions":{"type":"array","items":{"type":"object","additionalProperties":true}},"reviews":{"type":"array","items":{"type":"object","additionalProperties":true}},"linear":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"qualification":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"routingProposal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"landed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"processException":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"rework":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"admittedBy":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"scopeAmendments":{"type":"array","items":{"type":"object","additionalProperties":true}},"enqueued":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"mergeFailed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"roundBlocked":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"release":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"needs":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9._-]{0,63}$"},"maxItems":16},"unread":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["id","state","version","kind"],"additionalProperties":false}},"required":["item"],"additionalProperties":false}}}}},"x-scope":"foundry:write","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"heading":{"type":"string","pattern":"^[A-Za-z0-9][^\\n]{0,120}$"},"body":{"type":"string","minLength":1,"maxLength":65536}},"required":["expectedVersion","heading","body"],"additionalProperties":false}}}}}},"/v1/foundry/items/{itemId}/amend-scope":{"post":{"operationId":"foundry.items.amendscope","summary":"AC-534: append a recorded, owner-authorised area amendment against the version you read. Each added path carries a one-line reason. The signed-in person is recorded as who authorised it. The contract text, the description and the Linear ticket are never edited. A signed-in person only: a key is refused even when it was granted the scope.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"},"state":{"type":"string"},"returnTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["deliverable","outcome"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"team":{"anyOf":[{"type":"string"},{"type":"null"}]},"repository":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"anyOf":[{"type":"integer","minimum":1,"maximum":4},{"type":"null"}]},"labels":{"type":"array","items":{"type":"string"}},"tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"head":{"anyOf":[{"type":"string"},{"type":"null"}]},"pull":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contract":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contractBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"waits":{"type":"array","items":{"type":"object","additionalProperties":true}},"decisions":{"type":"array","items":{"type":"object","additionalProperties":true}},"reviews":{"type":"array","items":{"type":"object","additionalProperties":true}},"linear":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"qualification":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"routingProposal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"landed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"processException":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"rework":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"admittedBy":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"scopeAmendments":{"type":"array","items":{"type":"object","additionalProperties":true}},"enqueued":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"mergeFailed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"roundBlocked":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"release":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"needs":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9._-]{0,63}$"},"maxItems":16},"unread":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["id","state","version","kind"],"additionalProperties":false}},"required":["item"],"additionalProperties":false}}}}},"x-scope":"foundry:write","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"paths":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":500},"reason":{"type":"string","minLength":1,"maxLength":200}},"required":["path","reason"],"additionalProperties":false},"minItems":1,"maxItems":50}},"required":["expectedVersion","paths"],"additionalProperties":false}}}}}},"/v1/foundry/items/{itemId}/admit":{"post":{"operationId":"foundry.items.admit","summary":"Move one item from backlog to todo. Optional needs replaces the worker capabilities the item requires; leave it out and the ones it already has stay, which is none when it was created without them. A signed-in person only: a key is refused even when it was granted the scope.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"},"state":{"type":"string"},"returnTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["deliverable","outcome"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"team":{"anyOf":[{"type":"string"},{"type":"null"}]},"repository":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"anyOf":[{"type":"integer","minimum":1,"maximum":4},{"type":"null"}]},"labels":{"type":"array","items":{"type":"string"}},"tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"head":{"anyOf":[{"type":"string"},{"type":"null"}]},"pull":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contract":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contractBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"waits":{"type":"array","items":{"type":"object","additionalProperties":true}},"decisions":{"type":"array","items":{"type":"object","additionalProperties":true}},"reviews":{"type":"array","items":{"type":"object","additionalProperties":true}},"linear":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"qualification":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"routingProposal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"landed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"processException":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"rework":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"admittedBy":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"scopeAmendments":{"type":"array","items":{"type":"object","additionalProperties":true}},"enqueued":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"mergeFailed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"roundBlocked":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"release":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"needs":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9._-]{0,63}$"},"maxItems":16},"unread":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["id","state","version","kind"],"additionalProperties":false}},"required":["item"],"additionalProperties":false}}}}},"x-scope":"foundry:admit","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"needs":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9._-]{0,63}$"},"maxItems":16}},"required":[],"additionalProperties":false}}}}}},"/v1/foundry/items/{itemId}/review":{"post":{"operationId":"foundry.items.review","summary":"Record a review round on an item. `artifact`: the committed Gate B artifact (the JSON text of .fusion-gate/<head>.json) of the head this item submitted, checked as the gate checks it. `job`: a settled round read from your own review store; Gate B is bound to the submitted head and Gate A to the plan revision it read, and the same round twice is one record. `replay`: every settled round on the head, the plan revision or the pull request of the item through that same path, each answered with what it recorded or the input it lacks; a shipped change still missing a gate it owed is recorded as an outstanding process exception.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"},"state":{"type":"string"},"returnTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["deliverable","outcome"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"team":{"anyOf":[{"type":"string"},{"type":"null"}]},"repository":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"anyOf":[{"type":"integer","minimum":1,"maximum":4},{"type":"null"}]},"labels":{"type":"array","items":{"type":"string"}},"tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"head":{"anyOf":[{"type":"string"},{"type":"null"}]},"pull":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contract":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contractBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"waits":{"type":"array","items":{"type":"object","additionalProperties":true}},"decisions":{"type":"array","items":{"type":"object","additionalProperties":true}},"reviews":{"type":"array","items":{"type":"object","additionalProperties":true}},"linear":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"qualification":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"routingProposal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"landed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"processException":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"rework":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"admittedBy":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"scopeAmendments":{"type":"array","items":{"type":"object","additionalProperties":true}},"enqueued":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"mergeFailed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"roundBlocked":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"release":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"needs":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9._-]{0,63}$"},"maxItems":16},"unread":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["id","state","version","kind"],"additionalProperties":false},"review":{"type":"object","additionalProperties":true},"replayed":{"type":"array","items":{"type":"object","additionalProperties":true}},"owed":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"missing":{"type":"array","items":{"type":"string"}},"exception":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"partial":{"type":"boolean"}},"required":["item"],"additionalProperties":false}}}}},"x-scope":"foundry:review","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"artifact":{"type":"string","minLength":2,"maxLength":262144},"job":{"type":"string","pattern":"^review-[A-Za-z0-9_-]{8,200}$"},"replay":{"type":"boolean","enum":[true]}},"required":[],"additionalProperties":false}}}}}},"/v1/foundry/items/{itemId}/close":{"post":{"operationId":"foundry.items.close","summary":"The service's own closeout of a verifying item: it derives the verify receipt from GitHub (checks at the reviewed commit, the merge, the deployed revision), runs the close table on it, and on an allow queues two writes for the Linear issue in the same transaction: a comment, and the issue's move to its team's completed state. Not callable with a key or by a person. `files`, when the closeout read them, are the merged head's paths; the hosted gate's classifier says whether that head owes a Gate B PASS.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"},"state":{"type":"string"},"returnTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["deliverable","outcome"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"team":{"anyOf":[{"type":"string"},{"type":"null"}]},"repository":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"anyOf":[{"type":"integer","minimum":1,"maximum":4},{"type":"null"}]},"labels":{"type":"array","items":{"type":"string"}},"tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"head":{"anyOf":[{"type":"string"},{"type":"null"}]},"pull":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contract":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contractBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"waits":{"type":"array","items":{"type":"object","additionalProperties":true}},"decisions":{"type":"array","items":{"type":"object","additionalProperties":true}},"reviews":{"type":"array","items":{"type":"object","additionalProperties":true}},"linear":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"qualification":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"routingProposal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"landed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"processException":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"rework":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"admittedBy":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"scopeAmendments":{"type":"array","items":{"type":"object","additionalProperties":true}},"enqueued":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"mergeFailed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"roundBlocked":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"release":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"needs":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9._-]{0,63}$"},"maxItems":16},"unread":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["id","state","version","kind"],"additionalProperties":false},"receipt":{"type":"object","additionalProperties":true}},"required":["item"],"additionalProperties":false}}}}},"x-scope":"foundry:work","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reviewed":{"type":"string","pattern":"^[a-f0-9]{40}$"},"merge":{"type":"string","pattern":"^[a-f0-9]{40}$"},"policy":{"type":"integer","minimum":0},"files":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1024},"maxItems":3000}},"required":[],"additionalProperties":false}}}}}},"/v1/foundry/items/{itemId}/land":{"post":{"operationId":"foundry.items.land","summary":"The worker that submitted the item records its merged pull request (or the host's closeout step, once that worker's lease has ended or its heartbeat is past the company's stale window). The land table decides against the recorded reviews; on an allow the item is verifying. The reviewed head (the item's own), the final pull request head and the merge commit are kept as three fields. A final head that differs by closeout verdict commits and merges that only bring the base branch in is that same landing.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"},"state":{"type":"string"},"returnTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["deliverable","outcome"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"team":{"anyOf":[{"type":"string"},{"type":"null"}]},"repository":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"anyOf":[{"type":"integer","minimum":1,"maximum":4},{"type":"null"}]},"labels":{"type":"array","items":{"type":"string"}},"tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"head":{"anyOf":[{"type":"string"},{"type":"null"}]},"pull":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contract":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contractBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"waits":{"type":"array","items":{"type":"object","additionalProperties":true}},"decisions":{"type":"array","items":{"type":"object","additionalProperties":true}},"reviews":{"type":"array","items":{"type":"object","additionalProperties":true}},"linear":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"qualification":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"routingProposal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"landed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"processException":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"rework":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"admittedBy":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"scopeAmendments":{"type":"array","items":{"type":"object","additionalProperties":true}},"enqueued":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"mergeFailed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"roundBlocked":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"release":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"needs":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9._-]{0,63}$"},"maxItems":16},"unread":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["id","state","version","kind"],"additionalProperties":false}},"required":["item"],"additionalProperties":false}}}}},"x-scope":"foundry:work","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pr":{"type":"object","properties":{"repository":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"},"number":{"type":"integer","minimum":1},"base":{"type":"string","minLength":1,"maxLength":255},"head":{"type":"string","pattern":"^[a-f0-9]{40}$"},"files":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1024},"maxItems":3000},"since":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1024},"maxItems":3000},"carried":{"type":"boolean"},"reviewed":{"type":"string","pattern":"^[a-f0-9]{40}$"},"plan":{"type":"string","pattern":"^[a-f0-9]{64}$"},"rounds":{"type":"array","items":{"type":"string","pattern":"^review-[A-Za-z0-9_-]{8,200}$"},"maxItems":200}},"required":["repository","number","base","head","files"],"additionalProperties":false},"merge":{"type":"object","properties":{"sha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"head":{"type":"string","pattern":"^[a-f0-9]{40}$"}},"required":["sha","head"],"additionalProperties":false}},"required":["pr","merge"],"additionalProperties":false}}}}}},"/v1/foundry/items/{itemId}/reanchor":{"post":{"operationId":"foundry.items.reanchor","summary":"AC-472: an item in review whose work merged at another head is re-submitted at that merged head, so it closes on a round of the code that merged. The host's closeout step or a signed-in person only, never a key. The head-bound Gate B record is dropped; nothing lands without a passing round on the new head.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"},"state":{"type":"string"},"returnTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["deliverable","outcome"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"team":{"anyOf":[{"type":"string"},{"type":"null"}]},"repository":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"anyOf":[{"type":"integer","minimum":1,"maximum":4},{"type":"null"}]},"labels":{"type":"array","items":{"type":"string"}},"tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"head":{"anyOf":[{"type":"string"},{"type":"null"}]},"pull":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contract":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contractBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"waits":{"type":"array","items":{"type":"object","additionalProperties":true}},"decisions":{"type":"array","items":{"type":"object","additionalProperties":true}},"reviews":{"type":"array","items":{"type":"object","additionalProperties":true}},"linear":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"qualification":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"routingProposal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"landed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"processException":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"rework":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"admittedBy":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"scopeAmendments":{"type":"array","items":{"type":"object","additionalProperties":true}},"enqueued":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"mergeFailed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"roundBlocked":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"release":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"needs":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9._-]{0,63}$"},"maxItems":16},"unread":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["id","state","version","kind"],"additionalProperties":false}},"required":["item"],"additionalProperties":false}}}}},"x-scope":"foundry:work","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pr":{"type":"object","properties":{"number":{"type":"integer","minimum":1},"head":{"type":"string","pattern":"^[a-f0-9]{40}$"}},"required":["number","head"],"additionalProperties":false},"reviewed":{"type":"string","pattern":"^[a-f0-9]{40}$"}},"required":["pr","reviewed"],"additionalProperties":false}}}}}},"/v1/foundry/items/{itemId}/effect":{"post":{"operationId":"foundry.items.effect","summary":"AC-538: the service's own effects on an item it does not move: `merge-enqueue` puts the reviewed, green pull request of an item in review into the repository's merge queue (one `effect` event with the head, the required checks read and the round ids, once per head); `merge-ejected` sends an item back to the lane when its merge group failed, as a red check does; `release-merge` records that a repository deploys on the push this merge makes, and `release-dispatch` the deployment this step created at the merge commit for one declared environment. The host's closeout step only, as the service principal: never a key and never a person.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"},"state":{"type":"string"},"returnTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["deliverable","outcome"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"team":{"anyOf":[{"type":"string"},{"type":"null"}]},"repository":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"anyOf":[{"type":"integer","minimum":1,"maximum":4},{"type":"null"}]},"labels":{"type":"array","items":{"type":"string"}},"tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"head":{"anyOf":[{"type":"string"},{"type":"null"}]},"pull":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contract":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contractBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"waits":{"type":"array","items":{"type":"object","additionalProperties":true}},"decisions":{"type":"array","items":{"type":"object","additionalProperties":true}},"reviews":{"type":"array","items":{"type":"object","additionalProperties":true}},"linear":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"qualification":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"routingProposal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"landed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"processException":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"rework":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"admittedBy":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"scopeAmendments":{"type":"array","items":{"type":"object","additionalProperties":true}},"enqueued":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"mergeFailed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"roundBlocked":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"release":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"needs":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9._-]{0,63}$"},"maxItems":16},"unread":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["id","state","version","kind"],"additionalProperties":false}},"required":["item"],"additionalProperties":false}}}}},"x-scope":"foundry:work","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"effect":{"type":"string","enum":["merge-enqueue","merge-ejected","merge-retry","release-merge","release-dispatch","rework","comment-posted","round-not-started","closeout-evidence-commit-refused"]},"pr":{"type":"object","properties":{"number":{"type":"integer","minimum":1,"maximum":1000000},"head":{"type":"string","pattern":"^[a-f0-9]{40}$"}},"required":["head"],"additionalProperties":false},"checks":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":200},"rounds":{"type":"array","items":{"type":"string","pattern":"^review-[A-Za-z0-9_-]{8,200}$"},"maxItems":200},"queue":{"type":"string","maxLength":40},"reason":{"type":"string","maxLength":40},"next":{"type":"string","minLength":1,"maxLength":300},"environment":{"type":"string","minLength":1,"maxLength":100},"deployment":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["effect","pr"],"additionalProperties":false}}}}}},"/v1/foundry/items/{itemId}/unread":{"post":{"operationId":"foundry.items.unread","summary":"The service's own record of why it could not read GitHub for a `review` or `verifying` item, asked for by the host's closeout step and by nothing else (a key or a person is refused `service_required`). `code` is the fault it read: `connection_missing` (the company has no GitHub connection), `repository_not_allowed` (its connection does not allow the item's repository), `github_access_unavailable` (the App fence refused, or the connection was revoked), or `github_unread` (GitHub or the custodian did not answer, which is worth reading again). `clear: true` removes that record once a later read of the repository succeeded, so a repaired connection is not still shown as missing. Recorded against the version read, so a submission or an edit in between refuses `GUARDED_WRITE_CONFLICT` and nothing is recorded. The item then carries the code and the sentence `foundry.overview.get` counts, so a person can fix the connection instead of the item sitting in review as a transient miss.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"},"state":{"type":"string"},"returnTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["deliverable","outcome"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"team":{"anyOf":[{"type":"string"},{"type":"null"}]},"repository":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"anyOf":[{"type":"integer","minimum":1,"maximum":4},{"type":"null"}]},"labels":{"type":"array","items":{"type":"string"}},"tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"head":{"anyOf":[{"type":"string"},{"type":"null"}]},"pull":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contract":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contractBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"waits":{"type":"array","items":{"type":"object","additionalProperties":true}},"decisions":{"type":"array","items":{"type":"object","additionalProperties":true}},"reviews":{"type":"array","items":{"type":"object","additionalProperties":true}},"linear":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"qualification":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"routingProposal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"landed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"processException":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"rework":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"admittedBy":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"scopeAmendments":{"type":"array","items":{"type":"object","additionalProperties":true}},"enqueued":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"mergeFailed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"roundBlocked":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"release":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"needs":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9._-]{0,63}$"},"maxItems":16},"unread":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["id","state","version","kind"],"additionalProperties":false}},"required":["item"],"additionalProperties":false}}}}},"x-scope":"foundry:work","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["connection_missing","repository_not_allowed","github_access_unavailable","github_unread"]},"clear":{"type":"boolean"}},"required":["expectedVersion"],"additionalProperties":false}}}}}},"/v1/foundry/items/{itemId}/rework":{"post":{"operationId":"foundry.items.rework","summary":"Send one item in review back to its lane for rework, with a reason the next lane reads in its brief. `packet` is the failed round's blockers that still have no note (id, file, line, severity, required), shown to the lane as findings to answer; without it the item keeps the open rows it already holds. Allowed from in_review only, refused CHANGE_IDENTITY_STALE for another head and worker_holds_item while a lease runs; the Gate B record bound to that head is dropped. A signed-in person or the host's closeout step, never a key.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"},"state":{"type":"string"},"returnTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["deliverable","outcome"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"team":{"anyOf":[{"type":"string"},{"type":"null"}]},"repository":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"anyOf":[{"type":"integer","minimum":1,"maximum":4},{"type":"null"}]},"labels":{"type":"array","items":{"type":"string"}},"tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"head":{"anyOf":[{"type":"string"},{"type":"null"}]},"pull":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contract":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contractBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"waits":{"type":"array","items":{"type":"object","additionalProperties":true}},"decisions":{"type":"array","items":{"type":"object","additionalProperties":true}},"reviews":{"type":"array","items":{"type":"object","additionalProperties":true}},"linear":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"qualification":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"routingProposal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"landed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"processException":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"rework":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"admittedBy":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"scopeAmendments":{"type":"array","items":{"type":"object","additionalProperties":true}},"enqueued":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"mergeFailed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"roundBlocked":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"release":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"needs":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9._-]{0,63}$"},"maxItems":16},"unread":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["id","state","version","kind"],"additionalProperties":false}},"required":["item"],"additionalProperties":false}}}}},"x-scope":"foundry:admit","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":1000},"cause":{"type":"string","enum":["fusion-fail","ci-red","no-review-input","conflict_with_main","other"]},"head":{"type":"string","pattern":"^[a-f0-9]{40}$"},"packet":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"file":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"line":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"severity":{"anyOf":[{"type":"string","enum":["CRITICAL","HIGH"]},{"type":"null"}]},"required":{"anyOf":[{"type":"string","maxLength":600},{"type":"null"}]}},"required":["id"],"additionalProperties":false},"maxItems":40}},"required":["reason","cause","head"],"additionalProperties":false}}}}}},"/v1/foundry/items/{itemId}/done":{"post":{"operationId":"foundry.items.done","summary":"Mark one item done as a person, as Done in Linear does. A signed-in person only: a key is refused even when it was granted the scope.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"},"state":{"type":"string"},"returnTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["deliverable","outcome"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"team":{"anyOf":[{"type":"string"},{"type":"null"}]},"repository":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"anyOf":[{"type":"integer","minimum":1,"maximum":4},{"type":"null"}]},"labels":{"type":"array","items":{"type":"string"}},"tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"head":{"anyOf":[{"type":"string"},{"type":"null"}]},"pull":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contract":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contractBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"waits":{"type":"array","items":{"type":"object","additionalProperties":true}},"decisions":{"type":"array","items":{"type":"object","additionalProperties":true}},"reviews":{"type":"array","items":{"type":"object","additionalProperties":true}},"linear":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"qualification":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"routingProposal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"landed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"processException":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"rework":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"admittedBy":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"scopeAmendments":{"type":"array","items":{"type":"object","additionalProperties":true}},"enqueued":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"mergeFailed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"roundBlocked":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"release":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"needs":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9._-]{0,63}$"},"maxItems":16},"unread":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["id","state","version","kind"],"additionalProperties":false}},"required":["item"],"additionalProperties":false}}}}},"x-scope":"foundry:admit","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/foundry/items/{itemId}/settle":{"post":{"operationId":"foundry.items.settle","summary":"The service reads this item's Linear issue and, when that issue is already completed, marks the Foundry item done. A canceled or duplicate Linear issue never becomes Done: one Foundry item for it is canceled, and two items for the same issue are left. A child item is not marked done. The service only: a key or a person is refused. Linear is not written, and a verifying item is not closed from Linear's state alone.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"},"state":{"type":"string"},"returnTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["deliverable","outcome"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"team":{"anyOf":[{"type":"string"},{"type":"null"}]},"repository":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"anyOf":[{"type":"integer","minimum":1,"maximum":4},{"type":"null"}]},"labels":{"type":"array","items":{"type":"string"}},"tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"head":{"anyOf":[{"type":"string"},{"type":"null"}]},"pull":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contract":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contractBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"waits":{"type":"array","items":{"type":"object","additionalProperties":true}},"decisions":{"type":"array","items":{"type":"object","additionalProperties":true}},"reviews":{"type":"array","items":{"type":"object","additionalProperties":true}},"linear":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"qualification":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"routingProposal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"landed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"processException":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"rework":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"admittedBy":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"scopeAmendments":{"type":"array","items":{"type":"object","additionalProperties":true}},"enqueued":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"mergeFailed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"roundBlocked":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"release":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"needs":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9._-]{0,63}$"},"maxItems":16},"unread":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["id","state","version","kind"],"additionalProperties":false}},"required":["item"],"additionalProperties":false}}}}},"x-scope":"foundry:work","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/foundry/items/{itemId}/link":{"post":{"operationId":"foundry.items.link","summary":"The service links one Linear issue onto an item that does not have one. A second call does not overwrite. An item already in progress queues issueStart once; an item already done queues issueComplete once. The item is not moved to done, a child is not linked, and a team that is not the issue's team is not linked. Not callable with a key or by a person.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"},"state":{"type":"string"},"returnTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["deliverable","outcome"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"team":{"anyOf":[{"type":"string"},{"type":"null"}]},"repository":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"anyOf":[{"type":"integer","minimum":1,"maximum":4},{"type":"null"}]},"labels":{"type":"array","items":{"type":"string"}},"tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"head":{"anyOf":[{"type":"string"},{"type":"null"}]},"pull":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contract":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contractBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"waits":{"type":"array","items":{"type":"object","additionalProperties":true}},"decisions":{"type":"array","items":{"type":"object","additionalProperties":true}},"reviews":{"type":"array","items":{"type":"object","additionalProperties":true}},"linear":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"qualification":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"routingProposal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"landed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"processException":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"rework":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"admittedBy":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"scopeAmendments":{"type":"array","items":{"type":"object","additionalProperties":true}},"enqueued":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"mergeFailed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"roundBlocked":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"release":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"needs":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9._-]{0,63}$"},"maxItems":16},"unread":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["id","state","version","kind"],"additionalProperties":false},"linked":{"type":"boolean"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["item","linked"],"additionalProperties":false}}}}},"x-scope":"foundry:work","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"issue":{"type":"string","pattern":"^[A-Za-z0-9-]{1,80}$"},"team":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$"}},"required":["issue","team"],"additionalProperties":false}}}}}},"/v1/foundry/items/{itemId}/cancel":{"post":{"operationId":"foundry.items.cancel","summary":"Cancel one item as a person: allowed from triage, backlog, todo, waiting and needs_human, and refused with state_conflict while a lease runs (in_progress), in review, landing or verifying. Open decisions close with the answer canceled, open waits close, and a linked Linear issue gets one comment and no state change. A signed-in person only: a key is refused even when it was granted the scope.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"},"state":{"type":"string"},"returnTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["deliverable","outcome"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"team":{"anyOf":[{"type":"string"},{"type":"null"}]},"repository":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"anyOf":[{"type":"integer","minimum":1,"maximum":4},{"type":"null"}]},"labels":{"type":"array","items":{"type":"string"}},"tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"head":{"anyOf":[{"type":"string"},{"type":"null"}]},"pull":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contract":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"contractBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancel":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"waits":{"type":"array","items":{"type":"object","additionalProperties":true}},"decisions":{"type":"array","items":{"type":"object","additionalProperties":true}},"reviews":{"type":"array","items":{"type":"object","additionalProperties":true}},"linear":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"qualification":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"routingProposal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"landed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"processException":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"rework":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"admittedBy":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"scopeAmendments":{"type":"array","items":{"type":"object","additionalProperties":true}},"enqueued":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"mergeFailed":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"roundBlocked":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"release":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"needs":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9._-]{0,63}$"},"maxItems":16},"unread":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["id","state","version","kind"],"additionalProperties":false}},"required":["item"],"additionalProperties":false}}}}},"x-scope":"foundry:admit","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":1000}},"required":["reason"],"additionalProperties":false}}}}}},"/v1/foundry/findings":{"post":{"operationId":"foundry.findings.report","summary":"Report one finding from outside the factory's own record: a Sentinel finding, or a failed result of a product. It is one counted report, never a ticket and never text; a ref counts once. Refused unless your policy sets improvement.findingsAt.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"finding":{"type":"object","properties":{"key":{"type":"string"},"code":{"type":"string"},"ref":{"type":"string"},"recorded":{"type":"boolean"},"count":{"type":"integer","minimum":0},"threshold":{"type":"integer","minimum":1},"mode":{"type":"string","enum":["observe","commit"]}},"required":["key","code","ref","recorded","count","threshold","mode"],"additionalProperties":false}},"required":["finding"],"additionalProperties":false}}}}},"x-scope":"foundry:write","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","enum":["sentinel","platform","agentos","brainos","foundryos","marketingos","launchos","financeos"]},"code":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"},"ref":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"item":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"},"severity":{"type":"string","enum":["S0","S1","S2","S3"]}},"required":["source","code","ref"],"additionalProperties":false}}}}}},"/v1/foundry/decisions":{"get":{"operationId":"foundry.decisions.list","summary":"List the open asks of your company, each with its evidence pointers and what it blocks.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9]{1,12}$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string","pattern":"^(?:[1-9][0-9]?|100)$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"decisions":{"type":"array","items":{"type":"object","additionalProperties":true},"maxItems":100},"nextCursor":{"anyOf":[{"type":"string","pattern":"^[0-9]{1,12}$"},{"type":"null"}]}},"required":["decisions","nextCursor"],"additionalProperties":false}}}}},"x-scope":"foundry:read","x-effect":"read"}},"/v1/foundry/decisions/{decisionId}/answer":{"post":{"operationId":"foundry.decisions.answer","summary":"Record an answer and resume the item. An approval-class decision needs a signed-in person.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"decisionId","in":"path","required":true,"schema":{"type":"string","pattern":"^dec_[0-9]{1,12}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"object","additionalProperties":true},"item":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["decision"],"additionalProperties":false}}}}},"x-scope":"foundry:decide","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"answer":{"type":"string","enum":["approve","reject"]}},"required":["answer"],"additionalProperties":false}}}}}},"/v1/foundry/policy":{"get":{"operationId":"foundry.policy.get","summary":"Read the policy of your company and its version.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":0},"policy":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["version","policy"],"additionalProperties":false}}}}},"x-scope":"foundry:read","x-effect":"read"},"post":{"operationId":"foundry.policy.set","summary":"Replace the policy of your company against the version you read. Values are checked against the platform bounds, and the capacity of a worker is never set below the leases it holds.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":1}},"required":["version"],"additionalProperties":false}}}}},"x-scope":"foundry:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"policy":{"type":"object","properties":{"tenant":{"type":"string","minLength":1,"maxLength":2000},"teams":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"repositories":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":2000},"owner":{"type":"string","minLength":1,"maxLength":2000},"defaultBranch":{"type":"string","minLength":1,"maxLength":2000},"startLanes":{"type":"integer","minimum":1,"maximum":512},"surfaces":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"class":{"type":"string","enum":["product","factory","infrastructure"]},"frontEnd":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"agent":{"type":"string","minLength":1,"maxLength":2000},"handedTo":{"type":"string","minLength":1,"maxLength":2000},"roundCeiling":{"type":"integer","minimum":1,"maximum":12},"conflictGroups":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":2000},"paths":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500}},"required":["name","paths"],"additionalProperties":false},"maxItems":500},"deployTargets":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500}},"required":["key","owner"],"additionalProperties":false},"maxItems":500},"areas":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":2000},"repositories":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"description":{"type":"string","minLength":1,"maxLength":2000}},"required":["key","repositories","description"],"additionalProperties":false},"maxItems":500},"notifications":{"type":"object","properties":{"slack":{"type":"object","properties":{"enabled":{"type":"boolean"},"workspace":{"type":"string","minLength":1,"maxLength":2000},"channel":{"type":"string","minLength":1,"maxLength":2000},"events":{"type":"array","items":{"type":"string","enum":["pickup","done"]},"maxItems":500},"linearWorkspace":{"type":"string","minLength":1,"maxLength":2000}},"required":[],"additionalProperties":false},"decisions":{"type":"object","properties":{"enabled":{"type":"boolean"},"workspace":{"type":"string","minLength":1,"maxLength":2000},"channel":{"type":"string","minLength":1,"maxLength":2000},"warRoom":{"type":"object","properties":{"enabled":{"type":"boolean"},"channel":{"type":"string","minLength":1,"maxLength":2000},"mention":{"type":"string","minLength":1,"maxLength":2000}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"roadmap":{"type":"object","properties":{"repository":{"type":"string","minLength":1,"maxLength":2000},"path":{"type":"string","minLength":1,"maxLength":2000},"paths":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"refreshSeconds":{"type":"integer","minimum":0,"maximum":3600},"progress":{"type":"string","minLength":1,"maxLength":2000}},"required":[],"additionalProperties":false},"linear":{"type":"object","properties":{"mirrorStates":{"type":"boolean"},"verifyTimeoutMs":{"type":"integer","minimum":1,"maximum":120000},"verifyRetries":{"type":"integer","minimum":0,"maximum":3},"verifySkipMs":{"type":"integer","minimum":0,"maximum":3600000},"intakeRetryMaxMs":{"type":"integer","minimum":60000,"maximum":3600000},"claimFreshnessMs":{"type":"integer","minimum":0,"maximum":3600000},"outboxBatchSize":{"type":"integer","minimum":1,"maximum":1000},"outboxFailedRetryMs":{"type":"integer","minimum":60000,"maximum":86400000},"outboxFailedAttempts":{"type":"integer","minimum":0,"maximum":10}},"required":[],"additionalProperties":false},"workers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":2000},"kind":{"type":"string","enum":["lane","outside"]},"teams":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"repositories":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"capabilities":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"capacity":{"type":"integer","minimum":1,"maximum":512},"key":{"type":"string","minLength":1,"maxLength":2000}},"required":["id"],"additionalProperties":false},"maxItems":500},"routing":{"type":"object","properties":{"classes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"defaultClass":{"type":"string","minLength":1,"maxLength":2000},"classAgents":{"type":"array","items":{"type":"object","properties":{"class":{"type":"string","minLength":1,"maxLength":2000},"agent":{"type":"string","minLength":1,"maxLength":2000}},"required":["class","agent"],"additionalProperties":false},"maxItems":500},"buildPool":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"factoryTeams":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"maxRepositorySegments":{"type":"integer","minimum":1,"maximum":8},"routeGraceSeconds":{"type":"integer","minimum":0,"maximum":86400},"areaOrder":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"pathIndexMax":{"type":"integer","minimum":100,"maximum":1000000},"areaDecision":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":2000},"minConfidence":{"type":"number","minimum":0,"maximum":1},"confinedMin":{"type":"number","minimum":0,"maximum":1},"evidenceMaxChars":{"type":"integer","minimum":256,"maximum":1048576}},"required":["model","minConfidence","confinedMin","evidenceMaxChars"],"additionalProperties":false},"unsorted":{"type":"object","properties":{"marker":{"type":"string","minLength":1,"maxLength":2000},"autoRuleSweeps":{"type":"integer","minimum":0,"maximum":20},"sweepSpacingSeconds":{"type":"integer","minimum":0,"maximum":86400}},"required":[],"additionalProperties":false},"duplicates":{"type":"object","properties":{"mode":{"type":"string","enum":["off","observe","commit"]},"collector":{"type":"string","minLength":1,"maxLength":2000},"teams":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500}},"required":[],"additionalProperties":false},"capabilityMap":{"type":"object","properties":{"schemas":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"path":{"type":"string","minLength":1,"maxLength":2000},"repository":{"type":"string","minLength":1,"maxLength":2000},"codes":{"type":"object","properties":{"unreadable":{"type":"string","minLength":1,"maxLength":2000},"invalid":{"type":"string","minLength":1,"maxLength":2000},"declarationRequired":{"type":"string","minLength":1,"maxLength":2000},"extensionRequired":{"type":"string","minLength":1,"maxLength":2000}},"required":["unreadable","invalid","declarationRequired","extensionRequired"],"additionalProperties":false},"missing":{"type":"object","properties":{"declaration":{"type":"string","minLength":1,"maxLength":2000},"extension":{"type":"string","minLength":1,"maxLength":2000}},"required":["declaration","extension"],"additionalProperties":false},"duplicate":{"type":"object","properties":{"minShared":{"type":"integer","minimum":1,"maximum":64},"minDice":{"type":"number","minimum":0,"maximum":1}},"required":["minShared","minDice"],"additionalProperties":false},"draft":{"type":"object","properties":{"minShared":{"type":"integer","minimum":1,"maximum":64},"limits":{"type":"object","properties":{"functions":{"type":"integer","minimum":1,"maximum":32},"tables":{"type":"integer","minimum":1,"maximum":32},"pages":{"type":"integer","minimum":1,"maximum":32}},"required":["functions","tables","pages"],"additionalProperties":false}},"required":["minShared","limits"],"additionalProperties":false}},"required":["schemas","path","repository","codes","missing","duplicate","draft"],"additionalProperties":false},"authority":{"type":"object","properties":{"agents":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"runPropertyAgents":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500}},"required":["agents","runPropertyAgents"],"additionalProperties":false},"fleetCapability":{"type":"object","properties":{"skip":{"type":"string","minLength":1,"maxLength":2000},"rootCause":{"type":"string","minLength":1,"maxLength":2000},"fallbackOwner":{"type":"string","minLength":1,"maxLength":2000},"settingPrefix":{"type":"string","minLength":1,"maxLength":2000}},"required":["skip","rootCause","fallbackOwner","settingPrefix"],"additionalProperties":false},"laneCapability":{"type":"object","properties":{"rootCause":{"type":"string","minLength":1,"maxLength":2000},"dedupePrefix":{"type":"string","minLength":1,"maxLength":2000},"resumeCondition":{"type":"string","minLength":1,"maxLength":2000}},"required":["rootCause","dedupePrefix","resumeCondition"],"additionalProperties":false},"keeper":{"type":"object","properties":{"releaseReloadAsk":{"type":"string","minLength":1,"maxLength":2000},"requiredChecks":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"outageWords":{"type":"string","minLength":1,"maxLength":2000}},"required":["releaseReloadAsk","requiredChecks","outageWords"],"additionalProperties":false},"mediaKernel":{"type":"object","properties":{"humanAuthorityFraming":{"type":"string","minLength":1,"maxLength":2000}},"required":["humanAuthorityFraming"],"additionalProperties":false},"escalation":{"type":"object","properties":{"teams":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"ownerOnly":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"delegate":{"type":"string","minLength":1,"maxLength":2000},"owner":{"type":"string","minLength":1,"maxLength":2000}},"required":["teams","ownerOnly"],"additionalProperties":false},"excluded":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"repositoryAgents":{"type":"array","items":{"type":"object","properties":{"repository":{"type":"string","minLength":1,"maxLength":2000},"agent":{"type":"string","minLength":1,"maxLength":2000}},"required":["repository","agent"],"additionalProperties":false},"maxItems":500}},"required":[],"additionalProperties":false},"capacity":{"type":"object","properties":{"windowSeconds":{"type":"integer","minimum":300,"maximum":86400},"cooldownSeconds":{"type":"integer","minimum":0,"maximum":604800},"runnerBusyMaxPercent":{"type":"integer","minimum":0,"maximum":100},"verificationP95MaxSeconds":{"type":"integer","minimum":0,"maximum":86400},"target":{"type":"integer","minimum":1,"maximum":3750}},"required":[],"additionalProperties":false},"budget":{"type":"object","properties":{"ticket":{"type":"object","properties":{"T0":{"type":"object","properties":{"tokens":{"type":"integer","minimum":0,"maximum":1000000000},"costUsd":{"type":"number","minimum":0,"maximum":1000000}},"required":[],"additionalProperties":false},"T1":{"type":"object","properties":{"tokens":{"type":"integer","minimum":0,"maximum":1000000000},"costUsd":{"type":"number","minimum":0,"maximum":1000000}},"required":[],"additionalProperties":false},"T2":{"type":"object","properties":{"tokens":{"type":"integer","minimum":0,"maximum":1000000000},"costUsd":{"type":"number","minimum":0,"maximum":1000000}},"required":[],"additionalProperties":false},"T3":{"type":"object","properties":{"tokens":{"type":"integer","minimum":0,"maximum":1000000000},"costUsd":{"type":"number","minimum":0,"maximum":1000000}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"laneDailyUsd":{"type":"number","minimum":0,"maximum":1000000},"fleetDailyUsd":{"type":"number","minimum":0,"maximum":1000000}},"required":[],"additionalProperties":false},"timings":{"type":"object","properties":{"leaseSeconds":{"type":"integer","minimum":60,"maximum":21600},"heartbeatSeconds":{"type":"integer","minimum":5,"maximum":300},"leaseStaleSeconds":{"type":"integer","minimum":60,"maximum":600},"autoReleaseGraceSeconds":{"type":"integer","minimum":0,"maximum":3600},"progressStaleSeconds":{"type":"integer","minimum":300,"maximum":21600},"rescindGraceSeconds":{"type":"integer","minimum":0,"maximum":180},"strandedSeconds":{"type":"integer","minimum":300,"maximum":21600},"pendingBindSeconds":{"type":"integer","minimum":10,"maximum":600},"tickGapGraceSeconds":{"type":"integer","minimum":0,"maximum":900},"declaredWaitMinSeconds":{"type":"integer","minimum":1,"maximum":3600},"declaredWaitMaxSeconds":{"type":"integer","minimum":60,"maximum":21600},"pathStarvationSeconds":{"type":"integer","minimum":60,"maximum":86400}},"required":[],"additionalProperties":false},"recovery":{"type":"object","properties":{"zeroProgressLimit":{"type":"integer","minimum":1,"maximum":10},"resumeWithoutProgress":{"type":"integer","minimum":0,"maximum":10}},"required":[],"additionalProperties":false},"deadlines":{"type":"object","properties":{"triage":{"type":"integer","minimum":60,"maximum":604800},"backlog":{"type":"integer","minimum":3600,"maximum":2592000},"todo":{"type":"integer","minimum":60,"maximum":2592000},"review":{"type":"integer","minimum":60,"maximum":86400},"landing":{"type":"integer","minimum":60,"maximum":86400},"verifying":{"type":"integer","minimum":60,"maximum":604800},"decision":{"type":"integer","minimum":3600,"maximum":2592000}},"required":[],"additionalProperties":false},"waits":{"type":"object","properties":{"maxAgeSeconds":{"type":"integer","minimum":60,"maximum":7776000},"ciMaxHoldSeconds":{"type":"integer","minimum":60,"maximum":86400},"deployPendingMaxSeconds":{"type":"integer","minimum":60,"maximum":86400},"deployHoldMaxSeconds":{"type":"integer","minimum":60,"maximum":604800},"deployHoldAheadMaxSeconds":{"type":"integer","minimum":60,"maximum":604800},"observationMaxSeconds":{"type":"integer","minimum":60,"maximum":604800},"measurementMaxSeconds":{"type":"integer","minimum":60,"maximum":7776000},"specMaxSeconds":{"type":"integer","minimum":60,"maximum":86400},"windowMaxAheadSeconds":{"type":"integer","minimum":60,"maximum":7776000},"commandObservationMs":{"type":"integer","minimum":1000,"maximum":600000}},"required":[],"additionalProperties":false},"review":{"type":"object","properties":{"gateAMaxAgeDays":{"type":"integer","minimum":1,"maximum":90},"gateBMaxAgeHours":{"type":"integer","minimum":1,"maximum":720},"panelRouteConcurrency":{"type":"integer","minimum":0,"maximum":16},"clockSkewSeconds":{"type":"integer","minimum":0,"maximum":86400},"autoStart":{"type":"boolean"},"autoMerge":{"type":"boolean"},"deployOnLand":{"type":"boolean"},"updateBehind":{"type":"boolean"},"publishFailBlockers":{"type":"boolean"},"reworkOnFail":{"type":"boolean"},"regateFailedHead":{"type":"boolean"},"reworkLaneGraceSeconds":{"type":"integer","minimum":0,"maximum":86400},"standaloneMerge":{"type":"boolean"},"standaloneSweepSeconds":{"type":"integer","minimum":0,"maximum":86400},"standaloneRepositories":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"standaloneDrafts":{"type":"string","enum":["refuse","merge"]},"carryForward":{"type":"object","properties":{"enabled":{"type":"boolean"},"requireDisjointPaths":{"type":"boolean"}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"merge":{"type":"object","properties":{"autoUpdateBranch":{"type":"boolean"},"batch":{"type":"object","properties":{"enabled":{"type":"boolean"},"maxSize":{"type":"integer","minimum":1,"maximum":50}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"source":{"type":"object","properties":{"lineCeiling":{"type":"integer","minimum":1,"maximum":100000000}},"required":[],"additionalProperties":false},"ticketClose":{"type":"object","properties":{"enabled":{"type":"boolean"},"titleCloses":{"type":"boolean"},"branchCloses":{"type":"boolean"},"mentionVeto":{"type":"boolean"},"lookbackSeconds":{"type":"integer","minimum":3600,"maximum":2592000},"teams":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"closing":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"mentioning":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500}},"required":[],"additionalProperties":false},"scheduler":{"type":"object","properties":{"tickSeconds":{"type":"integer","minimum":0,"maximum":86400},"alarmFloorSeconds":{"type":"integer","minimum":0,"maximum":86400},"rebaseAsksPerTick":{"type":"integer","minimum":0,"maximum":50},"laneParallel":{"type":"integer","minimum":1,"maximum":100},"laneRunMinutes":{"type":"integer","minimum":15,"maximum":4320},"laneHost":{"type":"object","properties":{"cpus":{"type":"integer","minimum":1,"maximum":4096},"memoryMb":{"type":"integer","minimum":256,"maximum":16777216},"cpuPerLane":{"type":"integer","minimum":1,"maximum":1024},"memoryMbPerLane":{"type":"integer","minimum":64,"maximum":1048576},"maxLanes":{"type":"integer","minimum":1,"maximum":1000}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"laneModels":{"type":"object","properties":{"default":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"T0":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"T1":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"T2":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"T3":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500}},"required":[],"additionalProperties":false},"closeout":{"type":"object","properties":{"intervalSeconds":{"type":"integer","minimum":0,"maximum":86400},"budgetMs":{"type":"integer","minimum":0,"maximum":300000},"backoffCap":{"type":"integer","minimum":0,"maximum":32},"compareFiles":{"type":"integer","minimum":1,"maximum":300},"rounds":{"type":"integer","minimum":1,"maximum":10000},"roundAsks":{"type":"integer","minimum":1,"maximum":100},"roundSettleSeconds":{"type":"integer","minimum":0,"maximum":86400},"readAttempts":{"type":"integer","minimum":1,"maximum":20},"readPauseMs":{"type":"integer","minimum":0,"maximum":60000},"landWalk":{"type":"integer","minimum":1,"maximum":200}},"required":[],"additionalProperties":false},"pipeline":{"type":"object","properties":{"fileCapBytes":{"type":"integer","minimum":1024,"maximum":262144},"transientAsks":{"type":"integer","minimum":1,"maximum":100},"permanent":{"type":"array","items":{"type":"string","enum":["size-cap","docs-only","ci-not-green","gate-not-owed"]},"maxItems":500}},"required":[],"additionalProperties":false},"asks":{"type":"object","properties":{"premiseMaxAgeSeconds":{"type":"integer","minimum":0,"maximum":2592000},"sweepLimit":{"type":"integer","minimum":1,"maximum":1000},"digestMaxRows":{"type":"integer","minimum":1,"maximum":1000}},"required":[],"additionalProperties":false},"reconcile":{"type":"object","properties":{"sweep":{"type":"object","properties":{"intervalSeconds":{"type":"integer","minimum":60,"maximum":86400},"staleFactor":{"type":"integer","minimum":2,"maximum":4},"staleMaxSeconds":{"type":"integer","minimum":3600,"maximum":86400},"cadenceSamples":{"type":"integer","minimum":2,"maximum":32},"readsPerPass":{"type":"integer","minimum":1,"maximum":200},"actionsPerPass":{"type":"integer","minimum":1,"maximum":50},"passBudgetMs":{"type":"integer","minimum":1000,"maximum":300000}},"required":[],"additionalProperties":false},"branch":{"type":"object","properties":{"candidatesPerPass":{"type":"integer","minimum":1,"maximum":200},"actionsPerPass":{"type":"integer","minimum":1,"maximum":50},"archivePrefix":{"type":"string","minLength":1,"maxLength":2000}},"required":[],"additionalProperties":false},"pullRequest":{"type":"object","properties":{"ageSeconds":{"type":"integer","minimum":3600,"maximum":604800},"abandonedAfterSeconds":{"type":"integer","minimum":3600,"maximum":2592000},"rereadSeconds":{"type":"integer","minimum":60,"maximum":86400},"idleSeconds":{"type":"integer","minimum":60,"maximum":604800},"staleSeconds":{"type":"integer","minimum":3600,"maximum":604800},"carryDays":{"type":"integer","minimum":1,"maximum":30},"heldWorkDays":{"type":"integer","minimum":1,"maximum":60}},"required":[],"additionalProperties":false},"review":{"type":"object","properties":{"windowSeconds":{"type":"integer","minimum":60,"maximum":86400},"reobserveSeconds":{"type":"integer","minimum":30,"maximum":86400},"maxObservations":{"type":"integer","minimum":1,"maximum":64},"maxNewPulls":{"type":"integer","minimum":1,"maximum":50},"attemptWindowSeconds":{"type":"integer","minimum":3600,"maximum":604800},"maxAttempts":{"type":"integer","minimum":1,"maximum":10},"attemptTiers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500}},"required":[],"additionalProperties":false},"deploy":{"type":"object","properties":{"windowSeconds":{"type":"integer","minimum":60,"maximum":86400},"graceSeconds":{"type":"integer","minimum":60,"maximum":86400},"hardCapSeconds":{"type":"integer","minimum":60,"maximum":86400},"mergeCapSeconds":{"type":"integer","minimum":60,"maximum":86400},"maxCommits":{"type":"integer","minimum":1,"maximum":500},"maxMerges":{"type":"integer","minimum":1,"maximum":200},"driftThresholdSeconds":{"type":"integer","minimum":60,"maximum":86400}},"required":[],"additionalProperties":false},"hold":{"type":"object","properties":{"wholeRepoMaxHoldSeconds":{"type":"integer","minimum":300,"maximum":7200},"waiterObservedSeconds":{"type":"integer","minimum":60,"maximum":7200}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"admission":{"type":"object","properties":{"humanOnly":{"type":"boolean"},"requireExecutionWeight":{"type":"boolean"},"mode":{"type":"string","enum":["manual","auto"]},"auto":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":2000},"version":{"type":"integer","minimum":1,"maximum":1000000},"team":{"type":"string","minLength":1,"maxLength":2000},"repositories":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"sources":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"maxTier":{"type":"string","minLength":1,"maxLength":2000},"tiers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"gates":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"linearBacklog":{"type":"boolean"},"holdLabels":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500}},"required":["id","version","team","repositories","sources"],"additionalProperties":false},"maxItems":500}},"required":[],"additionalProperties":false},"landing":{"type":"object","properties":{"humanApprovalTiers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500}},"required":[],"additionalProperties":false},"sentinel":{"type":"object","properties":{"mode":{"type":"string","enum":["off","observe","commit"]},"triggers":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string","enum":["merge-review","code-reread","improvement-cycle","spec-planning","spec-writer"]},"kind":{"type":"string","enum":["clock","event","manual"]},"at":{"type":"string","minLength":1,"maxLength":2000},"event":{"type":"string","minLength":1,"maxLength":2000}},"required":["recipe","kind"],"additionalProperties":false},"maxItems":500},"lines":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string","enum":["merge-review","code-reread","improvement-cycle","spec-planning","spec-writer"]},"dailyUsd":{"type":"number","minimum":0,"maximum":1000000}},"required":[],"additionalProperties":false},"maxItems":500}},"required":[],"additionalProperties":false},"improvement":{"type":"object","properties":{"mode":{"type":"string","enum":["off","observe","commit"]},"windowSeconds":{"type":"integer","minimum":3600,"maximum":2592000},"remeasureAfterSeconds":{"type":"integer","minimum":0,"maximum":2592000},"daySeconds":{"type":"integer","minimum":1,"maximum":2592000},"rescuesAt":{"type":"integer","minimum":2,"maximum":1000},"refusalsAt":{"type":"integer","minimum":2,"maximum":100000},"dailyTickets":{"type":"integer","minimum":1,"maximum":100},"linearTeamId":{"type":"string","minLength":1,"maxLength":2000},"findingsAt":{"type":"integer","minimum":1,"maximum":1000},"route":{"type":"object","properties":{"team":{"type":"string","minLength":1,"maxLength":2000},"repository":{"type":"string","minLength":1,"maxLength":2000},"area":{"type":"string","minLength":1,"maxLength":2000},"tier":{"type":"string","enum":["T0","T1","T2"]}},"required":["team","repository"],"additionalProperties":false}},"required":["mode","windowSeconds","rescuesAt","refusalsAt","dailyTickets"],"additionalProperties":false},"privileged":{"type":"object","properties":{"mode":{"type":"string","enum":["off","observe","commit"]},"approvalSeconds":{"type":"integer","minimum":60,"maximum":86400},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":2000},"kind":{"type":"string","enum":["deploy"]},"repository":{"type":"string","minLength":1,"maxLength":2000},"environment":{"type":"string","minLength":1,"maxLength":2000},"ref":{"type":"string","minLength":1,"maxLength":2000}},"required":["id","kind","repository","environment","ref"],"additionalProperties":false},"maxItems":500}},"required":["mode","approvalSeconds","workflows"],"additionalProperties":false},"credentials":{"type":"object","properties":{"capability":{"type":"string","minLength":1,"maxLength":2000}},"required":[],"additionalProperties":false},"releaseGate":{"type":"object","properties":{"mode":{"type":"string","enum":["off","observe","enforce"]},"enforce":{"type":"boolean"},"requiredContexts":{"type":"array","items":{"type":"object","properties":{"repository":{"type":"string","minLength":1,"maxLength":2000},"contexts":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500}},"required":["repository","contexts"],"additionalProperties":false},"maxItems":500},"deployReadback":{"type":"array","items":{"type":"object","properties":{"repository":{"type":"string","minLength":1,"maxLength":2000},"proved":{"type":"boolean"}},"required":["repository","proved"],"additionalProperties":false},"maxItems":500},"liveRunRepositories":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"recordSources":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"advisoryChecks":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"ignoredChecks":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":500},"outcomeEvidence":{"type":"string","enum":["per-outcome","release-receipt"]},"bounds":{"type":"object","properties":{"USER_AGENT":{"type":"string","minLength":1,"maxLength":2000},"MIN_CONTEXT_OBSERVATIONS":{"type":"integer","minimum":1,"maximum":50},"MAX_DEPLOYMENTS":{"type":"integer","minimum":1,"maximum":500},"DEPLOYMENT_PAGE_SIZE":{"type":"integer","minimum":1,"maximum":100},"MAX_DEPLOYMENT_PAGES":{"type":"integer","minimum":1,"maximum":100},"MAX_DEPLOYMENT_CANDIDATES":{"type":"integer","minimum":1,"maximum":500},"PULL_REQUEST_FILE_PAGE_SIZE":{"type":"integer","minimum":1,"maximum":300},"MAX_PULL_REQUEST_FILE_PAGES":{"type":"integer","minimum":1,"maximum":100},"MAX_PULL_REQUEST_COMMIT_PAGES":{"type":"integer","minimum":1,"maximum":100},"MAX_JOB_LOG_BYTES":{"type":"integer","minimum":1024,"maximum":104857600},"MAX_TRUST_PROBE_RECORDS":{"type":"integer","minimum":1,"maximum":2000},"MAX_ARTIFACT_BYTES":{"type":"integer","minimum":1024,"maximum":104857600},"MAX_SCREENSHOTS_ATTACHED":{"type":"integer","minimum":1,"maximum":50}},"required":[],"additionalProperties":false},"close":{"type":"object","properties":{"CLOSE_DELIVERED_PROOF_MAX_AGE_MS":{"type":"integer","minimum":60000,"maximum":2592000000},"RECEIPT_FRESHNESS_MS":{"type":"integer","minimum":60000,"maximum":604800000},"POLICY_RECEIPT_STALE_MS":{"type":"integer","minimum":60000,"maximum":86400000},"SHIPPED_PROBE_TTL_MS":{"type":"integer","minimum":60000,"maximum":604800000},"SHIPPED_MIN_BUDGET_MS":{"type":"integer","minimum":0,"maximum":86400000},"EVIDENCE_CLOCK_SKEW_TOLERANCE_MS":{"type":"integer","minimum":0,"maximum":3600000},"CLOSEOUT_STATE_BLOCK_TTL_SECONDS":{"type":"integer","minimum":30,"maximum":3600}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false},"sourceLines":{"type":"object","properties":{"warnAt":{"type":"integer","minimum":1,"maximum":1000000000}},"required":[],"additionalProperties":false}},"required":[],"additionalProperties":false}},"required":["expectedVersion","policy"],"additionalProperties":false}}}}}},"/v1/foundry/control/pause":{"post":{"operationId":"foundry.control.pause","summary":"Stop new leases for your company, one repository or one worker, with a reason and how it ends. Leases already held continue.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"pauses":{"type":"array","items":{"type":"object","additionalProperties":true},"maxItems":500}},"required":["pauses"],"additionalProperties":false}}}}},"x-scope":"foundry:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["tenant","repository","worker"]},"ref":{"type":"string","pattern":"^[A-Za-z0-9_./-]{1,100}$"},"reason":{"type":"string","minLength":1,"maxLength":1000},"condition":{"type":"object","properties":{"kind":{"type":"string","enum":["expires_at","target_terminal"]},"at":{"type":"string","format":"date-time"},"issue":{"type":"string","minLength":1,"maxLength":100}},"required":["kind"],"additionalProperties":false}},"required":["scope","reason"],"additionalProperties":false}}}}}},"/v1/foundry/control/resume":{"post":{"operationId":"foundry.control.resume","summary":"End a pause.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"pauses":{"type":"array","items":{"type":"object","additionalProperties":true},"maxItems":500}},"required":["pauses"],"additionalProperties":false}}}}},"x-scope":"foundry:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["tenant","repository","worker"]},"ref":{"type":"string","pattern":"^[A-Za-z0-9_./-]{1,100}$"}},"required":["scope"],"additionalProperties":false}}}}}},"/v1/foundry/overview":{"get":{"operationId":"foundry.overview.get","summary":"Leases per repository, queue depth, open decisions, and review and verification health. Open work counts deliverables once; an outcome is not added to its deliverables. `capacity` is the operator line: the company target, lanes running, Todo items a worker can claim now by the claim rules (apart from `queue.depth`, every unleased Todo item), what holds the rest (intake, dependencies, compute, review, spend, deploy), human decisions due today and the age of the oldest unclosed merge. `linearQueue` is the Linear outbox when this host can count it: observe or write, how many rows are pending, the oldest, and how many writes failed with the oldest failure instant. Reading it changes nothing.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"type":"integer"},"tenant":{"type":"string"},"observedAt":{"type":"string"},"execution":{"type":"object","additionalProperties":true},"queue":{"type":"object","additionalProperties":true},"openWork":{"type":"object","additionalProperties":true},"decisions":{"type":"object","additionalProperties":true},"review":{"type":"object","additionalProperties":true},"verification":{"type":"object","additionalProperties":true},"unread":{"type":"object","additionalProperties":true},"scheduler":{"type":"object","additionalProperties":true},"capacity":{"type":"object","additionalProperties":true},"linearQueue":{"type":"object","properties":{"mode":{"anyOf":[{"type":"string","enum":["observe","write"]},{"type":"null"}]},"pending":{"type":"integer","minimum":0},"oldest":{"anyOf":[{"type":"string"},{"type":"null"}]},"failed":{"type":"integer","minimum":0},"failedOldest":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["pending"],"additionalProperties":false}},"required":["schema","tenant","observedAt","execution","queue","openWork","decisions","review","verification","scheduler"],"additionalProperties":false}}}}},"x-scope":"foundry:read","x-effect":"read"}},"/v1/foundry/outbox":{"get":{"operationId":"foundry.outbox.list","summary":"The company's outbox, newest first: id, target, status, operation and the failure code. The payload body is not returned. Failed rows stay failed. Reading it changes nothing.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"target":{"type":"string"},"status":{"type":"string"},"operation":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"idempotencyKey":{"type":"string"}},"required":["id","target","status","idempotencyKey"],"additionalProperties":false},"maxItems":100}},"required":["rows"],"additionalProperties":false}}}}},"x-scope":"foundry:read","x-effect":"read"}},"/v1/foundry/roadmap":{"get":{"operationId":"foundry.roadmap.get","summary":"The company roadmap snapshot: each area, the next milestone, blockers and proof. A hand-configured snapshot is returned as stored. A company with no snapshot is filled from its policy repository: roadmap.paths, or roadmap.path as one file, or every directory spec/steps/ROADMAP.md on the default branch, each file one area. A file that cannot be read is that area source failure and the other areas still show. A fill is read again when the branch head or the path list changes, no more often than roadmap.refreshSeconds, which defaults to 60.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"snapshot","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"area","in":"query","required":false,"schema":{"type":"string","maxLength":120}},{"name":"milestone","in":"query","required":false,"schema":{"type":"string","maxLength":120}},{"name":"target","in":"query","required":false,"schema":{"type":"string","pattern":"^(?:100|[1-9]?[0-9])$"}},{"name":"basis","in":"query","required":false,"schema":{"type":"string","enum":["recorded","verified"]}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"x-scope":"foundry:read","x-effect":"read"},"post":{"operationId":"foundry.roadmap.configure","summary":"Bind a roadmap source or accept a baseline for your company, against the version you read. Repositories, the default branch and teams are the ones in company policy.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"x-scope":"foundry:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"action":{"type":"string","enum":["bind","import","add-outcome","rename","checks","spec","map","edges","ingest","reconcile","rollback","source","revoke","file"]},"authority":{"type":"string","enum":["github","brain","recorded"]},"source":{"type":"string","maxLength":300},"sourceId":{"type":"string","minLength":1,"maxLength":80},"repository":{"type":"string","minLength":1,"maxLength":80},"defaultBranch":{"type":"string","maxLength":120},"linearTeam":{"type":"string","maxLength":40},"linearTeamId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"progress":{"type":"string","enum":["rows","tickets"]},"areas":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"name":{"type":"string","maxLength":500},"sharedGate":{"type":"object","properties":{"label":{"type":"string","maxLength":500},"ref":{"type":"string","minLength":1,"maxLength":80}},"required":["label"],"additionalProperties":false}},"required":["id","name"],"additionalProperties":false},"maxItems":40},"markdown":{"type":"string","maxLength":200000},"accept":{"type":"boolean"},"mirror":{"type":"boolean"},"recorded":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"name":{"type":"string","maxLength":500},"sharedGate":{"type":"object","properties":{"label":{"type":"string","maxLength":500},"ref":{"type":"string","minLength":1,"maxLength":80}},"required":["label"],"additionalProperties":false},"rows":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":500},"ships":{"type":"string","maxLength":500},"state":{"type":"string","maxLength":40},"owed":{"type":"string","maxLength":4000},"tickets":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":40},"evidence":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":20}},"required":["name","state"],"additionalProperties":false},"maxItems":200}},"required":["id","name"],"additionalProperties":false},"maxItems":20},"outcome":{"type":"string","minLength":1,"maxLength":80},"id":{"type":"string","minLength":1,"maxLength":80},"name":{"type":"string","maxLength":500},"added":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"area":{"type":"string","minLength":1,"maxLength":80},"name":{"type":"string","maxLength":500},"milestone":{"type":"string","minLength":1,"maxLength":80}},"required":["id","area","name"],"additionalProperties":false},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"name":{"type":"string","maxLength":500},"proof":{"type":"string","maxLength":80},"target":{"type":"string","maxLength":120},"owner":{"type":"string","maxLength":120}},"required":["id"],"additionalProperties":false},"maxItems":40},"requirements":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"outcome":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]}},"required":["id"],"additionalProperties":false},"maxItems":200},"claim":{"type":"object","properties":{"outcome":{"type":"string","minLength":1,"maxLength":80},"unmet":{"type":"boolean"}},"required":["outcome"],"additionalProperties":false},"ticket":{"type":"string","maxLength":40},"role":{"type":"string","enum":["parent","ticket"]},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","maxLength":40},"to":{"type":"string","maxLength":40},"kind":{"type":"string","enum":["blocks","related"]}},"required":["from","to","kind"],"additionalProperties":false},"maxItems":200},"deliveryId":{"type":"string","maxLength":120},"at":{"type":"string","format":"date-time"},"issues":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","maxLength":40},"status":{"type":"string","maxLength":40},"title":{"type":"string","maxLength":500},"url":{"type":"string","maxLength":2000},"assignee":{"type":"string","maxLength":120},"uuid":{"type":"string","maxLength":80}},"required":["key"],"additionalProperties":false},"maxItems":200},"evidence":{"type":"array","items":{"type":"object","properties":{"outcome":{"type":"string","minLength":1,"maxLength":80},"check":{"type":"string","minLength":1,"maxLength":80},"pass":{"type":"boolean"},"sha":{"type":"string","maxLength":64},"branch":{"type":"string","maxLength":120},"release":{"type":"string","maxLength":120},"target":{"type":"string","maxLength":120},"receipt":{"type":"string","maxLength":200},"waiver":{"type":"object","properties":{"by":{"type":"string","maxLength":500},"at":{"type":"string","format":"date-time"},"scope":{"type":"string","maxLength":500}},"required":["by"],"additionalProperties":false}},"required":["outcome","check"],"additionalProperties":false},"maxItems":80},"release":{"type":"string","maxLength":120},"outcomes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":40},"ok":{"type":"boolean"},"error":{"type":"string","maxLength":500},"hide":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":40},"title":{"type":"string","maxLength":500},"description":{"type":"string","maxLength":8000}},"required":["expectedVersion","action"],"additionalProperties":false}}}}}},"/v1/foundry/events":{"get":{"operationId":"foundry.events.list","summary":"The event stream of one item or of your company. Events carry ids and codes, never ticket text. Cursor paged.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"item","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9]{1,12}$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string","pattern":"^(?:[1-9][0-9]?|100)$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","additionalProperties":true},"maxItems":100},"nextCursor":{"anyOf":[{"type":"string","pattern":"^[0-9]{1,12}$"},{"type":"null"}]}},"required":["events","nextCursor"],"additionalProperties":false}}}}},"x-scope":"foundry:read","x-effect":"read"}},"/v1/foundry/pipeline-timings":{"get":{"operationId":"foundry.pipeline.timings","summary":"Timing of pull requests in your connected repositories, from open to live. `since` is a duration (24h, 7d, 2w) or an ISO instant; absent is the last 24 hours. Each stage has p50 and p90 in milliseconds. `bottleneck` is the stage that holds the most open pull requests, or the slowest stage when none are open. A permanent Gate B refusal that the head has not moved past is a blocker. `ac foundry pipeline-timings --since 24h`.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"since","in":"query","required":false,"schema":{"type":"string","pattern":"^(?:[1-9][0-9]{0,4}[hdw]|\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z)$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"since":{"type":"integer"},"until":{"type":"integer"},"bottleneck":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9.-]{0,40}$"},{"type":"null"}]},"stages":{"type":"array","items":{"type":"object","properties":{"stage":{"type":"string","pattern":"^[a-z][a-z0-9.-]{0,40}$"},"n":{"type":"integer","minimum":0},"p50":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"p90":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"open":{"type":"integer","minimum":0}},"required":["stage","n","p50","p90","open"],"additionalProperties":false},"maxItems":32},"pulls":{"type":"array","items":{"type":"object","properties":{"repository":{"type":"string"},"pull":{"type":"integer","minimum":1},"head":{"type":"string"},"openToLive":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"lastCommitToLive":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"reworkMs":{"type":"integer","minimum":0},"gateRounds":{"type":"integer","minimum":0},"wastedDispatches":{"type":"integer","minimum":0},"blocker":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["repository","pull","head","openToLive","lastCommitToLive","reworkMs","gateRounds","wastedDispatches","blocker"],"additionalProperties":false},"maxItems":200},"blockers":{"type":"array","items":{"type":"object","properties":{"repository":{"type":"string"},"pull":{"type":"integer","minimum":1},"head":{"type":"string"},"reason":{"type":"string"},"at":{"type":"integer"}},"required":["repository","pull","head","reason","at"],"additionalProperties":false},"maxItems":100}},"required":["since","until","bottleneck","stages","pulls","blockers"],"additionalProperties":false}}}}},"x-scope":"foundry:read","x-effect":"read"}},"/v1/foundry/rules":{"get":{"operationId":"foundry.rules.get","summary":"The rules the kernel that serves your company decides with: how many, how many are the core's, and the id, transition and refusal code of each row your company's own rule pack adds. `check` says whether a pack row refused its own self-check when the kernel's ask table was asked, as a dry run; `fired` names the first that did. Counts and ids only, and nothing is written.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":0},"core":{"type":"object","properties":{"count":{"type":"integer","minimum":0}},"required":["count"],"additionalProperties":false},"pack":{"type":"object","properties":{"count":{"type":"integer","minimum":0},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"transition":{"type":"string"},"code":{"type":"string"},"check":{"type":"string","enum":["fired","silent","none"]}},"required":["id","transition","code","check"],"additionalProperties":false},"maxItems":500}},"required":["count","rules"],"additionalProperties":false},"fired":{"type":"object","properties":{"count":{"type":"integer","minimum":0},"rule":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["count","rule","code"],"additionalProperties":false}},"required":["count","core","pack","fired"],"additionalProperties":false}}}}},"x-scope":"foundry:read","x-effect":"read"}},"/v1/foundry/work/claim":{"post":{"operationId":"foundry.work.claim","summary":"Take one lease on the next eligible item for this worker, bound to the run you name, or answer no work. With `recover: true` it claims nothing: it answers the lease that run already holds, which is how a host that lost a claim's answer finds the lease it took before that answer was lost.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"item":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"interrupt":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"refusal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"wait":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"decision":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"guidance":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"recovery":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["lease"],"additionalProperties":false}}}}},"x-scope":"foundry:work","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,120}$"},"item":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"},"recover":{"type":"boolean"}},"required":["run"],"additionalProperties":false}}}}}},"/v1/foundry/work/{lease}/heartbeat":{"post":{"operationId":"foundry.work.heartbeat","summary":"Renew liveness on a lease you hold. The answer may carry an interrupt request.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"lease","in":"path","required":true,"schema":{"type":"string","pattern":"^lease_[0-9]{1,12}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"item":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"interrupt":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"refusal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"wait":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"decision":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"guidance":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"recovery":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["lease"],"additionalProperties":false}}}}},"x-scope":"foundry:work","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,120}$"}},"required":["run"],"additionalProperties":false}}}}}},"/v1/foundry/work/{lease}":{"get":{"operationId":"foundry.work.get","summary":"The contract, repository guidance and any recovery brief of a lease you hold.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"lease","in":"path","required":true,"schema":{"type":"string","pattern":"^lease_[0-9]{1,12}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"item":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"interrupt":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"refusal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"wait":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"decision":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"guidance":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"recovery":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["lease"],"additionalProperties":false}}}}},"x-scope":"foundry:work","x-effect":"read"}},"/v1/foundry/work/{lease}/checkpoint":{"post":{"operationId":"foundry.work.checkpoint","summary":"Record progress on a lease you hold. A new head commit advances the stall clock. A repeated status checkpoint does not. May declare a bounded wait. `model` and `tries` are the model the run works on and how often the ticket has been tried, and `pr` the pull request it published; all three are recorded on the ticket so the overview and a later brief name them (AC-725).","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"lease","in":"path","required":true,"schema":{"type":"string","pattern":"^lease_[0-9]{1,12}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"item":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"interrupt":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"refusal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"wait":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"decision":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"guidance":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"recovery":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["lease"],"additionalProperties":false}}}}},"x-scope":"foundry:work","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,120}$"},"head":{"type":"string","pattern":"^[a-f0-9]{7,40}$"},"wait":{"type":"object","properties":{"declaredKind":{"type":"string","enum":["fusion_panel","ci","build","other"]},"until":{"type":"string","format":"date-time"}},"required":["declaredKind","until"],"additionalProperties":false},"model":{"type":"string","pattern":"^[a-z0-9][a-z0-9._:/-]{0,119}$"},"tries":{"type":"integer","minimum":0,"maximum":1000000},"pr":{"type":"object","properties":{"url":{"type":"string","pattern":"^https://github\\.com/[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+/pull/[0-9]{1,10}$"},"number":{"type":"integer","minimum":1,"maximum":1000000000}},"required":["url"],"additionalProperties":false}},"required":["run"],"additionalProperties":false}}}}}},"/v1/foundry/work/{lease}/submit":{"post":{"operationId":"foundry.work.submit","summary":"Hand a head commit to review and landing. The lease completes. `pr` is the pull request the run opened, when the host read one: the ticket's Linear comment and attachment name it (AC-542). `diff`, when sent, is an optional pre-flight excerpt of at most 8000 characters. Omitting it does not skip the pre-flight: the submitted head change is read through the same compare the review uses, the ticket text stays the review context, and a change that cannot be read leaves the head unsubmitted. A longer change is not put in `diff`. The compare is reviewed in parts that each keep whole files, and a file that does not fit one part leaves the head unsubmitted. When a change owes Gate B, each finding is fixed or answered, and a rework packet is answered blocker by blocker, before the head is accepted.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"lease","in":"path","required":true,"schema":{"type":"string","pattern":"^lease_[0-9]{1,12}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"item":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"interrupt":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"refusal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"wait":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"decision":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"guidance":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"recovery":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["lease"],"additionalProperties":false}}}}},"x-scope":"foundry:work","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,120}$"},"head":{"type":"string","pattern":"^[a-f0-9]{7,40}$"},"usage":{"type":"object","properties":{"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"type":"number","minimum":0,"maximum":1000000},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["tokens","costUsd"],"additionalProperties":false},"pr":{"type":"object","properties":{"url":{"type":"string","pattern":"^https://github\\.com/[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+/pull/[0-9]{1,10}$"},"number":{"type":"integer","minimum":1,"maximum":1000000000}},"required":["url"],"additionalProperties":false},"diff":{"type":"string","maxLength":8000},"acceptance":{"type":"string","maxLength":4000},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$","maxLength":160},"disposition":{"type":"string","enum":["fixed","answered"]},"note":{"type":"string","minLength":1,"maxLength":500}},"required":["id","disposition","note"],"additionalProperties":false},"maxItems":128},"resolutions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$","maxLength":160},"note":{"type":"string","minLength":1,"maxLength":500}},"required":["id","note"],"additionalProperties":false},"maxItems":512}},"required":["run","head"],"additionalProperties":false}}}}}},"/v1/foundry/work/{lease}/ask":{"post":{"operationId":"foundry.work.ask","summary":"Use a published decision class. For other, supply a reason. A dependency ask can name the Foundry item IDs it awaits in dependencyItems. The ask rules decide whether it becomes a decision, a wait or a refusal. Optional routing facts include `owner`, who it is addressed to; `credentialClaim`, a credential it says is missing, with the probe that read the same account; `hold`, a hold it says is its only remaining dependency, with any second dependency it names; `precondition`, a condition the step it asks for hangs on, with whether the lane can read it and has; and `blockerType`, the kind of blocker it is.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"lease","in":"path","required":true,"schema":{"type":"string","pattern":"^lease_[0-9]{1,12}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"item":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"interrupt":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"refusal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"wait":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"decision":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"guidance":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"recovery":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["lease"],"additionalProperties":false}}}}},"x-scope":"foundry:work","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,120}$"},"cls":{"type":"string","enum":["admission","t3-approval","destructive-data-mutation","credential-rotation","tenant-wide-write","external-send","review-round-ceiling","ticket-budget-overrun","unlisted-failure","dependency","missing-dependency","blocked-prerequisite","prerequisite-blocked","wait-expired","qualification-stalled","unclaimable","verification-stalled","round-not-started","review-not-startable","preflight-unavailable","blocked","credential","external-authorization","client-approval","approval","payment","owner-credential","client-facing-go","security","route-absence","release-hold","keeper-hold","admission-repair","capability-map","credential-intake","repository-access","sentinel-not-qualified","sentinel-publication-parked","spec-plan-terminal","spec-planner","dependency-canceled","digest","spec-timeout","review-rounds-cap","review-stall-owner","review-verdict-operator","review-verdict-rearm","release-coverage-gap","closeout-replay","closeout-evidence-commit","guarded-rollback","deployment-records-removed","rollback-incompatible-data","zero-progress-exhausted","duplicate-disposition","duplicate-identity","duplicate-release-anchor","repository-not-connected","linear-connection","linear-credential","linear-description-append","linear-install-bad-response","linear-install-client","linear-install-permission","linear-outbox-readback","linear-team","linear-write-field","other"]},"reason":{"type":"string","minLength":1,"maxLength":500},"dependencyItems":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,80}$"},"minItems":1,"maxItems":32},"evidence":{"type":"array","items":{"type":"object","properties":{"store":{"type":"string","pattern":"^[a-z][a-z0-9._-]{0,60}$"},"id":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["store","id","sha256"],"additionalProperties":false},"minItems":1,"maxItems":8},"dedupeKey":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"owner":{"type":"object","properties":{"kind":{"type":"string","enum":["human","team"]},"id":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"}},"required":["kind","id"],"additionalProperties":false},"credentialClaim":{"type":"object","properties":{"claimedAbsent":{"type":"boolean"},"account":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"probe":{"type":"object","properties":{"account":{"type":"string","pattern":"^[A-Za-z0-9_.:/@#+-]{1,160}$"},"verdict":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"}},"required":["account","verdict"],"additionalProperties":false}},"required":["claimedAbsent","account"],"additionalProperties":false},"hold":{"type":"object","properties":{"soleDependency":{"type":"boolean"},"affirmative":{"type":"boolean"},"secondDependencies":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,60}$"},"maxItems":8}},"required":[],"additionalProperties":false},"precondition":{"type":"object","properties":{"readable":{"type":"boolean"},"read":{"type":"boolean"}},"required":["readable"],"additionalProperties":false},"blockerType":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,60}$"}},"required":["run","cls","evidence"],"additionalProperties":false}}}}}},"/v1/foundry/work/{lease}/release":{"post":{"operationId":"foundry.work.release","summary":"End a lease you hold, with the reason.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"lease","in":"path","required":true,"schema":{"type":"string","pattern":"^lease_[0-9]{1,12}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"lease":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"item":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"interrupt":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"refusal":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"wait":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"decision":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"guidance":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"recovery":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"lane":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]}},"required":["lease"],"additionalProperties":false}}}}},"x-scope":"foundry:work","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,120}$"},"reason":{"type":"string","enum":["CHILD_EXIT_WITHOUT_CLOSEOUT","CHILD_TIMEOUT","CHILD_ERROR","CHILD_INTERRUPTED","CHILD_SELF_RELEASE","PRE_BIND_CHILD_DEATH","TIER_UNREADABLE","RUNTIME_RESTART_ORPHAN"]},"usage":{"type":"object","properties":{"tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"type":"number","minimum":0,"maximum":1000000},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["tokens","costUsd"],"additionalProperties":false}},"required":["run","reason"],"additionalProperties":false}}}}}},"/v1/foundry/fusion/config":{"get":{"operationId":"foundry.fusion.config.get","summary":"The Fusion config in force for your company: version, sha256, status and the whole document. `?version=n` reads one version from the history instead, including a proposal.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"version","in":"query","required":false,"schema":{"type":"string","pattern":"^[1-9][0-9]{0,15}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":1},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"status":{"type":"string","enum":["proposed","published","rejected","expired","revoked"]},"strength":{"type":"string","enum":["same","stronger","weaker"]},"changedPaths":{"type":"array","items":{"type":"string"},"maxItems":512},"reason":{"type":"string"},"proposedBy":{"type":"string"},"proposedByKind":{"type":"string","enum":["person","key","agent","system"]},"approval":{"anyOf":[{"type":"string","enum":["person","mandate"]},{"type":"null"}]},"approvedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoffId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"parentVersion":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposedAt":{"type":"string"},"decidedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"type":"object","additionalProperties":true}},"required":["version","sha256","status","strength"],"additionalProperties":false}}}}},"x-scope":"foundry:read","x-effect":"read"}},"/v1/foundry/fusion/config/versions":{"get":{"operationId":"foundry.fusion.config.versions.list","summary":"The history of your company's Fusion config, newest first: version, status, strength, the paths it changed, who proposed it, why and when.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["proposed","published","rejected","expired","revoked"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"string","pattern":"^(?:[1-9][0-9]?|1[0-9]{2}|200)$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"versions":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer","minimum":1},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"status":{"type":"string","enum":["proposed","published","rejected","expired","revoked"]},"strength":{"type":"string","enum":["same","stronger","weaker"]},"changedPaths":{"type":"array","items":{"type":"string"},"maxItems":512},"reason":{"type":"string"},"proposedBy":{"type":"string"},"proposedByKind":{"type":"string","enum":["person","key","agent","system"]},"approval":{"anyOf":[{"type":"string","enum":["person","mandate"]},{"type":"null"}]},"approvedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoffId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"parentVersion":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposedAt":{"type":"string"},"decidedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"type":"object","additionalProperties":true}},"required":["version","sha256","status","strength"],"additionalProperties":false},"maxItems":200}},"required":["versions"],"additionalProperties":false}}}}},"x-scope":"foundry:read","x-effect":"read"}},"/v1/foundry/fusion/config/change":{"post":{"operationId":"foundry.fusion.config.change","summary":"Apply one change to the config in force. `set` and `remove` name paths in the closed grammar, or `rollbackTo` names a version whose document becomes the new one. A change that must wait for a person is stored as `proposed` and a decide handoff is opened on its sha256; `dryRun: true` answers the validation, the strength, the diff and who must approve, and writes nothing.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"strength":{"type":"string","enum":["same","stronger","weaker"]},"status":{"type":"string"},"handoff":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},{"type":"null"}]},"idempotent":{"type":"boolean"},"changedPaths":{"type":"array","items":{"type":"string"},"maxItems":512},"approval":{"anyOf":[{"type":"string","enum":["person","mandate"]},{"type":"null"}]},"approver":{"type":"string"}},"required":["sha256","strength","status"],"additionalProperties":false}}}}},"x-scope":"foundry:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"base":{"type":"integer","minimum":1,"maximum":9007199254740991},"set":{"type":"object","maxProperties":64,"additionalProperties":false,"patternProperties":{"^(?:seats|gates|tiers|limits|loop)(?:\\.[A-Za-z0-9_-]{1,64}){1,4}$":{"type":["string","number","boolean","array","object","null"]}},"description":"Path in the closed grammar to its new value, e.g. {\"seats.glm.model\": \"glm-5.3\"}"},"remove":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^(?:seats|gates|tiers|limits|loop)(?:\\.[A-Za-z0-9_-]{1,64}){1,4}$"},"maxItems":64},"rollbackTo":{"oneOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"string","enum":["default"]}]},"reason":{"type":"string","minLength":8,"maxLength":500},"dryRun":{"type":"boolean"}},"required":["reason"],"additionalProperties":false}}}}}},"/v1/foundry/fusion/config/publish":{"post":{"operationId":"foundry.fusion.config.publish","summary":"Publish one proposed version, if a person's approval for exactly its sha256 exists and its parent is still the active version. A proposal whose parent was surpassed becomes `expired` and the answer says so; the drain cron calls the same function.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":1},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"status":{"type":"string"},"expired":{"type":"boolean"},"activeVersion":{"type":"integer","minimum":1}},"required":["version","sha256","status"],"additionalProperties":false}}}}},"x-scope":"foundry:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["version"],"additionalProperties":false}}}}}},"/v1/foundry/fusion/config/revoke":{"post":{"operationId":"foundry.fusion.config.revoke","summary":"Revoke a published version: consumers refuse new evidence under it and earlier merges are not re-judged. A signed-in person only, and never the active version — roll back first. A `proposed` version is not revocable: withdraw it.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":1},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"status":{"type":"string","enum":["proposed","published","rejected","expired","revoked"]},"strength":{"type":"string","enum":["same","stronger","weaker"]},"changedPaths":{"type":"array","items":{"type":"string"},"maxItems":512},"reason":{"type":"string"},"proposedBy":{"type":"string"},"proposedByKind":{"type":"string","enum":["person","key","agent","system"]},"approval":{"anyOf":[{"type":"string","enum":["person","mandate"]},{"type":"null"}]},"approvedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoffId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"parentVersion":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposedAt":{"type":"string"},"decidedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"type":"object","additionalProperties":true}},"required":["version","sha256","status","strength"],"additionalProperties":false}}}}},"x-scope":"foundry:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["version"],"additionalProperties":false}}}}}},"/v1/foundry/fusion/config/withdraw":{"post":{"operationId":"foundry.fusion.config.withdraw","summary":"Withdraw a `proposed` version the company no longer wants. The row becomes `rejected`, a terminal state, and stops being the proposal a repeated change returns, so a later change of the same document is written afresh and can publish. A signed-in person only; a published version is revoked or rolled back instead.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":1},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"status":{"type":"string","enum":["proposed","published","rejected","expired","revoked"]},"strength":{"type":"string","enum":["same","stronger","weaker"]},"changedPaths":{"type":"array","items":{"type":"string"},"maxItems":512},"reason":{"type":"string"},"proposedBy":{"type":"string"},"proposedByKind":{"type":"string","enum":["person","key","agent","system"]},"approval":{"anyOf":[{"type":"string","enum":["person","mandate"]},{"type":"null"}]},"approvedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"handoffId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"parentVersion":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"proposedAt":{"type":"string"},"decidedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"type":"object","additionalProperties":true}},"required":["version","sha256","status","strength"],"additionalProperties":false}}}}},"x-scope":"foundry:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["version"],"additionalProperties":false}}}}}},"/v1/foundry/fusion/config/audit":{"get":{"operationId":"foundry.fusion.config.audit","summary":"Acceptance A4, inside the service: one page of one of your company's own Fusion tables, and how many of its rows carry one of your bound model keys. Counts only: rows read, hits, the number of keys compared, and the next offset. No value, digest or row content is answered, and nothing is written.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"table","in":"query","required":false,"schema":{"type":"string","enum":["config_versions","review_jobs","review_rounds","review_attempts","telemetry_rounds","telemetry_seats"]}},{"name":"offset","in":"query","required":false,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,6})$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"table":{"type":"string"},"offset":{"type":"integer","minimum":0},"rows":{"type":"integer","minimum":0},"hits":{"type":"integer","minimum":0},"keys":{"type":"integer","minimum":0},"next":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]}},"required":["table","offset","rows","hits","keys","next"],"additionalProperties":false}}}}},"x-scope":"foundry:configure","x-effect":"read"}},"/v1/foundry/fusion/config/audit/text":{"post":{"operationId":"foundry.fusion.config.audit.text","summary":"Acceptance A4, Linear and Slack: up to 50 pages of text you exported, compared inside the service against your company's live model keys. The owner only. Answers counts only: no key value, prefix or digest, and nothing is stored.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string"},"pages":{"type":"integer","minimum":0},"hits":{"type":"integer","minimum":0},"keys":{"type":"integer","minimum":0}},"required":["source","pages","hits","keys"],"additionalProperties":false}}}}},"x-scope":"foundry:configure","x-effect":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","enum":["linear","slack"]},"pages":{"type":"array","items":{"type":"string","maxLength":20000},"minItems":1,"maxItems":50}},"required":["source","pages"],"additionalProperties":false}}}}}},"/v1/foundry/privileged/run":{"post":{"operationId":"foundry.privileged.run","summary":"Ask FoundryOS to run one privileged workflow your policy declares (`privileged.workflows`), at one commit, with these inputs. Nothing runs on a key's own say: the first call opens a decision for a signed-in owner and answers 202 with its id. Once the owner approves exactly this run (the SHA-256 of the workflow, commit and inputs), the same call starts it once, as a GitHub deployment created at that commit SHA and never at a branch, so a branch that moves cannot change what runs; `ranSha` is the commit GitHub bound it to. The approval is single-use and expires. Off unless your policy turns it on; every answer is in your audit record.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"dispatched":{"type":"boolean"},"code":{"type":"string"},"workflow":{"type":"string"},"subjectHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"handoff":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"state":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","state"],"additionalProperties":false},{"type":"null"}]},"ranSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"deployment":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"recorded":{"type":"boolean"}},"required":["dispatched","code"],"additionalProperties":false}}}}},"x-scope":"foundry:write","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflow":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"sha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"inputs":{"type":"object","maxProperties":10,"additionalProperties":false,"patternProperties":{"^[A-Za-z_][A-Za-z0-9_-]{0,63}$":{"type":"string","maxLength":256}}}},"required":["workflow","sha"],"additionalProperties":false}}}}}},"/v1/finance/plaid":{"get":{"operationId":"finance.plaid.get","summary":"finance plaid get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaidFinance"}}}}},"x-scope":"finance:read","x-effect":"read"}},"/v1/finance/stripe/connect":{"post":{"operationId":"finance.stripe.connect","summary":"finance stripe connect","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"connected":{"const":true},"account":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id"],"additionalProperties":false},"liveMode":{"type":"boolean"}},"required":["connected","account","liveMode"],"additionalProperties":false}}}}},"x-scope":"finance:connection","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":12,"maxLength":200}},"required":["key"],"additionalProperties":false}}}}}},"/v1/finance/stripe/disconnect":{"post":{"operationId":"finance.stripe.disconnect","summary":"finance stripe disconnect","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"connected":{"const":false},"revokedAtStripe":{"const":false}},"required":["connected","revokedAtStripe"],"additionalProperties":false}}}}},"x-scope":"finance:connection","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/finance/accounting":{"get":{"operationId":"finance.accounting.get","summary":"One accounting read: profit and loss, balance sheet, invoices and bills from this company's own provider, each with its source and freshness. Read only; the tenant is the principal and the provider is that company's connections row.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["last","mtd"]}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}},"x-scope":"finance:read","x-effect":"read"}},"/v1/brain/sources/options":{"get":{"operationId":"brain.sources.options","summary":"What this connected account can offer a source of this kind, one level at a time. Never a list of documents, and never a token, an account id or a custodian link.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"connection","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["google-drive","fathom","github","slack-app","gmail"]}},{"name":"place","in":"query","required":false,"schema":{"type":"string","enum":["folder","repository","channel","mailbox"]}},{"name":"parent","in":"query","required":false,"schema":{"type":"string","maxLength":500}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["google-drive","fathom","github","slack-app","gmail"]},"account":{"type":"string"},"places":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"members":{"type":"integer","minimum":0},"humans":{"type":"integer","minimum":0},"shared":{"type":"boolean"}},"required":[],"additionalProperties":false}},"scopes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":[],"additionalProperties":false}},"since":{"type":"object","properties":{"min":{"type":"string"}},"required":[],"additionalProperties":false},"repositories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"private":{"type":"boolean"}},"required":[],"additionalProperties":false}},"paths":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"bytes":{"type":"integer"}},"required":[],"additionalProperties":false}},"commit":{"type":"string"},"next":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"additionalProperties":false}}}}},"x-scope":"brain:configure","x-effect":"read"}},"/v1/brain/sources/{source}/sync":{"post":{"operationId":"brain.sources.sync","summary":"Mark one source due now. The tick reads it; the answer says when. A paused, held or removed source is refused with its state.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"source","in":"path","required":true,"schema":{"type":"string","pattern":"^SRC-[0-9]{4}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"due_at":{"type":"string"},"job":{"type":"string"}},"required":["due_at"],"additionalProperties":false}}}}},"x-scope":"brain:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/brain/agents":{"get":{"operationId":"brain.agents.list","summary":"The agents this company has deployed, enough to name who is handed a company file: every one of them for a company file, those deployed with a team for that team's file, and the one agent for its own. A removed agent is not listed. Role text, tools and caps are read through agentos.agents.list.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"recipe":{"type":"string"},"team":{"anyOf":[{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},{"type":"null"}]},"state":{"type":"string","enum":["active","paused"]}},"required":["id","name","title","recipe","team","state"],"additionalProperties":false}}},"required":["agents"],"additionalProperties":false}}}}},"x-scope":"brain:read","x-effect":"read"}},"/v1/brain/librarian/settings":{"post":{"operationId":"brain.librarian.settings.save","summary":"Name the repository the librarian routine reads each night, or clear it","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainLibrarian"}}}}},"x-scope":"brain:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"repository":{"anyOf":[{"type":"string","minLength":3,"maxLength":201,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.-]{0,99}/[A-Za-z0-9_.-]{1,100}$"},{"type":"null"}]}},"required":["repository"],"additionalProperties":false}}}}}},"/v1/brain/jobs/retry":{"post":{"operationId":"brain.jobs.retry","summary":"Re-drive one failed job of this company: it is put back due with a fresh attempt budget. A job that is not failed is refused. No other job is touched.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"retried":{"type":"boolean"},"id":{"type":"string"},"state":{"const":"due"}},"required":["retried","id","state"],"additionalProperties":false}}}}},"x-scope":"brain:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80,"pattern":"^JOB-[A-Z0-9-]{1,80}$"}},"required":["id"],"additionalProperties":false}}}}}},"/v1/brain/conflicts":{"get":{"operationId":"brain.conflicts.list","summary":"What two live records disagree about. Numbers are found by arithmetic; statements only where the brain_contradicts key is allowed to be asked.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"state","in":"query","required":false,"schema":{"type":"string","enum":["open","resolved","all"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"string","pattern":"^[1-9][0-9]{0,2}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"conflicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^CNF-[0-9]{4,}$"},"kind":{"type":"string","enum":["numbers","statements"]},"metric":{"type":"string"},"period":{"type":"string"},"a":{"type":"object","properties":{"id":{"type":"string"},"line":{"type":"string"}},"required":["id","line"],"additionalProperties":false},"b":{"type":"object","properties":{"id":{"type":"string"},"line":{"type":"string"}},"required":["id","line"],"additionalProperties":false},"detail":{"type":"string"},"found_by":{"type":"string","enum":["code","brain_contradicts"]},"state":{"type":"string","enum":["open","resolved"]},"resolution":{"anyOf":[{"type":"string","enum":["a","b","both","neither"]},{"type":"null"}]},"resolved_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"type":"string"},"opened_at":{"type":"string"}},"required":["id","kind","a","b","found_by","state","opened_at"],"additionalProperties":false}},"open":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}},"required":["conflicts","open","total"],"additionalProperties":false}}}}},"x-scope":"brain:read","x-effect":"read"}},"/v1/brain/conflicts/{id}/resolution":{"post":{"operationId":"brain.conflicts.resolve","summary":"A signed-in person says which side holds. The judgement is recorded; no record is rewritten here.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^CNF-[0-9]{4,}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"conflict":{"type":"object","properties":{"id":{"type":"string","pattern":"^CNF-[0-9]{4,}$"},"kind":{"type":"string","enum":["numbers","statements"]},"metric":{"type":"string"},"period":{"type":"string"},"a":{"type":"object","properties":{"id":{"type":"string"},"line":{"type":"string"}},"required":["id","line"],"additionalProperties":false},"b":{"type":"object","properties":{"id":{"type":"string"},"line":{"type":"string"}},"required":["id","line"],"additionalProperties":false},"detail":{"type":"string"},"found_by":{"type":"string","enum":["code","brain_contradicts"]},"state":{"type":"string","enum":["open","resolved"]},"resolution":{"anyOf":[{"type":"string","enum":["a","b","both","neither"]},{"type":"null"}]},"resolved_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"type":"string"},"opened_at":{"type":"string"}},"required":["id","kind","a","b","found_by","state","opened_at"],"additionalProperties":false}},"required":["conflict"],"additionalProperties":false}}}}},"x-scope":"brain:approve","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resolution":{"type":"string","enum":["a","b","both","neither"]},"note":{"type":"string","maxLength":1000}},"required":["resolution"],"additionalProperties":false}}}}}},"/v1/brain/channels":{"get":{"operationId":"brain.channels.list","summary":"Which Slack channels this company listens to, off by default, with each channel's own retention.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"channels":{"type":"array","items":{"type":"object","properties":{"workspace":{"type":"string"},"channel":{"type":"string"},"name":{"type":"string"},"enabled":{"type":"boolean"},"retention_days":{"type":"integer"},"audience":{"type":"string","enum":["company","team","owner"]},"switched_by":{"type":"string"},"switched_at":{"type":"string"}},"required":[],"additionalProperties":false}}},"required":["channels"],"additionalProperties":false}}}}},"x-scope":"brain:read","x-effect":"read"},"post":{"operationId":"brain.channels.save","summary":"Switch one channel on or off. A signed-in person does it; a channel that is not on stores nothing.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"type":"object","properties":{"workspace":{"type":"string"},"channel":{"type":"string"},"name":{"type":"string"},"enabled":{"type":"boolean"},"retention_days":{"type":"integer"},"audience":{"type":"string"},"switched_by":{"type":"string"},"switched_at":{"type":"string"}},"required":[],"additionalProperties":false}},"required":["channel"],"additionalProperties":false}}}}},"x-scope":"brain:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},"channel":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},"name":{"type":"string","maxLength":120},"enabled":{"type":"boolean"},"retention_days":{"type":"integer","minimum":0,"maximum":3650},"audience":{"type":"string","enum":["company","team","owner"]}},"required":["workspace","channel","enabled"],"additionalProperties":false}}}}}},"/v1/brain/decisions":{"get":{"operationId":"brain.decisions.list","summary":"The request log: what was asked and what came back, typed, with no prose written by the model. Empty for a tenant whose keys are off.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"string","pattern":"^[1-9][0-9]{0,2}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"decisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"mode":{"type":"string","enum":["shadow","live"]},"status":{"type":"string","enum":["ok","unavailable"]},"value":{},"probability":{"anyOf":[{"type":"number"},{"type":"null"}]},"acted":{"type":"boolean"},"cost_micro_usd":{"type":"integer"},"model":{"type":"string"},"span":{"type":"string"},"at":{"type":"string"}},"required":["id","key","mode","status","acted","at"],"additionalProperties":false}},"totals":{"type":"object","properties":{"calls":{"type":"integer","minimum":0},"cost_micro_usd":{"type":"integer","minimum":0},"unavailable":{"type":"integer","minimum":0}},"required":["calls","cost_micro_usd","unavailable"],"additionalProperties":false}},"required":["decisions","totals"],"additionalProperties":false}}}}},"x-scope":"brain:read","x-effect":"read"}},"/v1/brain/digest":{"post":{"operationId":"brain.digest.run","summary":"Read the evidence rows the digest has not read yet. Counts only; a proposal carries the quote.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"read":{"type":"integer","minimum":0},"spans":{"type":"integer","minimum":0},"kept":{"type":"integer","minimum":0},"dropped":{"type":"integer","minimum":0},"candidates":{"type":"integer","minimum":0},"calls":{"type":"integer","minimum":0},"conflicts":{"type":"integer","minimum":0}},"required":["read"],"additionalProperties":false}}}}},"x-scope":"brain:observe","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/brain/digest/{id}":{"get":{"operationId":"brain.digest.get","summary":"What the digest made of one evidence row, as counts.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^(DOC|TRN|MSG|ENT|NOT)-[0-9]{4,}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"eid":{"type":"string","pattern":"^(DOC|TRN|MSG|ENT|NOT)-[0-9]{4,}$"},"state":{"type":"string"},"reason":{},"spans":{},"kept":{},"dropped":{},"candidates":{},"calls":{},"at":{},"read_at":{}},"required":["eid","state"],"additionalProperties":false}}}}},"x-scope":"brain:read","x-effect":"read"}},"/v1/brain/bindings":{"get":{"operationId":"brain.bindings.list","summary":"List the Slack channels bound to this company, and the workspaces it may bind a channel in: installs that belong to a company under the same billing account.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"bindings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"app":{"type":"string"},"workspace":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"workspace_name":{"type":"string"},"channel":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"channel_name":{"type":"string"},"bound_at":{"type":"string"}},"required":["id","app","workspace","channel"],"additionalProperties":false}},"workspaces":{"type":"array","items":{"type":"object","properties":{"app":{"type":"string"},"workspace":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"workspace_name":{"type":"string"}},"required":["app","workspace"],"additionalProperties":false}}},"required":["bindings","workspaces"],"additionalProperties":false}}}}},"x-scope":"brain:read","x-effect":"read"},"post":{"operationId":"brain.bindings.save","summary":"Bind one Slack channel to this company, or unbind one with remove. A workspace installed under another billing account answers not_installed, and a channel another company holds answers place_taken without naming it.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"binding":{"type":"object","properties":{"id":{"type":"string"},"app":{"type":"string"},"workspace":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"workspace_name":{"type":"string"},"channel":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"channel_name":{"type":"string"},"bound_at":{"type":"string"}},"required":["id","app","workspace","channel"],"additionalProperties":false},"removed":{"type":"boolean"},"id":{"type":"string"}},"required":[],"additionalProperties":false}}}}},"x-scope":"brain:configure","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"channel":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"channel_name":{"type":"string","maxLength":200},"remove":{"type":"string","pattern":"^[0-9a-f-]{36}$"}},"required":[],"additionalProperties":false}}}}}},"/v1/brain/audiences/readers":{"post":{"operationId":"brain.audiences.readers","summary":"Who would read an audience before anything is saved: the number of people and of agent seats it admits, and up to 25 names the caller may see (an owner or admin sees the directory, any other person only themselves, a key no names). Company is everyone; team is anyone in any named team (one to eight); owner is owners and admins and never a seat; readers people withholds it from every seat. Nothing is written.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"people":{"type":"integer","minimum":0},"seats":{"type":"integer","minimum":0},"names":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["person","seat"]},"id":{"type":"string"},"label":{"type":"string"}},"required":["kind","id","label"],"additionalProperties":false},"maxItems":25},"policy":{"type":"object","properties":{"level":{"type":"string"},"teams":{"type":"array","items":{"type":"string"}},"readers":{"type":"string"},"seatsRead":{"type":"boolean"},"ownerReaders":{"type":"string"},"delegatedClients":{"type":"string"},"names":{"type":"string","enum":["directory","self","none"]},"namesLimit":{"type":"integer"},"seatKinds":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false}},"required":["people","seats","names","policy"],"additionalProperties":false}}}}},"x-scope":"brain:read","x-effect":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"level":{"type":"string","enum":["company","team","owner"]},"teams":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"minItems":1,"maxItems":8,"uniqueItems":true},"readers":{"type":"string","enum":["everyone","people"]}},"required":["level"],"additionalProperties":false}}}}}},"/v1/agentos/brain":{"get":{"operationId":"agentos.brain.get","summary":"Read this company's one brain setting: level none, a page of owner text, or a connected MCP brain, with the roles a probe finds (cached 60 seconds). The bearer token is the Worker secret and is never part of the answer.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["none","context","mcp"]},"context":{"type":"string","maxLength":20000},"mcp":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"url":{"type":"string","maxLength":2048},"tools":{"type":"object","properties":{"brief":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}$"},"search":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}$"},"read":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}$"},"observe":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}$"}},"required":[],"additionalProperties":false}},"required":["name","url"],"additionalProperties":false},"learn":{"type":"boolean"},"version":{"type":"integer","minimum":0},"status":{"type":"string","enum":["none","ok","unreachable"]},"roles":{"type":"object","properties":{"brief":{"type":"boolean"},"search":{"type":"boolean"},"read":{"type":"boolean"},"observe":{"type":"boolean"}},"required":["brief","search","read","observe"],"additionalProperties":false}},"required":["kind","learn","version","status","roles"],"additionalProperties":false}}}}},"x-scope":"agent:read","x-effect":"read"},"post":{"operationId":"agentos.brain.save","summary":"Set this company's one brain setting (owner only). A closed schema: level none, a page of text of at most 20,000 characters, or an MCP brain at a public https URL with no credentials and a tool-name map. Answers as the read does after probing.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["none","context","mcp"]},"context":{"type":"string","maxLength":20000},"mcp":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"url":{"type":"string","maxLength":2048},"tools":{"type":"object","properties":{"brief":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}$"},"search":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}$"},"read":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}$"},"observe":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}$"}},"required":[],"additionalProperties":false}},"required":["name","url"],"additionalProperties":false},"learn":{"type":"boolean"},"version":{"type":"integer","minimum":0},"status":{"type":"string","enum":["none","ok","unreachable"]},"roles":{"type":"object","properties":{"brief":{"type":"boolean"},"search":{"type":"boolean"},"read":{"type":"boolean"},"observe":{"type":"boolean"}},"required":["brief","search","read","observe"],"additionalProperties":false}},"required":["kind","learn","version","status","roles"],"additionalProperties":false}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["none","context","mcp"]},"context":{"type":"string","maxLength":20000},"mcp":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"url":{"type":"string","maxLength":2048},"tools":{"type":"object","properties":{"brief":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}$"},"search":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}$"},"read":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}$"},"observe":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}$"}},"required":[],"additionalProperties":false}},"required":["name","url"],"additionalProperties":false},"learn":{"type":"boolean"}},"required":["kind"],"additionalProperties":false}}}}}},"/v1/limits":{"get":{"operationId":"agentos.limits.get","summary":"Read this company's effective AgentOS limits: its own tenant_limits row over the platform defaults, with the platform hard ceiling each value must not exceed.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantLimits"}}}}},"x-scope":"agent:read","x-effect":"read"},"post":{"operationId":"agentos.limits.set","summary":"Set this company's AgentOS limits (owner only, audited, CAS required). Fields omitted keep their current effective value; a value outside the platform ceiling is refused with the field and the ceiling named. Per-tenant data, never a feature flag.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantLimitsSet"}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limits":{"type":"object","properties":{"lifetimeCapMicroUsd":{"type":"integer","minimum":1,"maximum":9007199254740991},"dailyCapMicroUsd":{"type":"integer","minimum":1,"maximum":9007199254740991},"maxLiveRuns":{"type":"integer","minimum":1,"maximum":1000000},"maxParallel":{"type":"integer","minimum":1,"maximum":1000000},"minBudgetMicroUsd":{"type":"integer","minimum":1,"maximum":9007199254740991},"maxBudgetMicroUsd":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":[],"additionalProperties":false},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740990}},"required":["limits","expectedVersion"],"additionalProperties":false}}}}}},"/v1/agentos/rules":{"get":{"operationId":"agentos.rules.get","summary":"agentos rules get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rules"}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/agentos/skills":{"get":{"operationId":"agentos.skills.list","summary":"agentos skills list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"agent","in":"query","required":false,"schema":{"type":"string","maxLength":160}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformSkills"}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/agentos/launches/{id}/messages":{"post":{"operationId":"agentos.launches.message","summary":"Steer a live single-agent launch, or continue that same launch after it has finished. A swarm is refused. The launch keeps its workspace.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Control"}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":8000},"addBudgetUsd":{"type":"number","minimum":0.5,"maximum":500}},"required":["text"],"additionalProperties":false}}}}}},"/v1/agentos/runs":{"get":{"operationId":"agentos.runs.list","summary":"The finished runs this company can read back after their Durable Objects are gone, newest first. The row is ids, a closed status, the settled cost and the object key; the text lives in the object.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"string","pattern":"^[1-9][0-9]{0,2}$"}},{"name":"before","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"beforeRun","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRuns"}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/agentos/runs/{id}":{"get":{"operationId":"agentos.runs.get","summary":"One finished run and its object: the prompts, answers and tool results as they were when the run finished. The row's digest is checked against the object.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRunArchive"}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/agentos/runs/export":{"get":{"operationId":"agentos.runs.export","summary":"This company's finished runs with their content objects, as one export. At most 200 runs or 16 MiB; truncated says which.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRunsExport"}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/agentos/runs/erase":{"post":{"operationId":"agentos.runs.erase","summary":"Remove this company's finished runs: every object under its runs prefix deleted and proved gone, then the rows. Answers one receipt naming what was removed.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRunsErased"}}}}},"x-scope":"agent:delete","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/agentos/agents":{"post":{"operationId":"agentos.agents.deploy","summary":"agentos agents deploy","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedAgents"}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"recipes":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"minItems":1,"maxItems":9,"uniqueItems":true},"keys":{"type":"object","propertyNames":{"pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"patternProperties":{"^[a-z0-9][a-z0-9-]{0,39}$":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"}},"additionalProperties":false},"tools":{"type":"object","propertyNames":{"pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"patternProperties":{"^[a-z0-9][a-z0-9-]{0,39}$":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$"},"uniqueItems":true}},"additionalProperties":false},"names":{"type":"object","propertyNames":{"pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"patternProperties":{"^[a-z0-9][a-z0-9-]{0,39}$":{"type":"string","minLength":1,"maxLength":60,"pattern":"\\S"}},"additionalProperties":false},"skills":{"type":"object","propertyNames":{"pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"patternProperties":{"^[a-z0-9][a-z0-9-]{0,39}$":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"uniqueItems":true,"maxItems":12}},"additionalProperties":false},"models":{"type":"object","propertyNames":{"pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"patternProperties":{"^[a-z0-9][a-z0-9-]{0,39}$":{"type":"object","properties":{"brain":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]},"fallback":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]}},"required":["model"],"additionalProperties":false},"hands":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]},"fallback":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]}},"required":["model"],"additionalProperties":false},"skills":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]},"fallback":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]},"bySkill":{"type":"object","propertyNames":{"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"patternProperties":{"^[a-z0-9][a-z0-9-]{0,63}$":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]}},"additionalProperties":false,"maxProperties":12}},"required":["model"],"additionalProperties":false}},"required":[],"additionalProperties":false}},"additionalProperties":false},"dailyUsd":{"type":"number","minimum":0.5,"maximum":2000},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500}},"required":["recipes"],"additionalProperties":false}}}}},"get":{"operationId":"agentos.agents.list","summary":"agentos agents list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedAgents"}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/agentos/agents/{id}":{"get":{"operationId":"agentos.agents.get","summary":"agentos agents get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedAgent"}}}}},"x-scope":"agent:read","x-effect":"read"},"post":{"operationId":"agentos.agents.update","summary":"agentos agents update","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedAgent"}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60,"pattern":"\\S"},"tools":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$"},"uniqueItems":true},"skills":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"uniqueItems":true,"maxItems":12},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500},"dailyUsd":{"type":"number","minimum":0.5,"maximum":2000},"state":{"type":"string","enum":["active","paused"]},"brainTools":{"type":"boolean"},"reportChannel":{"anyOf":[{"type":"string","pattern":"^[CDG][A-Z0-9]{8,12}$"},{"type":"null"}]},"stallMinutes":{"anyOf":[{"type":"integer","minimum":5,"maximum":1440},{"type":"null"}]},"dayAlertPct":{"anyOf":[{"type":"integer","minimum":1,"maximum":100},{"type":"null"}]},"models":{"type":"object","properties":{"brain":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]},"fallback":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]}},"required":["model"],"additionalProperties":false},"hands":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]},"fallback":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]}},"required":["model"],"additionalProperties":false},"skills":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]},"fallback":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]},"bySkill":{"type":"object","propertyNames":{"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"patternProperties":{"^[a-z0-9][a-z0-9-]{0,63}$":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]}},"additionalProperties":false,"maxProperties":12}},"required":["model"],"additionalProperties":false}},"required":[],"additionalProperties":false},"expectedModelsVersion":{"type":"integer","minimum":0,"maximum":9007199254740990}},"required":[],"additionalProperties":false}}}}}},"/v1/agentos/agents/{id}/scorecard":{"get":{"operationId":"agentos.agents.scorecard","summary":"One managed agent on each contextVersion it has run on: asks, cost and tokens of an answer, tools used and time to answer, read from this company's own execution record. The newest version is compared with the one before it; a restore verdict is a recommendation to a person and changes nothing. Ids and counts only, never text from a run. The tenant comes from the principal, never the request.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentScorecard"}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/agentos/models/defaults":{"get":{"operationId":"agentos.models.defaults.get","summary":"This company's default model slots: the brain, hands and skills models that apply to every agent with no slot of its own, with the version they were read at. Ids only; no key, no company text.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelSlotDefaults"}}}}},"x-scope":"agent:read","x-effect":"read"},"post":{"operationId":"agentos.models.defaults.set","summary":"Set this company's default model slots, as a signed-in owner and nobody else: a key is refused whatever scopes it holds. Compare-and-swap on the version that was read, so two saves cannot silently overwrite each other. The next ask uses the new value; a run already admitted keeps the slots it was admitted with. No cap, reach or limit changes.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelSlotDefaults"}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"models":{"type":"object","properties":{"brain":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]},"fallback":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]}},"required":["model"],"additionalProperties":false},"hands":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]},"fallback":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]}},"required":["model"],"additionalProperties":false},"skills":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]},"fallback":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]},"bySkill":{"type":"object","propertyNames":{"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"patternProperties":{"^[a-z0-9][a-z0-9-]{0,63}$":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]}},"additionalProperties":false,"maxProperties":12}},"required":["model"],"additionalProperties":false}},"required":[],"additionalProperties":false},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740990}},"required":["models","expectedVersion"],"additionalProperties":false}}}}}},"/v1/agentos/agents/{id}/remove":{"post":{"operationId":"agentos.agents.remove","summary":"agentos agents remove","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedAgentRemoved"}}}}},"x-scope":"agent:delete","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/agentos/agents/{id}/ask":{"post":{"operationId":"agentos.agents.ask","summary":"agentos agents ask","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Accepted"}}}}},"x-scope":"agent:create","x-effect":"spend","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ask":{"type":"string","minLength":1,"maxLength":8000,"pattern":"\\S"},"attachments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f\\\\/]+$"},"text":{"type":"string"}},"required":["name","text"],"additionalProperties":false},"maxItems":10},"target":{"oneOf":[{"type":"object","properties":{"kind":{"const":"none"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"github"},"repository":{"type":"string","pattern":"^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"}},"required":["kind","repository"],"additionalProperties":false}]},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500},"browser":{"type":"object","properties":{"profile":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"domains":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9.-]{0,252}$"},"minItems":1,"maxItems":20},"mode":{"type":"string","enum":["act","read"]}},"required":["profile"],"additionalProperties":false},"conversation":{"type":"string","pattern":"^[a-f0-9-]{36}$"}},"required":["ask"],"additionalProperties":false}}}}}},"/v1/agentos/agents/install":{"post":{"operationId":"agentos.agents.install","summary":"agentos agents install","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackInstall"}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"apps":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"minItems":1,"maxItems":7,"uniqueItems":true},"remove":{"type":"boolean"}},"required":[],"additionalProperties":false}}}}},"get":{"operationId":"agentos.agents.installs","summary":"agentos agents installs","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackInstalls"}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/agentos/fleet":{"get":{"operationId":"agentos.fleet.get","summary":"This company's agents and their day, its live launches with minutes since last progress, and the last ten terminal launches with their failure codes. Ids, counts and amounts only; the only run text is each live launch's last line, which a reader treats as untrusted.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Fleet"}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/agentos/rosters":{"post":{"operationId":"agentos.rosters.deploy","summary":"Deploy a team roster in one idempotent call: one roster record, one managed agent per entry, and each new member's role card seeded into this company's own brain as agents/<recipe>/SOUL.md — only where no card exists, `create_only`, as the deployer's own principal — reported beside the answer as one `cards` entry per member (`live`, `proposed`, `unchanged`, `refused` or `unavailable`) without ever failing the team. A per-agent override may rename, add the company's own skills and narrow tools or caps; it can never widen a grant (MA18). A team is deployed whole or not at all. It is free — there is no subscription and no roster fee — so quote it before the call with quotes.create (operation agentos.rosters.deploy, a fixed zero naming the per-answer maximum and day ceilings); each answer is metered at the rate card and its receipt shows the charge. The tenant is the authenticated one, never a parameter.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterDetail"}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"roster":{"oneOf":[{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"version":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"},"name":{"type":"string","minLength":1,"maxLength":60,"pattern":"\\S"},"agents":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string","enum":["company-files","rally","scout","pixel","patch","storm","sentinel"]},"version":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"required":["recipe","version"],"additionalProperties":false},"minItems":1,"maxItems":8},"dailyUsd":{"type":"number","minimum":0.5,"maximum":2000}},"required":["id","version","name","agents"],"additionalProperties":false}]},"slack":{"type":"object","properties":{"channels":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"minItems":1,"maxItems":10,"uniqueItems":true}},"required":["channels"],"additionalProperties":false},"agents":{"type":"object","propertyNames":{"pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"patternProperties":{"^[a-z0-9][a-z0-9-]{0,39}$":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60,"pattern":"\\S"},"tools":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$"},"uniqueItems":true},"skills":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"uniqueItems":true,"maxItems":12},"models":{"type":"object","properties":{"brain":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]},"fallback":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]}},"required":["model"],"additionalProperties":false},"hands":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]},"fallback":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]}},"required":["model"],"additionalProperties":false},"skills":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]},"fallback":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]},"bySkill":{"type":"object","propertyNames":{"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"patternProperties":{"^[a-z0-9][a-z0-9-]{0,63}$":{"anyOf":[{"type":"string","enum":["auto","coding","standard","strong","max"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]}},"additionalProperties":false,"maxProperties":12}},"required":["model"],"additionalProperties":false}},"required":[],"additionalProperties":false},"dailyUsd":{"type":"number","minimum":0.5,"maximum":2000},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500}},"required":[],"additionalProperties":false}},"additionalProperties":false},"dailyUsd":{"type":"number","minimum":0.5,"maximum":2000}},"required":["roster"],"additionalProperties":false}}}}},"get":{"operationId":"agentos.rosters.list","summary":"Every team roster this company has deployed, newest last, with the limit and the first-party ids it may name. Each roster carries its pinned version, its members' agent ids, recipes and versions, the day ceiling and its state. This company's rosters only: another tenant's id is not found.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rosters"}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/agentos/rosters/{id}":{"get":{"operationId":"agentos.rosters.get","summary":"One deployed roster and each member read from its own agent record: id, recipe, version, name, title, tools, skills, caps and state, and the manifest the roster came from. What is shown is what a launch uses. A roster id from another company is not found.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterDetail"}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/agentos/rosters/{id}/remove":{"post":{"operationId":"agentos.rosters.remove","summary":"Remove a team roster: every member is paused so it answers nothing, the roster is marked removed, and nothing is deleted — the conversations, the runs' record and the role cards in the company's brain stay untouched. A second remove returns the same record and writes nothing. Free, as read and deploy are.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterRemoved"}}}}},"x-scope":"agent:delete","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/agentos/operator/rosters":{"post":{"operationId":"agentos.operator.rosters.save","summary":"Save the operator's own roster in its company, as a new version of the same id. It belongs to the company that wrote it and is readable only by that company and the companies under its account. Nothing is deployed here: a client company deploys it with agentos.rosters.deploy and its own key.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"roster":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"version":{"type":"integer"},"state":{"type":"string"},"manifest":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"required":["id","name","version","state","manifest"],"additionalProperties":false}},"required":["roster"],"additionalProperties":false}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"name":{"type":"string","minLength":1,"maxLength":80},"manifest":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"version":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"},"name":{"type":"string","minLength":1,"maxLength":60,"pattern":"\\S"},"agents":{"type":"array","items":{"type":"object","properties":{"recipe":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"version":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"required":["recipe","version"],"additionalProperties":false},"minItems":1,"maxItems":8},"loops":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"everyMinutes":{"type":"integer","minimum":5,"maximum":1440},"check":{"type":"object","properties":{"tool":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},"connector":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"args":{"type":"object","propertyNames":{"pattern":"^[A-Za-z0-9_.-]{1,64}$"},"patternProperties":{"^[A-Za-z0-9_.-]{1,64}$":{"anyOf":[{"anyOf":[{"type":"string","maxLength":512},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"array","items":{"anyOf":[{"type":"string","maxLength":512},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"maxItems":32}]}},"additionalProperties":false,"maxProperties":32},"wakeWhen":{"type":"string","minLength":1,"maxLength":400}},"required":["tool","wakeWhen"],"additionalProperties":false},"recipe":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"objective":{"type":"string","minLength":1,"maxLength":500},"budgetUsd":{"type":"number","minimum":0.5,"maximum":2000}},"required":["name","everyMinutes","check","objective","recipe"],"additionalProperties":false},"maxItems":4},"dailyUsd":{"type":"number","minimum":0.5,"maximum":2000}},"required":["id","version","name","agents"],"additionalProperties":false}},"required":["manifest"],"additionalProperties":false}}}}}},"/v1/agentos/operator/rosters/{id}":{"get":{"operationId":"agentos.operator.rosters.get","summary":"One roster this company saved, or one saved by the account it sits under. A roster of another company is not found.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"roster":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"version":{"type":"integer"},"state":{"type":"string"},"manifest":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"required":["id","name","version","state","manifest"],"additionalProperties":false}},"required":["roster"],"additionalProperties":false}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/agentos/concierge/questions":{"get":{"operationId":"agentos.concierge.questions","summary":"The concierge interview as data: at most seven questions, each naming the files it feeds, the recipe a launch names, and the limits a caller meets. Read by the web page, the app, the command line and an agent alike. No tenant, person or secret is in it.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"recipe":{"type":"string","enum":["concierge"]},"version":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"},"questionsVersion":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"ask":{"type":"string","minLength":1,"maxLength":200},"feeds":{"type":"array","items":{"type":"string"},"maxItems":8},"required":{"type":"boolean"},"mandate":{"type":"boolean"},"kind":{"type":"string","enum":["text","website"]}},"required":["id","ask","feeds","required"],"additionalProperties":false},"minItems":1,"maxItems":7},"limits":{"type":"object","properties":{"audioSecondsPerCall":{"type":"integer","minimum":1},"audioSecondsPerDay":{"type":"integer","minimum":1},"interviewSeconds":{"type":"integer","minimum":1}},"required":["audioSecondsPerCall","audioSecondsPerDay","interviewSeconds"],"additionalProperties":false},"maxFollowUps":{"type":"integer","minimum":0,"maximum":3},"maxAskChars":{"type":"integer","minimum":1},"askFormat":{"type":"string"}},"required":["recipe","version","questionsVersion","questions","limits","maxFollowUps","maxAskChars","askFormat"],"additionalProperties":false}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/agentos/agents/create":{"post":{"operationId":"agentos.agents.create","summary":"agentos agents create","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyRecipeDeploy"}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"recipe":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"version":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"},"name":{"type":"string","minLength":1,"maxLength":60,"pattern":"\\S"},"title":{"type":"string","minLength":1,"maxLength":80,"pattern":"\\S"},"role":{"type":"string","minLength":1,"maxLength":1200,"pattern":"\\S"},"tools":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$"},"uniqueItems":true},"model":{"type":"string","minLength":1,"maxLength":160},"tier":{"type":"string","enum":["auto","coding","standard","strong","max"]},"budgetUsd":{"type":"number","minimum":0.5,"maximum":2},"dailyUsd":{"type":"number","minimum":0.5,"maximum":25},"skills":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"description":{"type":"string","maxLength":240},"body":{"type":"string","minLength":1,"maxLength":20000}},"required":["name","body"],"additionalProperties":false},"maxItems":12},"handoffs":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"maxItems":8,"uniqueItems":true}},"required":["name","role"],"additionalProperties":false}},"required":["recipe"],"additionalProperties":false}}}}}},"/v1/agentos/agents/recipes":{"get":{"operationId":"agentos.agents.recipes.list","summary":"agentos agents recipes list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyRecipes"}}}}},"x-scope":"agent:read","x-effect":"read"},"post":{"operationId":"agentos.agents.recipes.save","summary":"agentos agents recipes save","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyRecipe"}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"version":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"},"name":{"type":"string","minLength":1,"maxLength":60,"pattern":"\\S"},"title":{"type":"string","minLength":1,"maxLength":80,"pattern":"\\S"},"role":{"type":"string","minLength":1,"maxLength":1200,"pattern":"\\S"},"tools":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]{0,63}$"},"uniqueItems":true},"model":{"type":"string","minLength":1,"maxLength":160},"tier":{"type":"string","enum":["auto","coding","standard","strong","max"]},"budgetUsd":{"type":"number","minimum":0.5,"maximum":2},"dailyUsd":{"type":"number","minimum":0.5,"maximum":25},"skills":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"description":{"type":"string","maxLength":240},"body":{"type":"string","minLength":1,"maxLength":20000}},"required":["name","body"],"additionalProperties":false},"maxItems":12},"handoffs":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"maxItems":8,"uniqueItems":true}},"required":["name","role"],"additionalProperties":false}}}}}},"/v1/agentos/agents/recipes/{id}":{"get":{"operationId":"agentos.agents.recipes.get","summary":"agentos agents recipes get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyRecipe"}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/agentos/agents/recipes/{id}/export":{"get":{"operationId":"agentos.agents.recipes.export","summary":"agentos agents recipes export","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyRecipeExport"}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/agentos/agents/recipes/{id}/remove":{"post":{"operationId":"agentos.agents.recipes.remove","summary":"agentos agents recipes remove","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyRecipeRemoved"}}}}},"x-scope":"agent:delete","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/agentos/agents/settings":{"get":{"operationId":"agentos.agents.settings.get","summary":"agentos agents settings get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSettings"}}}}},"x-scope":"agent:read","x-effect":"read"},"post":{"operationId":"agentos.agents.settings.save","summary":"agentos agents settings save","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSetting"}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["propose","allow"]}},"required":["mode"],"additionalProperties":false}}}}}},"/v1/agentos/agents/proposals":{"get":{"operationId":"agentos.agents.proposals.list","summary":"agentos agents proposals list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentProposals"}}}}},"x-scope":"agent:read","x-effect":"read"}},"/v1/agentos/agents/proposals/{id}":{"post":{"operationId":"agentos.agents.proposals.decide","summary":"agentos agents proposals decide","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentProposalDecided"}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approve":{"type":"boolean"}},"required":["approve"],"additionalProperties":false}}}}}},"/v1/agentos/routines":{"get":{"operationId":"agentos.routines.list","summary":"agentos routines list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Routines"}}}}},"x-scope":"agent:read","x-effect":"read"},"post":{"operationId":"agentos.routines.create","summary":"agentos routines create","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Routine"}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"\\S"},"schedule":{"oneOf":[{"type":"object","properties":{"every":{"const":"hour"},"at":{"type":"string","pattern":"^00:[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["every","timezone"],"additionalProperties":false},{"type":"object","properties":{"every":{"const":"day"},"at":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["every","at","timezone"],"additionalProperties":false},{"type":"object","properties":{"every":{"const":"week"},"at":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"weekday":{"type":"integer","minimum":0,"maximum":6},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["every","at","weekday","timezone"],"additionalProperties":false}]},"launch":{"type":"object","properties":{"ask":{"type":"string","minLength":1,"maxLength":8000,"pattern":"\\S"},"target":{"oneOf":[{"type":"object","properties":{"kind":{"const":"none"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"github"},"repository":{"type":"string","pattern":"^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"}},"required":["kind","repository"],"additionalProperties":false}]},"tier":{"type":"string","enum":["auto","coding","standard","strong","max"]},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500},"agents":{"type":"integer","enum":[1,3]},"attachments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f\\\\/]+$"},"text":{"type":"string"}},"required":["name","text"],"additionalProperties":false},"maxItems":10},"council":{"type":"object","properties":{"mode":{"type":"string","enum":["independent","planned"]},"members":{"type":"array","items":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]},"label":{"type":"string","minLength":1,"maxLength":40,"allOf":[{"pattern":"\\S"},{"pattern":"^[^\\x00-\\x1f]*$"}]},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500},"tools":{"type":"array","items":{"type":"string","enum":["workspace_write","workspace_read","workspace_edit","workspace_grep","github_read","librarian_pass","web_search","web_fetch","web_scrape","domain_check"]},"uniqueItems":true}},"required":["model"],"additionalProperties":false},"minItems":2,"maxItems":8},"synthesizer":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]}},"required":["model"],"additionalProperties":false}},"required":["members","synthesizer"],"additionalProperties":false},"goal":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"stop":{"type":"string","minLength":1,"maxLength":500,"pattern":"\\S"},"rounds":{"type":"integer","minimum":1,"maximum":3},"workers":{"type":"integer","minimum":1,"maximum":3}},"required":["key","stop"],"additionalProperties":false},"recipe":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"hours":{"type":"number","minimum":0.1,"maximum":168}},"required":["ask"],"additionalProperties":false},"carryOver":{"type":"boolean"},"enabled":{"type":"boolean"}},"required":["name","schedule","launch"],"additionalProperties":false}}}}}},"/v1/agentos/routines/{id}":{"post":{"operationId":"agentos.routines.update","summary":"agentos routines update","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Routine"}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"\\S"},"schedule":{"oneOf":[{"type":"object","properties":{"every":{"const":"hour"},"at":{"type":"string","pattern":"^00:[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["every","timezone"],"additionalProperties":false},{"type":"object","properties":{"every":{"const":"day"},"at":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["every","at","timezone"],"additionalProperties":false},{"type":"object","properties":{"every":{"const":"week"},"at":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"weekday":{"type":"integer","minimum":0,"maximum":6},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["every","at","weekday","timezone"],"additionalProperties":false}]},"launch":{"type":"object","properties":{"ask":{"type":"string","minLength":1,"maxLength":8000,"pattern":"\\S"},"target":{"oneOf":[{"type":"object","properties":{"kind":{"const":"none"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"github"},"repository":{"type":"string","pattern":"^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"}},"required":["kind","repository"],"additionalProperties":false}]},"tier":{"type":"string","enum":["auto","coding","standard","strong","max"]},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500},"agents":{"type":"integer","enum":[1,3]},"attachments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f\\\\/]+$"},"text":{"type":"string"}},"required":["name","text"],"additionalProperties":false},"maxItems":10},"council":{"type":"object","properties":{"mode":{"type":"string","enum":["independent","planned"]},"members":{"type":"array","items":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]},"label":{"type":"string","minLength":1,"maxLength":40,"allOf":[{"pattern":"\\S"},{"pattern":"^[^\\x00-\\x1f]*$"}]},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500},"tools":{"type":"array","items":{"type":"string","enum":["workspace_write","workspace_read","workspace_edit","workspace_grep","github_read","librarian_pass","web_search","web_fetch","web_scrape","domain_check"]},"uniqueItems":true}},"required":["model"],"additionalProperties":false},"minItems":2,"maxItems":8},"synthesizer":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["auto","coding"]},{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}/[a-z0-9][a-z0-9._:-]{0,95}$"}]}},"required":["model"],"additionalProperties":false}},"required":["members","synthesizer"],"additionalProperties":false},"goal":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"stop":{"type":"string","minLength":1,"maxLength":500,"pattern":"\\S"},"rounds":{"type":"integer","minimum":1,"maximum":3},"workers":{"type":"integer","minimum":1,"maximum":3}},"required":["key","stop"],"additionalProperties":false},"recipe":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"hours":{"type":"number","minimum":0.1,"maximum":168}},"required":["ask"],"additionalProperties":false},"carryOver":{"type":"boolean"},"enabled":{"type":"boolean"}},"required":[],"additionalProperties":false}}}}}},"/v1/agentos/routines/{id}/run":{"post":{"operationId":"agentos.routines.run","summary":"agentos routines run","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutineRun"}}}}},"x-scope":"agent:create","x-effect":"spend","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/agentos/routines/{id}/delete":{"post":{"operationId":"agentos.routines.delete","summary":"agentos routines delete","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Control"}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/agentos/goals":{"get":{"operationId":"agentos.goals.list","summary":"agentos goals list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"goals":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"version":{"type":"integer","minimum":1},"state":{"type":"string","enum":["running","stopped"]},"counts":{"type":"object","additionalProperties":{"type":"integer","minimum":0}},"spentTodayUsd":{"type":"number","minimum":0},"upperBoundUsd":{"type":"number","minimum":0},"digest":{"type":"string","maxLength":6000}},"required":["key","version","state","counts","spentTodayUsd","upperBoundUsd"],"additionalProperties":true},"maxItems":20},"limit":{"const":20}},"required":["goals","limit"],"additionalProperties":false}}}}},"x-scope":"agent:read","x-effect":"read"},"post":{"operationId":"agentos.goals.create","summary":"agentos goals create","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"version":{"type":"integer","minimum":1},"state":{"type":"string","enum":["running","stopped"]},"counts":{"type":"object","additionalProperties":{"type":"integer","minimum":0}},"spentTodayUsd":{"type":"number","minimum":0},"upperBoundUsd":{"type":"number","minimum":0},"digest":{"type":"string","maxLength":6000}},"required":["key","version","state","counts","spentTodayUsd","upperBoundUsd"],"additionalProperties":true}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"ask":{"type":"string","minLength":1,"maxLength":2000,"pattern":"\\S"},"stop":{"type":"string","minLength":1,"maxLength":500,"pattern":"\\S"},"seats":{"type":"object","properties":{"plan":{"oneOf":[{"type":"object","properties":{"target":{"oneOf":[{"type":"object","properties":{"kind":{"const":"none"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"github"},"repository":{"type":"string","pattern":"^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"}},"required":["kind","repository"],"additionalProperties":false}]},"tier":{"type":"string","enum":["auto","coding","standard","strong","max"]},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500},"browser":{"type":"object","properties":{"profile":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"domains":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9.-]{0,252}$"},"minItems":1,"maxItems":20},"mode":{"type":"string","enum":["act","read"]}},"required":["profile"],"additionalProperties":false},"effort":{"type":"string","enum":["off","minimal","low","medium","high","xhigh","max"]},"notify":{"type":"array","items":{"type":"object","properties":{"kind":{"const":"slack"},"channel":{"type":"string"},"thread":{"type":"string"}},"required":["kind","channel"],"additionalProperties":false},"maxItems":3},"hours":{"type":"number","minimum":0.25,"maximum":72}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"agent":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500},"target":{"oneOf":[{"type":"object","properties":{"kind":{"const":"none"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"github"},"repository":{"type":"string","pattern":"^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"}},"required":["kind","repository"],"additionalProperties":false}]}},"required":["agent"],"additionalProperties":false}]},"work":{"oneOf":[{"type":"object","properties":{"target":{"oneOf":[{"type":"object","properties":{"kind":{"const":"none"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"github"},"repository":{"type":"string","pattern":"^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"}},"required":["kind","repository"],"additionalProperties":false}]},"tier":{"type":"string","enum":["auto","coding","standard","strong","max"]},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500},"browser":{"type":"object","properties":{"profile":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"domains":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9.-]{0,252}$"},"minItems":1,"maxItems":20},"mode":{"type":"string","enum":["act","read"]}},"required":["profile"],"additionalProperties":false},"effort":{"type":"string","enum":["off","minimal","low","medium","high","xhigh","max"]},"notify":{"type":"array","items":{"type":"object","properties":{"kind":{"const":"slack"},"channel":{"type":"string"},"thread":{"type":"string"}},"required":["kind","channel"],"additionalProperties":false},"maxItems":3},"hours":{"type":"number","minimum":0.25,"maximum":72}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"agent":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500},"target":{"oneOf":[{"type":"object","properties":{"kind":{"const":"none"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"github"},"repository":{"type":"string","pattern":"^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"}},"required":["kind","repository"],"additionalProperties":false}]}},"required":["agent"],"additionalProperties":false}]}},"required":["plan","work"],"additionalProperties":false},"concurrency":{"type":"integer","minimum":1,"maximum":5},"replanAt":{"type":"integer","minimum":0,"maximum":4},"planGapSeconds":{"type":"integer","minimum":60,"maximum":86400},"planMax":{"type":"integer","minimum":1,"maximum":12},"dailyUsd":{"type":"number","minimum":1},"maxIntents":{"type":"integer","minimum":1,"maximum":2000},"expiresAt":{"type":"string","format":"date-time"},"schedule":{"oneOf":[{"type":"object","properties":{"every":{"const":"hour"},"at":{"type":"string","pattern":"^00:[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["every","timezone"],"additionalProperties":false},{"type":"object","properties":{"every":{"const":"day"},"at":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["every","at","timezone"],"additionalProperties":false},{"type":"object","properties":{"every":{"const":"week"},"at":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"weekday":{"type":"integer","minimum":0,"maximum":6},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["every","at","weekday","timezone"],"additionalProperties":false}]},"enabled":{"type":"boolean"}},"required":["key","ask","stop","seats","dailyUsd","expiresAt"],"additionalProperties":false}}}}}},"/v1/agentos/goals/{key}":{"get":{"operationId":"agentos.goals.get","summary":"agentos goals get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"version":{"type":"integer","minimum":1},"state":{"type":"string","enum":["running","stopped"]},"counts":{"type":"object","additionalProperties":{"type":"integer","minimum":0}},"spentTodayUsd":{"type":"number","minimum":0},"upperBoundUsd":{"type":"number","minimum":0},"digest":{"type":"string","maxLength":6000}},"required":["key","version","state","counts","spentTodayUsd","upperBoundUsd"],"additionalProperties":true}}}}},"x-scope":"agent:read","x-effect":"read"},"post":{"operationId":"agentos.goals.update","summary":"agentos goals update","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"version":{"type":"integer","minimum":1},"state":{"type":"string","enum":["running","stopped"]},"counts":{"type":"object","additionalProperties":{"type":"integer","minimum":0}},"spentTodayUsd":{"type":"number","minimum":0},"upperBoundUsd":{"type":"number","minimum":0},"digest":{"type":"string","maxLength":6000}},"required":["key","version","state","counts","spentTodayUsd","upperBoundUsd"],"additionalProperties":true}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ask":{"type":"string","minLength":1,"maxLength":2000,"pattern":"\\S"},"stop":{"type":"string","minLength":1,"maxLength":500,"pattern":"\\S"},"seats":{"type":"object","properties":{"plan":{"oneOf":[{"type":"object","properties":{"target":{"oneOf":[{"type":"object","properties":{"kind":{"const":"none"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"github"},"repository":{"type":"string","pattern":"^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"}},"required":["kind","repository"],"additionalProperties":false}]},"tier":{"type":"string","enum":["auto","coding","standard","strong","max"]},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500},"browser":{"type":"object","properties":{"profile":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"domains":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9.-]{0,252}$"},"minItems":1,"maxItems":20},"mode":{"type":"string","enum":["act","read"]}},"required":["profile"],"additionalProperties":false},"effort":{"type":"string","enum":["off","minimal","low","medium","high","xhigh","max"]},"notify":{"type":"array","items":{"type":"object","properties":{"kind":{"const":"slack"},"channel":{"type":"string"},"thread":{"type":"string"}},"required":["kind","channel"],"additionalProperties":false},"maxItems":3},"hours":{"type":"number","minimum":0.25,"maximum":72}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"agent":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500},"target":{"oneOf":[{"type":"object","properties":{"kind":{"const":"none"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"github"},"repository":{"type":"string","pattern":"^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"}},"required":["kind","repository"],"additionalProperties":false}]}},"required":["agent"],"additionalProperties":false}]},"work":{"oneOf":[{"type":"object","properties":{"target":{"oneOf":[{"type":"object","properties":{"kind":{"const":"none"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"github"},"repository":{"type":"string","pattern":"^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"}},"required":["kind","repository"],"additionalProperties":false}]},"tier":{"type":"string","enum":["auto","coding","standard","strong","max"]},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500},"browser":{"type":"object","properties":{"profile":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"domains":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9.-]{0,252}$"},"minItems":1,"maxItems":20},"mode":{"type":"string","enum":["act","read"]}},"required":["profile"],"additionalProperties":false},"effort":{"type":"string","enum":["off","minimal","low","medium","high","xhigh","max"]},"notify":{"type":"array","items":{"type":"object","properties":{"kind":{"const":"slack"},"channel":{"type":"string"},"thread":{"type":"string"}},"required":["kind","channel"],"additionalProperties":false},"maxItems":3},"hours":{"type":"number","minimum":0.25,"maximum":72}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"agent":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"budgetUsd":{"type":"number","minimum":0.5,"maximum":500},"target":{"oneOf":[{"type":"object","properties":{"kind":{"const":"none"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"github"},"repository":{"type":"string","pattern":"^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"}},"required":["kind","repository"],"additionalProperties":false}]}},"required":["agent"],"additionalProperties":false}]}},"required":["plan","work"],"additionalProperties":false},"concurrency":{"type":"integer","minimum":1,"maximum":5},"replanAt":{"type":"integer","minimum":0,"maximum":4},"planGapSeconds":{"type":"integer","minimum":60,"maximum":86400},"planMax":{"type":"integer","minimum":1,"maximum":12},"dailyUsd":{"type":"number","minimum":1},"maxIntents":{"type":"integer","minimum":1,"maximum":2000},"expiresAt":{"type":"string","format":"date-time"},"schedule":{"oneOf":[{"type":"object","properties":{"every":{"const":"hour"},"at":{"type":"string","pattern":"^00:[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["every","timezone"],"additionalProperties":false},{"type":"object","properties":{"every":{"const":"day"},"at":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["every","at","timezone"],"additionalProperties":false},{"type":"object","properties":{"every":{"const":"week"},"at":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"weekday":{"type":"integer","minimum":0,"maximum":6},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["every","at","weekday","timezone"],"additionalProperties":false}]},"enabled":{"type":"boolean"},"state":{"type":"string","enum":["running","stopped"]}},"required":[],"additionalProperties":false}}}}}},"/v1/agentos/goals/{key}/wake":{"post":{"operationId":"agentos.goals.wake","summary":"agentos goals wake","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"version":{"type":"integer","minimum":1},"state":{"type":"string","enum":["running","stopped"]},"counts":{"type":"object","additionalProperties":{"type":"integer","minimum":0}},"spentTodayUsd":{"type":"number","minimum":0},"upperBoundUsd":{"type":"number","minimum":0},"digest":{"type":"string","maxLength":6000}},"required":["key","version","state","counts","spentTodayUsd","upperBoundUsd"],"additionalProperties":true}}}}},"x-scope":"agent:create","x-effect":"spend","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/agentos/goals/{key}/delete":{"post":{"operationId":"agentos.goals.delete","summary":"agentos goals delete","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Control"}}}}},"x-scope":"agent:create","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/agentos/browsers":{"post":{"operationId":"agentos.browsers.open","summary":"agentos browsers open","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserSession"}}}}},"x-scope":"browser:use","x-effect":"spend","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["act","read"]},"domains":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9.-]{0,252}$"},"minItems":1,"maxItems":20},"engine":{"type":"string","enum":["auto","standard","residential"]},"country":{"type":"string","pattern":"^[A-Za-z]{2}$"},"idleSeconds":{"type":"integer","minimum":30,"maximum":1200},"maxMinutes":{"type":"integer","minimum":1,"maximum":240},"maxUsd":{"type":"number","exclusiveMinimum":0,"maximum":500},"record":{"type":"boolean"},"profile":{"type":"string","pattern":"^[a-f0-9-]{36}$"}},"required":["maxUsd"],"additionalProperties":false}}}}},"get":{"operationId":"agentos.browsers.list","summary":"agentos browsers list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserSessions"}}}}},"x-scope":"browser:read","x-effect":"read"}},"/v1/agentos/browsers/{id}/act":{"post":{"operationId":"agentos.browsers.act","summary":"agentos browsers act","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserAnswer"}}}}},"x-scope":"browser:use","x-effect":"spend","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"object","properties":{"do":{"type":"string","enum":["open","back","snapshot","read","click","fill","press","select","scroll","wait","screenshot","eval","upload","handoff","viewport"]},"url":{"type":"string","maxLength":2048},"ref":{"type":"string","maxLength":16},"text":{"type":"string","maxLength":4000},"key":{"type":"string","maxLength":40},"value":{"type":"string","maxLength":500},"to":{"type":"string","maxLength":2048},"for":{"oneOf":[{"const":"idle"},{"type":"integer","minimum":0,"maximum":30000},{"type":"string","maxLength":200}]},"offset":{"type":"integer","minimum":0},"full":{"type":"boolean"},"show":{"type":"boolean"},"all":{"type":"boolean"},"scope":{"type":"string","maxLength":200},"js":{"type":"string","maxLength":8000},"file":{"type":"string","maxLength":120},"reason":{"type":"string","maxLength":200},"width":{"type":"integer","minimum":320,"maximum":2560},"height":{"type":"integer","minimum":320,"maximum":4000}},"required":["do"],"additionalProperties":false},"minItems":1,"maxItems":20},"return":{"type":"string","enum":["snapshot","text","none"]}},"required":["steps"],"additionalProperties":false}}}}}},"/v1/agentos/browsers/{id}":{"get":{"operationId":"agentos.browsers.get","summary":"agentos browsers get","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserSession"}}}}},"x-scope":"browser:read","x-effect":"read"}},"/v1/agentos/browsers/{id}/close":{"post":{"operationId":"agentos.browsers.close","summary":"agentos browsers close","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserSession"}}}}},"x-scope":"browser:use","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/agentos/browsers/{id}/files/{name}":{"get":{"operationId":"agentos.browsers.file","summary":"agentos browsers file","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,80}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}}},"x-scope":"browser:read","x-effect":"read"}},"/v1/agentos/browsers/{id}/authorize":{"post":{"operationId":"agentos.browsers.authorize","summary":"agentos browsers authorize","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserSession"}}}}},"x-scope":"browser:profiles","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approve":{"type":"boolean"},"termsHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["approve","termsHash"],"additionalProperties":false}}}}}},"/v1/agentos/browsers/profiles":{"get":{"operationId":"agentos.browsers.profiles.list","summary":"agentos browsers profiles list","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserProfiles"}}}}},"x-scope":"browser:read","x-effect":"read"},"post":{"operationId":"agentos.browsers.profiles.save","summary":"agentos browsers profiles save","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserProfile"}}}}},"x-scope":"browser:profiles","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"domains":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9.-]{0,252}$"},"minItems":1,"maxItems":20},"session":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"permission":{"type":"string","enum":["automatic","ask-first"]},"allowEval":{"type":"boolean"}},"required":["name","domains","session"],"additionalProperties":false}}}}}},"/v1/agentos/browsers/profiles/remove":{"post":{"operationId":"agentos.browsers.profiles.remove","summary":"agentos browsers profiles remove","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserProfile"}}}}},"x-scope":"browser:profiles","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"}},"required":["id"],"additionalProperties":false}}}}}},"/v1/launch/entity/sandbox":{"post":{"operationId":"launch.entity.sandbox.start","summary":"Synthetic filing-partner sandbox only. It does not file, pay or sign.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"sandbox":{"const":true},"execution":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"status":{"type":"string"},"provider":{"const":"filing-partner"},"environment":{"const":"sandbox"},"snapshot":{"anyOf":[{"type":"object","properties":{},"required":[],"additionalProperties":false},{"type":"object","properties":{"sandbox":{"const":true},"environment":{"const":"sandbox"},"formation":{"type":"string","enum":["complete","pending"]},"ein":{"type":"string","enum":["issued","pending"]},"letter":{"type":"string","enum":["available","pending"]},"submission":{"type":"string"},"services":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"status":{"type":"string"},"subStatus":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","status","subStatus"],"additionalProperties":false}},"signatureRequirements":{"type":"array","items":{"type":"object","properties":{"documentType":{"type":"string"},"status":{"type":"string"}},"required":["documentType","status"],"additionalProperties":false}}},"required":["sandbox","environment","formation","ein","letter","submission","services","signatureRequirements"],"additionalProperties":false}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","status","provider","environment","snapshot","errorCode","checkedAt","createdAt"],"additionalProperties":false},{"type":"null"}]},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkedAt":{"type":"string"}},"required":["id","type","checkedAt"],"additionalProperties":false}},"webhooks":{"type":"object","properties":{"verifiedReceipts":{"type":"integer"},"unknownActions":{"type":"integer"}},"required":["verifiedReceipts","unknownActions"],"additionalProperties":false},"version":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740990},{"type":"null"}]}},"required":["sandbox","execution"],"additionalProperties":false}}}}},"x-scope":"launch:run","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":1,"maximum":9007199254740990}},"required":["expectedVersion"],"additionalProperties":false}}}}},"get":{"operationId":"launch.entity.sandbox.get","summary":"Synthetic filing-partner sandbox only. It does not file, pay or sign.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"sandbox":{"const":true},"execution":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"status":{"type":"string"},"provider":{"const":"filing-partner"},"environment":{"const":"sandbox"},"snapshot":{"anyOf":[{"type":"object","properties":{},"required":[],"additionalProperties":false},{"type":"object","properties":{"sandbox":{"const":true},"environment":{"const":"sandbox"},"formation":{"type":"string","enum":["complete","pending"]},"ein":{"type":"string","enum":["issued","pending"]},"letter":{"type":"string","enum":["available","pending"]},"submission":{"type":"string"},"services":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"status":{"type":"string"},"subStatus":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","status","subStatus"],"additionalProperties":false}},"signatureRequirements":{"type":"array","items":{"type":"object","properties":{"documentType":{"type":"string"},"status":{"type":"string"}},"required":["documentType","status"],"additionalProperties":false}}},"required":["sandbox","environment","formation","ein","letter","submission","services","signatureRequirements"],"additionalProperties":false}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","status","provider","environment","snapshot","errorCode","checkedAt","createdAt"],"additionalProperties":false},{"type":"null"}]},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkedAt":{"type":"string"}},"required":["id","type","checkedAt"],"additionalProperties":false}},"webhooks":{"type":"object","properties":{"verifiedReceipts":{"type":"integer"},"unknownActions":{"type":"integer"}},"required":["verifiedReceipts","unknownActions"],"additionalProperties":false},"version":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740990},{"type":"null"}]}},"required":["sandbox","execution"],"additionalProperties":false}}}}},"x-scope":"launch:read","x-effect":"read"}},"/v1/launch/entity/sandbox/refresh":{"post":{"operationId":"launch.entity.sandbox.refresh","summary":"Synthetic filing-partner sandbox only. It does not file, pay or sign.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"sandbox":{"const":true},"execution":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9-]{36}$"},"status":{"type":"string"},"provider":{"const":"filing-partner"},"environment":{"const":"sandbox"},"snapshot":{"anyOf":[{"type":"object","properties":{},"required":[],"additionalProperties":false},{"type":"object","properties":{"sandbox":{"const":true},"environment":{"const":"sandbox"},"formation":{"type":"string","enum":["complete","pending"]},"ein":{"type":"string","enum":["issued","pending"]},"letter":{"type":"string","enum":["available","pending"]},"submission":{"type":"string"},"services":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"status":{"type":"string"},"subStatus":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","status","subStatus"],"additionalProperties":false}},"signatureRequirements":{"type":"array","items":{"type":"object","properties":{"documentType":{"type":"string"},"status":{"type":"string"}},"required":["documentType","status"],"additionalProperties":false}}},"required":["sandbox","environment","formation","ein","letter","submission","services","signatureRequirements"],"additionalProperties":false}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","status","provider","environment","snapshot","errorCode","checkedAt","createdAt"],"additionalProperties":false},{"type":"null"}]},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkedAt":{"type":"string"}},"required":["id","type","checkedAt"],"additionalProperties":false}},"webhooks":{"type":"object","properties":{"verifiedReceipts":{"type":"integer"},"unknownActions":{"type":"integer"}},"required":["verifiedReceipts","unknownActions"],"additionalProperties":false},"version":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740990},{"type":"null"}]}},"required":["sandbox","execution"],"additionalProperties":false}}}}},"x-scope":"launch:run","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":1,"maximum":9007199254740990}},"required":["expectedVersion"],"additionalProperties":false}}}}}},"/v1/launch/entity/sandbox/documents":{"get":{"operationId":"launch.entity.sandbox.documents","summary":"Read owned sandbox document metadata; not real legal or tax documents.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"sandbox":{"const":true},"environment":{"const":"sandbox"},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkedAt":{"type":"string"}},"required":["id","type","checkedAt"],"additionalProperties":false}}},"required":["sandbox","environment","documents"],"additionalProperties":false}}}}},"x-scope":"launch:read","x-effect":"read"}},"/v1/launch/entity/sandbox/documents/{documentId}":{"get":{"operationId":"launch.entity.sandbox.document","summary":"Download a tenant-owned synthetic sandbox PDF; no public provider URL.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"string","contentMediaType":"application/pdf"}}}}},"x-scope":"launch:read","x-effect":"read"}},"/v1/marketing/chain":{"get":{"operationId":"marketing.chain.read","summary":"The pipeline chain: stage counts and the oldest age in each stage. Read only.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"lane","in":"query","required":false,"schema":{"type":"string","maxLength":120}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"lane":{"type":"string"},"stages":{"type":"array","items":{"type":"object","properties":{"stage":{"type":"string"},"count":{"type":"integer","minimum":0}},"required":["stage","count"],"additionalProperties":false}},"oldestAgeHours":{"type":"integer","minimum":0}},"required":["stages"],"additionalProperties":false}}}}},"x-scope":"marketing:read","x-effect":"read"}},"/v1/marketing/activity":{"get":{"operationId":"marketing.activity.read","summary":"Activity entries for a subject or the tenant, newest first. Read only.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"subject","in":"query","required":false,"schema":{"type":"string","maxLength":120}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"before","in":"query","required":false,"schema":{"type":"string","maxLength":256}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"at":{"type":"string","format":"date-time"},"kind":{"type":"string"},"subject":{"type":"object","properties":{},"required":[],"additionalProperties":false},"summary":{"type":"string"}},"required":["id","at","kind"],"additionalProperties":false}},"nextCursor":{"type":"string"}},"required":["entries"],"additionalProperties":false}}}}},"x-scope":"marketing:read","x-effect":"read"}},"/v1/marketing/actions":{"post":{"operationId":"marketing.actions.propose","summary":"Propose one action. MarketingOS's action gateway decides: it executes inside policy or waits for a person. A proposal never sends, posts or pays by itself.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string"},"subject":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":40},"id":{"type":"string","minLength":1,"maxLength":120}},"required":["type","id"],"additionalProperties":false},"verdict":{"type":"object","properties":{},"required":[],"additionalProperties":false},"receipt":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"required":["id","kind","status"],"additionalProperties":false}}}}},"x-scope":"marketing:act","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":80},"lane":{"type":"string","maxLength":120},"subject":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":40},"id":{"type":"string","minLength":1,"maxLength":120}},"required":["type","id"],"additionalProperties":false},"payload":{"type":"object","properties":{},"required":[],"additionalProperties":false},"reason":{"type":"string","minLength":1,"maxLength":2000}},"required":["kind","payload","reason"],"additionalProperties":false}}}}}},"/v1/marketing/actions/{id}":{"get":{"operationId":"marketing.actions.read","summary":"One action and its verdict, receipt and status. Read only.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f-]{36}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string"},"subject":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":40},"id":{"type":"string","minLength":1,"maxLength":120}},"required":["type","id"],"additionalProperties":false},"verdict":{"type":"object","properties":{},"required":[],"additionalProperties":false},"receipt":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"required":["id","kind","status"],"additionalProperties":false}}}}},"x-scope":"marketing:read","x-effect":"read"}},"/v1/marketing/spend":{"get":{"operationId":"marketing.spend.read","summary":"Spend by kind, skill, lane or day since a time. Read only.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"by","in":"query","required":false,"schema":{"type":"string","enum":["kind","skill","lane","day"]}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"since":{"type":"string","format":"date-time"},"by":{"type":"string"},"totalUsd":{"type":"integer","minimum":0},"rows":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"usd":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0}},"required":["kind","usd","count"],"additionalProperties":false}}},"required":["since","by","totalUsd","rows"],"additionalProperties":false}}}}},"x-scope":"marketing:read","x-effect":"read"}},"/v1/marketing/skills/{name}/run":{"post":{"operationId":"marketing.skills.run","summary":"Run one MarketingOS skill against a subject. It proposes through the action gateway; dryRun returns the packet without proposing.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9_.-]{1,80}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string"},"status":{"type":"string"}},"required":["runId","status"],"additionalProperties":false}}}}},"x-scope":"marketing:act","x-effect":"spend","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":40},"id":{"type":"string","minLength":1,"maxLength":120}},"required":["type","id"],"additionalProperties":false},"payload":{"type":"object","properties":{},"required":[],"additionalProperties":false},"dryRun":{"type":"boolean"}},"required":["subject"],"additionalProperties":false}}}}}},"/v1/marketing/data/{name}":{"post":{"operationId":"marketing.data.call","summary":"Call one MarketingOS data function. It spends, so it is an act and the tenant's spend cap applies.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9_.-]{1,80}$"}}],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{},"required":[],"additionalProperties":false},"costUsd":{"type":"integer","minimum":0}},"required":["result","costUsd"],"additionalProperties":false}}}}},"x-scope":"marketing:act","x-effect":"spend","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"required":[],"additionalProperties":false}},"required":["input"],"additionalProperties":false}}}}}},"/v1/marketing/stops":{"post":{"operationId":"marketing.stops.write","summary":"Stop a lane, or the whole tenant when no lane is named. A stop only reduces outbound; it never sends, posts or pays.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"type":"object","properties":{"lane":{"type":"string"},"stopped":true,"reason":{"type":"string"}},"required":["stopped"],"additionalProperties":false}}}}},"x-scope":"marketing:act","x-effect":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lane":{"type":"string","maxLength":120},"stopped":{"type":"boolean"},"reason":{"type":"string","minLength":1,"maxLength":2000}},"required":["stopped","reason"],"additionalProperties":false}}}}}},"/v1/marketing/health":{"get":{"operationId":"marketing.health.get","summary":"Read MarketingOS health: the core Worker, its database and the deployed commit.","security":[{"bearerKey":[]},{"xApiKey":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Existing operation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingHealth"}}}}},"x-scope":"account:read","x-effect":"read"}}}}