{"openapi":"3.0.0","info":{"title":"ArcadeOps API","version":"1.1.0","description":"API versionnée d'ArcadeOps. Les réponses publient RateLimit et RateLimit-Policy ; les alias dépréciés publient Deprecation, Sunset et un lien vers la politique de versioning."},"servers":[{"url":"/"}],"components":{"securitySchemes":{"ExternalExecutionGrant":{"type":"http","scheme":"bearer","bearerFormat":"JWS","description":"Grant ArcadeOps signé, tenanté, lié à une Mission et un AgentRun, avec scopes et expiration."},"GithubActionsOidc":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Jeton OIDC GitHub Actions avec audience ArcadeOps, émis pour un runner GitHub-hosted et le workflow de confiance."}},"schemas":{"Agent":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"handle":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"avatarSeed":{"type":"string","nullable":true},"rank":{"type":"string"},"xp":{"type":"number"},"mood":{"type":"string"},"isRunning":{"type":"boolean"},"deskConfig":{"nullable":true},"defaultModel":{"type":"string","nullable":true},"missionSummary":{"type":"string"},"keyTools":{"type":"array","items":{"type":"string"}},"toolNames":{"type":"array","items":{"type":"string"}},"lastActivityAt":{"type":"string","nullable":true}},"required":["id","orgId","handle","name","type","status"]},"AgentsList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"handle":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"avatarSeed":{"type":"string","nullable":true},"rank":{"type":"string"},"xp":{"type":"number"},"mood":{"type":"string"},"isRunning":{"type":"boolean"},"deskConfig":{"nullable":true},"defaultModel":{"type":"string","nullable":true},"missionSummary":{"type":"string"},"keyTools":{"type":"array","items":{"type":"string"}},"toolNames":{"type":"array","items":{"type":"string"}},"lastActivityAt":{"type":"string","nullable":true}},"required":["id","orgId","handle","name","type","status"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"CreateAgentBody":{"type":"object","properties":{"orgId":{"type":"string"},"handle":{"type":"string","minLength":3,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":120},"type":{"type":"string","enum":["CEO","MANAGER","SPECIALIST","META","SERVICE"],"default":"SPECIALIST"},"systemPrompt":{"type":"string"},"defaultModel":{"type":"string","nullable":true},"permissions":{"type":"array","items":{"type":"string"}},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"config":{"nullable":true}},"required":["name"]}}},"required":["handle","name"]},"CreateAgentResponse":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"Project":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"description":{"type":"string","nullable":true},"taskCount":{"type":"number"},"tasksDone":{"type":"number"},"progress":{"type":"number","minimum":0,"maximum":1},"wallet":{"type":"object","nullable":true,"properties":{"budgetUSD":{"type":"number","default":0},"spendUSD":{"type":"number","default":0}}},"paused":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","orgId","key","name","status","taskCount","tasksDone","progress","createdAt","updatedAt"]},"ProjectsList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"description":{"type":"string","nullable":true},"taskCount":{"type":"number"},"tasksDone":{"type":"number"},"progress":{"type":"number","minimum":0,"maximum":1},"wallet":{"type":"object","nullable":true,"properties":{"budgetUSD":{"type":"number","default":0},"spendUSD":{"type":"number","default":0}}},"paused":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","orgId","key","name","status","taskCount","tasksDone","progress","createdAt","updatedAt"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"CreateProjectBody":{"type":"object","properties":{"orgId":{"type":"string"},"key":{"type":"string","minLength":2,"maxLength":10},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500}},"required":["key","name"]},"CreateProjectResponse":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"ProjectEvaluationPortfolio":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"projectKey":{"type":"string"},"projectName":{"type":"string"},"evaluationTaskId":{"type":"string","nullable":true},"surfaceUrl":{"type":"string","nullable":true},"repositoryUrl":{"type":"string","nullable":true},"evaluatorId":{"type":"string","nullable":true},"evaluatorVersion":{"type":"string","nullable":true},"threshold":{"type":"integer","nullable":true,"minimum":0,"maximum":100},"status":{"type":"string","enum":["EVALUATION_NOT_CONFIGURED","IDLE","PENDING","RUNNING","PASS","FAIL","ERROR","INCONCLUSIVE"]},"score":{"type":"integer","nullable":true,"minimum":0,"maximum":100},"essentialPass":{"type":"boolean","nullable":true},"verdict":{"type":"string","nullable":true,"enum":["PASS","FAIL","INCONCLUSIVE"]},"previousScore":{"type":"integer","nullable":true,"minimum":0,"maximum":100},"delta":{"type":"integer","nullable":true},"trend":{"type":"array","items":{"type":"integer","minimum":0,"maximum":100},"maxItems":3},"blockingProblems":{"type":"integer","minimum":0},"topFindings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tier":{"type":"string","enum":["essential","recommended","bonus"]},"result":{"type":"string","enum":["failed","partial"]},"details":{"type":"string","nullable":true},"recommendation":{"type":"string","nullable":true}},"required":["id","name","tier","result","details","recommendation"]},"maxItems":3},"correctiveMissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"priority":{"type":"string"},"status":{"type":"string"}},"required":["id","title","priority","status"]}},"lastEvaluationId":{"type":"string","nullable":true},"lastResultId":{"type":"string","nullable":true},"lastEvaluatedAt":{"type":"string","nullable":true},"technicalErrorCode":{"type":"string","nullable":true}},"required":["projectId","projectKey","projectName","evaluationTaskId","surfaceUrl","repositoryUrl","evaluatorId","evaluatorVersion","threshold","status","score","essentialPass","verdict","previousScore","delta","trend","blockingProblems","topFindings","correctiveMissions","lastEvaluationId","lastResultId","lastEvaluatedAt","technicalErrorCode"]}},"generatedAt":{"type":"string"}},"required":["items","generatedAt"]},"ProjectEvaluationPortfolioItem":{"type":"object","properties":{"projectId":{"type":"string"},"projectKey":{"type":"string"},"projectName":{"type":"string"},"evaluationTaskId":{"type":"string","nullable":true},"surfaceUrl":{"type":"string","nullable":true},"repositoryUrl":{"type":"string","nullable":true},"evaluatorId":{"type":"string","nullable":true},"evaluatorVersion":{"type":"string","nullable":true},"threshold":{"type":"integer","nullable":true,"minimum":0,"maximum":100},"status":{"type":"string","enum":["EVALUATION_NOT_CONFIGURED","IDLE","PENDING","RUNNING","PASS","FAIL","ERROR","INCONCLUSIVE"]},"score":{"type":"integer","nullable":true,"minimum":0,"maximum":100},"essentialPass":{"type":"boolean","nullable":true},"verdict":{"type":"string","nullable":true,"enum":["PASS","FAIL","INCONCLUSIVE"]},"previousScore":{"type":"integer","nullable":true,"minimum":0,"maximum":100},"delta":{"type":"integer","nullable":true},"trend":{"type":"array","items":{"type":"integer","minimum":0,"maximum":100},"maxItems":3},"blockingProblems":{"type":"integer","minimum":0},"topFindings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tier":{"type":"string","enum":["essential","recommended","bonus"]},"result":{"type":"string","enum":["failed","partial"]},"details":{"type":"string","nullable":true},"recommendation":{"type":"string","nullable":true}},"required":["id","name","tier","result","details","recommendation"]},"maxItems":3},"correctiveMissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"priority":{"type":"string"},"status":{"type":"string"}},"required":["id","title","priority","status"]}},"lastEvaluationId":{"type":"string","nullable":true},"lastResultId":{"type":"string","nullable":true},"lastEvaluatedAt":{"type":"string","nullable":true},"technicalErrorCode":{"type":"string","nullable":true}},"required":["projectId","projectKey","projectName","evaluationTaskId","surfaceUrl","repositoryUrl","evaluatorId","evaluatorVersion","threshold","status","score","essentialPass","verdict","previousScore","delta","trend","blockingProblems","topFindings","correctiveMissions","lastEvaluationId","lastResultId","lastEvaluatedAt","technicalErrorCode"]},"ProjectEvaluationTriggerResponse":{"type":"object","properties":{"evaluationRunId":{"type":"string"},"created":{"type":"boolean"}},"required":["evaluationRunId","created"]},"CapState":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"objectiveTitle":{"type":"string","minLength":1,"maxLength":180},"hasChosenLinks":{"type":"boolean"},"linkedProjectIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":100},"captures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"kind":{"type":"string","enum":["Demande","Action","Projet","Lien"]},"text":{"type":"string","minLength":1,"maxLength":2000},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","text","createdAt"]},"maxItems":100}},"required":["version","objectiveTitle","hasChosenLinks","linkedProjectIds","captures"]},"CapPreferencesResponse":{"type":"object","properties":{"exists":{"type":"boolean"},"state":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"objectiveTitle":{"type":"string","minLength":1,"maxLength":180},"hasChosenLinks":{"type":"boolean"},"linkedProjectIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":100},"captures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"kind":{"type":"string","enum":["Demande","Action","Projet","Lien"]},"text":{"type":"string","minLength":1,"maxLength":2000},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","text","createdAt"]},"maxItems":100}},"required":["version","objectiveTitle","hasChosenLinks","linkedProjectIds","captures"]},"updatedAt":{"type":"string","nullable":true}},"required":["exists","state","updatedAt"]},"CapPreferencesPatchBody":{"type":"object","properties":{"state":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"objectiveTitle":{"type":"string","minLength":1,"maxLength":180},"hasChosenLinks":{"type":"boolean"},"linkedProjectIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":100},"captures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"kind":{"type":"string","enum":["Demande","Action","Projet","Lien"]},"text":{"type":"string","minLength":1,"maxLength":2000},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","text","createdAt"]},"maxItems":100}},"required":["version","objectiveTitle","hasChosenLinks","linkedProjectIds","captures"]}},"required":["state"]},"Task":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"projectId":{"type":"string","nullable":true},"title":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string"},"deadline":{"type":"string","nullable":true},"createdAt":{"type":"string"},"assignee":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"handle":{"type":"string","nullable":true}},"required":["id"]}},"required":["id","orgId","projectId","title","status","priority"]},"TasksList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"projectId":{"type":"string","nullable":true},"title":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string"},"deadline":{"type":"string","nullable":true},"createdAt":{"type":"string"},"assignee":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"handle":{"type":"string","nullable":true}},"required":["id"]}},"required":["id","orgId","projectId","title","status","priority"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"CreateTaskBody":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?$"},"orgId":{"type":"string"},"projectId":{"type":"string","nullable":true,"minLength":1},"ownerId":{"type":"string","nullable":true,"minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"objective":{"type":"string","nullable":true},"expectedOutcome":{"type":"string","nullable":true,"maxLength":10000},"context":{"type":"string","nullable":true,"maxLength":20000},"sources":{"type":"string","nullable":true,"maxLength":20000},"constraints":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":50},"acceptanceCriteria":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":50},"requiredEvidence":{"type":"array","items":{"type":"string","minLength":1,"maxLength":500},"maxItems":50},"deadline":{"type":"string","nullable":true,"format":"date-time"},"budgetMicros":{"type":"string","nullable":true,"maxLength":16,"pattern":"^\\d+$"},"provenance":{"type":"string","enum":["COMMAND_CENTER"]},"priority":{"type":"string","enum":["LOW","NORMAL","HIGH","URGENT"],"default":"NORMAL"}},"required":["title"]},"CreateTaskResponse":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"KnowledgeSource":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"name":{"type":"string"},"lastSyncAt":{"type":"string","nullable":true}},"required":["id","orgId","type","status","name"]},"KnowledgeSourcesList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"name":{"type":"string"},"lastSyncAt":{"type":"string","nullable":true}},"required":["id","orgId","type","status","name"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"KnowledgeDoc":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"title":{"type":"string","nullable":true},"status":{"type":"string"},"language":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","orgId","status","createdAt"]},"KnowledgeDocsList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"title":{"type":"string","nullable":true},"status":{"type":"string"},"language":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","orgId","status","createdAt"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"MailThread":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"subject":{"type":"string"},"labels":{"type":"array","nullable":true,"items":{"type":"string"}},"channel":{"type":"string"},"updatedAt":{"type":"string"},"lastMessagePreview":{"type":"string","nullable":true},"lastMessageFromAgentId":{"type":"string","nullable":true},"lastMessageStatus":{"type":"string","nullable":true},"hasExternalMeta":{"type":"boolean"}},"required":["id","orgId","subject","channel","updatedAt"]},"MailThreadsList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"subject":{"type":"string"},"labels":{"type":"array","nullable":true,"items":{"type":"string"}},"channel":{"type":"string"},"updatedAt":{"type":"string"},"lastMessagePreview":{"type":"string","nullable":true},"lastMessageFromAgentId":{"type":"string","nullable":true},"lastMessageStatus":{"type":"string","nullable":true},"hasExternalMeta":{"type":"boolean"}},"required":["id","orgId","subject","channel","updatedAt"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"MailMessage":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"threadId":{"type":"string"},"subject":{"type":"string"},"bodyMd":{"type":"string"},"fromAgentId":{"type":"string","nullable":true},"toAgents":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"externalMeta":{"type":"object","nullable":true,"properties":{"to":{"type":"string"},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"replyTo":{"type":"string"},"providerErrorCode":{"type":"string","enum":["GOOGLE_RECONNECT_REQUIRED","RESEND_NOT_CONFIGURED","NO_AVAILABLE_MAIL_PROVIDER","MISSING_SENDER_USER"]},"providerSelection":{"type":"string","enum":["connected_gmail","policy_default","gmail_fallback"]},"providerName":{"type":"string","enum":["resend","gmail","outlook","smtp","noop"]},"providerId":{"type":"string"},"sentAt":{"type":"string"},"error":{"type":"string"},"bounceType":{"type":"string","enum":["hard","soft","complaint"]},"openedAt":{"type":"string"},"clickedAt":{"type":"string"},"unsubscribedAt":{"type":"string"},"firstOpenedAt":{"type":"string"},"lastOpenedAt":{"type":"string"},"openCount":{"type":"integer","minimum":0},"firstClickedAt":{"type":"string"},"lastClickedAt":{"type":"string"},"clickCount":{"type":"integer","minimum":0},"clickedUrls":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"generatedBy":{"type":"string"},"template":{"type":"string"},"templateId":{"type":"string"},"templateName":{"type":"string"},"campaignId":{"type":"string"},"campaignName":{"type":"string","nullable":true},"contactId":{"type":"string"},"senderUserId":{"type":"string"},"mailboxUserId":{"type":"string"},"createdAt":{"type":"string"},"gmailMessageId":{"type":"string"},"gmailThreadId":{"type":"string"},"from":{"type":"string"},"reply":{"type":"boolean"},"resendId":{"type":"string"}}},"createdAt":{"type":"string"}},"required":["id","orgId","threadId","subject","bodyMd","fromAgentId","status","createdAt"]},"MailMessagesList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"threadId":{"type":"string"},"subject":{"type":"string"},"bodyMd":{"type":"string"},"fromAgentId":{"type":"string","nullable":true},"toAgents":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"externalMeta":{"type":"object","nullable":true,"properties":{"to":{"type":"string"},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"replyTo":{"type":"string"},"providerErrorCode":{"type":"string","enum":["GOOGLE_RECONNECT_REQUIRED","RESEND_NOT_CONFIGURED","NO_AVAILABLE_MAIL_PROVIDER","MISSING_SENDER_USER"]},"providerSelection":{"type":"string","enum":["connected_gmail","policy_default","gmail_fallback"]},"providerName":{"type":"string","enum":["resend","gmail","outlook","smtp","noop"]},"providerId":{"type":"string"},"sentAt":{"type":"string"},"error":{"type":"string"},"bounceType":{"type":"string","enum":["hard","soft","complaint"]},"openedAt":{"type":"string"},"clickedAt":{"type":"string"},"unsubscribedAt":{"type":"string"},"firstOpenedAt":{"type":"string"},"lastOpenedAt":{"type":"string"},"openCount":{"type":"integer","minimum":0},"firstClickedAt":{"type":"string"},"lastClickedAt":{"type":"string"},"clickCount":{"type":"integer","minimum":0},"clickedUrls":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"generatedBy":{"type":"string"},"template":{"type":"string"},"templateId":{"type":"string"},"templateName":{"type":"string"},"campaignId":{"type":"string"},"campaignName":{"type":"string","nullable":true},"contactId":{"type":"string"},"senderUserId":{"type":"string"},"mailboxUserId":{"type":"string"},"createdAt":{"type":"string"},"gmailMessageId":{"type":"string"},"gmailThreadId":{"type":"string"},"from":{"type":"string"},"reply":{"type":"boolean"},"resendId":{"type":"string"}}},"createdAt":{"type":"string"}},"required":["id","orgId","threadId","subject","bodyMd","fromAgentId","status","createdAt"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"Policy":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["id","orgId","name","type"]},"PoliciesList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["id","orgId","name","type"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"Prompt":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"key":{"type":"string"},"createdAt":{"type":"string"},"versionCount":{"type":"integer","minimum":0},"latestContent":{"type":"string","nullable":true}},"required":["id","orgId","key"]},"PromptsList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"key":{"type":"string"},"createdAt":{"type":"string"},"versionCount":{"type":"integer","minimum":0},"latestContent":{"type":"string","nullable":true}},"required":["id","orgId","key"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"Org":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"]},"OrgsList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"Member":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"userId":{"type":"string"},"role":{"type":"string"},"userName":{"type":"string","nullable":true},"userEmail":{"type":"string","nullable":true},"userAvatarUrl":{"type":"string","nullable":true},"userStatus":{"type":"string"}},"required":["id","orgId","userId","role"]},"MembersList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"userId":{"type":"string"},"role":{"type":"string"},"userName":{"type":"string","nullable":true},"userEmail":{"type":"string","nullable":true},"userAvatarUrl":{"type":"string","nullable":true},"userStatus":{"type":"string"}},"required":["id","orgId","userId","role"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"Tag":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"color":{"type":"string","nullable":true}},"required":["id","orgId","key","label"]},"TagsList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"color":{"type":"string","nullable":true}},"required":["id","orgId","key","label"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"Job":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"cron":{"type":"string"},"enabled":{"type":"boolean"},"nextRunAt":{"type":"string","nullable":true}},"required":["id","orgId","name","cron","enabled"]},"JobsList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"cron":{"type":"string"},"enabled":{"type":"boolean"},"nextRunAt":{"type":"string","nullable":true}},"required":["id","orgId","name","cron","enabled"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"LoopDefinition":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","ACTIVE","PAUSED","ARCHIVED"]},"triggerType":{"type":"string","enum":["MANUAL","SCHEDULE","EVENT"]},"scheduledJobId":{"type":"string","nullable":true},"agentId":{"type":"string"},"taskTemplate":{"nullable":true},"evalPolicy":{"type":"object","properties":{"blockOnFail":{"type":"boolean"},"gate":{"type":"string","enum":["basic","none"]},"checks":{"type":"array","items":{"type":"string","enum":["required_final_answer"]}}},"required":["blockOnFail"],"additionalProperties":false},"learnPolicy":{"type":"object","nullable":true,"properties":{"gate":{"type":"string","enum":["off","capture_only","suggest_patch"]},"rerun":{"type":"string","enum":["manual","auto"]}},"required":["gate"],"additionalProperties":false},"approvalPolicy":{"nullable":true},"budgetPolicy":{"nullable":true},"maxIterations":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"cooldownSec":{"type":"integer","nullable":true,"minimum":0},"createdById":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"schedulingWired":{"type":"boolean","enum":[false]},"runCount":{"type":"integer","minimum":0},"lastRunAt":{"type":"string","nullable":true}},"required":["id","orgId","name","description","status","triggerType","scheduledJobId","agentId","evalPolicy","learnPolicy","maxIterations","cooldownSec","createdById","createdAt","updatedAt","schedulingWired"]},"LoopDefinitionsList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","ACTIVE","PAUSED","ARCHIVED"]},"triggerType":{"type":"string","enum":["MANUAL","SCHEDULE","EVENT"]},"scheduledJobId":{"type":"string","nullable":true},"agentId":{"type":"string"},"taskTemplate":{"nullable":true},"evalPolicy":{"type":"object","properties":{"blockOnFail":{"type":"boolean"},"gate":{"type":"string","enum":["basic","none"]},"checks":{"type":"array","items":{"type":"string","enum":["required_final_answer"]}}},"required":["blockOnFail"],"additionalProperties":false},"learnPolicy":{"type":"object","nullable":true,"properties":{"gate":{"type":"string","enum":["off","capture_only","suggest_patch"]},"rerun":{"type":"string","enum":["manual","auto"]}},"required":["gate"],"additionalProperties":false},"approvalPolicy":{"nullable":true},"budgetPolicy":{"nullable":true},"maxIterations":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"cooldownSec":{"type":"integer","nullable":true,"minimum":0},"createdById":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"schedulingWired":{"type":"boolean","enum":[false]},"runCount":{"type":"integer","minimum":0},"lastRunAt":{"type":"string","nullable":true}},"required":["id","orgId","name","description","status","triggerType","scheduledJobId","agentId","evalPolicy","learnPolicy","maxIterations","cooldownSec","createdById","createdAt","updatedAt","schedulingWired"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"CreateLoopDefinitionBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"triggerType":{"type":"string","enum":["MANUAL","SCHEDULE","EVENT"]},"scheduledJobId":{"type":"string"},"agentId":{"type":"string","minLength":1},"taskTemplate":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"objective":{"type":"string","maxLength":5000},"input":{"type":"object","additionalProperties":{"nullable":true}}},"required":["title"],"additionalProperties":false},"evalPolicy":{"type":"object","properties":{"blockOnFail":{"type":"boolean"},"gate":{"type":"string","enum":["basic","none"]},"checks":{"type":"array","items":{"type":"string","enum":["required_final_answer"]}}},"required":["blockOnFail"],"additionalProperties":false},"learnPolicy":{"type":"object","properties":{"gate":{"type":"string","enum":["off","capture_only","suggest_patch"]},"rerun":{"type":"string","enum":["manual","auto"]}},"required":["gate"],"additionalProperties":false},"approvalPolicy":{"type":"object","additionalProperties":{"nullable":true}},"budgetPolicy":{"type":"object","additionalProperties":{"nullable":true}},"maxIterations":{"type":"integer","minimum":0,"exclusiveMinimum":true},"cooldownSec":{"type":"integer","minimum":0}},"required":["name","agentId","taskTemplate"]},"CreateLoopDefinitionResponse":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"PatchLoopDefinitionBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","nullable":true,"maxLength":2000},"status":{"type":"string","enum":["DRAFT","ACTIVE","PAUSED","ARCHIVED"]},"triggerType":{"type":"string","enum":["MANUAL","SCHEDULE","EVENT"]},"scheduledJobId":{"type":"string","nullable":true},"agentId":{"type":"string","minLength":1},"taskTemplate":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"objective":{"type":"string","maxLength":5000},"input":{"type":"object","additionalProperties":{"nullable":true}}},"required":["title"],"additionalProperties":false},"evalPolicy":{"type":"object","properties":{"blockOnFail":{"type":"boolean"},"gate":{"type":"string","enum":["basic","none"]},"checks":{"type":"array","items":{"type":"string","enum":["required_final_answer"]}}},"required":["blockOnFail"],"additionalProperties":false},"learnPolicy":{"type":"object","nullable":true,"properties":{"gate":{"type":"string","enum":["off","capture_only","suggest_patch"]},"rerun":{"type":"string","enum":["manual","auto"]}},"required":["gate"],"additionalProperties":false},"approvalPolicy":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"budgetPolicy":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"maxIterations":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"cooldownSec":{"type":"integer","nullable":true,"minimum":0}},"additionalProperties":false},"DeleteLoopDefinitionResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"status":{"type":"string","enum":["ARCHIVED"]},"id":{"type":"string"}},"required":["ok","status","id"]},"LoopManualRunBody":{"type":"object","properties":{"input":{"type":"object","additionalProperties":{"nullable":true}}},"additionalProperties":false},"LoopManualRunResponse":{"type":"object","properties":{"loopRunId":{"type":"string"},"taskId":{"type":"string","nullable":true},"agentRunId":{"type":"string","nullable":true},"status":{"type":"string","enum":["QUEUED","RUNNING","SUCCEEDED","FAILED","CANCELLED","BLOCKED_EVAL"]},"iteration":{"type":"integer","minimum":0,"exclusiveMinimum":true},"pollUrl":{"type":"string","nullable":true},"statusFinalSynced":{"type":"boolean","enum":[false]},"idempotentDuplicate":{"type":"boolean","enum":[true]}},"required":["loopRunId","taskId","agentRunId","status","iteration","pollUrl","statusFinalSynced"]},"LoopRunsList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"loopDefinitionId":{"type":"string"},"iteration":{"type":"integer"},"status":{"type":"string","enum":["QUEUED","RUNNING","SUCCEEDED","FAILED","CANCELLED","BLOCKED_EVAL"]},"triggerType":{"type":"string","enum":["MANUAL","SCHEDULE","EVENT"]},"taskId":{"type":"string","nullable":true},"agentRunId":{"type":"string","nullable":true},"evalResult":{"nullable":true},"costMicros":{"type":"string","nullable":true},"error":{"type":"string","nullable":true},"startedAt":{"type":"string","nullable":true},"endedAt":{"type":"string","nullable":true},"sourceLearnRecordId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","orgId","loopDefinitionId","iteration","status","triggerType","taskId","agentRunId","costMicros","error","startedAt","endedAt","sourceLearnRecordId","createdAt","updatedAt"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"LlmCall":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"agentId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"provider":{"type":"string"},"model":{"type":"string"},"inputTokens":{"type":"number"},"outputTokens":{"type":"number"},"costMicros":{"type":"string"},"meteringStatus":{"type":"string"},"costStatus":{"type":"string"},"costDisposition":{"type":"string","nullable":true,"enum":["RECONCILED_SUCCEEDED","RECONCILED_FAILED","ESTIMATED_NON_CONFIRMED","RESERVED_PENDING","UNRECONCILED_EXPOSURE","UNKNOWN_NON_CONFIRMED","UNKNOWN_INVALID"]},"confirmedProviderCostMicros":{"type":"string","nullable":true},"estimatedCostMicros":{"type":"string","nullable":true},"reservationExposureMicros":{"type":"string","nullable":true},"billableEligible":{"type":"boolean"},"coverageExclusionReason":{"type":"string","nullable":true},"status":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","orgId","provider","model","inputTokens","outputTokens","costMicros","meteringStatus","costStatus","costDisposition","confirmedProviderCostMicros","estimatedCostMicros","reservationExposureMicros","billableEligible","coverageExclusionReason","status","createdAt"]},"LlmCallsList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"agentId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"provider":{"type":"string"},"model":{"type":"string"},"inputTokens":{"type":"number"},"outputTokens":{"type":"number"},"costMicros":{"type":"string"},"meteringStatus":{"type":"string"},"costStatus":{"type":"string"},"costDisposition":{"type":"string","nullable":true,"enum":["RECONCILED_SUCCEEDED","RECONCILED_FAILED","ESTIMATED_NON_CONFIRMED","RESERVED_PENDING","UNRECONCILED_EXPOSURE","UNKNOWN_NON_CONFIRMED","UNKNOWN_INVALID"]},"confirmedProviderCostMicros":{"type":"string","nullable":true},"estimatedCostMicros":{"type":"string","nullable":true},"reservationExposureMicros":{"type":"string","nullable":true},"billableEligible":{"type":"boolean"},"coverageExclusionReason":{"type":"string","nullable":true},"status":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","orgId","provider","model","inputTokens","outputTokens","costMicros","meteringStatus","costStatus","costDisposition","confirmedProviderCostMicros","estimatedCostMicros","reservationExposureMicros","billableEligible","coverageExclusionReason","status","createdAt"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"Audit":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"userId":{"type":"string","nullable":true},"agentId":{"type":"string","nullable":true},"action":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"message":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","orgId","action","entityType","entityId","createdAt"]},"AuditsList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"userId":{"type":"string","nullable":true},"agentId":{"type":"string","nullable":true},"action":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"message":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","orgId","action","entityType","entityId","createdAt"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"CostsRow":{"type":"object","properties":{"day":{"type":"string"},"costMicros":{"type":"string"},"costSummary":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["cost-truth.v1"]},"currency":{"type":"string","enum":["USD"]},"coverage":{"type":"object","properties":{"scope":{"type":"string","enum":["ENGINE_CORE"]},"inScopeCallCount":{"type":"integer","minimum":0},"excludedCallCount":{"type":"integer","minimum":0},"sources":{"type":"array","items":{"type":"string"}}},"required":["scope","inScopeCallCount","excludedCallCount","sources"]},"confirmedProvider":{"type":"object","properties":{"callCount":{"type":"integer","minimum":0},"costUsd":{"type":"string"}},"required":["callCount","costUsd"]},"billableEligible":{"type":"object","properties":{"callCount":{"type":"integer","minimum":0},"costUsd":{"type":"string"}},"required":["callCount","costUsd"]},"estimated":{"type":"object","properties":{"callCount":{"type":"integer","minimum":0},"costUsd":{"type":"string","nullable":true}},"required":["callCount","costUsd"]},"reservations":{"type":"object","properties":{"callCount":{"type":"integer","minimum":0},"upperBoundUsd":{"type":"string"}},"required":["callCount","upperBoundUsd"]},"unreconciled":{"type":"object","properties":{"callCount":{"type":"integer","minimum":0},"exposureUpperBoundUsd":{"type":"string","nullable":true}},"required":["callCount","exposureUpperBoundUsd"]},"failed":{"type":"object","properties":{"callCount":{"type":"integer","minimum":0},"confirmedProviderCostUsd":{"type":"string"},"billableEligibleCostUsd":{"type":"string","enum":["0"]}},"required":["callCount","confirmedProviderCostUsd","billableEligibleCostUsd"]},"unknown":{"type":"object","properties":{"callCount":{"type":"integer","minimum":0},"invalidRowCount":{"type":"integer","minimum":0}},"required":["callCount","invalidRowCount"]},"classification":{"type":"object","properties":{"reconciledSucceededCount":{"type":"integer","minimum":0},"reconciledFailedCount":{"type":"integer","minimum":0},"estimatedCount":{"type":"integer","minimum":0},"reservedCount":{"type":"integer","minimum":0},"unreconciledCount":{"type":"integer","minimum":0},"unknownCount":{"type":"integer","minimum":0},"invalidCount":{"type":"integer","minimum":0}},"required":["reconciledSucceededCount","reconciledFailedCount","estimatedCount","reservedCount","unreconciledCount","unknownCount","invalidCount"]},"completeness":{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETE","PARTIAL","UNKNOWN"]},"hasOpenReservations":{"type":"boolean"},"hasUnreconciledCalls":{"type":"boolean"},"hasUnknownCosts":{"type":"boolean"},"hasEstimatedOnlyCosts":{"type":"boolean"},"hasExcludedBoundaries":{"type":"boolean"}},"required":["status","hasOpenReservations","hasUnreconciledCalls","hasUnknownCosts","hasEstimatedOnlyCosts","hasExcludedBoundaries"]},"asOf":{"type":"string","format":"date-time"}},"required":["schemaVersion","currency","coverage","confirmedProvider","billableEligible","estimated","reservations","unreconciled","failed","unknown","classification","completeness","asOf"]}},"required":["day","costMicros","costSummary"]},"CostsList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"costMicros":{"type":"string"},"costSummary":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["cost-truth.v1"]},"currency":{"type":"string","enum":["USD"]},"coverage":{"type":"object","properties":{"scope":{"type":"string","enum":["ENGINE_CORE"]},"inScopeCallCount":{"type":"integer","minimum":0},"excludedCallCount":{"type":"integer","minimum":0},"sources":{"type":"array","items":{"type":"string"}}},"required":["scope","inScopeCallCount","excludedCallCount","sources"]},"confirmedProvider":{"type":"object","properties":{"callCount":{"type":"integer","minimum":0},"costUsd":{"type":"string"}},"required":["callCount","costUsd"]},"billableEligible":{"type":"object","properties":{"callCount":{"type":"integer","minimum":0},"costUsd":{"type":"string"}},"required":["callCount","costUsd"]},"estimated":{"type":"object","properties":{"callCount":{"type":"integer","minimum":0},"costUsd":{"type":"string","nullable":true}},"required":["callCount","costUsd"]},"reservations":{"type":"object","properties":{"callCount":{"type":"integer","minimum":0},"upperBoundUsd":{"type":"string"}},"required":["callCount","upperBoundUsd"]},"unreconciled":{"type":"object","properties":{"callCount":{"type":"integer","minimum":0},"exposureUpperBoundUsd":{"type":"string","nullable":true}},"required":["callCount","exposureUpperBoundUsd"]},"failed":{"type":"object","properties":{"callCount":{"type":"integer","minimum":0},"confirmedProviderCostUsd":{"type":"string"},"billableEligibleCostUsd":{"type":"string","enum":["0"]}},"required":["callCount","confirmedProviderCostUsd","billableEligibleCostUsd"]},"unknown":{"type":"object","properties":{"callCount":{"type":"integer","minimum":0},"invalidRowCount":{"type":"integer","minimum":0}},"required":["callCount","invalidRowCount"]},"classification":{"type":"object","properties":{"reconciledSucceededCount":{"type":"integer","minimum":0},"reconciledFailedCount":{"type":"integer","minimum":0},"estimatedCount":{"type":"integer","minimum":0},"reservedCount":{"type":"integer","minimum":0},"unreconciledCount":{"type":"integer","minimum":0},"unknownCount":{"type":"integer","minimum":0},"invalidCount":{"type":"integer","minimum":0}},"required":["reconciledSucceededCount","reconciledFailedCount","estimatedCount","reservedCount","unreconciledCount","unknownCount","invalidCount"]},"completeness":{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETE","PARTIAL","UNKNOWN"]},"hasOpenReservations":{"type":"boolean"},"hasUnreconciledCalls":{"type":"boolean"},"hasUnknownCosts":{"type":"boolean"},"hasEstimatedOnlyCosts":{"type":"boolean"},"hasExcludedBoundaries":{"type":"boolean"}},"required":["status","hasOpenReservations","hasUnreconciledCalls","hasUnknownCosts","hasEstimatedOnlyCosts","hasExcludedBoundaries"]},"asOf":{"type":"string","format":"date-time"}},"required":["schemaVersion","currency","coverage","confirmedProvider","billableEligible","estimated","reservations","unreconciled","failed","unknown","classification","completeness","asOf"]}},"required":["day","costMicros","costSummary"]}}},"required":["items"]},"MissionSummary":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"objective":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","READY","RUNNING","WAITING_FOR_DECISION","BLOCKED","REVIEW","COMPLETED","FAILED","CANCELLED"]},"priority":{"type":"string","enum":["LOW","NORMAL","HIGH","URGENT"]},"project":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"agent":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string","nullable":true},"status":{"type":"string","nullable":true}},"required":["id","name","handle","status"]},"progress":{"type":"number","nullable":true,"minimum":0,"maximum":100},"budget":{"type":"object","properties":{"limitUsd":{"type":"string","nullable":true},"source":{"type":"string","enum":["TASK","PROJECT","RUN","NONE"]},"cost":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"]},"confirmedUsd":{"type":"string"},"estimatedUsd":{"type":"string","nullable":true},"reservedUpperBoundUsd":{"type":"string"},"unreconciledUpperBoundUsd":{"type":"string","nullable":true},"completeness":{"type":"string","enum":["COMPLETE","PARTIAL","UNKNOWN"]},"callCount":{"type":"integer","minimum":0}},"required":["currency","confirmedUsd","estimatedUsd","reservedUpperBoundUsd","unreconciledUpperBoundUsd","completeness","callCount"]}},"required":["limitUsd","source","cost"]},"cost":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"]},"confirmedUsd":{"type":"string"},"estimatedUsd":{"type":"string","nullable":true},"reservedUpperBoundUsd":{"type":"string"},"unreconciledUpperBoundUsd":{"type":"string","nullable":true},"completeness":{"type":"string","enum":["COMPLETE","PARTIAL","UNKNOWN"]},"callCount":{"type":"integer","minimum":0}},"required":["currency","confirmedUsd","estimatedUsd","reservedUpperBoundUsd","unreconciledUpperBoundUsd","completeness","callCount"]},"lastActivityAt":{"type":"string"},"runningSince":{"type":"string","nullable":true},"nextExpectedEvent":{"type":"string","nullable":true},"deadline":{"type":"string","nullable":true},"blocker":{"type":"object","nullable":true,"properties":{"code":{"type":"string"},"message":{"type":"string"},"source":{"type":"string","enum":["TASK","RUN","DECISION"]}},"required":["code","message","source"]},"decisionRequired":{"type":"object","nullable":true,"properties":{"count":{"type":"integer","minimum":0,"exclusiveMinimum":true},"highestRisk":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL","UNKNOWN"]}},"required":["count","highestRisk"]},"runCount":{"type":"integer","minimum":0},"latestRunId":{"type":"string","nullable":true},"latestDeliverable":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["FILE","CODE","COMMIT","PULL_REQUEST","REPORT","URL","DATA","MESSAGE","ARTIFACT","OTHER"]},"status":{"type":"string","enum":["AVAILABLE","NEEDS_REVIEW","VERIFIED","REVOKED"]}},"required":["id","title","type","status"]},"legacy":{"type":"boolean"}},"required":["id","title","objective","status","priority","project","agent","progress","budget","cost","lastActivityAt","runningSince","nextExpectedEvent","deadline","blocker","decisionRequired","runCount","latestRunId","latestDeliverable","legacy"]},"MissionDetail":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"objective":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","READY","RUNNING","WAITING_FOR_DECISION","BLOCKED","REVIEW","COMPLETED","FAILED","CANCELLED"]},"priority":{"type":"string","enum":["LOW","NORMAL","HIGH","URGENT"]},"project":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"agent":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string","nullable":true},"status":{"type":"string","nullable":true}},"required":["id","name","handle","status"]},"progress":{"type":"number","nullable":true,"minimum":0,"maximum":100},"budget":{"type":"object","properties":{"limitUsd":{"type":"string","nullable":true},"source":{"type":"string","enum":["TASK","PROJECT","RUN","NONE"]},"cost":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"]},"confirmedUsd":{"type":"string"},"estimatedUsd":{"type":"string","nullable":true},"reservedUpperBoundUsd":{"type":"string"},"unreconciledUpperBoundUsd":{"type":"string","nullable":true},"completeness":{"type":"string","enum":["COMPLETE","PARTIAL","UNKNOWN"]},"callCount":{"type":"integer","minimum":0}},"required":["currency","confirmedUsd","estimatedUsd","reservedUpperBoundUsd","unreconciledUpperBoundUsd","completeness","callCount"]}},"required":["limitUsd","source","cost"]},"cost":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"]},"confirmedUsd":{"type":"string"},"estimatedUsd":{"type":"string","nullable":true},"reservedUpperBoundUsd":{"type":"string"},"unreconciledUpperBoundUsd":{"type":"string","nullable":true},"completeness":{"type":"string","enum":["COMPLETE","PARTIAL","UNKNOWN"]},"callCount":{"type":"integer","minimum":0}},"required":["currency","confirmedUsd","estimatedUsd","reservedUpperBoundUsd","unreconciledUpperBoundUsd","completeness","callCount"]},"lastActivityAt":{"type":"string"},"runningSince":{"type":"string","nullable":true},"nextExpectedEvent":{"type":"string","nullable":true},"deadline":{"type":"string","nullable":true},"blocker":{"type":"object","nullable":true,"properties":{"code":{"type":"string"},"message":{"type":"string"},"source":{"type":"string","enum":["TASK","RUN","DECISION"]}},"required":["code","message","source"]},"decisionRequired":{"type":"object","nullable":true,"properties":{"count":{"type":"integer","minimum":0,"exclusiveMinimum":true},"highestRisk":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL","UNKNOWN"]}},"required":["count","highestRisk"]},"runCount":{"type":"integer","minimum":0},"latestRunId":{"type":"string","nullable":true},"latestDeliverable":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["FILE","CODE","COMMIT","PULL_REQUEST","REPORT","URL","DATA","MESSAGE","ARTIFACT","OTHER"]},"status":{"type":"string","enum":["AVAILABLE","NEEDS_REVIEW","VERIFIED","REVOKED"]}},"required":["id","title","type","status"]},"legacy":{"type":"boolean"},"expectedOutcome":{"type":"string","nullable":true},"successCriteria":{"type":"array","items":{"type":"string"}},"requiredEvidence":{"type":"array","items":{"type":"string"}},"context":{"type":"array","items":{"type":"string"}},"activity":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["CREATED","STATUS","RUN","DECISION","DELIVERABLE","ERROR","OTHER"]},"title":{"type":"string"},"detail":{"type":"string","nullable":true},"createdAt":{"type":"string"},"runId":{"type":"string","nullable":true}},"required":["id","type","title","detail","createdAt","runId"]}},"decisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["TOOL_APPROVAL","STRATEGIC","MAIL_DRAFT","EVALUATOR"]},"status":{"type":"string","enum":["PENDING","APPROVED","REJECTED","EXPIRED","CANCELLED"]},"mission":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"]},"agent":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string","nullable":true},"status":{"type":"string","nullable":true}},"required":["id","name","handle","status"]},"request":{"type":"string"},"context":{"type":"string","nullable":true},"risk":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL","UNKNOWN"]},"consequenceOfRefusal":{"type":"string"},"createdAt":{"type":"string"},"expiresAt":{"type":"string","nullable":true},"actions":{"type":"array","items":{"type":"string","enum":["APPROVE","REJECT","INSPECT"]}},"inspectHref":{"type":"string"},"runId":{"type":"string","nullable":true}},"required":["id","kind","status","mission","agent","request","context","risk","consequenceOfRefusal","createdAt","expiresAt","actions","inspectHref","runId"]}},"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string","nullable":true},"status":{"type":"string","nullable":true}},"required":["id","name","handle","status"]},"startedAt":{"type":"string"},"endedAt":{"type":"string","nullable":true},"durationMs":{"type":"integer","nullable":true,"minimum":0},"outputSummary":{"type":"string","nullable":true},"error":{"type":"string","nullable":true},"cost":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"]},"confirmedUsd":{"type":"string"},"estimatedUsd":{"type":"string","nullable":true},"reservedUpperBoundUsd":{"type":"string"},"unreconciledUpperBoundUsd":{"type":"string","nullable":true},"completeness":{"type":"string","enum":["COMPLETE","PARTIAL","UNKNOWN"]},"callCount":{"type":"integer","minimum":0}},"required":["currency","confirmedUsd","estimatedUsd","reservedUpperBoundUsd","unreconciledUpperBoundUsd","completeness","callCount"]},"releaseDecision":{"type":"string","nullable":true}},"required":["id","status","agent","startedAt","endedAt","durationMs","outputSummary","error","cost","releaseDecision"]}},"deliverables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"mission":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"]},"agent":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string","nullable":true},"status":{"type":"string","nullable":true}},"required":["id","name","handle","status"]},"runId":{"type":"string","nullable":true},"type":{"type":"string","enum":["FILE","CODE","COMMIT","PULL_REQUEST","REPORT","URL","DATA","MESSAGE","ARTIFACT","OTHER"]},"status":{"type":"string","enum":["AVAILABLE","NEEDS_REVIEW","VERIFIED","REVOKED"]},"title":{"type":"string"},"summary":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"mimeType":{"type":"string","nullable":true},"sizeBytes":{"type":"integer","nullable":true,"minimum":0},"createdAt":{"type":"string"},"provenance":{"type":"object","properties":{"source":{"type":"string","enum":["RUN_ARTIFACT","ATTACHMENT","RUN_OUTPUT"]},"sourceId":{"type":"string"},"contentSha256":{"type":"string","nullable":true}},"required":["source","sourceId","contentSha256"]},"evidence":{"type":"object","properties":{"verified":{"type":"boolean"},"certificateId":{"type":"string","nullable":true},"evidencePackId":{"type":"string","nullable":true},"hash":{"type":"string","nullable":true}},"required":["verified","certificateId","evidencePackId","hash"]},"cost":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"]},"confirmedUsd":{"type":"string"},"estimatedUsd":{"type":"string","nullable":true},"reservedUpperBoundUsd":{"type":"string"},"unreconciledUpperBoundUsd":{"type":"string","nullable":true},"completeness":{"type":"string","enum":["COMPLETE","PARTIAL","UNKNOWN"]},"callCount":{"type":"integer","minimum":0}},"required":["currency","confirmedUsd","estimatedUsd","reservedUpperBoundUsd","unreconciledUpperBoundUsd","completeness","callCount"]}},"required":["id","mission","agent","runId","type","status","title","summary","url","mimeType","sizeBytes","createdAt","provenance","evidence","cost"]}},"evidence":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["EVIDENCE_PACK","CERTIFICATE","EVALUATION","ARTIFACT"]},"status":{"type":"string"},"runId":{"type":"string"},"label":{"type":"string"},"hash":{"type":"string","nullable":true},"verified":{"type":"boolean"},"createdAt":{"type":"string"},"href":{"type":"string"}},"required":["id","kind","status","runId","label","hash","verified","createdAt","href"]}},"dependencies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"}},"required":["id","title","status"]}},"parentMissionId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","objective","status","priority","project","agent","progress","budget","cost","lastActivityAt","runningSince","nextExpectedEvent","deadline","blocker","decisionRequired","runCount","latestRunId","latestDeliverable","legacy","expectedOutcome","successCriteria","requiredEvidence","context","activity","decisions","runs","deliverables","evidence","dependencies","parentMissionId","createdAt","updatedAt"]},"MissionList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"objective":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","READY","RUNNING","WAITING_FOR_DECISION","BLOCKED","REVIEW","COMPLETED","FAILED","CANCELLED"]},"priority":{"type":"string","enum":["LOW","NORMAL","HIGH","URGENT"]},"project":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"agent":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string","nullable":true},"status":{"type":"string","nullable":true}},"required":["id","name","handle","status"]},"progress":{"type":"number","nullable":true,"minimum":0,"maximum":100},"budget":{"type":"object","properties":{"limitUsd":{"type":"string","nullable":true},"source":{"type":"string","enum":["TASK","PROJECT","RUN","NONE"]},"cost":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"]},"confirmedUsd":{"type":"string"},"estimatedUsd":{"type":"string","nullable":true},"reservedUpperBoundUsd":{"type":"string"},"unreconciledUpperBoundUsd":{"type":"string","nullable":true},"completeness":{"type":"string","enum":["COMPLETE","PARTIAL","UNKNOWN"]},"callCount":{"type":"integer","minimum":0}},"required":["currency","confirmedUsd","estimatedUsd","reservedUpperBoundUsd","unreconciledUpperBoundUsd","completeness","callCount"]}},"required":["limitUsd","source","cost"]},"cost":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"]},"confirmedUsd":{"type":"string"},"estimatedUsd":{"type":"string","nullable":true},"reservedUpperBoundUsd":{"type":"string"},"unreconciledUpperBoundUsd":{"type":"string","nullable":true},"completeness":{"type":"string","enum":["COMPLETE","PARTIAL","UNKNOWN"]},"callCount":{"type":"integer","minimum":0}},"required":["currency","confirmedUsd","estimatedUsd","reservedUpperBoundUsd","unreconciledUpperBoundUsd","completeness","callCount"]},"lastActivityAt":{"type":"string"},"runningSince":{"type":"string","nullable":true},"nextExpectedEvent":{"type":"string","nullable":true},"deadline":{"type":"string","nullable":true},"blocker":{"type":"object","nullable":true,"properties":{"code":{"type":"string"},"message":{"type":"string"},"source":{"type":"string","enum":["TASK","RUN","DECISION"]}},"required":["code","message","source"]},"decisionRequired":{"type":"object","nullable":true,"properties":{"count":{"type":"integer","minimum":0,"exclusiveMinimum":true},"highestRisk":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL","UNKNOWN"]}},"required":["count","highestRisk"]},"runCount":{"type":"integer","minimum":0},"latestRunId":{"type":"string","nullable":true},"latestDeliverable":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["FILE","CODE","COMMIT","PULL_REQUEST","REPORT","URL","DATA","MESSAGE","ARTIFACT","OTHER"]},"status":{"type":"string","enum":["AVAILABLE","NEEDS_REVIEW","VERIFIED","REVOKED"]}},"required":["id","title","type","status"]},"legacy":{"type":"boolean"}},"required":["id","title","objective","status","priority","project","agent","progress","budget","cost","lastActivityAt","runningSince","nextExpectedEvent","deadline","blocker","decisionRequired","runCount","latestRunId","latestDeliverable","legacy"]}},"hasMore":{"type":"boolean"}},"required":["items","hasMore"]},"Decision":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["TOOL_APPROVAL","STRATEGIC","MAIL_DRAFT","EVALUATOR"]},"status":{"type":"string","enum":["PENDING","APPROVED","REJECTED","EXPIRED","CANCELLED"]},"mission":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"]},"agent":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string","nullable":true},"status":{"type":"string","nullable":true}},"required":["id","name","handle","status"]},"request":{"type":"string"},"context":{"type":"string","nullable":true},"risk":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL","UNKNOWN"]},"consequenceOfRefusal":{"type":"string"},"createdAt":{"type":"string"},"expiresAt":{"type":"string","nullable":true},"actions":{"type":"array","items":{"type":"string","enum":["APPROVE","REJECT","INSPECT"]}},"inspectHref":{"type":"string"},"runId":{"type":"string","nullable":true}},"required":["id","kind","status","mission","agent","request","context","risk","consequenceOfRefusal","createdAt","expiresAt","actions","inspectHref","runId"]},"DecisionList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["TOOL_APPROVAL","STRATEGIC","MAIL_DRAFT","EVALUATOR"]},"status":{"type":"string","enum":["PENDING","APPROVED","REJECTED","EXPIRED","CANCELLED"]},"mission":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"]},"agent":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string","nullable":true},"status":{"type":"string","nullable":true}},"required":["id","name","handle","status"]},"request":{"type":"string"},"context":{"type":"string","nullable":true},"risk":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL","UNKNOWN"]},"consequenceOfRefusal":{"type":"string"},"createdAt":{"type":"string"},"expiresAt":{"type":"string","nullable":true},"actions":{"type":"array","items":{"type":"string","enum":["APPROVE","REJECT","INSPECT"]}},"inspectHref":{"type":"string"},"runId":{"type":"string","nullable":true}},"required":["id","kind","status","mission","agent","request","context","risk","consequenceOfRefusal","createdAt","expiresAt","actions","inspectHref","runId"]}}},"required":["items"]},"Deliverable":{"type":"object","properties":{"id":{"type":"string"},"mission":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"]},"agent":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string","nullable":true},"status":{"type":"string","nullable":true}},"required":["id","name","handle","status"]},"runId":{"type":"string","nullable":true},"type":{"type":"string","enum":["FILE","CODE","COMMIT","PULL_REQUEST","REPORT","URL","DATA","MESSAGE","ARTIFACT","OTHER"]},"status":{"type":"string","enum":["AVAILABLE","NEEDS_REVIEW","VERIFIED","REVOKED"]},"title":{"type":"string"},"summary":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"mimeType":{"type":"string","nullable":true},"sizeBytes":{"type":"integer","nullable":true,"minimum":0},"createdAt":{"type":"string"},"provenance":{"type":"object","properties":{"source":{"type":"string","enum":["RUN_ARTIFACT","ATTACHMENT","RUN_OUTPUT"]},"sourceId":{"type":"string"},"contentSha256":{"type":"string","nullable":true}},"required":["source","sourceId","contentSha256"]},"evidence":{"type":"object","properties":{"verified":{"type":"boolean"},"certificateId":{"type":"string","nullable":true},"evidencePackId":{"type":"string","nullable":true},"hash":{"type":"string","nullable":true}},"required":["verified","certificateId","evidencePackId","hash"]},"cost":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"]},"confirmedUsd":{"type":"string"},"estimatedUsd":{"type":"string","nullable":true},"reservedUpperBoundUsd":{"type":"string"},"unreconciledUpperBoundUsd":{"type":"string","nullable":true},"completeness":{"type":"string","enum":["COMPLETE","PARTIAL","UNKNOWN"]},"callCount":{"type":"integer","minimum":0}},"required":["currency","confirmedUsd","estimatedUsd","reservedUpperBoundUsd","unreconciledUpperBoundUsd","completeness","callCount"]}},"required":["id","mission","agent","runId","type","status","title","summary","url","mimeType","sizeBytes","createdAt","provenance","evidence","cost"]},"DeliverableList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"mission":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"]},"agent":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string","nullable":true},"status":{"type":"string","nullable":true}},"required":["id","name","handle","status"]},"runId":{"type":"string","nullable":true},"type":{"type":"string","enum":["FILE","CODE","COMMIT","PULL_REQUEST","REPORT","URL","DATA","MESSAGE","ARTIFACT","OTHER"]},"status":{"type":"string","enum":["AVAILABLE","NEEDS_REVIEW","VERIFIED","REVOKED"]},"title":{"type":"string"},"summary":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"mimeType":{"type":"string","nullable":true},"sizeBytes":{"type":"integer","nullable":true,"minimum":0},"createdAt":{"type":"string"},"provenance":{"type":"object","properties":{"source":{"type":"string","enum":["RUN_ARTIFACT","ATTACHMENT","RUN_OUTPUT"]},"sourceId":{"type":"string"},"contentSha256":{"type":"string","nullable":true}},"required":["source","sourceId","contentSha256"]},"evidence":{"type":"object","properties":{"verified":{"type":"boolean"},"certificateId":{"type":"string","nullable":true},"evidencePackId":{"type":"string","nullable":true},"hash":{"type":"string","nullable":true}},"required":["verified","certificateId","evidencePackId","hash"]},"cost":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"]},"confirmedUsd":{"type":"string"},"estimatedUsd":{"type":"string","nullable":true},"reservedUpperBoundUsd":{"type":"string"},"unreconciledUpperBoundUsd":{"type":"string","nullable":true},"completeness":{"type":"string","enum":["COMPLETE","PARTIAL","UNKNOWN"]},"callCount":{"type":"integer","minimum":0}},"required":["currency","confirmedUsd","estimatedUsd","reservedUpperBoundUsd","unreconciledUpperBoundUsd","completeness","callCount"]}},"required":["id","mission","agent","runId","type","status","title","summary","url","mimeType","sizeBytes","createdAt","provenance","evidence","cost"]}}},"required":["items"]},"CommandCenter":{"type":"object","properties":{"generatedAt":{"type":"string"},"needsYourDecision":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["TOOL_APPROVAL","STRATEGIC","MAIL_DRAFT","EVALUATOR"]},"status":{"type":"string","enum":["PENDING","APPROVED","REJECTED","EXPIRED","CANCELLED"]},"mission":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"]},"agent":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string","nullable":true},"status":{"type":"string","nullable":true}},"required":["id","name","handle","status"]},"request":{"type":"string"},"context":{"type":"string","nullable":true},"risk":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL","UNKNOWN"]},"consequenceOfRefusal":{"type":"string"},"createdAt":{"type":"string"},"expiresAt":{"type":"string","nullable":true},"actions":{"type":"array","items":{"type":"string","enum":["APPROVE","REJECT","INSPECT"]}},"inspectHref":{"type":"string"},"runId":{"type":"string","nullable":true}},"required":["id","kind","status","mission","agent","request","context","risk","consequenceOfRefusal","createdAt","expiresAt","actions","inspectHref","runId"]}},"running":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"objective":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","READY","RUNNING","WAITING_FOR_DECISION","BLOCKED","REVIEW","COMPLETED","FAILED","CANCELLED"]},"priority":{"type":"string","enum":["LOW","NORMAL","HIGH","URGENT"]},"project":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"agent":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string","nullable":true},"status":{"type":"string","nullable":true}},"required":["id","name","handle","status"]},"progress":{"type":"number","nullable":true,"minimum":0,"maximum":100},"budget":{"type":"object","properties":{"limitUsd":{"type":"string","nullable":true},"source":{"type":"string","enum":["TASK","PROJECT","RUN","NONE"]},"cost":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"]},"confirmedUsd":{"type":"string"},"estimatedUsd":{"type":"string","nullable":true},"reservedUpperBoundUsd":{"type":"string"},"unreconciledUpperBoundUsd":{"type":"string","nullable":true},"completeness":{"type":"string","enum":["COMPLETE","PARTIAL","UNKNOWN"]},"callCount":{"type":"integer","minimum":0}},"required":["currency","confirmedUsd","estimatedUsd","reservedUpperBoundUsd","unreconciledUpperBoundUsd","completeness","callCount"]}},"required":["limitUsd","source","cost"]},"cost":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"]},"confirmedUsd":{"type":"string"},"estimatedUsd":{"type":"string","nullable":true},"reservedUpperBoundUsd":{"type":"string"},"unreconciledUpperBoundUsd":{"type":"string","nullable":true},"completeness":{"type":"string","enum":["COMPLETE","PARTIAL","UNKNOWN"]},"callCount":{"type":"integer","minimum":0}},"required":["currency","confirmedUsd","estimatedUsd","reservedUpperBoundUsd","unreconciledUpperBoundUsd","completeness","callCount"]},"lastActivityAt":{"type":"string"},"runningSince":{"type":"string","nullable":true},"nextExpectedEvent":{"type":"string","nullable":true},"deadline":{"type":"string","nullable":true},"blocker":{"type":"object","nullable":true,"properties":{"code":{"type":"string"},"message":{"type":"string"},"source":{"type":"string","enum":["TASK","RUN","DECISION"]}},"required":["code","message","source"]},"decisionRequired":{"type":"object","nullable":true,"properties":{"count":{"type":"integer","minimum":0,"exclusiveMinimum":true},"highestRisk":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL","UNKNOWN"]}},"required":["count","highestRisk"]},"runCount":{"type":"integer","minimum":0},"latestRunId":{"type":"string","nullable":true},"latestDeliverable":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["FILE","CODE","COMMIT","PULL_REQUEST","REPORT","URL","DATA","MESSAGE","ARTIFACT","OTHER"]},"status":{"type":"string","enum":["AVAILABLE","NEEDS_REVIEW","VERIFIED","REVOKED"]}},"required":["id","title","type","status"]},"legacy":{"type":"boolean"}},"required":["id","title","objective","status","priority","project","agent","progress","budget","cost","lastActivityAt","runningSince","nextExpectedEvent","deadline","blocker","decisionRequired","runCount","latestRunId","latestDeliverable","legacy"]}},"blocked":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"objective":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","READY","RUNNING","WAITING_FOR_DECISION","BLOCKED","REVIEW","COMPLETED","FAILED","CANCELLED"]},"priority":{"type":"string","enum":["LOW","NORMAL","HIGH","URGENT"]},"project":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"agent":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string","nullable":true},"status":{"type":"string","nullable":true}},"required":["id","name","handle","status"]},"progress":{"type":"number","nullable":true,"minimum":0,"maximum":100},"budget":{"type":"object","properties":{"limitUsd":{"type":"string","nullable":true},"source":{"type":"string","enum":["TASK","PROJECT","RUN","NONE"]},"cost":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"]},"confirmedUsd":{"type":"string"},"estimatedUsd":{"type":"string","nullable":true},"reservedUpperBoundUsd":{"type":"string"},"unreconciledUpperBoundUsd":{"type":"string","nullable":true},"completeness":{"type":"string","enum":["COMPLETE","PARTIAL","UNKNOWN"]},"callCount":{"type":"integer","minimum":0}},"required":["currency","confirmedUsd","estimatedUsd","reservedUpperBoundUsd","unreconciledUpperBoundUsd","completeness","callCount"]}},"required":["limitUsd","source","cost"]},"cost":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"]},"confirmedUsd":{"type":"string"},"estimatedUsd":{"type":"string","nullable":true},"reservedUpperBoundUsd":{"type":"string"},"unreconciledUpperBoundUsd":{"type":"string","nullable":true},"completeness":{"type":"string","enum":["COMPLETE","PARTIAL","UNKNOWN"]},"callCount":{"type":"integer","minimum":0}},"required":["currency","confirmedUsd","estimatedUsd","reservedUpperBoundUsd","unreconciledUpperBoundUsd","completeness","callCount"]},"lastActivityAt":{"type":"string"},"runningSince":{"type":"string","nullable":true},"nextExpectedEvent":{"type":"string","nullable":true},"deadline":{"type":"string","nullable":true},"blocker":{"type":"object","nullable":true,"properties":{"code":{"type":"string"},"message":{"type":"string"},"source":{"type":"string","enum":["TASK","RUN","DECISION"]}},"required":["code","message","source"]},"decisionRequired":{"type":"object","nullable":true,"properties":{"count":{"type":"integer","minimum":0,"exclusiveMinimum":true},"highestRisk":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL","UNKNOWN"]}},"required":["count","highestRisk"]},"runCount":{"type":"integer","minimum":0},"latestRunId":{"type":"string","nullable":true},"latestDeliverable":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["FILE","CODE","COMMIT","PULL_REQUEST","REPORT","URL","DATA","MESSAGE","ARTIFACT","OTHER"]},"status":{"type":"string","enum":["AVAILABLE","NEEDS_REVIEW","VERIFIED","REVOKED"]}},"required":["id","title","type","status"]},"legacy":{"type":"boolean"}},"required":["id","title","objective","status","priority","project","agent","progress","budget","cost","lastActivityAt","runningSince","nextExpectedEvent","deadline","blocker","decisionRequired","runCount","latestRunId","latestDeliverable","legacy"]}},"recentlyCompleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"objective":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","READY","RUNNING","WAITING_FOR_DECISION","BLOCKED","REVIEW","COMPLETED","FAILED","CANCELLED"]},"priority":{"type":"string","enum":["LOW","NORMAL","HIGH","URGENT"]},"project":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"agent":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string","nullable":true},"status":{"type":"string","nullable":true}},"required":["id","name","handle","status"]},"progress":{"type":"number","nullable":true,"minimum":0,"maximum":100},"budget":{"type":"object","properties":{"limitUsd":{"type":"string","nullable":true},"source":{"type":"string","enum":["TASK","PROJECT","RUN","NONE"]},"cost":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"]},"confirmedUsd":{"type":"string"},"estimatedUsd":{"type":"string","nullable":true},"reservedUpperBoundUsd":{"type":"string"},"unreconciledUpperBoundUsd":{"type":"string","nullable":true},"completeness":{"type":"string","enum":["COMPLETE","PARTIAL","UNKNOWN"]},"callCount":{"type":"integer","minimum":0}},"required":["currency","confirmedUsd","estimatedUsd","reservedUpperBoundUsd","unreconciledUpperBoundUsd","completeness","callCount"]}},"required":["limitUsd","source","cost"]},"cost":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"]},"confirmedUsd":{"type":"string"},"estimatedUsd":{"type":"string","nullable":true},"reservedUpperBoundUsd":{"type":"string"},"unreconciledUpperBoundUsd":{"type":"string","nullable":true},"completeness":{"type":"string","enum":["COMPLETE","PARTIAL","UNKNOWN"]},"callCount":{"type":"integer","minimum":0}},"required":["currency","confirmedUsd","estimatedUsd","reservedUpperBoundUsd","unreconciledUpperBoundUsd","completeness","callCount"]},"lastActivityAt":{"type":"string"},"runningSince":{"type":"string","nullable":true},"nextExpectedEvent":{"type":"string","nullable":true},"deadline":{"type":"string","nullable":true},"blocker":{"type":"object","nullable":true,"properties":{"code":{"type":"string"},"message":{"type":"string"},"source":{"type":"string","enum":["TASK","RUN","DECISION"]}},"required":["code","message","source"]},"decisionRequired":{"type":"object","nullable":true,"properties":{"count":{"type":"integer","minimum":0,"exclusiveMinimum":true},"highestRisk":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL","UNKNOWN"]}},"required":["count","highestRisk"]},"runCount":{"type":"integer","minimum":0},"latestRunId":{"type":"string","nullable":true},"latestDeliverable":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["FILE","CODE","COMMIT","PULL_REQUEST","REPORT","URL","DATA","MESSAGE","ARTIFACT","OTHER"]},"status":{"type":"string","enum":["AVAILABLE","NEEDS_REVIEW","VERIFIED","REVOKED"]}},"required":["id","title","type","status"]},"legacy":{"type":"boolean"}},"required":["id","title","objective","status","priority","project","agent","progress","budget","cost","lastActivityAt","runningSince","nextExpectedEvent","deadline","blocker","decisionRequired","runCount","latestRunId","latestDeliverable","legacy"]}},"workforce":{"type":"object","properties":{"activeAgents":{"type":"integer","minimum":0},"busyAgents":{"type":"integer","minimum":0},"availableAgents":{"type":"integer","minimum":0},"runningMissions":{"type":"integer","minimum":0},"successRate30d":{"type":"number","nullable":true,"minimum":0,"maximum":1},"successRateBasis":{"type":"string","nullable":true,"enum":["TECHNICAL_RUN_COMPLETION_30D"]}},"required":["activeAgents","busyAgents","availableAgents","runningMissions","successRate30d","successRateBasis"]}},"required":["generatedAt","needsYourDecision","running","blocked","recentlyCompleted","workforce"]},"WorkforceError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["error"]},"ExternalExecutionAuthorizationRequest":{"type":"object","properties":{"agentId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"scopes":{"type":"array","items":{"type":"string","enum":["session:write","decision:request","artifact:write","tests:write","run:complete"]},"minItems":1,"maxItems":5},"allowedTools":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._:/-]*$"},"maxItems":200},"budget":{"type":"object","properties":{"maxCostMicros":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,18})$"},"maxTokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["maxCostMicros","maxTokens"],"additionalProperties":false},"repository":{"type":"object","nullable":true,"properties":{"repository":{"type":"string","minLength":3,"maxLength":300,"pattern":"^[a-z0-9._-]+\\/[a-z0-9._-]+$"},"branch":{"type":"string","minLength":1,"maxLength":255,"pattern":"^(?!\\/|.*(?:\\.\\.|\\/\\/|@\\{|\\\\))[a-z0-9._/-]+$"},"baseCommit":{"type":"string","pattern":"^(?:[a-f0-9]{40}|[a-f0-9]{64})$"}},"default":null,"required":["repository","branch","baseCommit"],"additionalProperties":false},"provider":{"type":"string","minLength":1,"maxLength":120},"model":{"type":"string","minLength":1,"maxLength":200},"client":{"type":"string","minLength":1,"maxLength":200},"protocol":{"type":"string","enum":["arcadeops.external-execution.v1"]},"ttlSeconds":{"type":"integer","minimum":300,"maximum":14400}},"required":["scopes","allowedTools","budget","provider","model","client","protocol","ttlSeconds"],"additionalProperties":false},"ExternalExecutionAuthorizationResponse":{"type":"object","properties":{"externalExecutionId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"runId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"grantToken":{"type":"string","minLength":1,"maxLength":16384},"tokenType":{"type":"string","enum":["Bearer"]},"expiresAt":{"type":"string","format":"date-time"},"eventEndpoint":{"type":"string","maxLength":2000,"format":"uri"},"attestation":{"type":"object","properties":{"provider":{"type":"string","enum":["github-actions"]},"audience":{"type":"string","minLength":1,"maxLength":250},"endpoint":{"type":"string","maxLength":2000,"format":"uri"},"workflowRef":{"type":"string","minLength":1,"maxLength":500},"challenge":{"type":"string","format":"uuid"}},"required":["provider","audience","endpoint","workflowRef","challenge"],"additionalProperties":false},"providerReceipt":{"type":"object","properties":{"schema":{"type":"string","enum":["arcadeops.provider-usage-receipt.v1"]},"audience":{"type":"string","enum":["arcadeops:provider-usage-receipt"]},"clientReferenceDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["schema","audience","clientReferenceDigest"],"additionalProperties":false},"protocol":{"type":"string","enum":["arcadeops.external-execution.v1"]},"scopes":{"type":"array","items":{"type":"string","enum":["session:write","decision:request","artifact:write","tests:write","run:complete"]},"minItems":1}},"required":["externalExecutionId","runId","grantToken","tokenType","expiresAt","eventEndpoint","attestation","providerReceipt","protocol","scopes"],"additionalProperties":false},"ExternalExecutionEvent":{"oneOf":[{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["arcadeops.external-execution.v1"]},"eventId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"externalExecutionId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"sequence":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"occurredAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["session.started"]},"payload":{"type":"object","properties":{"providerSessionId":{"type":"string","nullable":true,"minLength":1,"maxLength":500},"summary":{"type":"string","minLength":1,"maxLength":2000}},"required":["summary"],"additionalProperties":false}},"required":["schemaVersion","eventId","externalExecutionId","sequence","occurredAt","type","payload"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["arcadeops.external-execution.v1"]},"eventId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"externalExecutionId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"sequence":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"occurredAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["session.heartbeat"]},"payload":{"type":"object","properties":{"summary":{"type":"string","minLength":1,"maxLength":2000},"progressPercent":{"type":"number","minimum":0,"maximum":100},"usage":{"type":"object","properties":{"status":{"type":"string","enum":["UNKNOWN"]},"inputTokens":{"type":"integer","nullable":true,"minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"maximum":9007199254740991},"costMicros":{"type":"string","nullable":true,"pattern":"^(?:0|[1-9][0-9]{0,18})$"},"source":{"type":"string","minLength":1,"maxLength":500}},"required":["status","inputTokens","outputTokens","costMicros","source"],"additionalProperties":false}},"required":["summary"],"additionalProperties":false}},"required":["schemaVersion","eventId","externalExecutionId","sequence","occurredAt","type","payload"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["arcadeops.external-execution.v1"]},"eventId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"externalExecutionId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"sequence":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"occurredAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["decision.requested"]},"payload":{"type":"object","properties":{"request":{"type":"string","minLength":1,"maxLength":2000},"context":{"type":"string","minLength":1,"maxLength":10000},"risk":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"consequenceOfRefusal":{"type":"string","minLength":1,"maxLength":2000},"toolName":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._:/-]*$"},"arguments":{"type":"object","additionalProperties":{"nullable":true}},"expiresAt":{"type":"string","format":"date-time"}},"required":["request","context","risk","consequenceOfRefusal","toolName","arguments","expiresAt"],"additionalProperties":false}},"required":["schemaVersion","eventId","externalExecutionId","sequence","occurredAt","type","payload"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["arcadeops.external-execution.v1"]},"eventId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"externalExecutionId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"sequence":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"occurredAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["artifact.produced"]},"payload":{"type":"object","properties":{"artifactType":{"type":"string","enum":["FILE","CODE","COMMIT","PULL_REQUEST","REPORT","URL","DATA","MESSAGE","ARTIFACT","OTHER"]},"name":{"type":"string","minLength":1,"maxLength":255},"mimeType":{"type":"string","nullable":true,"minLength":1,"maxLength":150},"sizeBytes":{"type":"integer","nullable":true,"minimum":0,"maximum":100000000},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"pointer":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["REPOSITORY_PATH"]},"value":{"type":"string","minLength":1,"maxLength":1000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["COMMIT"]},"value":{"type":"string","pattern":"^(?:[a-f0-9]{40}|[a-f0-9]{64})$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["STORAGE_KEY"]},"provider":{"type":"string","minLength":1,"maxLength":120},"value":{"type":"string","minLength":1,"maxLength":2000}},"required":["kind","provider","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["HTTPS_URL"]},"value":{"type":"string","maxLength":2000,"format":"uri"}},"required":["kind","value"],"additionalProperties":false}]},"summary":{"type":"string","minLength":1,"maxLength":2000}},"required":["artifactType","name","mimeType","sizeBytes","sha256","pointer","summary"],"additionalProperties":false}},"required":["schemaVersion","eventId","externalExecutionId","sequence","occurredAt","type","payload"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["arcadeops.external-execution.v1"]},"eventId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"externalExecutionId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"sequence":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"occurredAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["tests.completed"]},"payload":{"type":"object","properties":{"command":{"type":"string","minLength":1,"maxLength":2000},"status":{"type":"string","enum":["PASSED","FAILED"]},"exitCode":{"type":"integer","minimum":0,"maximum":255},"summary":{"type":"string","minLength":1,"maxLength":5000},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","nullable":true,"minimum":0,"maximum":1000000},"passed":{"type":"integer","nullable":true,"minimum":0,"maximum":1000000},"failed":{"type":"integer","nullable":true,"minimum":0,"maximum":1000000},"skipped":{"type":"integer","nullable":true,"minimum":0,"maximum":1000000},"evidence":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"pointer":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["REPOSITORY_PATH"]},"value":{"type":"string","minLength":1,"maxLength":1000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["COMMIT"]},"value":{"type":"string","pattern":"^(?:[a-f0-9]{40}|[a-f0-9]{64})$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["STORAGE_KEY"]},"provider":{"type":"string","minLength":1,"maxLength":120},"value":{"type":"string","minLength":1,"maxLength":2000}},"required":["kind","provider","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["HTTPS_URL"]},"value":{"type":"string","maxLength":2000,"format":"uri"}},"required":["kind","value"],"additionalProperties":false}]}},"required":["name","sha256","pointer"],"additionalProperties":false},"minItems":1,"maxItems":100}},"required":["command","status","exitCode","summary","durationMs","total","passed","failed","skipped","evidence"],"additionalProperties":false}},"required":["schemaVersion","eventId","externalExecutionId","sequence","occurredAt","type","payload"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["arcadeops.external-execution.v1"]},"eventId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"externalExecutionId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"sequence":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"occurredAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["run.completed"]},"payload":{"type":"object","properties":{"summary":{"type":"string","minLength":1,"maxLength":5000},"result":{"type":"string","minLength":1,"maxLength":20000},"deliverableEventIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"maxItems":200},"evidenceEventIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"maxItems":500},"usage":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["UNKNOWN"]},"inputTokens":{"type":"integer","nullable":true,"minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"maximum":9007199254740991},"costMicros":{"type":"string","nullable":true,"pattern":"^(?:0|[1-9][0-9]{0,18})$"},"source":{"type":"string","minLength":1,"maxLength":500}},"required":["status","inputTokens","outputTokens","costMicros","source"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["PROVIDER_RECEIPT"]},"receipt":{"type":"string","minLength":1,"maxLength":65536},"source":{"type":"string","minLength":1,"maxLength":500}},"required":["status","receipt","source"],"additionalProperties":false}]}},"required":["summary","result","deliverableEventIds","evidenceEventIds","usage"],"additionalProperties":false}},"required":["schemaVersion","eventId","externalExecutionId","sequence","occurredAt","type","payload"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["arcadeops.external-execution.v1"]},"eventId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"externalExecutionId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"sequence":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"occurredAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["run.failed"]},"payload":{"type":"object","properties":{"errorCode":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Z0-9_:-]+$"},"message":{"type":"string","minLength":1,"maxLength":10000},"retryable":{"type":"boolean"},"usage":{"type":"object","properties":{"status":{"type":"string","enum":["UNKNOWN"]},"inputTokens":{"type":"integer","nullable":true,"minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"maximum":9007199254740991},"costMicros":{"type":"string","nullable":true,"pattern":"^(?:0|[1-9][0-9]{0,18})$"},"source":{"type":"string","minLength":1,"maxLength":500}},"required":["status","inputTokens","outputTokens","costMicros","source"],"additionalProperties":false}},"required":["errorCode","message","retryable","usage"],"additionalProperties":false}},"required":["schemaVersion","eventId","externalExecutionId","sequence","occurredAt","type","payload"],"additionalProperties":false}]},"ExternalExecutionEventIngestResponse":{"type":"object","properties":{"eventId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"externalExecutionId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"replayed":{"type":"boolean"},"runStatus":{"type":"string","enum":["PENDING","RUNNING","AWAITING_APPROVAL","COMPLETED","FAILED","CANCELLED"]},"approval":{"type":"object","nullable":true,"properties":{"id":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"status":{"type":"string","enum":["PENDING","APPROVED","REJECTED","EXPIRED","CANCELLED"]}},"required":["id","status"],"additionalProperties":false},"resumed":{"type":"boolean","nullable":true},"releaseDecision":{"type":"string","nullable":true,"enum":["READY","BLOCKED","NEEDS_REVIEW","REJECTED"]},"evidencePackId":{"type":"string","nullable":true,"minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"certificateId":{"type":"string","nullable":true,"minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"}},"required":["eventId","externalExecutionId","replayed","runStatus","approval"],"additionalProperties":false},"GithubActionsAttestationRequest":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["arcadeops.github-actions-attestation.v1"]},"challenge":{"type":"string","format":"uuid"},"externalExecutionId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"runId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"taskId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"projectId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"githubRunId":{"type":"string","pattern":"^\\d+$"},"githubRunAttempt":{"type":"string","pattern":"^\\d+$"},"verifyResult":{"type":"string","enum":["success"]},"baseCommit":{"type":"string","pattern":"^(?:[a-f0-9]{40}|[a-f0-9]{64})$"},"commitSha":{"type":"string","pattern":"^(?:[a-f0-9]{40}|[a-f0-9]{64})$"},"evidenceArtifactId":{"type":"string","pattern":"^\\d+$"},"evidenceArtifactSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"changedPaths":{"type":"array","items":{"type":"string","minLength":1,"maxLength":500},"maxItems":300},"evidence":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z0-9._:-]+$"},"status":{"type":"string","enum":["PASS","FAIL"]},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"summary":{"type":"string","minLength":1,"maxLength":2000}},"required":["key","status","sha256","summary"],"additionalProperties":false},"maxItems":100},"artifacts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["name","sha256"],"additionalProperties":false},"maxItems":200},"completedAt":{"type":"string","format":"date-time"}},"required":["schemaVersion","challenge","externalExecutionId","runId","taskId","projectId","githubRunId","githubRunAttempt","verifyResult","baseCommit","commitSha","evidenceArtifactId","evidenceArtifactSha256","changedPaths","evidence","artifacts","completedAt"],"additionalProperties":false},"GithubActionsAttestationResponse":{"type":"object","properties":{"externalExecutionId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"runId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"replayed":{"type":"boolean"},"releaseDecision":{"type":"string","enum":["READY","BLOCKED","NEEDS_REVIEW","REJECTED"]},"evidencePackId":{"type":"string","minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"certificateId":{"type":"string","nullable":true,"minLength":1,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]*$"},"missingEvidence":{"type":"array","items":{"type":"string"}},"attestationStatus":{"type":"string","enum":["VERIFIED"]}},"required":["externalExecutionId","runId","replayed","releaseDecision","evidencePackId","certificateId","missingEvidence","attestationStatus"],"additionalProperties":false},"OpenAIProject":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"externalId":{"type":"string","nullable":true},"isDefault":{"type":"boolean"}},"required":["id","orgId","name","provider","isDefault"]},"OpenAIProjectsList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"externalId":{"type":"string","nullable":true},"isDefault":{"type":"boolean"}},"required":["id","orgId","name","provider","isDefault"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"OpenAIFile":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"fileId":{"type":"string"},"filename":{"type":"string"},"purpose":{"type":"string"},"status":{"type":"string","nullable":true}},"required":["id","orgId","fileId","filename","purpose"]},"OpenAIFilesList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"fileId":{"type":"string"},"filename":{"type":"string"},"purpose":{"type":"string"},"status":{"type":"string","nullable":true}},"required":["id","orgId","fileId","filename","purpose"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"OpenAIBatch":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"batchId":{"type":"string"},"endpoint":{"type":"string"},"status":{"type":"string"},"startedAt":{"type":"string","nullable":true},"finishedAt":{"type":"string","nullable":true}},"required":["id","orgId","batchId","endpoint","status"]},"OpenAIBatchesList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"batchId":{"type":"string"},"endpoint":{"type":"string"},"status":{"type":"string"},"startedAt":{"type":"string","nullable":true},"finishedAt":{"type":"string","nullable":true}},"required":["id","orgId","batchId","endpoint","status"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"CreatePlanBody":{"type":"object","properties":{"orgId":{"type":"string"},"objective":{"type":"string","minLength":1},"constraints":{"type":"string","nullable":true}},"required":["objective"]},"CreatePlanResponse":{"type":"object","properties":{"runId":{"type":"string"},"projectId":{"type":"string"},"rootTaskId":{"type":"string"},"taskIds":{"type":"array","items":{"type":"string"}}},"required":["runId","projectId","rootTaskId","taskIds"]},"RunStartResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]},"RunStatusResponse":{"type":"object","properties":{"runId":{"type":"string"},"status":{"anyOf":[{"type":"string","enum":["PENDING","RUNNING","DONE","ERROR"]},{"type":"string"}]},"progress":{"type":"number","minimum":0,"maximum":1},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"anyOf":[{"type":"string","enum":["OPEN","IN_PROGRESS","REVIEW","BLOCKED","DONE","CANCELLED"]},{"type":"string"}]}},"required":["id","title","status"]}}},"required":["runId","status","progress","tasks"]}},"parameters":{}},"paths":{"/api/v1/health":{"get":{"summary":"Health check","tags":["System"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"results":{"type":"object","additionalProperties":{"nullable":true}}},"required":["ok","results"]}}}}},"operationId":"getApiV1Health","description":"Health check."}},"/api/v1/sandbox":{"get":{"summary":"Découvrir la sandbox publique ArcadeOps","description":"Retourne un exemple synthétique en lecture seule, sans authentification et sans accès aux données client.","tags":["System"],"responses":{"200":{"description":"Contrat et exemple de la sandbox publique","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"id":{"type":"string","enum":["arcadeops-public-sandbox"]},"name":{"type":"string","enum":["ArcadeOps Public Sandbox"]},"mode":{"type":"string","enum":["read-only"]},"dataPolicy":{"type":"string","enum":["synthetic-only"]},"authentication":{"type":"object","properties":{"required":{"type":"boolean","enum":[false]},"method":{"type":"string","enum":["none"]}},"required":["required","method"],"additionalProperties":false},"capabilities":{"type":"array","items":{"type":"string","enum":["discover","inspect-sample-mission","verify-contracts"]}},"limits":{"type":"object","properties":{"requestsPerMinute":{"type":"number","enum":[60]},"writes":{"type":"boolean","enum":[false]}},"required":["requestsPerMinute","writes"],"additionalProperties":false},"sampleMission":{"type":"object","properties":{"id":{"type":"string","enum":["sandbox-mission-001"]},"title":{"type":"string","enum":["Qualifier un écart d’évaluation agentique"]},"status":{"type":"string","enum":["READY_FOR_REVIEW"]},"evidenceCount":{"type":"number","enum":[3]},"approvalRequired":{"type":"boolean","enum":[true]}},"required":["id","title","status","evidenceCount","approvalRequired"],"additionalProperties":false},"links":{"type":"object","properties":{"documentation":{"type":"string","format":"uri"},"health":{"type":"string","format":"uri"},"mcp":{"type":"string","format":"uri"},"openapi":{"type":"string","format":"uri"}},"required":["documentation","health","mcp","openapi"],"additionalProperties":false}},"required":["ok","id","name","mode","dataPolicy","authentication","capabilities","limits","sampleMission","links"],"additionalProperties":false}}}},"400":{"description":"Les paramètres de requête ne sont pas acceptés"},"429":{"description":"Limite de 60 requêtes par minute atteinte"}},"operationId":"getApiV1Sandbox"}},"/api/v1/marketing-events":{"post":{"summary":"Enregistrer une étape agrégée du tunnel marketing public","description":"Accepte uniquement des catégories fermées, sans identifiant visiteur, URL, referrer ni contenu libre.","tags":["Marketing"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"event":{"type":"string","enum":["page_viewed","demo_clicked","pilot_clicked","contact_clicked","form_opened","form_submitted","form_failed","language_switched"]},"locale":{"type":"string","enum":["fr","en"]},"page":{"type":"string","enum":["home","pricing","support","privacy","terms","legal_notice","other"]},"placement":{"type":"string","enum":["page","header","hero","evidence","pilot_section","closing","mobile_bar","footer","pricing_hero","pricing_closing","pricing_form","language_selector"]}},"required":["event","locale","page","placement"],"additionalProperties":false}}}},"responses":{"200":{"description":"Événement agrégé","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"Payload invalide"},"429":{"description":"Limite de requêtes atteinte"}},"operationId":"postApiV1MarketingEvents"}},"/api/v1/marketing-leads":{"post":{"summary":"Envoyer une demande publique de cadrage pilote","description":"Valide et persiste la demande dans le CRM cible avant toute notification n8n. Le champ leurre `website` n’est pas une donnée métier.","tags":["Marketing"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email"},"useCase":{"type":"string","minLength":20,"maxLength":500},"teamSize":{"type":"string","enum":["1-10","11-50","51-200","201+"]},"tools":{"type":"string","minLength":2,"maxLength":300},"timeline":{"type":"string","enum":["this_month","this_quarter","exploring"]},"locale":{"type":"string","enum":["fr","en"]},"consent":{"type":"boolean","enum":[true]},"website":{"type":"string","maxLength":200,"default":""}},"required":["email","useCase","teamSize","tools","timeline","locale","consent"],"additionalProperties":false}}}},"responses":{"201":{"description":"Demande enregistrée","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"Payload invalide ou consentement absent"},"429":{"description":"Limite de requêtes atteinte"},"503":{"description":"CRM de destination indisponible"}},"operationId":"postApiV1MarketingLeads"}},"/api/v1/runs/attest/external-execution":{"post":{"summary":"Attester indépendamment un run Codex avec GitHub Actions OIDC","description":"Vérifie le jeton OIDC, le runner hébergé, le workflow épinglé, le dépôt, la branche, le commit et le challenge du run avant de chaîner un nouveau Evidence Pack.","tags":["AI Workforce","Runs externes"],"security":[{"GithubActionsOidc":[]}],"parameters":[{"schema":{"type":"string","minLength":8,"maxLength":191,"pattern":"^[a-z0-9._:-]{8,191}$"},"required":true,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubActionsAttestationRequest"}}}},"responses":{"200":{"description":"Attestation vérifiée et Evidence Pack chaîné","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubActionsAttestationResponse"}}}},"400":{"description":"Attestation ou Idempotency-Key invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"401":{"description":"Jeton OIDC ou challenge absent, invalide ou expiré","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"403":{"description":"Autorisation du run révoquée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"409":{"description":"Run non attestable, challenge consommé ou état en conflit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"413":{"description":"Corps supérieur à 256 Ko","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"415":{"description":"Content-Type application/json requis","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}}},"operationId":"postApiV1RunsAttestExternalExecution"}},"/api/v1/health/worker":{"get":{"summary":"Santé des workers BullMQ (heartbeats Redis)","tags":["System"],"responses":{"200":{"description":"État workers","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"ts":{"type":"string"},"redisConfigured":{"type":"boolean"},"activeCount":{"type":"number"},"staleCount":{"type":"number"},"workers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"host":{"type":"string"},"pid":{"type":"number"},"startedAt":{"type":"number"},"lastBeatAt":{"type":"number"},"ageMs":{"type":"number"},"version":{"type":"string"},"queues":{"type":"array","items":{"type":"string"}}},"required":["id","host","pid","startedAt","lastBeatAt","ageMs","version","queues"]}},"error":{"type":"string"}},"required":["ok","ts","redisConfigured","activeCount","staleCount","workers"]}}}}},"operationId":"getApiV1HealthWorker","description":"Santé des workers BullMQ (heartbeats Redis)."}},"/api/health":{"get":{"summary":"Health check (déprécié — utiliser /api/v1/health)","tags":["System"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"results":{"type":"object","additionalProperties":{"nullable":true}}},"required":["ok","results"]}}}}},"operationId":"getApiHealth","description":"Health check (déprécié — utiliser /api/v1/health)."}},"/api/docs":{"get":{"summary":"Spécification OpenAPI 3 (JSON)","tags":["System"],"responses":{"200":{"description":"Document OpenAPI","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}},"429":{"description":"Rate limited"}},"operationId":"getApiDocs","description":"Spécification OpenAPI 3 (JSON)."}},"/api/openai-apps-challenge":{"get":{"summary":"Lire le jeton de vérification OpenAI Apps","tags":["OpenAI Apps"],"responses":{"200":{"description":"Jeton de vérification configuré","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Jeton de vérification non configuré","content":{"text/plain":{"schema":{"type":"string"}}}}},"operationId":"getApiOpenaiAppsChallenge","description":"Lire le jeton de vérification OpenAI Apps."}},"/api/v1/metrics":{"get":{"summary":"Métriques Prometheus (text/plain)","tags":["Metrics"],"responses":{"200":{"description":"Exposition Prometheus","content":{"text/plain":{"schema":{"type":"string"}}}}},"operationId":"getApiV1Metrics","description":"Métriques Prometheus (text/plain)."}},"/api/v1/notifications":{"get":{"summary":"Liste des notifications","tags":["Notifications"],"parameters":[{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["1"]},"required":false,"name":"unread","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"data":{"nullable":true},"readAt":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","channel","title","body","readAt","createdAt"]}},"unreadCount":{"type":"number"}},"required":["items","unreadCount"]}}}}},"operationId":"getApiV1Notifications","description":"Liste des notifications."},"patch":{"summary":"Marquer des notifications comme lues","tags":["Notifications"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}},"markAllRead":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"number"}},"required":["updated"]}}}}},"operationId":"patchApiV1Notifications","description":"Marquer des notifications comme lues."}},"/api/v1/cap":{"get":{"summary":"Lire les préférences du cockpit CAP","tags":["CAP"],"responses":{"200":{"description":"Préférences CAP de l’utilisateur dans l’organisation courante","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapPreferencesResponse"}}}},"401":{"description":"Non authentifié"},"403":{"description":"Accès à l’organisation refusé"},"429":{"description":"Limite de requêtes atteinte"}},"operationId":"getApiV1Cap","description":"Lire les préférences du cockpit CAP."},"patch":{"summary":"Enregistrer les préférences du cockpit CAP","tags":["CAP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapPreferencesPatchBody"}}}},"responses":{"200":{"description":"Préférences CAP enregistrées","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapPreferencesResponse"}}}},"400":{"description":"État CAP invalide"},"401":{"description":"Non authentifié"},"403":{"description":"Accès à l’organisation refusé"},"409":{"description":"Modification concurrente"},"429":{"description":"Limite de requêtes atteinte"}},"operationId":"patchApiV1Cap","description":"Enregistrer les préférences du cockpit CAP."}},"/api/v1/projects/evaluator-portfolio":{"get":{"summary":"Comparer l'Agentic Readiness des Projects","description":"Projette le dernier score Is Agentic, les essentiels, la tendance, les bloquants et les Missions correctives du tenant courant, sans calculer de score de santé global.","tags":["Projects","Evaluators"],"responses":{"200":{"description":"Portfolio d'évaluation tenanté","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"projectKey":{"type":"string"},"projectName":{"type":"string"},"evaluationTaskId":{"type":"string","nullable":true},"surfaceUrl":{"type":"string","nullable":true},"repositoryUrl":{"type":"string","nullable":true},"evaluatorId":{"type":"string","nullable":true},"evaluatorVersion":{"type":"string","nullable":true},"threshold":{"type":"integer","nullable":true,"minimum":0,"maximum":100},"status":{"type":"string","enum":["EVALUATION_NOT_CONFIGURED","IDLE","PENDING","RUNNING","PASS","FAIL","ERROR","INCONCLUSIVE"]},"score":{"type":"integer","nullable":true,"minimum":0,"maximum":100},"essentialPass":{"type":"boolean","nullable":true},"verdict":{"type":"string","nullable":true,"enum":["PASS","FAIL","INCONCLUSIVE"]},"previousScore":{"type":"integer","nullable":true,"minimum":0,"maximum":100},"delta":{"type":"integer","nullable":true},"trend":{"type":"array","items":{"type":"integer","minimum":0,"maximum":100},"maxItems":3},"blockingProblems":{"type":"integer","minimum":0},"topFindings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tier":{"type":"string","enum":["essential","recommended","bonus"]},"result":{"type":"string","enum":["failed","partial"]},"details":{"type":"string","nullable":true},"recommendation":{"type":"string","nullable":true}},"required":["id","name","tier","result","details","recommendation"]},"maxItems":3},"correctiveMissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"priority":{"type":"string"},"status":{"type":"string"}},"required":["id","title","priority","status"]}},"lastEvaluationId":{"type":"string","nullable":true},"lastResultId":{"type":"string","nullable":true},"lastEvaluatedAt":{"type":"string","nullable":true},"technicalErrorCode":{"type":"string","nullable":true}},"required":["projectId","projectKey","projectName","evaluationTaskId","surfaceUrl","repositoryUrl","evaluatorId","evaluatorVersion","threshold","status","score","essentialPass","verdict","previousScore","delta","trend","blockingProblems","topFindings","correctiveMissions","lastEvaluationId","lastResultId","lastEvaluatedAt","technicalErrorCode"]}},"generatedAt":{"type":"string"}},"required":["items","generatedAt"]}}}},"401":{"description":"Authentification requise","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"403":{"description":"Droits TASK_READ insuffisants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}}},"operationId":"getApiV1ProjectsEvaluatorPortfolio"}},"/api/v1/projects/{id}/evaluations":{"get":{"summary":"Consulter l'Agentic Readiness d'un Project","description":"Retourne la surface canonique, la politique, le dernier résultat, la tendance, les Evidence projetées et les Missions correctives liées.","tags":["Projects","Evaluators"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Détail d'évaluation du Project","content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string"},"projectKey":{"type":"string"},"projectName":{"type":"string"},"evaluationTaskId":{"type":"string","nullable":true},"surfaceUrl":{"type":"string","nullable":true},"repositoryUrl":{"type":"string","nullable":true},"evaluatorId":{"type":"string","nullable":true},"evaluatorVersion":{"type":"string","nullable":true},"threshold":{"type":"integer","nullable":true,"minimum":0,"maximum":100},"status":{"type":"string","enum":["EVALUATION_NOT_CONFIGURED","IDLE","PENDING","RUNNING","PASS","FAIL","ERROR","INCONCLUSIVE"]},"score":{"type":"integer","nullable":true,"minimum":0,"maximum":100},"essentialPass":{"type":"boolean","nullable":true},"verdict":{"type":"string","nullable":true,"enum":["PASS","FAIL","INCONCLUSIVE"]},"previousScore":{"type":"integer","nullable":true,"minimum":0,"maximum":100},"delta":{"type":"integer","nullable":true},"trend":{"type":"array","items":{"type":"integer","minimum":0,"maximum":100},"maxItems":3},"blockingProblems":{"type":"integer","minimum":0},"topFindings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tier":{"type":"string","enum":["essential","recommended","bonus"]},"result":{"type":"string","enum":["failed","partial"]},"details":{"type":"string","nullable":true},"recommendation":{"type":"string","nullable":true}},"required":["id","name","tier","result","details","recommendation"]},"maxItems":3},"correctiveMissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"priority":{"type":"string"},"status":{"type":"string"}},"required":["id","title","priority","status"]}},"lastEvaluationId":{"type":"string","nullable":true},"lastResultId":{"type":"string","nullable":true},"lastEvaluatedAt":{"type":"string","nullable":true},"technicalErrorCode":{"type":"string","nullable":true}},"required":["projectId","projectKey","projectName","evaluationTaskId","surfaceUrl","repositoryUrl","evaluatorId","evaluatorVersion","threshold","status","score","essentialPass","verdict","previousScore","delta","trend","blockingProblems","topFindings","correctiveMissions","lastEvaluationId","lastResultId","lastEvaluatedAt","technicalErrorCode"]}}}},"401":{"description":"Authentification requise","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"403":{"description":"Droits TASK_READ insuffisants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"404":{"description":"Project absent ou inaccessible dans ce tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}}},"operationId":"getApiV1ProjectsByIdEvaluations"}},"/api/v1/projects/{id}/evaluations/trigger":{"post":{"summary":"Déclencher l'Evaluator configuré d'un Project","description":"Crée un AgentRun d'ancrage local terminé, puis une EvaluationRun idempotente. Aucun rework automatique cross-repo n'est lancé.","tags":["Projects","Evaluators"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"201":{"description":"Évaluation créée ou retrouvée","content":{"application/json":{"schema":{"type":"object","properties":{"evaluationRunId":{"type":"string"},"created":{"type":"boolean"}},"required":["evaluationRunId","created"]}}}},"401":{"description":"Authentification requise","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"403":{"description":"Droits DELIVERY_VERIFY insuffisants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"404":{"description":"Project absent ou inaccessible dans ce tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"409":{"description":"Surface ou agent propriétaire non configuré","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}}},"operationId":"postApiV1ProjectsByIdEvaluationsTrigger"}},"/api/me":{"get":{"summary":"Utilisateur courant (déprécié — utiliser /api/v1/me)","tags":["Auth"],"responses":{"200":{"description":"Current user and linked DB user","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","nullable":true}},"required":["id","email"]},"dbUser":{"nullable":true},"memberships":{"type":"array","items":{"type":"object","properties":{"orgId":{"type":"string"},"role":{"type":"string"},"orgName":{"type":"string","nullable":true}},"required":["orgId","role","orgName"]}},"currentOrgId":{"type":"string","nullable":true}},"required":["ok","user","memberships","currentOrgId"]}}}}},"operationId":"getApiMe","description":"Utilisateur courant (déprécié — utiliser /api/v1/me)."},"post":{"summary":"Mise à jour du nom (déprécié — utiliser /api/v1/me)","tags":["Auth"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120}},"required":["name"]}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"updated":{"type":"boolean"}},"required":["ok","updated"]}}}}},"operationId":"postApiMe","description":"Mise à jour du nom (déprécié — utiliser /api/v1/me)."}},"/api/v1/me":{"get":{"summary":"Current user","tags":["Auth"],"responses":{"200":{"description":"Current user and linked DB user","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","nullable":true}},"required":["id","email"]},"dbUser":{"nullable":true},"memberships":{"type":"array","items":{"type":"object","properties":{"orgId":{"type":"string"},"role":{"type":"string"},"orgName":{"type":"string","nullable":true}},"required":["orgId","role","orgName"]}},"currentOrgId":{"type":"string","nullable":true}},"required":["ok","user","memberships","currentOrgId"]}}}}},"operationId":"getApiV1Me","description":"Current user."},"post":{"summary":"Update current DB user name","tags":["Auth"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120}},"required":["name"]}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"updated":{"type":"boolean"}},"required":["ok","updated"]}}}}},"operationId":"postApiV1Me","description":"Update current DB user name."}},"/api/v1/agents":{"get":{"summary":"List agents","tags":["Agents"],"parameters":[{"schema":{"type":"number"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","enum":["ENABLED","DISABLED","EPHEMERAL"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["CEO","MANAGER","SPECIALIST","META","SERVICE"]},"required":false,"name":"type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"handle":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"avatarSeed":{"type":"string","nullable":true},"rank":{"type":"string"},"xp":{"type":"number"},"mood":{"type":"string"},"isRunning":{"type":"boolean"},"deskConfig":{"nullable":true},"defaultModel":{"type":"string","nullable":true},"missionSummary":{"type":"string"},"keyTools":{"type":"array","items":{"type":"string"}},"toolNames":{"type":"array","items":{"type":"string"}},"lastActivityAt":{"type":"string","nullable":true}},"required":["id","orgId","handle","name","type","status"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1Agents","description":"List agents."},"post":{"summary":"Create agent","tags":["Agents"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orgId":{"type":"string"},"handle":{"type":"string","minLength":3,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":120},"type":{"type":"string","enum":["CEO","MANAGER","SPECIALIST","META","SERVICE"],"default":"SPECIALIST"},"systemPrompt":{"type":"string"},"defaultModel":{"type":"string","nullable":true},"permissions":{"type":"array","items":{"type":"string"}},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"config":{"nullable":true}},"required":["name"]}}},"required":["handle","name"]}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"400":{"description":"Validation/OrgId error"}},"operationId":"postApiV1Agents","description":"Create agent."}},"/api/v1/projects":{"get":{"summary":"List projects","tags":["Projects"],"parameters":[{"schema":{"type":"number"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"q","in":"query"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"description":{"type":"string","nullable":true},"taskCount":{"type":"number"},"tasksDone":{"type":"number"},"progress":{"type":"number","minimum":0,"maximum":1},"wallet":{"type":"object","nullable":true,"properties":{"budgetUSD":{"type":"number","default":0},"spendUSD":{"type":"number","default":0}}},"paused":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","orgId","key","name","status","taskCount","tasksDone","progress","createdAt","updatedAt"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1Projects","description":"List projects."},"post":{"summary":"Create project","tags":["Projects"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orgId":{"type":"string"},"key":{"type":"string","minLength":2,"maxLength":10},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500}},"required":["key","name"]}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}},"operationId":"postApiV1Projects","description":"Create project."}},"/api/v1/tasks":{"get":{"summary":"List tasks","tags":["Tasks"],"parameters":[{"schema":{"type":"number"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"projectId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"priority","in":"query"},{"schema":{"type":"string"},"required":false,"name":"q","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"projectId":{"type":"string","nullable":true},"title":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string"},"deadline":{"type":"string","nullable":true},"createdAt":{"type":"string"},"assignee":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"handle":{"type":"string","nullable":true}},"required":["id"]}},"required":["id","orgId","projectId","title","status","priority"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1Tasks","description":"List tasks."},"post":{"summary":"Create task","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?$"},"orgId":{"type":"string"},"projectId":{"type":"string","nullable":true,"minLength":1},"ownerId":{"type":"string","nullable":true,"minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"objective":{"type":"string","nullable":true},"expectedOutcome":{"type":"string","nullable":true,"maxLength":10000},"context":{"type":"string","nullable":true,"maxLength":20000},"sources":{"type":"string","nullable":true,"maxLength":20000},"constraints":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":50},"acceptanceCriteria":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":50},"requiredEvidence":{"type":"array","items":{"type":"string","minLength":1,"maxLength":500},"maxItems":50},"deadline":{"type":"string","nullable":true,"format":"date-time"},"budgetMicros":{"type":"string","nullable":true,"maxLength":16,"pattern":"^\\d+$"},"provenance":{"type":"string","enum":["COMMAND_CENTER"]},"priority":{"type":"string","enum":["LOW","NORMAL","HIGH","URGENT"],"default":"NORMAL"}},"required":["title"]}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}},"operationId":"postApiV1Tasks","description":"Create task."}},"/api/v1/ai-workforce/command-center":{"get":{"summary":"Afficher le Command Center de l'équipe d'agents IA","description":"Agrège les décisions en attente, les missions actives ou bloquées, les derniers résultats et la disponibilité de la workforce pour l'organisation courante.","tags":["AI Workforce"],"responses":{"200":{"description":"État opérationnel de la workforce","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandCenter"}}}},"401":{"description":"Authentification requise","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"403":{"description":"Droits TASK_READ insuffisants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}}},"operationId":"getApiV1AiWorkforceCommandCenter"}},"/api/v1/missions":{"get":{"summary":"Lister les missions de l'organisation","description":"Retourne des vues Mission tenantées, dérivées des Tasks et AgentRuns existants, avec leur statut UX, agent, coût, blocage et éventuelle décision requise.","tags":["AI Workforce"],"parameters":[{"schema":{"type":"string","enum":["DRAFT","READY","RUNNING","WAITING_FOR_DECISION","BLOCKED","REVIEW","COMPLETED","FAILED","CANCELLED"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"projectId","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Liste filtrée et bornée des missions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MissionList"}}}},"400":{"description":"Filtres de missions invalides","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"401":{"description":"Authentification requise","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"403":{"description":"Droits TASK_READ insuffisants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}}},"operationId":"getApiV1Missions"}},"/api/v1/missions/{id}":{"get":{"summary":"Consulter le dossier d'une mission","description":"Retourne l'objectif, les critères de réussite, l'activité synthétique, les décisions, runs, livrables, preuves, dépendances et coûts d'une Mission accessible dans l'organisation courante.","tags":["AI Workforce"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Dossier Mission complet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MissionDetail"}}}},"401":{"description":"Authentification requise","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"403":{"description":"Droits TASK_READ insuffisants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"404":{"description":"Mission absente ou inaccessible dans cette organisation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}}},"operationId":"getApiV1MissionsById"}},"/api/v1/missions/{id}/evaluator":{"get":{"summary":"Consulter l’Evaluator d’une Mission","description":"Retourne la configuration bornée, l’état courant, l’historique tenanté des évaluations, les preuves et l’éventuelle décision terminale.","tags":["AI Workforce"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"État de l’Evaluator","content":{"application/json":{"schema":{"type":"object","properties":{"featureEnabled":{"type":"boolean"},"binding":{"oneOf":[{"type":"object","properties":{"enabled":{"type":"boolean","default":true},"evaluatorKey":{"type":"string","enum":["artifact_manifest_v1"]},"evaluatorVersion":{"type":"string","enum":["1"],"default":"1"},"threshold":{"type":"integer","minimum":1,"maximum":100},"maxEvaluations":{"type":"integer","minimum":1,"maximum":20,"default":4},"maxReworkCycles":{"type":"integer","minimum":0,"maximum":10,"default":2},"maxTechnicalRetries":{"type":"integer","minimum":0,"maximum":5,"default":2},"stagnationLimit":{"type":"integer","minimum":1,"maximum":5,"default":2},"autoEvaluate":{"type":"boolean","default":true},"terminalBehavior":{"type":"string","enum":["BLOCK_AND_DECIDE"],"default":"BLOCK_AND_DECIDE"},"criteria":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"label":{"type":"string","minLength":1,"maxLength":160},"artifactName":{"type":"string","minLength":1,"maxLength":240},"weight":{"type":"integer","minimum":1,"maximum":100}},"required":["id","label","artifactName","weight"]},"minItems":1,"maxItems":20}},"required":["evaluatorKey","threshold","criteria"]},{"type":"object","properties":{"enabled":{"type":"boolean","default":true},"evaluatorKey":{"type":"string","enum":["is_agentic_v1"]},"evaluatorVersion":{"type":"string","enum":["1"],"default":"1"},"targetUrl":{"type":"string","maxLength":2048,"format":"uri"},"minimumScore":{"type":"integer","minimum":1,"maximum":100,"default":90},"threshold":{"type":"integer","minimum":1,"maximum":100,"default":90},"requireEssentialPass":{"type":"boolean","default":true},"maxEvaluations":{"type":"integer","minimum":1,"maximum":20,"default":1},"maxReworkCycles":{"type":"number","enum":[0],"default":0},"maxTechnicalRetries":{"type":"integer","minimum":0,"maximum":5,"default":2},"stagnationLimit":{"type":"integer","minimum":1,"maximum":5,"default":1},"autoEvaluate":{"type":"boolean","default":false},"terminalBehavior":{"type":"string","enum":["BLOCK_AND_DECIDE"],"default":"BLOCK_AND_DECIDE"}},"required":["evaluatorKey","targetUrl"]},{"nullable":true}]},"status":{"type":"string","enum":["NOT_CONFIGURED","IDLE","PENDING","RUNNING","PASS","FAIL","ERROR","BLOCKED"]},"latestVerdict":{"type":"string","nullable":true,"enum":["PASS","FAIL","INCONCLUSIVE"]},"latestScore":{"type":"number","nullable":true,"minimum":0,"maximum":100},"attempts":{"type":"integer","minimum":0},"nextAction":{"type":"string","nullable":true},"stopReason":{"type":"string","nullable":true},"verifiedRunId":{"type":"string","nullable":true},"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"resultId":{"type":"string","nullable":true},"evaluatorId":{"type":"string"},"evaluatorVersion":{"type":"string"},"status":{"type":"string","enum":["PENDING","RUNNING","COMPLETED","ERROR","CANCELLED"]},"verdict":{"type":"string","nullable":true,"enum":["PASS","FAIL","INCONCLUSIVE"]},"score":{"type":"number","nullable":true,"minimum":0,"maximum":100},"attempt":{"type":"integer","minimum":0,"exclusiveMinimum":true},"technicalAttempt":{"type":"integer","minimum":0},"summary":{"type":"string","nullable":true},"feedback":{"type":"string","nullable":true},"reasonCode":{"type":"string","nullable":true},"technicalErrorCode":{"type":"string","nullable":true},"evidence":{"type":"array","items":{"nullable":true}},"createdAt":{"type":"string"},"completedAt":{"type":"string","nullable":true}},"required":["id","runId","resultId","evaluatorId","evaluatorVersion","status","verdict","score","attempt","technicalAttempt","summary","feedback","reasonCode","technicalErrorCode","evidence","createdAt","completedAt"]}},"decision":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PENDING","RESOLVED","CANCELLED"]},"reasonCode":{"type":"string"},"request":{"type":"string"},"context":{"nullable":true},"options":{"nullable":true},"createdAt":{"type":"string"}},"required":["id","status","reasonCode","request","createdAt"]}},"required":["featureEnabled","binding","status","latestVerdict","latestScore","attempts","nextAction","stopReason","verifiedRunId","runs","decision"]}}}},"404":{"description":"Mission absente ou inaccessible dans cette organisation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}}},"operationId":"getApiV1MissionsByIdEvaluator"},"patch":{"summary":"Configurer l’Evaluator déterministe d’une Mission","description":"Valide et attache une configuration P0 sans réseau ni exécution arbitraire. Le feature flag de l’organisation doit être actif.","tags":["AI Workforce"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"enabled":{"type":"boolean","default":true},"evaluatorKey":{"type":"string","enum":["artifact_manifest_v1"]},"evaluatorVersion":{"type":"string","enum":["1"],"default":"1"},"threshold":{"type":"integer","minimum":1,"maximum":100},"maxEvaluations":{"type":"integer","minimum":1,"maximum":20,"default":4},"maxReworkCycles":{"type":"integer","minimum":0,"maximum":10,"default":2},"maxTechnicalRetries":{"type":"integer","minimum":0,"maximum":5,"default":2},"stagnationLimit":{"type":"integer","minimum":1,"maximum":5,"default":2},"autoEvaluate":{"type":"boolean","default":true},"terminalBehavior":{"type":"string","enum":["BLOCK_AND_DECIDE"],"default":"BLOCK_AND_DECIDE"},"criteria":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"label":{"type":"string","minLength":1,"maxLength":160},"artifactName":{"type":"string","minLength":1,"maxLength":240},"weight":{"type":"integer","minimum":1,"maximum":100}},"required":["id","label","artifactName","weight"]},"minItems":1,"maxItems":20}},"required":["evaluatorKey","threshold","criteria"]},{"type":"object","properties":{"enabled":{"type":"boolean","default":true},"evaluatorKey":{"type":"string","enum":["is_agentic_v1"]},"evaluatorVersion":{"type":"string","enum":["1"],"default":"1"},"targetUrl":{"type":"string","maxLength":2048,"format":"uri"},"minimumScore":{"type":"integer","minimum":1,"maximum":100,"default":90},"threshold":{"type":"integer","minimum":1,"maximum":100,"default":90},"requireEssentialPass":{"type":"boolean","default":true},"maxEvaluations":{"type":"integer","minimum":1,"maximum":20,"default":1},"maxReworkCycles":{"type":"number","enum":[0],"default":0},"maxTechnicalRetries":{"type":"integer","minimum":0,"maximum":5,"default":2},"stagnationLimit":{"type":"integer","minimum":1,"maximum":5,"default":1},"autoEvaluate":{"type":"boolean","default":false},"terminalBehavior":{"type":"string","enum":["BLOCK_AND_DECIDE"],"default":"BLOCK_AND_DECIDE"}},"required":["evaluatorKey","targetUrl"]}]}}}},"responses":{"200":{"description":"Configuration enregistrée","content":{"application/json":{"schema":{"type":"object","properties":{"featureEnabled":{"type":"boolean"},"binding":{"oneOf":[{"type":"object","properties":{"enabled":{"type":"boolean","default":true},"evaluatorKey":{"type":"string","enum":["artifact_manifest_v1"]},"evaluatorVersion":{"type":"string","enum":["1"],"default":"1"},"threshold":{"type":"integer","minimum":1,"maximum":100},"maxEvaluations":{"type":"integer","minimum":1,"maximum":20,"default":4},"maxReworkCycles":{"type":"integer","minimum":0,"maximum":10,"default":2},"maxTechnicalRetries":{"type":"integer","minimum":0,"maximum":5,"default":2},"stagnationLimit":{"type":"integer","minimum":1,"maximum":5,"default":2},"autoEvaluate":{"type":"boolean","default":true},"terminalBehavior":{"type":"string","enum":["BLOCK_AND_DECIDE"],"default":"BLOCK_AND_DECIDE"},"criteria":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"label":{"type":"string","minLength":1,"maxLength":160},"artifactName":{"type":"string","minLength":1,"maxLength":240},"weight":{"type":"integer","minimum":1,"maximum":100}},"required":["id","label","artifactName","weight"]},"minItems":1,"maxItems":20}},"required":["evaluatorKey","threshold","criteria"]},{"type":"object","properties":{"enabled":{"type":"boolean","default":true},"evaluatorKey":{"type":"string","enum":["is_agentic_v1"]},"evaluatorVersion":{"type":"string","enum":["1"],"default":"1"},"targetUrl":{"type":"string","maxLength":2048,"format":"uri"},"minimumScore":{"type":"integer","minimum":1,"maximum":100,"default":90},"threshold":{"type":"integer","minimum":1,"maximum":100,"default":90},"requireEssentialPass":{"type":"boolean","default":true},"maxEvaluations":{"type":"integer","minimum":1,"maximum":20,"default":1},"maxReworkCycles":{"type":"number","enum":[0],"default":0},"maxTechnicalRetries":{"type":"integer","minimum":0,"maximum":5,"default":2},"stagnationLimit":{"type":"integer","minimum":1,"maximum":5,"default":1},"autoEvaluate":{"type":"boolean","default":false},"terminalBehavior":{"type":"string","enum":["BLOCK_AND_DECIDE"],"default":"BLOCK_AND_DECIDE"}},"required":["evaluatorKey","targetUrl"]},{"nullable":true}]},"status":{"type":"string","enum":["NOT_CONFIGURED","IDLE","PENDING","RUNNING","PASS","FAIL","ERROR","BLOCKED"]},"latestVerdict":{"type":"string","nullable":true,"enum":["PASS","FAIL","INCONCLUSIVE"]},"latestScore":{"type":"number","nullable":true,"minimum":0,"maximum":100},"attempts":{"type":"integer","minimum":0},"nextAction":{"type":"string","nullable":true},"stopReason":{"type":"string","nullable":true},"verifiedRunId":{"type":"string","nullable":true},"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"resultId":{"type":"string","nullable":true},"evaluatorId":{"type":"string"},"evaluatorVersion":{"type":"string"},"status":{"type":"string","enum":["PENDING","RUNNING","COMPLETED","ERROR","CANCELLED"]},"verdict":{"type":"string","nullable":true,"enum":["PASS","FAIL","INCONCLUSIVE"]},"score":{"type":"number","nullable":true,"minimum":0,"maximum":100},"attempt":{"type":"integer","minimum":0,"exclusiveMinimum":true},"technicalAttempt":{"type":"integer","minimum":0},"summary":{"type":"string","nullable":true},"feedback":{"type":"string","nullable":true},"reasonCode":{"type":"string","nullable":true},"technicalErrorCode":{"type":"string","nullable":true},"evidence":{"type":"array","items":{"nullable":true}},"createdAt":{"type":"string"},"completedAt":{"type":"string","nullable":true}},"required":["id","runId","resultId","evaluatorId","evaluatorVersion","status","verdict","score","attempt","technicalAttempt","summary","feedback","reasonCode","technicalErrorCode","evidence","createdAt","completedAt"]}},"decision":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PENDING","RESOLVED","CANCELLED"]},"reasonCode":{"type":"string"},"request":{"type":"string"},"context":{"nullable":true},"options":{"nullable":true},"createdAt":{"type":"string"}},"required":["id","status","reasonCode","request","createdAt"]}},"required":["featureEnabled","binding","status","latestVerdict","latestScore","attempts","nextAction","stopReason","verifiedRunId","runs","decision"]}}}},"400":{"description":"Configuration invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"404":{"description":"Mission absente ou inaccessible dans cette organisation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"409":{"description":"Feature flag désactivé ou Mission non configurable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}}},"operationId":"patchApiV1MissionsByIdEvaluator"}},"/api/v1/missions/{id}/evaluator/trigger":{"post":{"summary":"Déclencher l’évaluation du dernier AgentRun terminé","description":"Crée atomiquement une seule EvaluationRun et une intention d’outbox. Les doubles soumissions retournent l’exécution existante.","tags":["AI Workforce"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"201":{"description":"Évaluation créée ou retrouvée","content":{"application/json":{"schema":{"type":"object","properties":{"evaluationRunId":{"type":"string"},"created":{"type":"boolean"}},"required":["evaluationRunId","created"]}}}},"404":{"description":"Mission ou exécution absente dans cette organisation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"409":{"description":"Evaluation non autorisée dans l’état courant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}}},"operationId":"postApiV1MissionsByIdEvaluatorTrigger"}},"/api/v1/missions/{id}/external-executions":{"post":{"summary":"Autoriser une exécution Codex externe pour une Mission","description":"Crée et réclame atomiquement un AgentRun lié à la Mission, réserve son budget et émet un grant signé, tenanté, borné et à durée de vie courte. L'en-tête Idempotency-Key est obligatoire.","tags":["AI Workforce","Runs externes"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":8,"maxLength":191,"pattern":"^[a-z0-9][a-z0-9._:-]{7,190}$"},"required":true,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalExecutionAuthorizationRequest"}}}},"responses":{"201":{"description":"Exécution externe autorisée et budget réservé","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalExecutionAuthorizationResponse"}}}},"400":{"description":"Contrat, Mission ou Idempotency-Key invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"401":{"description":"Authentification requise","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"403":{"description":"Droits RUN_INGEST insuffisants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"404":{"description":"Mission absente ou inaccessible dans cette organisation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"409":{"description":"Mission déjà réclamée, budget refusé ou clé en conflit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"503":{"description":"Secret de signature ou service de budget indisponible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}}},"operationId":"postApiV1MissionsByIdExternalExecutions"}},"/api/v1/runs/ingest/external-execution":{"post":{"summary":"Ingérer un événement d'exécution Codex externe","description":"Accepte un événement du protocole d'exécution externe avec un grant Bearer signé et une Idempotency-Key. Le grant borne l'organisation, la Mission, l'AgentRun, l'Agent, les scopes, les outils, le budget et le dépôt autorisés.","tags":["AI Workforce","Runs externes"],"security":[{"ExternalExecutionGrant":[]}],"parameters":[{"schema":{"type":"string","minLength":8,"maxLength":191,"pattern":"^[a-z0-9._:-]{8,191}$"},"required":true,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalExecutionEvent"}}}},"responses":{"200":{"description":"Événement accepté ou rejoué sans répéter son effet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalExecutionEventIngestResponse"}}}},"400":{"description":"Événement ou Idempotency-Key invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"401":{"description":"Grant Bearer absent, invalide ou expiré","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"403":{"description":"Grant révoqué, scope insuffisant ou liaison refusée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"409":{"description":"Rejeu divergent, séquence ou état d'exécution en conflit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"413":{"description":"Corps supérieur à 1 Mo","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"415":{"description":"Content-Type application/json requis","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"500":{"description":"Erreur interne d'ingestion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}}},"operationId":"postApiV1RunsIngestExternalExecution"}},"/api/v1/decisions":{"get":{"summary":"Lister les décisions humaines requises","description":"Expose la boîte de décisions tenantée construite à partir des approvals, avec filtrage optionnel par Mission et actions conformes au rôle courant.","tags":["AI Workforce"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"missionId","in":"query"}],"responses":{"200":{"description":"Décisions visibles par l'utilisateur courant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionList"}}}},"400":{"description":"Filtre de décisions invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"401":{"description":"Authentification requise","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"403":{"description":"Droits TASK_READ insuffisants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}}},"operationId":"getApiV1Decisions"}},"/api/v1/deliverables":{"get":{"summary":"Lister les livrables produits par les missions","description":"Retourne les livrables tenantés agrégés depuis les artifacts, attachments et sorties de runs, avec provenance, preuves et coût vérifiable.","tags":["AI Workforce"],"parameters":[{"schema":{"type":"string","minLength":1},"required":false,"name":"missionId","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string","enum":["FILE","CODE","COMMIT","PULL_REQUEST","REPORT","URL","DATA","MESSAGE","ARTIFACT","OTHER"]},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","enum":["AVAILABLE","NEEDS_REVIEW","VERIFIED","REVOKED"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Liste filtrée et bornée des livrables","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliverableList"}}}},"400":{"description":"Filtres de livrables invalides","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"401":{"description":"Authentification requise","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"403":{"description":"Droits TASK_READ insuffisants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkforceError"}}}}},"operationId":"getApiV1Deliverables"}},"/api/v1/kb/sources":{"get":{"summary":"List knowledge sources","tags":["Knowledge"],"parameters":[{"schema":{"type":"number"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"name":{"type":"string"},"lastSyncAt":{"type":"string","nullable":true}},"required":["id","orgId","type","status","name"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1KbSources","description":"List knowledge sources."}},"/api/v1/kb/docs":{"get":{"summary":"List knowledge docs","tags":["Knowledge"],"parameters":[{"schema":{"type":"number"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"title":{"type":"string","nullable":true},"status":{"type":"string"},"language":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","orgId","status","createdAt"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1KbDocs","description":"List knowledge docs."}},"/api/v1/mail/threads":{"get":{"summary":"List mail threads","tags":["Mail"],"parameters":[{"schema":{"type":"number"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"subject":{"type":"string"},"labels":{"type":"array","nullable":true,"items":{"type":"string"}},"channel":{"type":"string"},"updatedAt":{"type":"string"},"lastMessagePreview":{"type":"string","nullable":true},"lastMessageFromAgentId":{"type":"string","nullable":true},"lastMessageStatus":{"type":"string","nullable":true},"hasExternalMeta":{"type":"boolean"}},"required":["id","orgId","subject","channel","updatedAt"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1MailThreads","description":"List mail threads."}},"/api/v1/mail/threads/{id}/messages":{"get":{"summary":"List messages in a thread","tags":["Mail"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"number"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"threadId":{"type":"string"},"subject":{"type":"string"},"bodyMd":{"type":"string"},"fromAgentId":{"type":"string","nullable":true},"toAgents":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"externalMeta":{"type":"object","nullable":true,"properties":{"to":{"type":"string"},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"replyTo":{"type":"string"},"providerErrorCode":{"type":"string","enum":["GOOGLE_RECONNECT_REQUIRED","RESEND_NOT_CONFIGURED","NO_AVAILABLE_MAIL_PROVIDER","MISSING_SENDER_USER"]},"providerSelection":{"type":"string","enum":["connected_gmail","policy_default","gmail_fallback"]},"providerName":{"type":"string","enum":["resend","gmail","outlook","smtp","noop"]},"providerId":{"type":"string"},"sentAt":{"type":"string"},"error":{"type":"string"},"bounceType":{"type":"string","enum":["hard","soft","complaint"]},"openedAt":{"type":"string"},"clickedAt":{"type":"string"},"unsubscribedAt":{"type":"string"},"firstOpenedAt":{"type":"string"},"lastOpenedAt":{"type":"string"},"openCount":{"type":"integer","minimum":0},"firstClickedAt":{"type":"string"},"lastClickedAt":{"type":"string"},"clickCount":{"type":"integer","minimum":0},"clickedUrls":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"generatedBy":{"type":"string"},"template":{"type":"string"},"templateId":{"type":"string"},"templateName":{"type":"string"},"campaignId":{"type":"string"},"campaignName":{"type":"string","nullable":true},"contactId":{"type":"string"},"senderUserId":{"type":"string"},"mailboxUserId":{"type":"string"},"createdAt":{"type":"string"},"gmailMessageId":{"type":"string"},"gmailThreadId":{"type":"string"},"from":{"type":"string"},"reply":{"type":"boolean"},"resendId":{"type":"string"}}},"createdAt":{"type":"string"}},"required":["id","orgId","threadId","subject","bodyMd","fromAgentId","status","createdAt"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1MailThreadsByIdMessages","description":"List messages in a thread."},"post":{"summary":"Create message in a thread","tags":["Mail"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orgId":{"type":"string"},"subject":{"type":"string","minLength":1,"maxLength":200},"bodyMd":{"type":"string","minLength":1},"fromAgentId":{"type":"string"},"to":{"type":"string","format":"email"}},"required":["subject","bodyMd"]}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}},"operationId":"postApiV1MailThreadsByIdMessages","description":"Create message in a thread."}},"/api/v1/policies":{"get":{"summary":"List policies","tags":["Policies"],"parameters":[{"schema":{"type":"number"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["id","orgId","name","type"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1Policies","description":"List policies."}},"/api/v1/prompts":{"get":{"summary":"List prompts","tags":["Prompts"],"parameters":[{"schema":{"type":"number"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"key":{"type":"string"},"createdAt":{"type":"string"},"versionCount":{"type":"integer","minimum":0},"latestContent":{"type":"string","nullable":true}},"required":["id","orgId","key"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1Prompts","description":"List prompts."},"post":{"summary":"Create prompt template","tags":["Prompts"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z0-9._-]+$"},"content":{"type":"string","minLength":1,"maxLength":500000}},"required":["key","content"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"key":{"type":"string"},"createdAt":{"type":"string"},"versionCount":{"type":"integer","minimum":0},"latestContent":{"type":"string","nullable":true}},"required":["id","orgId","key"]}}}}},"operationId":"postApiV1Prompts","description":"Create prompt template."}},"/api/v1/prompts/{key}":{"delete":{"summary":"Delete prompt template","tags":["Prompts"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"key","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}},"operationId":"deleteApiV1PromptsByKey","description":"Delete prompt template."}},"/api/v1/prompts/{key}/versions":{"get":{"summary":"List prompt versions","tags":["Prompts"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"key","in":"path"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"templateId":{"type":"string"},"version":{"type":"number"},"content":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","templateId","version","content","createdAt"]}}},"required":["items"]}}}}},"operationId":"getApiV1PromptsByKeyVersions","description":"List prompt versions."},"post":{"summary":"Create prompt version","tags":["Prompts"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"key","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orgId":{"type":"string"},"content":{"type":"string","minLength":1,"maxLength":500000},"system":{"type":"string","nullable":true},"user":{"type":"string","nullable":true},"tools":{"nullable":true},"notes":{"type":"string","nullable":true}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"templateId":{"type":"string"},"version":{"type":"number"},"content":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","templateId","version","content","createdAt"]}}}}},"operationId":"postApiV1PromptsByKeyVersions","description":"Create prompt version."}},"/api/v1/prompts/{key}/versions/latest":{"get":{"summary":"Get latest prompt version","tags":["Prompts"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"key","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"templateId":{"type":"string"},"version":{"type":"number"},"createdAt":{"type":"string"},"content":{"type":"string"},"system":{"type":"string","nullable":true},"user":{"type":"string","nullable":true},"tools":{"nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","templateId","version","createdAt","content"]}}}}},"operationId":"getApiV1PromptsByKeyVersionsLatest","description":"Get latest prompt version."}},"/api/v1/orgs":{"get":{"summary":"List orgs","tags":["Orgs"],"parameters":[{"schema":{"type":"number"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1Orgs","description":"List orgs."},"post":{"summary":"Create org","tags":["Orgs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","minLength":3,"maxLength":48},"name":{"type":"string","minLength":1,"maxLength":120}},"required":["slug","name"]}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}},"operationId":"postApiV1Orgs","description":"Create org."}},"/api/v1/members":{"get":{"summary":"List members","tags":["Members"],"parameters":[{"schema":{"type":"number"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"userId":{"type":"string"},"role":{"type":"string"},"userName":{"type":"string","nullable":true},"userEmail":{"type":"string","nullable":true},"userAvatarUrl":{"type":"string","nullable":true},"userStatus":{"type":"string"}},"required":["id","orgId","userId","role"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1Members","description":"List members."}},"/api/v1/tags":{"get":{"summary":"List tags","tags":["Tags"],"parameters":[{"schema":{"type":"number"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"color":{"type":"string","nullable":true}},"required":["id","orgId","key","label"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1Tags","description":"List tags."}},"/api/v1/loops":{"get":{"summary":"List loop definitions","tags":["Loops"],"parameters":[{"schema":{"type":"number"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","ACTIVE","PAUSED","ARCHIVED"]},"triggerType":{"type":"string","enum":["MANUAL","SCHEDULE","EVENT"]},"scheduledJobId":{"type":"string","nullable":true},"agentId":{"type":"string"},"taskTemplate":{"nullable":true},"evalPolicy":{"type":"object","properties":{"blockOnFail":{"type":"boolean"},"gate":{"type":"string","enum":["basic","none"]},"checks":{"type":"array","items":{"type":"string","enum":["required_final_answer"]}}},"required":["blockOnFail"],"additionalProperties":false},"learnPolicy":{"type":"object","nullable":true,"properties":{"gate":{"type":"string","enum":["off","capture_only","suggest_patch"]},"rerun":{"type":"string","enum":["manual","auto"]}},"required":["gate"],"additionalProperties":false},"approvalPolicy":{"nullable":true},"budgetPolicy":{"nullable":true},"maxIterations":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"cooldownSec":{"type":"integer","nullable":true,"minimum":0},"createdById":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"schedulingWired":{"type":"boolean","enum":[false]},"runCount":{"type":"integer","minimum":0},"lastRunAt":{"type":"string","nullable":true}},"required":["id","orgId","name","description","status","triggerType","scheduledJobId","agentId","evalPolicy","learnPolicy","maxIterations","cooldownSec","createdById","createdAt","updatedAt","schedulingWired"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1Loops","description":"List loop definitions."},"post":{"summary":"Create loop definition","tags":["Loops"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"triggerType":{"type":"string","enum":["MANUAL","SCHEDULE","EVENT"]},"scheduledJobId":{"type":"string"},"agentId":{"type":"string","minLength":1},"taskTemplate":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"objective":{"type":"string","maxLength":5000},"input":{"type":"object","additionalProperties":{"nullable":true}}},"required":["title"],"additionalProperties":false},"evalPolicy":{"type":"object","properties":{"blockOnFail":{"type":"boolean"},"gate":{"type":"string","enum":["basic","none"]},"checks":{"type":"array","items":{"type":"string","enum":["required_final_answer"]}}},"required":["blockOnFail"],"additionalProperties":false},"learnPolicy":{"type":"object","properties":{"gate":{"type":"string","enum":["off","capture_only","suggest_patch"]},"rerun":{"type":"string","enum":["manual","auto"]}},"required":["gate"],"additionalProperties":false},"approvalPolicy":{"type":"object","additionalProperties":{"nullable":true}},"budgetPolicy":{"type":"object","additionalProperties":{"nullable":true}},"maxIterations":{"type":"integer","minimum":0,"exclusiveMinimum":true},"cooldownSec":{"type":"integer","minimum":0}},"required":["name","agentId","taskTemplate"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}},"operationId":"postApiV1Loops","description":"Create loop definition."}},"/api/v1/loops/{id}":{"get":{"summary":"Get loop definition","tags":["Loops"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Detail","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","ACTIVE","PAUSED","ARCHIVED"]},"triggerType":{"type":"string","enum":["MANUAL","SCHEDULE","EVENT"]},"scheduledJobId":{"type":"string","nullable":true},"agentId":{"type":"string"},"taskTemplate":{"nullable":true},"evalPolicy":{"type":"object","properties":{"blockOnFail":{"type":"boolean"},"gate":{"type":"string","enum":["basic","none"]},"checks":{"type":"array","items":{"type":"string","enum":["required_final_answer"]}}},"required":["blockOnFail"],"additionalProperties":false},"learnPolicy":{"type":"object","nullable":true,"properties":{"gate":{"type":"string","enum":["off","capture_only","suggest_patch"]},"rerun":{"type":"string","enum":["manual","auto"]}},"required":["gate"],"additionalProperties":false},"approvalPolicy":{"nullable":true},"budgetPolicy":{"nullable":true},"maxIterations":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"cooldownSec":{"type":"integer","nullable":true,"minimum":0},"createdById":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"schedulingWired":{"type":"boolean","enum":[false]},"runCount":{"type":"integer","minimum":0},"lastRunAt":{"type":"string","nullable":true}},"required":["id","orgId","name","description","status","triggerType","scheduledJobId","agentId","evalPolicy","learnPolicy","maxIterations","cooldownSec","createdById","createdAt","updatedAt","schedulingWired"]}}}}},"operationId":"getApiV1LoopsById","description":"Get loop definition."},"patch":{"summary":"Update loop definition","tags":["Loops"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","nullable":true,"maxLength":2000},"status":{"type":"string","enum":["DRAFT","ACTIVE","PAUSED","ARCHIVED"]},"triggerType":{"type":"string","enum":["MANUAL","SCHEDULE","EVENT"]},"scheduledJobId":{"type":"string","nullable":true},"agentId":{"type":"string","minLength":1},"taskTemplate":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"objective":{"type":"string","maxLength":5000},"input":{"type":"object","additionalProperties":{"nullable":true}}},"required":["title"],"additionalProperties":false},"evalPolicy":{"type":"object","properties":{"blockOnFail":{"type":"boolean"},"gate":{"type":"string","enum":["basic","none"]},"checks":{"type":"array","items":{"type":"string","enum":["required_final_answer"]}}},"required":["blockOnFail"],"additionalProperties":false},"learnPolicy":{"type":"object","nullable":true,"properties":{"gate":{"type":"string","enum":["off","capture_only","suggest_patch"]},"rerun":{"type":"string","enum":["manual","auto"]}},"required":["gate"],"additionalProperties":false},"approvalPolicy":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"budgetPolicy":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"maxIterations":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"cooldownSec":{"type":"integer","nullable":true,"minimum":0}},"additionalProperties":false}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","ACTIVE","PAUSED","ARCHIVED"]},"triggerType":{"type":"string","enum":["MANUAL","SCHEDULE","EVENT"]},"scheduledJobId":{"type":"string","nullable":true},"agentId":{"type":"string"},"taskTemplate":{"nullable":true},"evalPolicy":{"type":"object","properties":{"blockOnFail":{"type":"boolean"},"gate":{"type":"string","enum":["basic","none"]},"checks":{"type":"array","items":{"type":"string","enum":["required_final_answer"]}}},"required":["blockOnFail"],"additionalProperties":false},"learnPolicy":{"type":"object","nullable":true,"properties":{"gate":{"type":"string","enum":["off","capture_only","suggest_patch"]},"rerun":{"type":"string","enum":["manual","auto"]}},"required":["gate"],"additionalProperties":false},"approvalPolicy":{"nullable":true},"budgetPolicy":{"nullable":true},"maxIterations":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"cooldownSec":{"type":"integer","nullable":true,"minimum":0},"createdById":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"schedulingWired":{"type":"boolean","enum":[false]},"runCount":{"type":"integer","minimum":0},"lastRunAt":{"type":"string","nullable":true}},"required":["id","orgId","name","description","status","triggerType","scheduledJobId","agentId","evalPolicy","learnPolicy","maxIterations","cooldownSec","createdById","createdAt","updatedAt","schedulingWired"]}}}}},"operationId":"patchApiV1LoopsById","description":"Update loop definition."},"delete":{"summary":"Archive loop definition","tags":["Loops"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Archived","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"status":{"type":"string","enum":["ARCHIVED"]},"id":{"type":"string"}},"required":["ok","status","id"]}}}}},"operationId":"deleteApiV1LoopsById","description":"Archive loop definition."}},"/api/v1/loops/{id}/runs":{"get":{"summary":"List loop runs for a definition","tags":["Loops"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"number"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"loopDefinitionId":{"type":"string"},"iteration":{"type":"integer"},"status":{"type":"string","enum":["QUEUED","RUNNING","SUCCEEDED","FAILED","CANCELLED","BLOCKED_EVAL"]},"triggerType":{"type":"string","enum":["MANUAL","SCHEDULE","EVENT"]},"taskId":{"type":"string","nullable":true},"agentRunId":{"type":"string","nullable":true},"evalResult":{"nullable":true},"costMicros":{"type":"string","nullable":true},"error":{"type":"string","nullable":true},"startedAt":{"type":"string","nullable":true},"endedAt":{"type":"string","nullable":true},"sourceLearnRecordId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","orgId","loopDefinitionId","iteration","status","triggerType","taskId","agentRunId","costMicros","error","startedAt","endedAt","sourceLearnRecordId","createdAt","updatedAt"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1LoopsByIdRuns","description":"List loop runs for a definition."}},"/api/v1/loops/{id}/run":{"post":{"summary":"Manually trigger a loop run","tags":["Loops"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","additionalProperties":{"nullable":true}}},"additionalProperties":false}}}},"responses":{"202":{"description":"Run accepted (async via agent-exec)","content":{"application/json":{"schema":{"type":"object","properties":{"loopRunId":{"type":"string"},"taskId":{"type":"string","nullable":true},"agentRunId":{"type":"string","nullable":true},"status":{"type":"string","enum":["QUEUED","RUNNING","SUCCEEDED","FAILED","CANCELLED","BLOCKED_EVAL"]},"iteration":{"type":"integer","minimum":0,"exclusiveMinimum":true},"pollUrl":{"type":"string","nullable":true},"statusFinalSynced":{"type":"boolean","enum":[false]},"idempotentDuplicate":{"type":"boolean","enum":[true]}},"required":["loopRunId","taskId","agentRunId","status","iteration","pollUrl","statusFinalSynced"]}}}}},"operationId":"postApiV1LoopsByIdRun","description":"Manually trigger a loop run."}},"/api/v1/scheduler/jobs":{"get":{"summary":"List scheduled jobs","tags":["Scheduler"],"parameters":[{"schema":{"type":"number"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"cron":{"type":"string"},"enabled":{"type":"boolean"},"nextRunAt":{"type":"string","nullable":true}},"required":["id","orgId","name","cron","enabled"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1SchedulerJobs","description":"List scheduled jobs."}},"/api/v1/logs/llm-calls":{"get":{"summary":"List LLM calls","tags":["Logs"],"parameters":[{"schema":{"type":"number"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"model","in":"query"},{"schema":{"type":"string"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"projectId","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"agentId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"provider":{"type":"string"},"model":{"type":"string"},"inputTokens":{"type":"number"},"outputTokens":{"type":"number"},"costMicros":{"type":"string"},"meteringStatus":{"type":"string"},"costStatus":{"type":"string"},"costDisposition":{"type":"string","nullable":true,"enum":["RECONCILED_SUCCEEDED","RECONCILED_FAILED","ESTIMATED_NON_CONFIRMED","RESERVED_PENDING","UNRECONCILED_EXPOSURE","UNKNOWN_NON_CONFIRMED","UNKNOWN_INVALID"]},"confirmedProviderCostMicros":{"type":"string","nullable":true},"estimatedCostMicros":{"type":"string","nullable":true},"reservationExposureMicros":{"type":"string","nullable":true},"billableEligible":{"type":"boolean"},"coverageExclusionReason":{"type":"string","nullable":true},"status":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","orgId","provider","model","inputTokens","outputTokens","costMicros","meteringStatus","costStatus","costDisposition","confirmedProviderCostMicros","estimatedCostMicros","reservationExposureMicros","billableEligible","coverageExclusionReason","status","createdAt"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1LogsLlmCalls","description":"List LLM calls."}},"/api/v1/logs/audit":{"get":{"summary":"List audit logs","tags":["Logs"],"parameters":[{"schema":{"type":"number"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"userId":{"type":"string","nullable":true},"agentId":{"type":"string","nullable":true},"action":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"message":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","orgId","action","entityType","entityId","createdAt"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1LogsAudit","description":"List audit logs."}},"/api/v1/metrics/costs":{"get":{"summary":"Aggregate LLM costs per day","tags":["Metrics"],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"costMicros":{"type":"string"},"costSummary":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["cost-truth.v1"]},"currency":{"type":"string","enum":["USD"]},"coverage":{"type":"object","properties":{"scope":{"type":"string","enum":["ENGINE_CORE"]},"inScopeCallCount":{"type":"integer","minimum":0},"excludedCallCount":{"type":"integer","minimum":0},"sources":{"type":"array","items":{"type":"string"}}},"required":["scope","inScopeCallCount","excludedCallCount","sources"]},"confirmedProvider":{"type":"object","properties":{"callCount":{"type":"integer","minimum":0},"costUsd":{"type":"string"}},"required":["callCount","costUsd"]},"billableEligible":{"type":"object","properties":{"callCount":{"type":"integer","minimum":0},"costUsd":{"type":"string"}},"required":["callCount","costUsd"]},"estimated":{"type":"object","properties":{"callCount":{"type":"integer","minimum":0},"costUsd":{"type":"string","nullable":true}},"required":["callCount","costUsd"]},"reservations":{"type":"object","properties":{"callCount":{"type":"integer","minimum":0},"upperBoundUsd":{"type":"string"}},"required":["callCount","upperBoundUsd"]},"unreconciled":{"type":"object","properties":{"callCount":{"type":"integer","minimum":0},"exposureUpperBoundUsd":{"type":"string","nullable":true}},"required":["callCount","exposureUpperBoundUsd"]},"failed":{"type":"object","properties":{"callCount":{"type":"integer","minimum":0},"confirmedProviderCostUsd":{"type":"string"},"billableEligibleCostUsd":{"type":"string","enum":["0"]}},"required":["callCount","confirmedProviderCostUsd","billableEligibleCostUsd"]},"unknown":{"type":"object","properties":{"callCount":{"type":"integer","minimum":0},"invalidRowCount":{"type":"integer","minimum":0}},"required":["callCount","invalidRowCount"]},"classification":{"type":"object","properties":{"reconciledSucceededCount":{"type":"integer","minimum":0},"reconciledFailedCount":{"type":"integer","minimum":0},"estimatedCount":{"type":"integer","minimum":0},"reservedCount":{"type":"integer","minimum":0},"unreconciledCount":{"type":"integer","minimum":0},"unknownCount":{"type":"integer","minimum":0},"invalidCount":{"type":"integer","minimum":0}},"required":["reconciledSucceededCount","reconciledFailedCount","estimatedCount","reservedCount","unreconciledCount","unknownCount","invalidCount"]},"completeness":{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETE","PARTIAL","UNKNOWN"]},"hasOpenReservations":{"type":"boolean"},"hasUnreconciledCalls":{"type":"boolean"},"hasUnknownCosts":{"type":"boolean"},"hasEstimatedOnlyCosts":{"type":"boolean"},"hasExcludedBoundaries":{"type":"boolean"}},"required":["status","hasOpenReservations","hasUnreconciledCalls","hasUnknownCosts","hasEstimatedOnlyCosts","hasExcludedBoundaries"]},"asOf":{"type":"string","format":"date-time"}},"required":["schemaVersion","currency","coverage","confirmedProvider","billableEligible","estimated","reservations","unreconciled","failed","unknown","classification","completeness","asOf"]}},"required":["day","costMicros","costSummary"]}}},"required":["items"]}}}}},"operationId":"getApiV1MetricsCosts","description":"Aggregate LLM costs per day."}},"/api/metrics":{"get":{"summary":"Prometheus metrics","tags":["Metrics"],"responses":{"200":{"description":"Prometheus text format","content":{"text/plain":{"schema":{"type":"string"}}}}},"operationId":"getApiMetrics","description":"Prometheus metrics."}},"/api/v1/openai/projects":{"get":{"summary":"List OpenAI projects","tags":["OpenAI"],"parameters":[{"schema":{"type":"number"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"externalId":{"type":"string","nullable":true},"isDefault":{"type":"boolean"}},"required":["id","orgId","name","provider","isDefault"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1OpenaiProjects","description":"List OpenAI projects."}},"/api/v1/openai/files":{"get":{"summary":"List OpenAI files","tags":["OpenAI"],"parameters":[{"schema":{"type":"number"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"fileId":{"type":"string"},"filename":{"type":"string"},"purpose":{"type":"string"},"status":{"type":"string","nullable":true}},"required":["id","orgId","fileId","filename","purpose"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1OpenaiFiles","description":"List OpenAI files."}},"/api/v1/openai/batches":{"get":{"summary":"List OpenAI batches","tags":["OpenAI"],"parameters":[{"schema":{"type":"number"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"batchId":{"type":"string"},"endpoint":{"type":"string"},"status":{"type":"string"},"startedAt":{"type":"string","nullable":true},"finishedAt":{"type":"string","nullable":true}},"required":["id","orgId","batchId","endpoint","status"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1OpenaiBatches","description":"List OpenAI batches."}},"/api/v1/agents/{id}/run":{"post":{"summary":"Run agent with a prompt","tags":["Agents"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orgId":{"type":"string"},"taskId":{"type":"string","minLength":1},"prompt":{"type":"string","minLength":1},"model":{"type":"string"},"temperature":{"type":"number","minimum":0,"maximum":2},"reasoningEffort":{"type":"string","enum":["none","low","medium","high","xhigh"]},"maxCostUsd":{"type":"number","minimum":0.05,"maximum":2},"allowedTools":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":64},"missionId":{"type":"string","minLength":1,"maxLength":120},"replay":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"contractHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["runId","contractHash"]}},"required":["prompt"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"id":{"type":"string"},"text":{"type":"string"},"executionStatus":{"type":"string","enum":["awaiting_approval","completed","cancelled","failed"]},"missionOutcome":{"type":"object","nullable":true,"properties":{"goalStatus":{"type":"string","enum":["pass","partial","fail","blocked","not_evaluated"]},"releaseStatus":{"type":"string","enum":["approved","rejected","pending"]},"overallStatus":{"type":"string","enum":["completed","partial_success","blocked","unknown"]},"blockedReasons":{"type":"array","items":{"type":"string"}},"crmImportEvidence":{"type":"string","enum":["proven_success","proven_failure","no_proof"]},"verificationVerdict":{"type":"string","nullable":true,"enum":["PASS","FAIL","PARTIAL"]},"verificationEvidence":{"type":"object","nullable":true,"properties":{"runId":{"type":"string"},"declaredVerdict":{"type":"string","enum":["PASS","FAIL","PARTIAL"]},"effectiveVerdict":{"type":"string","enum":["PASS","FAIL","PARTIAL"]},"checks":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"result":{"type":"string","enum":["PASS","FAIL"]},"detail":{"type":"string"}},"required":["name","result","detail"]}},"totalChecks":{"type":"integer","minimum":0},"passedChecks":{"type":"integer","minimum":0},"failedChecks":{"type":"integer","minimum":0},"structurallyValid":{"type":"boolean"},"verifierRunId":{"type":"string","nullable":true},"reportHash":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"durationMs":{"type":"integer","nullable":true,"minimum":0},"tokensUsed":{"type":"integer","nullable":true,"minimum":0}},"required":["runId","declaredVerdict","effectiveVerdict","checks","totalChecks","passedChecks","failedChecks","structurallyValid","verifierRunId","reportHash","model","durationMs","tokensUsed"]},"deterministicEvidence":{"type":"object","nullable":true,"properties":{"version":{"type":"string","enum":["v1"]},"runId":{"type":"string","nullable":true},"verdict":{"type":"string","enum":["PASS","FAIL","NOT_APPLICABLE"]},"coverage":{"type":"string","enum":["authoritative","supporting","none"]},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"validator":{"type":"string","enum":["exact_output","json_syntax","file_artifact","research_sources","url","http_success"]},"name":{"type":"string"},"result":{"type":"string","enum":["PASS","FAIL"]},"coverage":{"type":"string","enum":["authoritative","supporting"]},"detail":{"type":"string"},"evidence":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true},{"nullable":true}]}}},"required":["id","validator","name","result","coverage","detail","evidence"]}},"applicableChecks":{"type":"integer","minimum":0},"passedChecks":{"type":"integer","minimum":0},"failedChecks":{"type":"integer","minimum":0},"evidenceHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["version","runId","verdict","coverage","checks","applicableChecks","passedChecks","failedChecks","evidenceHash"]},"verdictSource":{"type":"string","enum":["crm_operational_evidence","verification_agent","deterministic_evidence","combined","none"]}},"required":["goalStatus","releaseStatus","overallStatus","blockedReasons","crmImportEvidence","verificationVerdict","verificationEvidence","deterministicEvidence","verdictSource"]}},"required":["ok","id","text","executionStatus"]}}}}},"operationId":"postApiV1AgentsByIdRun","description":"Run agent with a prompt."}},"/api/v1/orchestrator/plans":{"post":{"summary":"Create a plan (Planner)","tags":["Orchestrator"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orgId":{"type":"string"},"objective":{"type":"string","minLength":1},"constraints":{"type":"string","nullable":true}},"required":["objective"]}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string"},"projectId":{"type":"string"},"rootTaskId":{"type":"string"},"taskIds":{"type":"array","items":{"type":"string"}}},"required":["runId","projectId","rootTaskId","taskIds"]}}}}},"operationId":"postApiV1OrchestratorPlans","description":"Create a plan (Planner)."}},"/api/v1/orchestrator/runs/{id}/start":{"post":{"summary":"Start a run (Dispatcher)","tags":["Orchestrator"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}}},"operationId":"postApiV1OrchestratorRunsByIdStart","description":"Start a run (Dispatcher)."}},"/api/v1/orchestrator/runs/{id}/status":{"get":{"summary":"Run status","tags":["Orchestrator"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string"},"status":{"anyOf":[{"type":"string","enum":["PENDING","RUNNING","DONE","ERROR"]},{"type":"string"}]},"progress":{"type":"number","minimum":0,"maximum":1},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"anyOf":[{"type":"string","enum":["OPEN","IN_PROGRESS","REVIEW","BLOCKED","DONE","CANCELLED"]},{"type":"string"}]}},"required":["id","title","status"]}}},"required":["runId","status","progress","tasks"]}}}}},"operationId":"getApiV1OrchestratorRunsByIdStatus","description":"Run status."}},"/api/v1/orchestrator/runs/{id}/events":{"get":{"summary":"Run events (SSE)","tags":["Orchestrator"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"SSE stream","content":{"text/event-stream":{"schema":{"type":"string"}}}}},"operationId":"getApiV1OrchestratorRunsByIdEvents","description":"Run events (SSE)."}},"/api/v1/agents/{id}":{"get":{"summary":"Get agent by id","tags":["Agents"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"handle":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"systemPrompt":{"type":"string","nullable":true},"persona":{"type":"string","nullable":true},"defaultModel":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","orgId","handle","name","type","status","createdAt","updatedAt"]}}}}},"operationId":"getApiV1AgentsById","description":"Get agent by id."},"patch":{"summary":"Update agent","tags":["Agents"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"handle":{"type":"string","minLength":3,"maxLength":32},"status":{"type":"string","enum":["ENABLED","DISABLED"]},"type":{"type":"string","enum":["CEO","MANAGER","SPECIALIST","META","SERVICE"]},"systemPrompt":{"type":"string","nullable":true},"persona":{"type":"string","nullable":true},"defaultModel":{"type":"string","nullable":true}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}},"operationId":"patchApiV1AgentsById","description":"Update agent."}},"/api/v1/projects/{id}":{"get":{"summary":"Get project by id","tags":["Projects"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"taskCount":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","orgId","key","name","status","taskCount","createdAt","updatedAt"]}}}}},"operationId":"getApiV1ProjectsById","description":"Get project by id."},"patch":{"summary":"Update project","tags":["Projects"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"status":{"type":"string","enum":["DRAFT","ACTIVE","ON_HOLD","DONE","CANCELLED"]}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}},"operationId":"patchApiV1ProjectsById","description":"Update project."}},"/api/v1/tasks/{id}":{"get":{"summary":"Get task by id","tags":["Tasks"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"projectId":{"type":"string","nullable":true},"title":{"type":"string"},"objective":{"type":"string","nullable":true},"status":{"type":"string"},"priority":{"type":"string"},"deadline":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","orgId","projectId","title","status","priority","createdAt","updatedAt"]}}}}},"operationId":"getApiV1TasksById","description":"Get task by id."},"patch":{"summary":"Update task","tags":["Tasks"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["OPEN","IN_PROGRESS","REVIEW","BLOCKED","DONE","CANCELLED"]},"priority":{"type":"string","enum":["LOW","NORMAL","HIGH","URGENT"]},"objective":{"type":"string","nullable":true},"deadline":{"type":"string","nullable":true}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}},"operationId":"patchApiV1TasksById","description":"Update task."}},"/api/v1/billing/checkout":{"post":{"summary":"Create Stripe checkout session","tags":["Billing"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"priceId":{"type":"string"},"plan":{"type":"string"},"interval":{"type":"string","enum":["monthly","annual"]}}}}}},"responses":{"200":{"description":"Checkout URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}}}}},"operationId":"postApiV1BillingCheckout","description":"Create Stripe checkout session."}},"/api/v1/billing/portal":{"post":{"summary":"Create Stripe portal session","tags":["Billing"],"responses":{"200":{"description":"Portal URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}}}}},"operationId":"postApiV1BillingPortal","description":"Create Stripe portal session."}},"/api/v1/chat":{"post":{"summary":"Chat with LLM (SSE stream)","tags":["Chat"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string"},"model":{"type":"string"},"agentId":{"type":"string"},"useTools":{"type":"boolean"}},"required":["prompt"]}}}},"responses":{"200":{"description":"SSE stream","content":{"text/event-stream":{"schema":{"type":"string"}}}}},"operationId":"postApiV1Chat","description":"Chat with LLM (SSE stream)."}},"/api/v1/chat/sync":{"post":{"summary":"Synchronous chat","tags":["Chat"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string"},"model":{"type":"string"}},"required":["prompt"]}}}},"responses":{"200":{"description":"Chat response","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"]}}}}},"operationId":"postApiV1ChatSync","description":"Synchronous chat."}},"/api/v1/agents/{id}/run-stream":{"post":{"summary":"Run agent with SSE streaming","tags":["Agents"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string"},"model":{"type":"string"},"temperature":{"type":"number"},"reasoningEffort":{"type":"string","enum":["none","low","medium","high","xhigh"]}},"required":["prompt"]}}}},"responses":{"200":{"description":"SSE stream","content":{"text/event-stream":{"schema":{"type":"string"}}}}},"operationId":"postApiV1AgentsByIdRunStream","description":"Run agent with SSE streaming."}},"/api/v1/agents/{id}/runs/{runId}/stream":{"get":{"summary":"Stream agent run progress","tags":["Agents"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"runId","in":"path"}],"responses":{"200":{"description":"SSE stream","content":{"text/event-stream":{"schema":{"type":"string"}}}}},"operationId":"getApiV1AgentsByIdRunsByRunIdStream","description":"Stream agent run progress."}},"/api/v1/agents/{id}/spawn":{"post":{"summary":"Spawn a sub-agent","tags":["Agents"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Spawned"}},"operationId":"postApiV1AgentsByIdSpawn","description":"Spawn a sub-agent."}},"/api/v1/notifications/stream":{"get":{"summary":"Real-time notifications (SSE)","tags":["Notifications"],"responses":{"200":{"description":"SSE stream","content":{"text/event-stream":{"schema":{"type":"string"}}}}},"operationId":"getApiV1NotificationsStream","description":"Real-time notifications (SSE)."}},"/api/v1/gamification/stream":{"get":{"summary":"Gamification events (SSE)","tags":["Gamification"],"responses":{"200":{"description":"SSE stream","content":{"text/event-stream":{"schema":{"type":"string"}}}}},"operationId":"getApiV1GamificationStream","description":"Gamification events (SSE)."}},"/api/v1/agents/approvals/stream":{"get":{"summary":"Tool approval requests (SSE)","tags":["Agents"],"responses":{"200":{"description":"SSE stream","content":{"text/event-stream":{"schema":{"type":"string"}}}}},"operationId":"getApiV1AgentsApprovalsStream","description":"Tool approval requests (SSE)."}},"/api/v1/agents/approvals/{approvalId}":{"post":{"summary":"Resolve a tool approval","tags":["Agents"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"approvalId","in":"path"}],"responses":{"200":{"description":"Resolved"}},"operationId":"postApiV1AgentsApprovalsByApprovalId","description":"Resolve a tool approval."}},"/api/v1/onboarding/profile":{"post":{"summary":"Save onboarding profile","tags":["Onboarding"],"responses":{"200":{"description":"OK"}},"operationId":"postApiV1OnboardingProfile","description":"Save onboarding profile."}},"/api/v1/onboarding/organization":{"post":{"summary":"Save onboarding organization","tags":["Onboarding"],"responses":{"200":{"description":"OK"}},"operationId":"postApiV1OnboardingOrganization","description":"Save onboarding organization."}},"/api/v1/onboarding/complete":{"post":{"summary":"Complete onboarding","tags":["Onboarding"],"responses":{"200":{"description":"OK"}},"operationId":"postApiV1OnboardingComplete","description":"Complete onboarding."}},"/api/v1/integrations/google/authorize":{"get":{"summary":"Start Google OAuth flow","tags":["Integrations"],"responses":{"302":{"description":"Redirect to Google"}},"operationId":"getApiV1IntegrationsGoogleAuthorize","description":"Start Google OAuth flow."}},"/api/v1/integrations/google/status":{"get":{"summary":"Google integration status","tags":["Integrations"],"responses":{"200":{"description":"Status","content":{"application/json":{"schema":{"type":"object","properties":{"connected":{"type":"boolean"},"needsReconnect":{"type":"boolean"}},"required":["connected"]}}}}},"operationId":"getApiV1IntegrationsGoogleStatus","description":"Google integration status."}},"/api/v1/integrations/n8n/preflight":{"get":{"summary":"Diagnostic secret signature N8N (org, sans plaintext)","tags":["Integrations"],"responses":{"200":{"description":"Preflight","content":{"application/json":{"schema":{"type":"object","properties":{"orgId":{"type":"string"},"vaultKey":{"type":"string","enum":["n8n.signing_secret"]},"hasOrgSecret":{"type":"boolean"},"hint":{"type":"string","nullable":true},"strictModeEnabled":{"type":"boolean"},"envFallbackConfigured":{"type":"boolean"},"effectiveSource":{"type":"string","enum":["org_secret","env_fallback","none"]},"readyForStrict":{"type":"boolean"},"callbacksOperational":{"type":"boolean"},"warnings":{"type":"array","items":{"type":"string"}},"blockers":{"type":"array","items":{"type":"string"}}},"required":["orgId","vaultKey","hasOrgSecret","hint","strictModeEnabled","envFallbackConfigured","effectiveSource","readyForStrict","callbacksOperational","warnings","blockers"]}}}}},"operationId":"getApiV1IntegrationsN8nPreflight","description":"Diagnostic secret signature N8N (org, sans plaintext)."}},"/api/v1/integrations/registry":{"get":{"summary":"Registre intégrations org (statuts connecteurs)","tags":["Integrations"],"responses":{"200":{"description":"Registry","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"integrations":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["google","gmail","calendar","n8n","mcp","webhooks","custom_tools"]},"label":{"type":"string"},"description":{"type":"string"},"riskLevel":{"type":"string","enum":["low","medium","high"]},"isExperimental":{"type":"boolean"},"planRequired":{"type":"string","enum":["FREE","PRO","ENTERPRISE"]},"setupPath":{"type":"string"},"docsPath":{"type":"string","nullable":true},"status":{"type":"string","enum":["connected","disconnected","partial","needs_reconnect","configured","not_configured","enabled","disabled"]},"statusDetail":{"type":"string","nullable":true}},"required":["key","label","description","riskLevel","isExperimental","setupPath","docsPath","status","statusDetail"]}}},"required":["schemaVersion","integrations"]}}}}},"operationId":"getApiV1IntegrationsRegistry","description":"Registre intégrations org (statuts connecteurs)."}},"/api/v1/mcp/servers":{"get":{"summary":"List MCP servers","tags":["MCP"],"responses":{"200":{"description":"List"}},"operationId":"getApiV1McpServers","description":"List MCP servers."},"post":{"summary":"Register MCP server","tags":["MCP"],"responses":{"201":{"description":"Created"}},"operationId":"postApiV1McpServers","description":"Register MCP server."}},"/api/v1/mcp/n8n":{"get":{"summary":"n8n MCP policy + serveurs détectés (org)","tags":["MCP"],"responses":{"200":{"description":"Config"}},"operationId":"getApiV1McpN8n","description":"n8n MCP policy + serveurs détectés (org)."},"patch":{"summary":"Mettre à jour la politique n8n MCP (trustUnsupervised)","tags":["MCP"],"responses":{"200":{"description":"Updated"}},"operationId":"patchApiV1McpN8n","description":"Mettre à jour la politique n8n MCP (trustUnsupervised)."}},"/api/v1/email-templates":{"get":{"summary":"List email templates (optionally filter by status or category)","tags":["Mail"],"parameters":[{"schema":{"type":"string"},"required":false,"name":"category","in":"query"},{"schema":{"type":"string","enum":["DRAFT","PUBLISHED"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"List","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"subject":{"type":"string"},"bodyMd":{"type":"string"},"variables":{"type":"array","items":{"type":"string"}},"category":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED"]},"label":{"type":"string","nullable":true},"proposedByAgentId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","subject","bodyMd","variables","category","status","label","proposedByAgentId","createdAt","updatedAt"]}}},"required":["templates"]}}}}},"operationId":"getApiV1EmailTemplates","description":"List email templates (optionally filter by status or category)."},"post":{"summary":"Create a published email template","tags":["Mail"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"subject":{"type":"string","minLength":1},"bodyMd":{"type":"string","minLength":1},"variables":{"type":"array","items":{"type":"string"}},"category":{"type":"string"}},"required":["name","subject","bodyMd"]}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"subject":{"type":"string"},"bodyMd":{"type":"string"},"variables":{"type":"array","items":{"type":"string"}},"category":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED"]},"label":{"type":"string","nullable":true},"proposedByAgentId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","subject","bodyMd","variables","category","status","label","proposedByAgentId","createdAt","updatedAt"]}}}}},"operationId":"postApiV1EmailTemplates","description":"Create a published email template."}},"/api/v1/email-templates/{id}":{"patch":{"summary":"Update an email template (rename, edit body, publish a draft)","tags":["Mail"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"subject":{"type":"string","minLength":1},"bodyMd":{"type":"string","minLength":1},"variables":{"type":"array","items":{"type":"string"}},"category":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED"]},"label":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"nullable":true},{"nullable":true}]}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"subject":{"type":"string"},"bodyMd":{"type":"string"},"variables":{"type":"array","items":{"type":"string"}},"category":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED"]},"label":{"type":"string","nullable":true},"proposedByAgentId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","subject","bodyMd","variables","category","status","label","proposedByAgentId","createdAt","updatedAt"]}}}},"409":{"description":"Conflict (name already taken or published → draft)"}},"operationId":"patchApiV1EmailTemplatesById","description":"Update an email template (rename, edit body, publish a draft)."},"delete":{"summary":"Delete an email template","tags":["Mail"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}}},"operationId":"deleteApiV1EmailTemplatesById","description":"Delete an email template."}},"/api/v1/tools":{"get":{"summary":"List available tools","tags":["Tools"],"responses":{"200":{"description":"List"}},"operationId":"getApiV1Tools","description":"List available tools."}},"/api/v1/admin/feature-flags":{"get":{"summary":"List feature flags","tags":["Admin"],"responses":{"200":{"description":"List"}},"operationId":"getApiV1AdminFeatureFlags","description":"List feature flags."}},"/api/v1/admin/diagnostics/runs/{id}":{"get":{"summary":"Diagnostic consolidé d’un AgentRun (ADMIN+)","tags":["Admin"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Run diagnostic bundle"}},"operationId":"getApiV1AdminDiagnosticsRunsById","description":"Diagnostic consolidé d’un AgentRun (ADMIN+)."}},"/api/v1/admin/diagnostics/runs/suspicious":{"get":{"summary":"Runs récents suspects à investiguer (ADMIN+)","tags":["Admin"],"parameters":[{"schema":{"type":"string"},"required":false,"name":"hours","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Suspicious runs list"}},"operationId":"getApiV1AdminDiagnosticsRunsSuspicious","description":"Runs récents suspects à investiguer (ADMIN+)."}},"/api/v1/webhooks/stripe":{"post":{"summary":"Stripe webhook endpoint","tags":["Webhooks"],"responses":{"200":{"description":"Received"}},"operationId":"postApiV1WebhooksStripe","description":"Stripe webhook endpoint."}},"/api/v1/agents/callback":{"post":{"summary":"External agent callback (currently unavailable)","tags":["Agents"],"responses":{"503":{"description":"CALLBACK_NOT_AVAILABLE"}},"operationId":"postApiV1AgentsCallback","description":"External agent callback (currently unavailable)."}},"/api/v1/metrics/stream":{"get":{"summary":"Metrics stream (SSE)","tags":["Metrics"],"responses":{"200":{"description":"SSE stream","content":{"text/event-stream":{"schema":{"type":"string"}}}}},"operationId":"getApiV1MetricsStream","description":"Metrics stream (SSE)."}},"/api/v1/metrics/roi":{"get":{"summary":"ROI metrics","tags":["Metrics"],"responses":{"200":{"description":"ROI data"}},"operationId":"getApiV1MetricsRoi","description":"ROI metrics."}},"/api/v1/tasks/stream":{"get":{"summary":"Task events stream (SSE)","tags":["Tasks"],"responses":{"200":{"description":"SSE stream","content":{"text/event-stream":{"schema":{"type":"string"}}}}},"operationId":"getApiV1TasksStream","description":"Task events stream (SSE)."}},"/api/v1/scheduler/tick":{"get":{"summary":"Trigger scheduler tick (cron)","tags":["Scheduler"],"responses":{"200":{"description":"OK"}},"operationId":"getApiV1SchedulerTick","description":"Trigger scheduler tick (cron)."}},"/api/v1/scheduler/jobs/stream":{"get":{"summary":"Scheduler jobs stream (SSE)","tags":["Scheduler"],"responses":{"200":{"description":"SSE stream","content":{"text/event-stream":{"schema":{"type":"string"}}}}},"operationId":"getApiV1SchedulerJobsStream","description":"Scheduler jobs stream (SSE)."}},"/api/v1/kb/ingest/{id}/stream":{"get":{"summary":"Ingestion progress stream (SSE)","tags":["Knowledge"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"SSE stream","content":{"text/event-stream":{"schema":{"type":"string"}}}}},"operationId":"getApiV1KbIngestByIdStream","description":"Ingestion progress stream (SSE)."}},"/api/v1/mail/threads/{id}/stream":{"get":{"summary":"Mail thread stream (SSE)","tags":["Mail"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"SSE stream","content":{"text/event-stream":{"schema":{"type":"string"}}}}},"operationId":"getApiV1MailThreadsByIdStream","description":"Mail thread stream (SSE)."}},"/api/v1/logs/llm-calls/stream":{"get":{"summary":"LLM calls stream (SSE)","tags":["Logs"],"responses":{"200":{"description":"SSE stream","content":{"text/event-stream":{"schema":{"type":"string"}}}}},"operationId":"getApiV1LogsLlmCallsStream","description":"LLM calls stream (SSE)."}},"/api/v1/me/select-org":{"post":{"summary":"Select active organization","tags":["Auth"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orgId":{"type":"string"}},"required":["orgId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}}},"operationId":"postApiV1MeSelectOrg","description":"Select active organization."}},"/api/v1/action-plans":{"get":{"summary":"Lister les plans d'action","tags":["Plans"],"parameters":[{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"projectId","in":"query"},{"schema":{"type":"string","enum":["DRAFT","ACTIVE","APPLIED","COMPLETED","ARCHIVED"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"],"additionalProperties":false}}}}},"operationId":"getApiV1ActionPlans","description":"Lister les plans d'action."},"post":{"summary":"Créer un plan d'action","description":"Exige un en-tête `Idempotency-Key` d'au moins 8 caractères.","tags":["Plans"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"logicalKey":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"title":{"type":"string","minLength":4,"maxLength":200},"objective":{"type":"string","minLength":1,"maxLength":8000},"constraints":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":100,"default":[]},"acceptanceCriteria":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]},"requiredEvidence":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]},"risks":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]},"deadline":{"type":"string","format":"date-time"},"budgetMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"priority":{"type":"string","enum":["LOW","NORMAL","HIGH","URGENT"],"default":"NORMAL"},"source":{"type":"string","enum":["USER","CHATGPT","CLAUDE","CURSOR","CODEX","GEMINI","INTERNAL","API","IMPORT"],"default":"USER"},"sourceClient":{"type":"string","minLength":1,"maxLength":100},"sourceConversationId":{"type":"string","maxLength":255},"provenance":{"type":"object","additionalProperties":{"nullable":true},"default":{}},"nextAction":{"type":"string","maxLength":2000},"structure":{"type":"object","properties":{"phases":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"title":{"type":"string","minLength":1,"maxLength":200},"objective":{"type":"string","maxLength":4000},"order":{"type":"integer","minimum":0},"acceptanceCriteria":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]},"requiredEvidence":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]},"deadline":{"type":"string","format":"date-time"},"budgetMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"risks":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]}},"required":["key","title","order"],"additionalProperties":false},"maxItems":100,"default":[]},"milestones":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"phaseKey":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":4000},"order":{"type":"integer","minimum":0},"acceptanceCriteria":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]},"requiredEvidence":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]},"dueAt":{"type":"string","format":"date-time"}},"required":["key","title","order"],"additionalProperties":false},"maxItems":200,"default":[]},"tasks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"phaseKey":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"milestoneKey":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"title":{"type":"string","minLength":4,"maxLength":500},"objective":{"type":"string","maxLength":4000},"expectedOutcome":{"type":"string","maxLength":4000},"acceptanceCriteria":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]},"requiredEvidence":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]},"priority":{"type":"string","enum":["LOW","NORMAL","HIGH","URGENT"],"default":"NORMAL"},"order":{"type":"integer","minimum":0},"dependsOn":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"maxItems":100,"default":[]},"ownerAgentId":{"type":"string","minLength":1},"humanOwnerId":{"type":"string","minLength":1},"deadline":{"type":"string","format":"date-time"},"budgetMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"estimatedEffort":{"type":"string","maxLength":100},"risks":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]},"nextAction":{"type":"string","maxLength":2000}},"required":["key","title","order"],"additionalProperties":false},"minItems":1,"maxItems":1000}},"required":["tasks"],"additionalProperties":false}},"required":["projectId","title","objective","sourceClient","structure"],"additionalProperties":false}}}},"responses":{"201":{"description":"Créé","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}},"operationId":"postApiV1ActionPlans"}},"/api/v1/action-plans/{id}":{"get":{"summary":"Lire un plan d'action","tags":["Plans"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}},"operationId":"getApiV1ActionPlansById","description":"Lire un plan d'action."},"patch":{"summary":"Modifier un plan d'action","tags":["Plans"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":4,"maxLength":200},"objective":{"type":"string","minLength":1,"maxLength":8000},"constraints":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":100,"default":[]},"acceptanceCriteria":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]},"requiredEvidence":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]},"risks":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]},"deadline":{"type":"string","format":"date-time"},"budgetMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"priority":{"type":"string","enum":["LOW","NORMAL","HIGH","URGENT"],"default":"NORMAL"},"source":{"type":"string","enum":["USER","CHATGPT","CLAUDE","CURSOR","CODEX","GEMINI","INTERNAL","API","IMPORT"],"default":"USER"},"sourceClient":{"type":"string","minLength":1,"maxLength":100},"sourceConversationId":{"type":"string","maxLength":255},"provenance":{"type":"object","additionalProperties":{"nullable":true},"default":{}},"nextAction":{"type":"string","maxLength":2000},"structure":{"type":"object","properties":{"phases":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"title":{"type":"string","minLength":1,"maxLength":200},"objective":{"type":"string","maxLength":4000},"order":{"type":"integer","minimum":0},"acceptanceCriteria":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]},"requiredEvidence":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]},"deadline":{"type":"string","format":"date-time"},"budgetMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"risks":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]}},"required":["key","title","order"],"additionalProperties":false},"maxItems":100,"default":[]},"milestones":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"phaseKey":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":4000},"order":{"type":"integer","minimum":0},"acceptanceCriteria":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]},"requiredEvidence":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]},"dueAt":{"type":"string","format":"date-time"}},"required":["key","title","order"],"additionalProperties":false},"maxItems":200,"default":[]},"tasks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"phaseKey":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"milestoneKey":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"title":{"type":"string","minLength":4,"maxLength":500},"objective":{"type":"string","maxLength":4000},"expectedOutcome":{"type":"string","maxLength":4000},"acceptanceCriteria":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]},"requiredEvidence":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]},"priority":{"type":"string","enum":["LOW","NORMAL","HIGH","URGENT"],"default":"NORMAL"},"order":{"type":"integer","minimum":0},"dependsOn":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"maxItems":100,"default":[]},"ownerAgentId":{"type":"string","minLength":1},"humanOwnerId":{"type":"string","minLength":1},"deadline":{"type":"string","format":"date-time"},"budgetMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"estimatedEffort":{"type":"string","maxLength":100},"risks":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"maxItems":100,"default":[]},"nextAction":{"type":"string","maxLength":2000}},"required":["key","title","order"],"additionalProperties":false},"minItems":1,"maxItems":1000}},"required":["tasks"],"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}},"operationId":"patchApiV1ActionPlansById","description":"Modifier un plan d'action."}},"/api/v1/action-plans/{id}/apply":{"post":{"summary":"Appliquer un plan d'action","description":"Matérialise le plan en tâches. Corps vide et strict.","tags":["Plans"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"applied":{"type":"boolean"},"id":{"type":"string"},"taskIds":{"type":"array","items":{"type":"string"}},"version":{"type":"integer"}},"required":["applied","id","taskIds","version"],"additionalProperties":false}}}}},"operationId":"postApiV1ActionPlansByIdApply"}},"/api/v1/action-plans/{id}/next-action":{"get":{"summary":"Prochaine action recommandée d'un plan","tags":["Plans"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}},"operationId":"getApiV1ActionPlansByIdNextAction","description":"Prochaine action recommandée d'un plan."}},"/api/v1/agent-runs/{id}/evidence":{"get":{"summary":"Pack de preuve de la dernière version d'un run","tags":["Agent Runs"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}},"operationId":"getApiV1AgentRunsByIdEvidence","description":"Pack de preuve de la dernière version d'un run."}},"/api/v1/agent-runs/{id}/delivery":{"get":{"summary":"Livraison à examiner : exécution, livraison, vérification, acceptation","description":"Projection canonique unique. `COMPLETED` n'implique jamais `VERIFIED` : `readyForAcceptance` exige une vérification déterministe `PASS` et un Evidence Pack complet et cohérent.","tags":["Agent Runs"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"truth":{"type":"object","properties":{"schema":{"type":"string","enum":["arcadeops.delivery-truth.v1"]},"runId":{"type":"string"},"projectId":{"type":"string","nullable":true},"taskId":{"type":"string","nullable":true},"execution":{"type":"object","properties":{"state":{"type":"string","enum":["PENDING","RUNNING","AWAITING_APPROVAL","COMPLETED","FAILED","CANCELLED"]},"reasonCode":{"type":"string","nullable":true,"enum":["EXECUTION_PENDING","EXECUTION_RUNNING","EXECUTION_AWAITING_APPROVAL","EXECUTION_FAILED","EXECUTION_CANCELLED","DELIVERY_NOT_STARTED","DELIVERY_MISSING_ARTIFACT","DELIVERY_PARTIAL","DELIVERY_PRODUCED","VERIFICATION_NOT_EVALUATED","VERIFICATION_SIGNAL_UNAVAILABLE","VERIFICATION_COVERAGE_NOT_AUTHORITATIVE","VERIFICATION_PARTIAL","VERIFICATION_FAILED","VERIFICATION_PASSED","EVIDENCE_PACK_MISSING","EVIDENCE_PACK_INCOMPLETE","EVIDENCE_PACK_STALE","EVIDENCE_PACK_SIGNATURE_INVALID","EVIDENCE_PACK_RUN_MISMATCH","POLICY_BLOCKING","AUTHORIZATION_REVOKED","ACCEPTANCE_PENDING","ACCEPTANCE_ACCEPTED","ACCEPTANCE_SELF_APPROVED","ACCEPTANCE_CHANGES_REQUESTED","ACCEPTANCE_SUPERSEDED_BY_NEW_VERSION","ACCEPTANCE_NOT_APPLICABLE","HISTORICAL_RUN_UNKNOWN"]}},"required":["state","reasonCode"]},"delivery":{"type":"object","properties":{"state":{"type":"string","enum":["MISSING","PARTIAL","PRODUCED"]},"artifactCount":{"type":"integer","minimum":0},"missingEvidence":{"type":"array","items":{"type":"string"}},"reasonCode":{"type":"string","enum":["EXECUTION_PENDING","EXECUTION_RUNNING","EXECUTION_AWAITING_APPROVAL","EXECUTION_FAILED","EXECUTION_CANCELLED","DELIVERY_NOT_STARTED","DELIVERY_MISSING_ARTIFACT","DELIVERY_PARTIAL","DELIVERY_PRODUCED","VERIFICATION_NOT_EVALUATED","VERIFICATION_SIGNAL_UNAVAILABLE","VERIFICATION_COVERAGE_NOT_AUTHORITATIVE","VERIFICATION_PARTIAL","VERIFICATION_FAILED","VERIFICATION_PASSED","EVIDENCE_PACK_MISSING","EVIDENCE_PACK_INCOMPLETE","EVIDENCE_PACK_STALE","EVIDENCE_PACK_SIGNATURE_INVALID","EVIDENCE_PACK_RUN_MISMATCH","POLICY_BLOCKING","AUTHORIZATION_REVOKED","ACCEPTANCE_PENDING","ACCEPTANCE_ACCEPTED","ACCEPTANCE_SELF_APPROVED","ACCEPTANCE_CHANGES_REQUESTED","ACCEPTANCE_SUPERSEDED_BY_NEW_VERSION","ACCEPTANCE_NOT_APPLICABLE","HISTORICAL_RUN_UNKNOWN"]}},"required":["state","artifactCount","missingEvidence","reasonCode"]},"verification":{"type":"object","properties":{"state":{"type":"string","enum":["NOT_EVALUATED","PASS","PARTIAL","FAIL"]},"goalStatus":{"type":"string","enum":["pass","partial","fail","blocked","not_evaluated"]},"verdictSource":{"type":"string","nullable":true},"deterministicVerdict":{"type":"string","nullable":true},"coverage":{"type":"string","nullable":true},"applicableChecks":{"type":"integer","nullable":true,"minimum":0},"passedChecks":{"type":"integer","nullable":true,"minimum":0},"failedChecks":{"type":"integer","nullable":true,"minimum":0},"notEvaluatedChecks":{"type":"integer","nullable":true,"minimum":0},"evidenceHash":{"type":"string","nullable":true},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"result":{"type":"string"},"detail":{"type":"string"}},"required":["id","name","result","detail"]}},"reasonCode":{"type":"string","enum":["EXECUTION_PENDING","EXECUTION_RUNNING","EXECUTION_AWAITING_APPROVAL","EXECUTION_FAILED","EXECUTION_CANCELLED","DELIVERY_NOT_STARTED","DELIVERY_MISSING_ARTIFACT","DELIVERY_PARTIAL","DELIVERY_PRODUCED","VERIFICATION_NOT_EVALUATED","VERIFICATION_SIGNAL_UNAVAILABLE","VERIFICATION_COVERAGE_NOT_AUTHORITATIVE","VERIFICATION_PARTIAL","VERIFICATION_FAILED","VERIFICATION_PASSED","EVIDENCE_PACK_MISSING","EVIDENCE_PACK_INCOMPLETE","EVIDENCE_PACK_STALE","EVIDENCE_PACK_SIGNATURE_INVALID","EVIDENCE_PACK_RUN_MISMATCH","POLICY_BLOCKING","AUTHORIZATION_REVOKED","ACCEPTANCE_PENDING","ACCEPTANCE_ACCEPTED","ACCEPTANCE_SELF_APPROVED","ACCEPTANCE_CHANGES_REQUESTED","ACCEPTANCE_SUPERSEDED_BY_NEW_VERSION","ACCEPTANCE_NOT_APPLICABLE","HISTORICAL_RUN_UNKNOWN"]}},"required":["state","goalStatus","verdictSource","deterministicVerdict","coverage","applicableChecks","passedChecks","failedChecks","notEvaluatedChecks","evidenceHash","checks","reasonCode"]},"acceptance":{"type":"object","properties":{"state":{"type":"string","enum":["NOT_APPLICABLE","PENDING","ACCEPTED","CHANGES_REQUESTED"]},"decision":{"type":"string","nullable":true,"enum":["ACCEPTED","CHANGES_REQUESTED"]},"decidedAt":{"type":"string","nullable":true},"actorDigest":{"type":"string","nullable":true},"commentDigest":{"type":"string","nullable":true},"reviewedEvidencePackSha256":{"type":"string","nullable":true},"reviewedEvidencePackVersion":{"type":"integer","nullable":true,"minimum":0},"followUpTaskId":{"type":"string","nullable":true},"selfApproved":{"type":"boolean"},"superseded":{"type":"boolean"},"reasonCode":{"type":"string","enum":["EXECUTION_PENDING","EXECUTION_RUNNING","EXECUTION_AWAITING_APPROVAL","EXECUTION_FAILED","EXECUTION_CANCELLED","DELIVERY_NOT_STARTED","DELIVERY_MISSING_ARTIFACT","DELIVERY_PARTIAL","DELIVERY_PRODUCED","VERIFICATION_NOT_EVALUATED","VERIFICATION_SIGNAL_UNAVAILABLE","VERIFICATION_COVERAGE_NOT_AUTHORITATIVE","VERIFICATION_PARTIAL","VERIFICATION_FAILED","VERIFICATION_PASSED","EVIDENCE_PACK_MISSING","EVIDENCE_PACK_INCOMPLETE","EVIDENCE_PACK_STALE","EVIDENCE_PACK_SIGNATURE_INVALID","EVIDENCE_PACK_RUN_MISMATCH","POLICY_BLOCKING","AUTHORIZATION_REVOKED","ACCEPTANCE_PENDING","ACCEPTANCE_ACCEPTED","ACCEPTANCE_SELF_APPROVED","ACCEPTANCE_CHANGES_REQUESTED","ACCEPTANCE_SUPERSEDED_BY_NEW_VERSION","ACCEPTANCE_NOT_APPLICABLE","HISTORICAL_RUN_UNKNOWN"]}},"required":["state","decision","decidedAt","actorDigest","commentDigest","reviewedEvidencePackSha256","reviewedEvidencePackVersion","followUpTaskId","selfApproved","superseded","reasonCode"]},"evidence":{"type":"object","properties":{"packId":{"type":"string","nullable":true},"packVersion":{"type":"integer","nullable":true,"minimum":0},"packSha256":{"type":"string","nullable":true},"completeness":{"type":"string","nullable":true,"enum":["COMPLETE","INCOMPLETE"]},"signatureValid":{"type":"boolean","nullable":true},"missingEvidence":{"type":"array","items":{"type":"string"}},"certificateId":{"type":"string","nullable":true},"certificateStatus":{"type":"string","nullable":true,"enum":["ISSUED","REVOKED"]}},"required":["packId","packVersion","packSha256","completeness","signatureValid","missingEvidence","certificateId","certificateStatus"]},"reviewVersionSha256":{"type":"string","nullable":true},"readyForAcceptance":{"type":"boolean"},"blockingReasons":{"type":"array","items":{"type":"string","enum":["EXECUTION_PENDING","EXECUTION_RUNNING","EXECUTION_AWAITING_APPROVAL","EXECUTION_FAILED","EXECUTION_CANCELLED","DELIVERY_NOT_STARTED","DELIVERY_MISSING_ARTIFACT","DELIVERY_PARTIAL","DELIVERY_PRODUCED","VERIFICATION_NOT_EVALUATED","VERIFICATION_SIGNAL_UNAVAILABLE","VERIFICATION_COVERAGE_NOT_AUTHORITATIVE","VERIFICATION_PARTIAL","VERIFICATION_FAILED","VERIFICATION_PASSED","EVIDENCE_PACK_MISSING","EVIDENCE_PACK_INCOMPLETE","EVIDENCE_PACK_STALE","EVIDENCE_PACK_SIGNATURE_INVALID","EVIDENCE_PACK_RUN_MISMATCH","POLICY_BLOCKING","AUTHORIZATION_REVOKED","ACCEPTANCE_PENDING","ACCEPTANCE_ACCEPTED","ACCEPTANCE_SELF_APPROVED","ACCEPTANCE_CHANGES_REQUESTED","ACCEPTANCE_SUPERSEDED_BY_NEW_VERSION","ACCEPTANCE_NOT_APPLICABLE","HISTORICAL_RUN_UNKNOWN"]}},"reasonCode":{"type":"string","enum":["EXECUTION_PENDING","EXECUTION_RUNNING","EXECUTION_AWAITING_APPROVAL","EXECUTION_FAILED","EXECUTION_CANCELLED","DELIVERY_NOT_STARTED","DELIVERY_MISSING_ARTIFACT","DELIVERY_PARTIAL","DELIVERY_PRODUCED","VERIFICATION_NOT_EVALUATED","VERIFICATION_SIGNAL_UNAVAILABLE","VERIFICATION_COVERAGE_NOT_AUTHORITATIVE","VERIFICATION_PARTIAL","VERIFICATION_FAILED","VERIFICATION_PASSED","EVIDENCE_PACK_MISSING","EVIDENCE_PACK_INCOMPLETE","EVIDENCE_PACK_STALE","EVIDENCE_PACK_SIGNATURE_INVALID","EVIDENCE_PACK_RUN_MISMATCH","POLICY_BLOCKING","AUTHORIZATION_REVOKED","ACCEPTANCE_PENDING","ACCEPTANCE_ACCEPTED","ACCEPTANCE_SELF_APPROVED","ACCEPTANCE_CHANGES_REQUESTED","ACCEPTANCE_SUPERSEDED_BY_NEW_VERSION","ACCEPTANCE_NOT_APPLICABLE","HISTORICAL_RUN_UNKNOWN"]},"displayStatus":{"type":"string"},"displayTone":{"type":"string","enum":["neutral","positive","warning","danger"]},"nextAction":{"type":"string","enum":["wait","review_and_decide","explain_block","request_verification","rework","none"]}},"required":["schema","runId","projectId","taskId","execution","delivery","verification","acceptance","evidence","reviewVersionSha256","readyForAcceptance","blockingReasons","reasonCode","displayStatus","displayTone","nextAction"],"additionalProperties":false},"run":{"type":"object","properties":{"id":{"type":"string"},"agentName":{"type":"string","nullable":true},"executionMode":{"type":"string","nullable":true},"inputSummary":{"type":"string","nullable":true},"outputSummary":{"type":"string","nullable":true},"durationMs":{"type":"integer","nullable":true,"minimum":0},"estimatedCostUsd":{"type":"number","nullable":true,"minimum":0},"startedAt":{"type":"string"},"endedAt":{"type":"string","nullable":true}},"required":["id","agentName","executionMode","inputSummary","outputSummary","durationMs","estimatedCostUsd","startedAt","endedAt"]},"mission":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"expectedOutcome":{"type":"string","nullable":true},"acceptanceCriteria":{"type":"array","items":{"type":"string"}},"requiredEvidence":{"type":"array","items":{"type":"string"}},"nextAction":{"type":"string","nullable":true}},"required":["id","title","status","expectedOutcome","acceptanceCriteria","requiredEvidence","nextAction"]},"artifacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"mimeType":{"type":"string","nullable":true},"sizeBytes":{"type":"integer","nullable":true,"minimum":0}},"required":["id","name","contentSha256","mimeType","sizeBytes"]}},"permissions":{"type":"object","properties":{"canDecide":{"type":"boolean"}},"required":["canDecide"]}},"required":["truth","run","mission","artifacts","permissions"],"additionalProperties":false}}}}},"operationId":"getApiV1AgentRunsByIdDelivery"}},"/api/v1/agent-runs/{id}/delivery/verify":{"post":{"summary":"Vérifier de façon déterministe le contrat de livraison","description":"Évalue le contrat déclaré contre l'état durable du run, enregistre une `RunEvaluation` versionnée et scelle une version d'Evidence Pack. Aucun signal manquant n'est simulé.","tags":["Agent Runs"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"201":{"description":"Créé","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string"},"verdict":{"type":"string","enum":["PASS","FAIL","NOT_APPLICABLE"]},"coverage":{"type":"string","enum":["authoritative","supporting","none"]},"applicableChecks":{"type":"integer","minimum":0},"passedChecks":{"type":"integer","minimum":0},"failedChecks":{"type":"integer","minimum":0},"unevaluated":{"type":"array","items":{"type":"string"}},"evidenceHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"evaluationId":{"type":"string","nullable":true},"evidencePackId":{"type":"string"},"evidencePackVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true},"evidencePackSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"releaseDecision":{"type":"string","enum":["READY","SAFE","BLOCKED","NEEDS_REVIEW","REJECTED"]},"truth":{"type":"object","properties":{"schema":{"type":"string","enum":["arcadeops.delivery-truth.v1"]},"runId":{"type":"string"},"projectId":{"type":"string","nullable":true},"taskId":{"type":"string","nullable":true},"execution":{"type":"object","properties":{"state":{"type":"string","enum":["PENDING","RUNNING","AWAITING_APPROVAL","COMPLETED","FAILED","CANCELLED"]},"reasonCode":{"type":"string","nullable":true,"enum":["EXECUTION_PENDING","EXECUTION_RUNNING","EXECUTION_AWAITING_APPROVAL","EXECUTION_FAILED","EXECUTION_CANCELLED","DELIVERY_NOT_STARTED","DELIVERY_MISSING_ARTIFACT","DELIVERY_PARTIAL","DELIVERY_PRODUCED","VERIFICATION_NOT_EVALUATED","VERIFICATION_SIGNAL_UNAVAILABLE","VERIFICATION_COVERAGE_NOT_AUTHORITATIVE","VERIFICATION_PARTIAL","VERIFICATION_FAILED","VERIFICATION_PASSED","EVIDENCE_PACK_MISSING","EVIDENCE_PACK_INCOMPLETE","EVIDENCE_PACK_STALE","EVIDENCE_PACK_SIGNATURE_INVALID","EVIDENCE_PACK_RUN_MISMATCH","POLICY_BLOCKING","AUTHORIZATION_REVOKED","ACCEPTANCE_PENDING","ACCEPTANCE_ACCEPTED","ACCEPTANCE_SELF_APPROVED","ACCEPTANCE_CHANGES_REQUESTED","ACCEPTANCE_SUPERSEDED_BY_NEW_VERSION","ACCEPTANCE_NOT_APPLICABLE","HISTORICAL_RUN_UNKNOWN"]}},"required":["state","reasonCode"]},"delivery":{"type":"object","properties":{"state":{"type":"string","enum":["MISSING","PARTIAL","PRODUCED"]},"artifactCount":{"type":"integer","minimum":0},"missingEvidence":{"type":"array","items":{"type":"string"}},"reasonCode":{"type":"string","enum":["EXECUTION_PENDING","EXECUTION_RUNNING","EXECUTION_AWAITING_APPROVAL","EXECUTION_FAILED","EXECUTION_CANCELLED","DELIVERY_NOT_STARTED","DELIVERY_MISSING_ARTIFACT","DELIVERY_PARTIAL","DELIVERY_PRODUCED","VERIFICATION_NOT_EVALUATED","VERIFICATION_SIGNAL_UNAVAILABLE","VERIFICATION_COVERAGE_NOT_AUTHORITATIVE","VERIFICATION_PARTIAL","VERIFICATION_FAILED","VERIFICATION_PASSED","EVIDENCE_PACK_MISSING","EVIDENCE_PACK_INCOMPLETE","EVIDENCE_PACK_STALE","EVIDENCE_PACK_SIGNATURE_INVALID","EVIDENCE_PACK_RUN_MISMATCH","POLICY_BLOCKING","AUTHORIZATION_REVOKED","ACCEPTANCE_PENDING","ACCEPTANCE_ACCEPTED","ACCEPTANCE_SELF_APPROVED","ACCEPTANCE_CHANGES_REQUESTED","ACCEPTANCE_SUPERSEDED_BY_NEW_VERSION","ACCEPTANCE_NOT_APPLICABLE","HISTORICAL_RUN_UNKNOWN"]}},"required":["state","artifactCount","missingEvidence","reasonCode"]},"verification":{"type":"object","properties":{"state":{"type":"string","enum":["NOT_EVALUATED","PASS","PARTIAL","FAIL"]},"goalStatus":{"type":"string","enum":["pass","partial","fail","blocked","not_evaluated"]},"verdictSource":{"type":"string","nullable":true},"deterministicVerdict":{"type":"string","nullable":true},"coverage":{"type":"string","nullable":true},"applicableChecks":{"type":"integer","nullable":true,"minimum":0},"passedChecks":{"type":"integer","nullable":true,"minimum":0},"failedChecks":{"type":"integer","nullable":true,"minimum":0},"notEvaluatedChecks":{"type":"integer","nullable":true,"minimum":0},"evidenceHash":{"type":"string","nullable":true},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"result":{"type":"string"},"detail":{"type":"string"}},"required":["id","name","result","detail"]}},"reasonCode":{"type":"string","enum":["EXECUTION_PENDING","EXECUTION_RUNNING","EXECUTION_AWAITING_APPROVAL","EXECUTION_FAILED","EXECUTION_CANCELLED","DELIVERY_NOT_STARTED","DELIVERY_MISSING_ARTIFACT","DELIVERY_PARTIAL","DELIVERY_PRODUCED","VERIFICATION_NOT_EVALUATED","VERIFICATION_SIGNAL_UNAVAILABLE","VERIFICATION_COVERAGE_NOT_AUTHORITATIVE","VERIFICATION_PARTIAL","VERIFICATION_FAILED","VERIFICATION_PASSED","EVIDENCE_PACK_MISSING","EVIDENCE_PACK_INCOMPLETE","EVIDENCE_PACK_STALE","EVIDENCE_PACK_SIGNATURE_INVALID","EVIDENCE_PACK_RUN_MISMATCH","POLICY_BLOCKING","AUTHORIZATION_REVOKED","ACCEPTANCE_PENDING","ACCEPTANCE_ACCEPTED","ACCEPTANCE_SELF_APPROVED","ACCEPTANCE_CHANGES_REQUESTED","ACCEPTANCE_SUPERSEDED_BY_NEW_VERSION","ACCEPTANCE_NOT_APPLICABLE","HISTORICAL_RUN_UNKNOWN"]}},"required":["state","goalStatus","verdictSource","deterministicVerdict","coverage","applicableChecks","passedChecks","failedChecks","notEvaluatedChecks","evidenceHash","checks","reasonCode"]},"acceptance":{"type":"object","properties":{"state":{"type":"string","enum":["NOT_APPLICABLE","PENDING","ACCEPTED","CHANGES_REQUESTED"]},"decision":{"type":"string","nullable":true,"enum":["ACCEPTED","CHANGES_REQUESTED"]},"decidedAt":{"type":"string","nullable":true},"actorDigest":{"type":"string","nullable":true},"commentDigest":{"type":"string","nullable":true},"reviewedEvidencePackSha256":{"type":"string","nullable":true},"reviewedEvidencePackVersion":{"type":"integer","nullable":true,"minimum":0},"followUpTaskId":{"type":"string","nullable":true},"selfApproved":{"type":"boolean"},"superseded":{"type":"boolean"},"reasonCode":{"type":"string","enum":["EXECUTION_PENDING","EXECUTION_RUNNING","EXECUTION_AWAITING_APPROVAL","EXECUTION_FAILED","EXECUTION_CANCELLED","DELIVERY_NOT_STARTED","DELIVERY_MISSING_ARTIFACT","DELIVERY_PARTIAL","DELIVERY_PRODUCED","VERIFICATION_NOT_EVALUATED","VERIFICATION_SIGNAL_UNAVAILABLE","VERIFICATION_COVERAGE_NOT_AUTHORITATIVE","VERIFICATION_PARTIAL","VERIFICATION_FAILED","VERIFICATION_PASSED","EVIDENCE_PACK_MISSING","EVIDENCE_PACK_INCOMPLETE","EVIDENCE_PACK_STALE","EVIDENCE_PACK_SIGNATURE_INVALID","EVIDENCE_PACK_RUN_MISMATCH","POLICY_BLOCKING","AUTHORIZATION_REVOKED","ACCEPTANCE_PENDING","ACCEPTANCE_ACCEPTED","ACCEPTANCE_SELF_APPROVED","ACCEPTANCE_CHANGES_REQUESTED","ACCEPTANCE_SUPERSEDED_BY_NEW_VERSION","ACCEPTANCE_NOT_APPLICABLE","HISTORICAL_RUN_UNKNOWN"]}},"required":["state","decision","decidedAt","actorDigest","commentDigest","reviewedEvidencePackSha256","reviewedEvidencePackVersion","followUpTaskId","selfApproved","superseded","reasonCode"]},"evidence":{"type":"object","properties":{"packId":{"type":"string","nullable":true},"packVersion":{"type":"integer","nullable":true,"minimum":0},"packSha256":{"type":"string","nullable":true},"completeness":{"type":"string","nullable":true,"enum":["COMPLETE","INCOMPLETE"]},"signatureValid":{"type":"boolean","nullable":true},"missingEvidence":{"type":"array","items":{"type":"string"}},"certificateId":{"type":"string","nullable":true},"certificateStatus":{"type":"string","nullable":true,"enum":["ISSUED","REVOKED"]}},"required":["packId","packVersion","packSha256","completeness","signatureValid","missingEvidence","certificateId","certificateStatus"]},"reviewVersionSha256":{"type":"string","nullable":true},"readyForAcceptance":{"type":"boolean"},"blockingReasons":{"type":"array","items":{"type":"string","enum":["EXECUTION_PENDING","EXECUTION_RUNNING","EXECUTION_AWAITING_APPROVAL","EXECUTION_FAILED","EXECUTION_CANCELLED","DELIVERY_NOT_STARTED","DELIVERY_MISSING_ARTIFACT","DELIVERY_PARTIAL","DELIVERY_PRODUCED","VERIFICATION_NOT_EVALUATED","VERIFICATION_SIGNAL_UNAVAILABLE","VERIFICATION_COVERAGE_NOT_AUTHORITATIVE","VERIFICATION_PARTIAL","VERIFICATION_FAILED","VERIFICATION_PASSED","EVIDENCE_PACK_MISSING","EVIDENCE_PACK_INCOMPLETE","EVIDENCE_PACK_STALE","EVIDENCE_PACK_SIGNATURE_INVALID","EVIDENCE_PACK_RUN_MISMATCH","POLICY_BLOCKING","AUTHORIZATION_REVOKED","ACCEPTANCE_PENDING","ACCEPTANCE_ACCEPTED","ACCEPTANCE_SELF_APPROVED","ACCEPTANCE_CHANGES_REQUESTED","ACCEPTANCE_SUPERSEDED_BY_NEW_VERSION","ACCEPTANCE_NOT_APPLICABLE","HISTORICAL_RUN_UNKNOWN"]}},"reasonCode":{"type":"string","enum":["EXECUTION_PENDING","EXECUTION_RUNNING","EXECUTION_AWAITING_APPROVAL","EXECUTION_FAILED","EXECUTION_CANCELLED","DELIVERY_NOT_STARTED","DELIVERY_MISSING_ARTIFACT","DELIVERY_PARTIAL","DELIVERY_PRODUCED","VERIFICATION_NOT_EVALUATED","VERIFICATION_SIGNAL_UNAVAILABLE","VERIFICATION_COVERAGE_NOT_AUTHORITATIVE","VERIFICATION_PARTIAL","VERIFICATION_FAILED","VERIFICATION_PASSED","EVIDENCE_PACK_MISSING","EVIDENCE_PACK_INCOMPLETE","EVIDENCE_PACK_STALE","EVIDENCE_PACK_SIGNATURE_INVALID","EVIDENCE_PACK_RUN_MISMATCH","POLICY_BLOCKING","AUTHORIZATION_REVOKED","ACCEPTANCE_PENDING","ACCEPTANCE_ACCEPTED","ACCEPTANCE_SELF_APPROVED","ACCEPTANCE_CHANGES_REQUESTED","ACCEPTANCE_SUPERSEDED_BY_NEW_VERSION","ACCEPTANCE_NOT_APPLICABLE","HISTORICAL_RUN_UNKNOWN"]},"displayStatus":{"type":"string"},"displayTone":{"type":"string","enum":["neutral","positive","warning","danger"]},"nextAction":{"type":"string","enum":["wait","review_and_decide","explain_block","request_verification","rework","none"]}},"required":["schema","runId","projectId","taskId","execution","delivery","verification","acceptance","evidence","reviewVersionSha256","readyForAcceptance","blockingReasons","reasonCode","displayStatus","displayTone","nextAction"],"additionalProperties":false}},"required":["runId","verdict","coverage","applicableChecks","passedChecks","failedChecks","unevaluated","evidenceHash","evaluationId","evidencePackId","evidencePackVersion","evidencePackSha256","releaseDecision","truth"],"additionalProperties":false}}}}},"operationId":"postApiV1AgentRunsByIdDeliveryVerify"}},"/api/v1/agent-runs/{id}/delivery/decision":{"post":{"summary":"Accepter la livraison ou demander des modifications","description":"Décision produit humaine, liée à la version de preuves examinée (`expectedEvidencePackSha256`) et rendue idempotente par `idempotencyKey`. Rôle minimum : MANAGER.","tags":["Agent Runs"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["ACCEPTED","CHANGES_REQUESTED"]},"expectedEvidencePackSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"comment":{"type":"string","maxLength":2000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["decision","expectedEvidencePackSha256","idempotencyKey"],"additionalProperties":false}}}},"responses":{"201":{"description":"Créé","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string"},"decision":{"type":"string","enum":["ACCEPTED","CHANGES_REQUESTED"]},"replayed":{"type":"boolean"},"evidencePackId":{"type":"string","nullable":true},"evidencePackVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true},"evidencePackSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"reviewedEvidencePackSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"decidedAt":{"type":"string"},"followUpTaskId":{"type":"string","nullable":true},"nextAction":{"type":"string","nullable":true},"truth":{"type":"object","properties":{"schema":{"type":"string","enum":["arcadeops.delivery-truth.v1"]},"runId":{"type":"string"},"projectId":{"type":"string","nullable":true},"taskId":{"type":"string","nullable":true},"execution":{"type":"object","properties":{"state":{"type":"string","enum":["PENDING","RUNNING","AWAITING_APPROVAL","COMPLETED","FAILED","CANCELLED"]},"reasonCode":{"type":"string","nullable":true,"enum":["EXECUTION_PENDING","EXECUTION_RUNNING","EXECUTION_AWAITING_APPROVAL","EXECUTION_FAILED","EXECUTION_CANCELLED","DELIVERY_NOT_STARTED","DELIVERY_MISSING_ARTIFACT","DELIVERY_PARTIAL","DELIVERY_PRODUCED","VERIFICATION_NOT_EVALUATED","VERIFICATION_SIGNAL_UNAVAILABLE","VERIFICATION_COVERAGE_NOT_AUTHORITATIVE","VERIFICATION_PARTIAL","VERIFICATION_FAILED","VERIFICATION_PASSED","EVIDENCE_PACK_MISSING","EVIDENCE_PACK_INCOMPLETE","EVIDENCE_PACK_STALE","EVIDENCE_PACK_SIGNATURE_INVALID","EVIDENCE_PACK_RUN_MISMATCH","POLICY_BLOCKING","AUTHORIZATION_REVOKED","ACCEPTANCE_PENDING","ACCEPTANCE_ACCEPTED","ACCEPTANCE_SELF_APPROVED","ACCEPTANCE_CHANGES_REQUESTED","ACCEPTANCE_SUPERSEDED_BY_NEW_VERSION","ACCEPTANCE_NOT_APPLICABLE","HISTORICAL_RUN_UNKNOWN"]}},"required":["state","reasonCode"]},"delivery":{"type":"object","properties":{"state":{"type":"string","enum":["MISSING","PARTIAL","PRODUCED"]},"artifactCount":{"type":"integer","minimum":0},"missingEvidence":{"type":"array","items":{"type":"string"}},"reasonCode":{"type":"string","enum":["EXECUTION_PENDING","EXECUTION_RUNNING","EXECUTION_AWAITING_APPROVAL","EXECUTION_FAILED","EXECUTION_CANCELLED","DELIVERY_NOT_STARTED","DELIVERY_MISSING_ARTIFACT","DELIVERY_PARTIAL","DELIVERY_PRODUCED","VERIFICATION_NOT_EVALUATED","VERIFICATION_SIGNAL_UNAVAILABLE","VERIFICATION_COVERAGE_NOT_AUTHORITATIVE","VERIFICATION_PARTIAL","VERIFICATION_FAILED","VERIFICATION_PASSED","EVIDENCE_PACK_MISSING","EVIDENCE_PACK_INCOMPLETE","EVIDENCE_PACK_STALE","EVIDENCE_PACK_SIGNATURE_INVALID","EVIDENCE_PACK_RUN_MISMATCH","POLICY_BLOCKING","AUTHORIZATION_REVOKED","ACCEPTANCE_PENDING","ACCEPTANCE_ACCEPTED","ACCEPTANCE_SELF_APPROVED","ACCEPTANCE_CHANGES_REQUESTED","ACCEPTANCE_SUPERSEDED_BY_NEW_VERSION","ACCEPTANCE_NOT_APPLICABLE","HISTORICAL_RUN_UNKNOWN"]}},"required":["state","artifactCount","missingEvidence","reasonCode"]},"verification":{"type":"object","properties":{"state":{"type":"string","enum":["NOT_EVALUATED","PASS","PARTIAL","FAIL"]},"goalStatus":{"type":"string","enum":["pass","partial","fail","blocked","not_evaluated"]},"verdictSource":{"type":"string","nullable":true},"deterministicVerdict":{"type":"string","nullable":true},"coverage":{"type":"string","nullable":true},"applicableChecks":{"type":"integer","nullable":true,"minimum":0},"passedChecks":{"type":"integer","nullable":true,"minimum":0},"failedChecks":{"type":"integer","nullable":true,"minimum":0},"notEvaluatedChecks":{"type":"integer","nullable":true,"minimum":0},"evidenceHash":{"type":"string","nullable":true},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"result":{"type":"string"},"detail":{"type":"string"}},"required":["id","name","result","detail"]}},"reasonCode":{"type":"string","enum":["EXECUTION_PENDING","EXECUTION_RUNNING","EXECUTION_AWAITING_APPROVAL","EXECUTION_FAILED","EXECUTION_CANCELLED","DELIVERY_NOT_STARTED","DELIVERY_MISSING_ARTIFACT","DELIVERY_PARTIAL","DELIVERY_PRODUCED","VERIFICATION_NOT_EVALUATED","VERIFICATION_SIGNAL_UNAVAILABLE","VERIFICATION_COVERAGE_NOT_AUTHORITATIVE","VERIFICATION_PARTIAL","VERIFICATION_FAILED","VERIFICATION_PASSED","EVIDENCE_PACK_MISSING","EVIDENCE_PACK_INCOMPLETE","EVIDENCE_PACK_STALE","EVIDENCE_PACK_SIGNATURE_INVALID","EVIDENCE_PACK_RUN_MISMATCH","POLICY_BLOCKING","AUTHORIZATION_REVOKED","ACCEPTANCE_PENDING","ACCEPTANCE_ACCEPTED","ACCEPTANCE_SELF_APPROVED","ACCEPTANCE_CHANGES_REQUESTED","ACCEPTANCE_SUPERSEDED_BY_NEW_VERSION","ACCEPTANCE_NOT_APPLICABLE","HISTORICAL_RUN_UNKNOWN"]}},"required":["state","goalStatus","verdictSource","deterministicVerdict","coverage","applicableChecks","passedChecks","failedChecks","notEvaluatedChecks","evidenceHash","checks","reasonCode"]},"acceptance":{"type":"object","properties":{"state":{"type":"string","enum":["NOT_APPLICABLE","PENDING","ACCEPTED","CHANGES_REQUESTED"]},"decision":{"type":"string","nullable":true,"enum":["ACCEPTED","CHANGES_REQUESTED"]},"decidedAt":{"type":"string","nullable":true},"actorDigest":{"type":"string","nullable":true},"commentDigest":{"type":"string","nullable":true},"reviewedEvidencePackSha256":{"type":"string","nullable":true},"reviewedEvidencePackVersion":{"type":"integer","nullable":true,"minimum":0},"followUpTaskId":{"type":"string","nullable":true},"selfApproved":{"type":"boolean"},"superseded":{"type":"boolean"},"reasonCode":{"type":"string","enum":["EXECUTION_PENDING","EXECUTION_RUNNING","EXECUTION_AWAITING_APPROVAL","EXECUTION_FAILED","EXECUTION_CANCELLED","DELIVERY_NOT_STARTED","DELIVERY_MISSING_ARTIFACT","DELIVERY_PARTIAL","DELIVERY_PRODUCED","VERIFICATION_NOT_EVALUATED","VERIFICATION_SIGNAL_UNAVAILABLE","VERIFICATION_COVERAGE_NOT_AUTHORITATIVE","VERIFICATION_PARTIAL","VERIFICATION_FAILED","VERIFICATION_PASSED","EVIDENCE_PACK_MISSING","EVIDENCE_PACK_INCOMPLETE","EVIDENCE_PACK_STALE","EVIDENCE_PACK_SIGNATURE_INVALID","EVIDENCE_PACK_RUN_MISMATCH","POLICY_BLOCKING","AUTHORIZATION_REVOKED","ACCEPTANCE_PENDING","ACCEPTANCE_ACCEPTED","ACCEPTANCE_SELF_APPROVED","ACCEPTANCE_CHANGES_REQUESTED","ACCEPTANCE_SUPERSEDED_BY_NEW_VERSION","ACCEPTANCE_NOT_APPLICABLE","HISTORICAL_RUN_UNKNOWN"]}},"required":["state","decision","decidedAt","actorDigest","commentDigest","reviewedEvidencePackSha256","reviewedEvidencePackVersion","followUpTaskId","selfApproved","superseded","reasonCode"]},"evidence":{"type":"object","properties":{"packId":{"type":"string","nullable":true},"packVersion":{"type":"integer","nullable":true,"minimum":0},"packSha256":{"type":"string","nullable":true},"completeness":{"type":"string","nullable":true,"enum":["COMPLETE","INCOMPLETE"]},"signatureValid":{"type":"boolean","nullable":true},"missingEvidence":{"type":"array","items":{"type":"string"}},"certificateId":{"type":"string","nullable":true},"certificateStatus":{"type":"string","nullable":true,"enum":["ISSUED","REVOKED"]}},"required":["packId","packVersion","packSha256","completeness","signatureValid","missingEvidence","certificateId","certificateStatus"]},"reviewVersionSha256":{"type":"string","nullable":true},"readyForAcceptance":{"type":"boolean"},"blockingReasons":{"type":"array","items":{"type":"string","enum":["EXECUTION_PENDING","EXECUTION_RUNNING","EXECUTION_AWAITING_APPROVAL","EXECUTION_FAILED","EXECUTION_CANCELLED","DELIVERY_NOT_STARTED","DELIVERY_MISSING_ARTIFACT","DELIVERY_PARTIAL","DELIVERY_PRODUCED","VERIFICATION_NOT_EVALUATED","VERIFICATION_SIGNAL_UNAVAILABLE","VERIFICATION_COVERAGE_NOT_AUTHORITATIVE","VERIFICATION_PARTIAL","VERIFICATION_FAILED","VERIFICATION_PASSED","EVIDENCE_PACK_MISSING","EVIDENCE_PACK_INCOMPLETE","EVIDENCE_PACK_STALE","EVIDENCE_PACK_SIGNATURE_INVALID","EVIDENCE_PACK_RUN_MISMATCH","POLICY_BLOCKING","AUTHORIZATION_REVOKED","ACCEPTANCE_PENDING","ACCEPTANCE_ACCEPTED","ACCEPTANCE_SELF_APPROVED","ACCEPTANCE_CHANGES_REQUESTED","ACCEPTANCE_SUPERSEDED_BY_NEW_VERSION","ACCEPTANCE_NOT_APPLICABLE","HISTORICAL_RUN_UNKNOWN"]}},"reasonCode":{"type":"string","enum":["EXECUTION_PENDING","EXECUTION_RUNNING","EXECUTION_AWAITING_APPROVAL","EXECUTION_FAILED","EXECUTION_CANCELLED","DELIVERY_NOT_STARTED","DELIVERY_MISSING_ARTIFACT","DELIVERY_PARTIAL","DELIVERY_PRODUCED","VERIFICATION_NOT_EVALUATED","VERIFICATION_SIGNAL_UNAVAILABLE","VERIFICATION_COVERAGE_NOT_AUTHORITATIVE","VERIFICATION_PARTIAL","VERIFICATION_FAILED","VERIFICATION_PASSED","EVIDENCE_PACK_MISSING","EVIDENCE_PACK_INCOMPLETE","EVIDENCE_PACK_STALE","EVIDENCE_PACK_SIGNATURE_INVALID","EVIDENCE_PACK_RUN_MISMATCH","POLICY_BLOCKING","AUTHORIZATION_REVOKED","ACCEPTANCE_PENDING","ACCEPTANCE_ACCEPTED","ACCEPTANCE_SELF_APPROVED","ACCEPTANCE_CHANGES_REQUESTED","ACCEPTANCE_SUPERSEDED_BY_NEW_VERSION","ACCEPTANCE_NOT_APPLICABLE","HISTORICAL_RUN_UNKNOWN"]},"displayStatus":{"type":"string"},"displayTone":{"type":"string","enum":["neutral","positive","warning","danger"]},"nextAction":{"type":"string","enum":["wait","review_and_decide","explain_block","request_verification","rework","none"]}},"required":["schema","runId","projectId","taskId","execution","delivery","verification","acceptance","evidence","reviewVersionSha256","readyForAcceptance","blockingReasons","reasonCode","displayStatus","displayTone","nextAction"],"additionalProperties":false}},"required":["runId","decision","replayed","evidencePackId","evidencePackVersion","evidencePackSha256","reviewedEvidencePackSha256","decidedAt","followUpTaskId","nextAction","truth"],"additionalProperties":false}}}}},"operationId":"postApiV1AgentRunsByIdDeliveryDecision"}},"/api/v1/agent-runs/{id}/explain-block":{"get":{"summary":"Expliquer pourquoi un run est bloqué","tags":["Agent Runs"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"approvalRequired":{"type":"boolean"},"causes":{"type":"array","items":{"type":"string"}},"minimumAction":{"type":"string"},"missingEvidence":{"type":"array","items":{"type":"string"}},"releaseDecision":{"type":"string","nullable":true},"runId":{"type":"string"},"unsatisfiedCriteria":{"type":"array","items":{"type":"string"}}},"required":["approvalRequired","causes","minimumAction","missingEvidence","releaseDecision","runId","unsatisfiedCriteria"]}}}}},"operationId":"getApiV1AgentRunsByIdExplainBlock","description":"Expliquer pourquoi un run est bloqué."}},"/api/v1/context-items":{"get":{"summary":"Lister les éléments de contexte","tags":["Contexte"],"parameters":[{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"projectId","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"],"additionalProperties":false}}}}},"operationId":"getApiV1ContextItems","description":"Lister les éléments de contexte."},"post":{"summary":"Enregistrer un élément de contexte","tags":["Contexte"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"logicalKey":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"type":{"type":"string","enum":["FACT","DECISION","OBJECTIVE","CONSTRAINT","NOTE","RISK","ASSUMPTION","LINK","DOCUMENT","DOCUMENT_SUMMARY","PROMPT","LESSON_LEARNED"]},"title":{"type":"string","minLength":1,"maxLength":300},"content":{"type":"string","minLength":1,"maxLength":200000},"summary":{"type":"string","maxLength":8000},"sourceClient":{"type":"string","minLength":1,"maxLength":100},"sourceProvider":{"type":"string","maxLength":100},"sourceModel":{"type":"string","maxLength":200},"sourceConversationId":{"type":"string","maxLength":255},"sourceRunId":{"type":"string","minLength":1},"sourceDocumentId":{"type":"string","minLength":1},"sensitivity":{"type":"string","enum":["PUBLIC","INTERNAL","CONFIDENTIAL","RESTRICTED"],"default":"INTERNAL"},"verificationStatus":{"type":"string","enum":["VERIFIED","UNVERIFIED","DISPUTED"],"default":"UNVERIFIED"},"confidence":{"type":"number","minimum":0,"maximum":1},"provenance":{"type":"object","additionalProperties":{"nullable":true}},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":100,"default":[]},"permissions":{"type":"object","additionalProperties":{"nullable":true}},"retentionUntil":{"type":"string","format":"date-time"}},"required":["type","title","content","sourceClient","provenance"],"additionalProperties":false}}}},"responses":{"201":{"description":"Créé","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}},"operationId":"postApiV1ContextItems","description":"Enregistrer un élément de contexte."}},"/api/v1/context-items/sources":{"get":{"summary":"Sources de contexte disponibles","tags":["Contexte"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}},"operationId":"getApiV1ContextItemsSources","description":"Sources de contexte disponibles."}},"/api/v1/context-items/{id}":{"get":{"summary":"Lire un élément de contexte","tags":["Contexte"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}},"operationId":"getApiV1ContextItemsById","description":"Lire un élément de contexte."}},"/api/v1/context-items/{id}/archive":{"post":{"summary":"Archiver un élément de contexte","tags":["Contexte"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}},"operationId":"postApiV1ContextItemsByIdArchive","description":"Archiver un élément de contexte."}},"/api/v1/context-items/{id}/pin":{"post":{"summary":"Épingler ou désépingler un élément de contexte","tags":["Contexte"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"pinned":{"type":"boolean","default":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}},"operationId":"postApiV1ContextItemsByIdPin","description":"Épingler ou désépingler un élément de contexte."}},"/api/v1/context-items/{id}/supersede":{"post":{"summary":"Remplacer un élément de contexte par une nouvelle version","tags":["Contexte"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"type":{"type":"string","enum":["FACT","DECISION","OBJECTIVE","CONSTRAINT","NOTE","RISK","ASSUMPTION","LINK","DOCUMENT","DOCUMENT_SUMMARY","PROMPT","LESSON_LEARNED"]},"title":{"type":"string","minLength":1,"maxLength":300},"content":{"type":"string","minLength":1,"maxLength":200000},"summary":{"type":"string","maxLength":8000},"sourceClient":{"type":"string","minLength":1,"maxLength":100},"sourceProvider":{"type":"string","maxLength":100},"sourceModel":{"type":"string","maxLength":200},"sourceConversationId":{"type":"string","maxLength":255},"sourceRunId":{"type":"string","minLength":1},"sourceDocumentId":{"type":"string","minLength":1},"sensitivity":{"type":"string","enum":["PUBLIC","INTERNAL","CONFIDENTIAL","RESTRICTED"],"default":"INTERNAL"},"verificationStatus":{"type":"string","enum":["VERIFIED","UNVERIFIED","DISPUTED"],"default":"UNVERIFIED"},"confidence":{"type":"number","minimum":0,"maximum":1},"provenance":{"type":"object","additionalProperties":{"nullable":true}},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":100,"default":[]},"permissions":{"type":"object","additionalProperties":{"nullable":true}},"retentionUntil":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"responses":{"201":{"description":"Créé","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}},"operationId":"postApiV1ContextItemsByIdSupersede","description":"Remplacer un élément de contexte par une nouvelle version."}},"/api/v1/projects/{id}/context":{"get":{"summary":"Contexte d'un projet","tags":["Contexte"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}},"operationId":"getApiV1ProjectsByIdContext","description":"Contexte d'un projet."}},"/api/v1/release-certificates":{"get":{"summary":"Lister les certificats de release","tags":["Release"],"parameters":[{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1ReleaseCertificates","description":"Lister les certificats de release."}},"/api/v1/release-certificates/verify":{"post":{"summary":"Vérifier un certificat de release par son empreinte","tags":["Release"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"certificateHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["certificateHash"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"certificateId":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true},"runId":{"type":"string","nullable":true},"valid":{"type":"boolean"}},"required":["certificateId","reason","runId","valid"]}}}}},"operationId":"postApiV1ReleaseCertificatesVerify","description":"Vérifier un certificat de release par son empreinte."}},"/api/v1/release-certificates/{id}/revoke":{"post":{"summary":"Révoquer un certificat de release","description":"Le motif est obligatoire : une révocation sans raison n'est pas opposable.","tags":["Release"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":1000}},"required":["reason"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["REVOKED"]}},"required":["id","status"]}}}}},"operationId":"postApiV1ReleaseCertificatesByIdRevoke"}},"/api/v1/runs/ingest":{"post":{"summary":"Ingérer un run externe signé","tags":["Runs externes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["arcadeops.external-run.v1"]},"source":{"type":"string","enum":["GENERIC_WEBHOOK","GITHUB_ACTIONS"]},"provider":{"type":"string","minLength":1,"maxLength":120},"client":{"type":"string","minLength":1,"maxLength":120},"runId":{"type":"string","minLength":1,"maxLength":191},"projectId":{"type":"string","minLength":1,"maxLength":191},"taskId":{"type":"string","minLength":1,"maxLength":191},"objective":{"type":"string","minLength":1,"maxLength":10000},"resultSummary":{"type":"string","minLength":1,"maxLength":10000},"constraints":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":100,"default":[]},"requestedModel":{"type":"string","minLength":1,"maxLength":200},"actualModel":{"type":"string","minLength":1,"maxLength":200},"tools":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":200,"default":[]},"events":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":120},"at":{"type":"string","format":"date-time"},"summary":{"type":"string","minLength":1,"maxLength":2000}},"required":["type","at","summary"],"additionalProperties":false},"maxItems":1000,"default":[]},"artifacts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"mimeType":{"type":"string","minLength":1,"maxLength":150},"sizeBytes":{"type":"integer","minimum":0,"maximum":100000000},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"uri":{"type":"string","maxLength":2000,"format":"uri"}},"required":["name","mimeType","sizeBytes","sha256"],"additionalProperties":false},"maxItems":200,"default":[]},"criteria":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z0-9._:-]+$"},"description":{"type":"string","minLength":1,"maxLength":2000},"requiredEvidence":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z0-9._:-]+$"},"maxItems":100,"default":[]}},"required":["key","description"],"additionalProperties":false},"minItems":1,"maxItems":200},"evidence":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z0-9._:-]+$"},"type":{"type":"string","enum":["TEST","ASSERTION","ARTIFACT","LOG","SOURCE","HUMAN_APPROVAL"]},"status":{"type":"string","enum":["PASS","FAIL"]},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"summary":{"type":"string","minLength":1,"maxLength":2000},"source":{"type":"string","minLength":1,"maxLength":500},"capturedAt":{"type":"string","format":"date-time"}},"required":["key","type","status","summary","capturedAt"],"additionalProperties":false},"maxItems":500,"default":[]},"declaredStatus":{"type":"string","enum":["QUEUED","RUNNING","COMPLETED","FAILED","CANCELLED"]},"startedAt":{"type":"string","format":"date-time"},"endedAt":{"type":"string","format":"date-time"},"costMicros":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":0},"currency":{"type":"string","enum":["USD"],"default":"USD"},"repository":{"type":"string","pattern":"^[a-z0-9._-]+\\/[a-z0-9._-]+$"},"commitSha":{"type":"string","pattern":"^(?:[a-f0-9]{40}|[a-f0-9]{64})$"}},"required":["schemaVersion","source","provider","client","projectId","objective","criteria","declaredStatus","startedAt"],"additionalProperties":false}}}},"responses":{"201":{"description":"Ingéré","content":{"application/json":{"schema":{"type":"object","properties":{"ingestionId":{"type":"string"},"runId":{"type":"string"},"replayed":{"type":"boolean"},"technicalStatus":{"type":"string","enum":["PENDING","RUNNING","COMPLETED","FAILED","CANCELLED"]},"releaseDecision":{"type":"string","enum":["READY","BLOCKED","NEEDS_REVIEW","REJECTED"]},"evidencePackId":{"type":"string"},"evidenceHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"missingEvidence":{"type":"array","items":{"type":"string"}},"certificateId":{"type":"string","nullable":true},"certificateHash":{"type":"string","nullable":true,"pattern":"^[a-f0-9]{64}$"}},"required":["ingestionId","runId","replayed","technicalStatus","releaseDecision","evidencePackId","evidenceHash","missingEvidence","certificateId","certificateHash"]}}}}},"operationId":"postApiV1RunsIngest","description":"Ingérer un run externe signé."}},"/api/v1/runs/ingest/authenticated":{"post":{"summary":"Ingérer un run externe sous identité authentifiée","tags":["Runs externes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["arcadeops.external-run.v1"]},"source":{"type":"string","enum":["GENERIC_WEBHOOK","GITHUB_ACTIONS"]},"provider":{"type":"string","minLength":1,"maxLength":120},"client":{"type":"string","minLength":1,"maxLength":120},"runId":{"type":"string","minLength":1,"maxLength":191},"projectId":{"type":"string","minLength":1,"maxLength":191},"taskId":{"type":"string","minLength":1,"maxLength":191},"objective":{"type":"string","minLength":1,"maxLength":10000},"resultSummary":{"type":"string","minLength":1,"maxLength":10000},"constraints":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":100,"default":[]},"requestedModel":{"type":"string","minLength":1,"maxLength":200},"actualModel":{"type":"string","minLength":1,"maxLength":200},"tools":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":200,"default":[]},"events":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":120},"at":{"type":"string","format":"date-time"},"summary":{"type":"string","minLength":1,"maxLength":2000}},"required":["type","at","summary"],"additionalProperties":false},"maxItems":1000,"default":[]},"artifacts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"mimeType":{"type":"string","minLength":1,"maxLength":150},"sizeBytes":{"type":"integer","minimum":0,"maximum":100000000},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"uri":{"type":"string","maxLength":2000,"format":"uri"}},"required":["name","mimeType","sizeBytes","sha256"],"additionalProperties":false},"maxItems":200,"default":[]},"criteria":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z0-9._:-]+$"},"description":{"type":"string","minLength":1,"maxLength":2000},"requiredEvidence":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z0-9._:-]+$"},"maxItems":100,"default":[]}},"required":["key","description"],"additionalProperties":false},"minItems":1,"maxItems":200},"evidence":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z0-9._:-]+$"},"type":{"type":"string","enum":["TEST","ASSERTION","ARTIFACT","LOG","SOURCE","HUMAN_APPROVAL"]},"status":{"type":"string","enum":["PASS","FAIL"]},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"summary":{"type":"string","minLength":1,"maxLength":2000},"source":{"type":"string","minLength":1,"maxLength":500},"capturedAt":{"type":"string","format":"date-time"}},"required":["key","type","status","summary","capturedAt"],"additionalProperties":false},"maxItems":500,"default":[]},"declaredStatus":{"type":"string","enum":["QUEUED","RUNNING","COMPLETED","FAILED","CANCELLED"]},"startedAt":{"type":"string","format":"date-time"},"endedAt":{"type":"string","format":"date-time"},"costMicros":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":0},"currency":{"type":"string","enum":["USD"],"default":"USD"},"repository":{"type":"string","pattern":"^[a-z0-9._-]+\\/[a-z0-9._-]+$"},"commitSha":{"type":"string","pattern":"^(?:[a-f0-9]{40}|[a-f0-9]{64})$"}},"required":["schemaVersion","source","provider","client","projectId","objective","criteria","declaredStatus","startedAt"],"additionalProperties":false}}}},"responses":{"201":{"description":"Ingéré","content":{"application/json":{"schema":{"type":"object","properties":{"ingestionId":{"type":"string"},"runId":{"type":"string"},"replayed":{"type":"boolean"},"technicalStatus":{"type":"string","enum":["PENDING","RUNNING","COMPLETED","FAILED","CANCELLED"]},"releaseDecision":{"type":"string","enum":["READY","BLOCKED","NEEDS_REVIEW","REJECTED"]},"evidencePackId":{"type":"string"},"evidenceHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"missingEvidence":{"type":"array","items":{"type":"string"}},"certificateId":{"type":"string","nullable":true},"certificateHash":{"type":"string","nullable":true,"pattern":"^[a-f0-9]{64}$"}},"required":["ingestionId","runId","replayed","technicalStatus","releaseDecision","evidencePackId","evidenceHash","missingEvidence","certificateId","certificateHash"]}}}}},"operationId":"postApiV1RunsIngestAuthenticated","description":"Ingérer un run externe sous identité authentifiée."}},"/api/v1/connectors":{"get":{"summary":"Lister le catalogue des connecteurs","tags":["Control Plane"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}}},"required":["items"]}}}}},"operationId":"getApiV1Connectors","description":"Lister le catalogue des connecteurs."}},"/api/v1/connections":{"get":{"summary":"Lister les connexions de l’organisation","tags":["Control Plane"],"parameters":[{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["PERSONAL","DEVELOPMENT","STAGING","PRODUCTION"]},"required":false,"name":"environment","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"q","in":"query"},{"schema":{"type":"string"},"required":false,"name":"category","in":"query"},{"schema":{"type":"string","enum":["CONNECTED","DEGRADED","EXPIRED","ACTION_REQUIRED","DISCONNECTED","UNKNOWN","VERIFIED_HEALTHY","AUTH_EXPIRED","ACCESS_DENIED","NOT_FOUND","RATE_LIMITED","ERROR"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1Connections","description":"Lister les connexions de l’organisation."},"post":{"summary":"Enregistrer une connexion sans secret embarqué","tags":["Control Plane"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"connectorKey":{"type":"string","enum":["github","google_drive","gmail","slack","vercel","supabase","notion","canva","n8n","stripe","ovhcloud","local_filesystem","generic_url","generic_api"]},"label":{"type":"string","minLength":1,"maxLength":120},"externalAccountId":{"type":"string","minLength":1,"maxLength":320},"ownerUserId":{"type":"string","minLength":1,"maxLength":191},"grantedCapabilities":{"type":"array","items":{"type":"string","enum":["DISCOVER","READ","WRITE","EXECUTE","PUBLISH","ADMIN"]},"maxItems":6,"default":[]},"environment":{"type":"string","enum":["PERSONAL","DEVELOPMENT","STAGING","PRODUCTION"],"default":"PERSONAL"},"metadata":{"type":"object","additionalProperties":{"nullable":true},"default":{}},"credentialProvenance":{"type":"string","enum":["EXISTING_OAUTH","VAULT_REFERENCE","PLATFORM_SECRET","NONE"]},"secretReferenceId":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"}},"required":["connectorKey","label","credentialProvenance"],"additionalProperties":false}}}},"responses":{"201":{"description":"Créé","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}},"operationId":"postApiV1Connections","description":"Enregistrer une connexion sans secret embarqué."}},"/api/v1/connections/{id}":{"get":{"summary":"Lire une connexion","tags":["Control Plane"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}},"operationId":"getApiV1ConnectionsById","description":"Lire une connexion."},"patch":{"summary":"Mettre à jour une connexion","tags":["Control Plane"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"externalAccountId":{"type":"string","nullable":true,"minLength":1,"maxLength":320},"grantedCapabilities":{"type":"array","items":{"type":"string","enum":["DISCOVER","READ","WRITE","EXECUTE","PUBLISH","ADMIN"]},"maxItems":6},"environment":{"type":"string","enum":["PERSONAL","DEVELOPMENT","STAGING","PRODUCTION"]},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"credentialProvenance":{"type":"string","enum":["EXISTING_OAUTH","VAULT_REFERENCE","PLATFORM_SECRET","NONE"]},"secretReferenceId":{"type":"string","nullable":true,"minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"ownerUserId":{"type":"string","nullable":true,"minLength":1,"maxLength":191}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}},"operationId":"patchApiV1ConnectionsById","description":"Mettre à jour une connexion."},"delete":{"summary":"Déconnecter une connexion","tags":["Control Plane"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}},"operationId":"deleteApiV1ConnectionsById","description":"Déconnecter une connexion."}},"/api/v1/connections/{id}/health-check":{"post":{"summary":"Vérifier une connexion, dont GitHub en lecture seule","description":"Retourne soit le diagnostic distant GitHub auditable, soit l’état V0 explicitement non vérifié d’un connecteur sans adaptateur.","tags":["Control Plane"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Diagnostic de connexion","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"resourceId":{"type":"string","nullable":true},"state":{"type":"string","enum":["UNKNOWN","VERIFIED_HEALTHY","DEGRADED","AUTH_EXPIRED","ACCESS_DENIED","NOT_FOUND","RATE_LIMITED","ERROR"]},"status":{"type":"string"},"verified":{"type":"boolean"},"checkedAt":{"type":"string","format":"date-time"},"verificationSource":{"type":"string","enum":["GITHUB_API"]},"failureCode":{"type":"string","nullable":true},"retryAfter":{"type":"string","nullable":true,"format":"date-time"},"evidenceDigest":{"type":"string","pattern":"^[0-9a-f]{64}$"},"cacheExpiresAt":{"type":"string","format":"date-time"},"cached":{"type":"boolean"},"maskedIdentity":{"type":"string","nullable":true},"defaultBranch":{"type":"string","nullable":true},"observedCommit":{"type":"string","nullable":true},"agentAccess":{"type":"string","enum":["READ_ONLY"]},"externalWrites":{"type":"string","enum":["DISABLED"]},"detail":{"type":"string"}},"required":["id","resourceId","state","status","verified","checkedAt","verificationSource","failureCode","retryAfter","evidenceDigest","cacheExpiresAt","cached","maskedIdentity","defaultBranch","observedCommit","agentAccess","externalWrites","detail"],"additionalProperties":false},{"type":"object","properties":{"checkedAt":{"type":"string","format":"date-time"},"detail":{"type":"string"},"id":{"type":"string"},"status":{"type":"string"},"verified":{"type":"boolean","enum":[false]}},"required":["checkedAt","detail","id","status","verified"]}]}}}}},"operationId":"postApiV1ConnectionsByIdHealthCheck"}},"/api/v1/resources":{"get":{"summary":"Lister les ressources rattachées aux projets","tags":["Control Plane"],"parameters":[{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["PERSONAL","DEVELOPMENT","STAGING","PRODUCTION"]},"required":false,"name":"environment","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"q","in":"query"},{"schema":{"type":"string"},"required":false,"name":"projectId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1Resources","description":"Lister les ressources rattachées aux projets."},"post":{"summary":"Rattacher une ressource à un projet","tags":["Control Plane"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"maxLength":191},"connectedAccountId":{"type":"string","nullable":true,"minLength":1,"maxLength":191},"type":{"type":"string","enum":["GITHUB_REPOSITORY","LOCAL_FOLDER","GOOGLE_DRIVE_FOLDER","VERCEL_PROJECT","SUPABASE_PROJECT","NOTION_SPACE","SLACK_CHANNEL","N8N_WORKFLOW","DASHBOARD","GENERIC_URL"]},"name":{"type":"string","minLength":1,"maxLength":160},"uri":{"type":"string","minLength":1,"maxLength":2048},"environment":{"type":"string","enum":["PERSONAL","DEVELOPMENT","STAGING","PRODUCTION"],"default":"DEVELOPMENT"},"description":{"type":"string","nullable":true,"maxLength":1000},"verificationStatus":{"type":"string","enum":["VERIFIED","UNVERIFIED","FAILED"],"default":"UNVERIFIED"},"metadata":{"type":"object","additionalProperties":{"nullable":true},"default":{}}},"required":["projectId","type","name","uri"],"additionalProperties":false}}}},"responses":{"201":{"description":"Créé","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}},"operationId":"postApiV1Resources","description":"Rattacher une ressource à un projet."}},"/api/v1/resources/{id}":{"get":{"summary":"Lire une ressource","tags":["Control Plane"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}},"operationId":"getApiV1ResourcesById","description":"Lire une ressource."},"patch":{"summary":"Mettre à jour une ressource","tags":["Control Plane"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"connectedAccountId":{"type":"string","nullable":true,"minLength":1,"maxLength":191},"type":{"type":"string","enum":["GITHUB_REPOSITORY","LOCAL_FOLDER","GOOGLE_DRIVE_FOLDER","VERCEL_PROJECT","SUPABASE_PROJECT","NOTION_SPACE","SLACK_CHANNEL","N8N_WORKFLOW","DASHBOARD","GENERIC_URL"]},"name":{"type":"string","minLength":1,"maxLength":160},"uri":{"type":"string","minLength":1,"maxLength":2048},"environment":{"type":"string","enum":["PERSONAL","DEVELOPMENT","STAGING","PRODUCTION"]},"description":{"type":"string","nullable":true,"maxLength":1000},"verificationStatus":{"type":"string","enum":["VERIFIED","UNVERIFIED","FAILED"]},"metadata":{"type":"object","additionalProperties":{"nullable":true}}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}},"operationId":"patchApiV1ResourcesById","description":"Mettre à jour une ressource."},"delete":{"summary":"Archiver une ressource","tags":["Control Plane"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"archivedAt":{"type":"string","format":"date-time"},"id":{"type":"string"}},"required":["archivedAt","id"]}}}}},"operationId":"deleteApiV1ResourcesById","description":"Archiver une ressource."}},"/api/v1/secret-references":{"get":{"summary":"Lister les références opaques de secrets","description":"Ne retourne jamais la valeur d’un secret.","tags":["Control Plane"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1SecretReferences"},"post":{"summary":"Enregistrer une référence opaque de secret","tags":["Control Plane"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["onepassword","bitwarden","hashicorp_vault","platform_vault","other"]},"vaultId":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"itemId":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"fieldName":{"type":"string","minLength":1,"maxLength":120},"environment":{"type":"string","enum":["PERSONAL","DEVELOPMENT","STAGING","PRODUCTION"]},"label":{"type":"string","minLength":1,"maxLength":120},"fingerprint":{"type":"string","pattern":"^[a-f0-9]{16,128}$"}},"required":["provider","vaultId","itemId","environment","label"],"additionalProperties":false}}}},"responses":{"201":{"description":"Créé","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}},"operationId":"postApiV1SecretReferences","description":"Enregistrer une référence opaque de secret."}},"/api/v1/access":{"get":{"summary":"Lister les délégations d’accès","tags":["Control Plane"],"parameters":[{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"projectId","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}}},"operationId":"getApiV1Access","description":"Lister les délégations d’accès."},"post":{"summary":"Créer une délégation d’accès bornée","tags":["Control Plane"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subjectType":{"type":"string","enum":["AGENT","MISSION"]},"subjectId":{"type":"string","minLength":1,"maxLength":191},"targetType":{"type":"string","enum":["CONNECTION","RESOURCE"]},"targetId":{"type":"string","minLength":1,"maxLength":191},"capabilities":{"type":"array","items":{"type":"string","enum":["DISCOVER","READ","WRITE","EXECUTE","PUBLISH","ADMIN"]},"minItems":1,"maxItems":6},"environment":{"type":"string","enum":["PERSONAL","DEVELOPMENT","STAGING","PRODUCTION"]},"projectId":{"type":"string","minLength":1,"maxLength":191},"missionId":{"type":"string","minLength":1,"maxLength":191},"validFrom":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"approvalRequired":{"type":"boolean","default":false},"budgetLimit":{"type":"number","minimum":0,"maximum":1000000},"reason":{"type":"string","minLength":1,"maxLength":1000}},"required":["subjectType","subjectId","targetType","targetId","capabilities","environment","reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"Créé","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}},"operationId":"postApiV1Access","description":"Créer une délégation d’accès bornée."}},"/api/v1/access/{id}":{"delete":{"summary":"Révoquer une délégation d’accès","tags":["Control Plane"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}},"operationId":"deleteApiV1AccessById","description":"Révoquer une délégation d’accès."}},"/api/v1/access/check":{"get":{"summary":"Évaluer une capacité sans effet de bord","tags":["Control Plane"],"parameters":[{"schema":{"type":"string","enum":["DISCOVER","READ","WRITE","EXECUTE","PUBLISH","ADMIN"]},"required":true,"name":"capability","in":"query"},{"schema":{"type":"string"},"required":true,"name":"subjectId","in":"query"},{"schema":{"type":"string"},"required":true,"name":"targetId","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"allowed":{"type":"boolean"},"approvalRequired":{"type":"boolean"},"grantId":{"type":"string","nullable":true}},"required":["allowed","approvalRequired","grantId"]}}}}},"operationId":"getApiV1AccessCheck","description":"Évaluer une capacité sans effet de bord."}},"/api/v1/projects/{id}/workspace":{"get":{"summary":"Lire le résumé Control Plane d’un projet","tags":["Control Plane"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}},"operationId":"getApiV1ProjectsByIdWorkspace","description":"Lire le résumé Control Plane d’un projet."}},"/api/v1/resources/{id}/verify":{"post":{"summary":"Vérifier un dépôt GitHub rattaché à un projet","description":"Contrôle authentifié et strictement read-only de l’identité, du dépôt, de la branche par défaut et du dernier commit.","tags":["Control Plane"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Diagnostic GitHub","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"resourceId":{"type":"string","nullable":true},"state":{"type":"string","enum":["UNKNOWN","VERIFIED_HEALTHY","DEGRADED","AUTH_EXPIRED","ACCESS_DENIED","NOT_FOUND","RATE_LIMITED","ERROR"]},"status":{"type":"string"},"verified":{"type":"boolean"},"checkedAt":{"type":"string","format":"date-time"},"verificationSource":{"type":"string","enum":["GITHUB_API"]},"failureCode":{"type":"string","nullable":true},"retryAfter":{"type":"string","nullable":true,"format":"date-time"},"evidenceDigest":{"type":"string","pattern":"^[0-9a-f]{64}$"},"cacheExpiresAt":{"type":"string","format":"date-time"},"cached":{"type":"boolean"},"maskedIdentity":{"type":"string","nullable":true},"defaultBranch":{"type":"string","nullable":true},"observedCommit":{"type":"string","nullable":true},"agentAccess":{"type":"string","enum":["READ_ONLY"]},"externalWrites":{"type":"string","enum":["DISABLED"]},"detail":{"type":"string"}},"required":["id","resourceId","state","status","verified","checkedAt","verificationSource","failureCode","retryAfter","evidenceDigest","cacheExpiresAt","cached","maskedIdentity","defaultBranch","observedCommit","agentAccess","externalWrites","detail"],"additionalProperties":false}}}}},"operationId":"postApiV1ResourcesByIdVerify"}}},"externalDocs":{"description":"Documentation développeur et politique de versioning ArcadeOps","url":"https://arcadeops.leadalpes.fr/developers"}}