{"openapi":"3.1.0","info":{"title":"Dharma Agent Fabric API","version":"0.1.0","description":"Organization-scoped control-plane API for onboarding, local agents, managed ADK, cloud BYOK, trajectories, evaluation, remediation, skills, A2A tasks, and usage. Customer credentials authenticate only to Dharma HQ."},"servers":[{"url":"https://www.dharma-ai.io"}],"security":[{"organizationToken":[]}],"paths":{"/api/v1/orgs/{orgId}/agent-fabric/onboarding":{"get":{"operationId":"getAgentFabricOnboarding","summary":"Get the autonomous onboarding state","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"startAgentFabricOnboarding","summary":"Start idempotent purchase-backed provisioning","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingRequest"}}}},"responses":{"202":{"$ref":"#/components/responses/Success"},"400":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"/api/v1/orgs/{orgId}/agent-fabric/github/access":{"post":{"operationId":"grantAgentFabricRepositoryAccess","summary":"Invite a customer GitHub account to its private Dharma-managed repository","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubRepositoryAccessRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/Success"},"400":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"/api/v1/orgs/{orgId}/agent-fabric/byok":{"get":{"operationId":"listByokProviders","summary":"List cloud BYOK adapters, proof requirements, and active credential-free bindings","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"403":{"$ref":"#/components/responses/Error"}}}},"/api/v1/orgs/{orgId}/agent-fabric/byok/gcp":{"get":{"operationId":"getGcpByokBinding","summary":"Get the credential-free GCP BYOK setup state","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"403":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"configureOrVerifyGcpByokBinding","summary":"Configure or verify GCP BYOK through workload identity federation","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GcpByokRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/Success"},"400":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"/api/v1/orgs/{orgId}/agent-fabric/devices":{"$ref":"#/components/pathItems/devices"},"/api/v1/orgs/{orgId}/agent-fabric/instructions":{"$ref":"#/components/pathItems/instructions"},"/api/v1/orgs/{orgId}/agent-fabric/repository-agents":{"$ref":"#/components/pathItems/repositoryAgents"},"/api/v1/orgs/{orgId}/agent-fabric/workspaces":{"$ref":"#/components/pathItems/workspaces"},"/api/v1/orgs/{orgId}/agent-fabric/agents":{"$ref":"#/components/pathItems/agents"},"/api/v1/orgs/{orgId}/agent-fabric/agents/{agentId}/endpoints":{"$ref":"#/components/pathItems/endpoints"},"/api/v1/orgs/{orgId}/agent-fabric/evidence-policy":{"get":{"operationId":"getAgentFabricEvidencePolicy","summary":"Get the active server-held content disclosure policy and CLI policy fragment","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"createAgentFabricEvidencePolicy","summary":"Authorize bounded continuous content synchronization as an organization admin","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentDisclosurePolicyRequest"}}}},"responses":{"201":{"$ref":"#/components/responses/Created"},"400":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"withdrawAgentFabricEvidencePolicy","summary":"Stop future content synchronization and immediately tombstone content uploaded under the grant","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentDisclosurePolicyWithdrawal"}}}},"responses":{"200":{"$ref":"#/components/responses/Success"},"400":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/v1/orgs/{orgId}/agent-fabric/trajectories":{"$ref":"#/components/pathItems/trajectories"},"/api/v1/orgs/{orgId}/agent-fabric/evals":{"$ref":"#/components/pathItems/evals"},"/api/v1/orgs/{orgId}/agent-fabric/evaluation-contracts":{"$ref":"#/components/pathItems/evaluationContracts"},"/api/v1/orgs/{orgId}/agent-fabric/failures":{"$ref":"#/components/pathItems/failures"},"/api/v1/orgs/{orgId}/agent-fabric/remediations":{"$ref":"#/components/pathItems/remediations"},"/api/v1/orgs/{orgId}/agent-fabric/remediations/{targetId}":{"$ref":"#/components/pathItems/remediationTarget"},"/api/v1/orgs/{orgId}/agent-fabric/decisions":{"$ref":"#/components/pathItems/actionDecisions"},"/api/v1/orgs/{orgId}/agent-fabric/decisions/{decisionId}/enforcements":{"$ref":"#/components/pathItems/actionDecisionEnforcements"},"/api/v1/orgs/{orgId}/agent-fabric/tasks":{"$ref":"#/components/pathItems/tasks"},"/api/v1/orgs/{orgId}/agent-fabric/conversations":{"$ref":"#/components/pathItems/conversations"},"/api/v1/orgs/{orgId}/agent-fabric/skills":{"$ref":"#/components/pathItems/skills"},"/api/v1/orgs/{orgId}/agent-fabric/usage":{"$ref":"#/components/pathItems/usage"},"/api/v1/orgs/{orgId}/control-agent/sessions":{"$ref":"#/components/pathItems/controlAgentSessions"},"/api/v1/orgs/{orgId}/control-agent/sessions/{sessionId}/messages":{"$ref":"#/components/pathItems/controlAgentMessages"},"/api/v1/orgs/{orgId}/control-agent/sessions/{sessionId}/events":{"$ref":"#/components/pathItems/controlAgentEvents"},"/api/v1/orgs/{orgId}/control-agent/tool-calls/{toolCallId}/approve":{"$ref":"#/components/pathItems/controlAgentApprove"},"/api/v1/orgs/{orgId}/control-agent/tool-calls/{toolCallId}/reject":{"$ref":"#/components/pathItems/controlAgentReject"},"/api/orgs/{orgId}/managed-agents":{"$ref":"#/components/pathItems/managedAgents"},"/api/orgs/{orgId}/managed-agents/{agentId}":{"$ref":"#/components/pathItems/managedAgent"},"/api/orgs/{orgId}/managed-agents/{agentId}/revisions":{"$ref":"#/components/pathItems/managedAgentRevisions"},"/api/orgs/{orgId}/managed-agents/{agentId}/deploy":{"$ref":"#/components/pathItems/managedAgentDeploy"},"/api/orgs/{orgId}/agent-runs":{"$ref":"#/components/pathItems/agentRuns"},"/api/orgs/{orgId}/agent-runs/{runId}":{"get":{"operationId":"getAgentRun","summary":"Get an asynchronous run","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/runId"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/orgs/{orgId}/agent-runs/{runId}/events":{"get":{"operationId":"getAgentRunEvents","summary":"Get ordered run events and trace references","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/runId"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}}},"/api/orgs/{orgId}/managed-evals/campaigns":{"$ref":"#/components/pathItems/managedEvals"},"/api/orgs/{orgId}/managed-evals/preflight":{"$ref":"#/components/pathItems/managedEvalPreflight"},"/api/orgs/{orgId}/managed-traces":{"$ref":"#/components/pathItems/managedTraces"},"/api/orgs/{orgId}/managed-remediation/candidates":{"$ref":"#/components/pathItems/remediationCandidates"},"/api/v1/orgs/{orgId}/agent-fabric/learning-policies":{"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"listLearningPolicies","summary":"List organization policy metadata without loading private evidence","security":[{"organizationBearer":[]},{"learningAdminSession":[]}],"description":"Required permission: evals:read. Organization membership is checked before any lookup.","responses":{"200":{"description":"Scoped response.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"organizationId":{"type":"string"},"correlationId":{"type":"string","format":"uuid"},"policies":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/LearningPolicySummary"}},"nextCursor":{"type":["string","null"],"format":"uuid"}},"required":["ok","organizationId","policies","nextCursor","correlationId"]}}}},"400":{"description":"Invalid configuration, ID or evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Organization scope or required permission is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization-scoped resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Paused policy, stale revision, consent or idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Evidence too large; no truncation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Evidence allowance exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation failed; inspect the correlation receipt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment allowlist or service configuration unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"},"description":"Returned nextCursor; policies are ordered by ID ascending. Null means the final page."}]},"post":{"operationId":"createLearningPolicy","summary":"Create an endpoint-scoped policy","security":[{"learningAdminSession":[]}],"description":"Organization administrator only. Ordinary policy configuration is unchanged. Optional controlledProof registers an immutable authored garment proof atomically with a new paused policy and its audit receipt. It requires a fresh isolated managed endpoint with no prior runs or aliases, explicit endpointId, null managedAgentId, a Gemini 3.8 image evidence contract, Gemini 3.8 evaluation/replay bindings, and caps within the proof lifetime ceiling. Registration does not enable spending, open final-test inputs, run calibration or activate a skill. Complete the authorized budget/lifecycle preflight before enabling. Proof membership cannot be added or replaced by PATCH.","responses":{"201":{"description":"Scoped response.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"organizationId":{"type":"string"},"correlationId":{"type":"string","format":"uuid"}}}}}},"400":{"description":"Invalid configuration, ID or evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Organization scope or required permission is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization-scoped resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Paused policy, stale revision, consent or idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Evidence too large; no truncation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Evidence allowance exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation failed; inspect the correlation receipt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment allowlist or service configuration unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":200},"description":"Retain the identical key and request bytes on retry; changed evidence under the same identity is rejected."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["config"],"additionalProperties":false,"properties":{"config":{"$ref":"#/components/schemas/LearningPolicy"},"controlledProof":{"$ref":"#/components/schemas/ControlledProofRegistration"}}}}}}}},"/api/v1/orgs/{orgId}/agent-fabric/learning-policies/{id}":{"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"readLearningPolicy","summary":"Read configuration, progress, cost exposure and release blockers","security":[{"organizationBearer":[]},{"learningAdminSession":[]}],"description":"Required permission: evals:read. Organization membership is checked before any lookup.","responses":{"200":{"description":"Scoped response.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"organizationId":{"type":"string"},"correlationId":{"type":"string","format":"uuid"},"policy":{"type":"object","properties":{"controlledProof":{"type":["object","null"],"properties":{"progress":{"$ref":"#/components/schemas/ControlledProofProgress"}},"description":"Present only for the administrator-created isolated controlled-proof policy."}}},"progress":{"type":"object","properties":{"graderCalibration":{"$ref":"#/components/schemas/GraderCalibrationProgress"}},"description":"Counts, retained evidence coverage, per-charge-kind settled/reserved/uncertain amounts (decimal micro-USD strings), candidate states, adoption and waiting reasons."},"measurementScope":{"type":"object","required":["trafficClass"],"properties":{"trafficClass":{"enum":["production","diagnostic","dharma_authored_proof"]},"studyId":{"type":"string","format":"uuid"},"sourceManifestHash":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"productionEligible":{"const":false},"activationBoundary":{"const":"isolated_proof_endpoint_only"},"cohortCounts":{"type":"object","properties":{"learning":{"const":100},"development":{"const":20},"calibration":{"const":100},"test":{"const":100}}}},"description":"Diagnostic and authored proof counts are not natural customer-production qualification. Proof responses expose verified scope metadata and counts, not hidden labels or test inputs."}}}}}},"400":{"description":"Invalid configuration, ID or evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Organization scope or required permission is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization-scoped resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Paused policy, stale revision, consent or idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Evidence too large; no truncation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Evidence allowance exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation failed; inspect the correlation receipt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment allowlist or service configuration unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"reviseLearningPolicy","summary":"Pause/resume or create a CAS-protected configuration revision","security":[{"learningAdminSession":[]}],"description":"Required permission: evals:run and organization administrator. Organization membership is checked before any lookup.","responses":{"200":{"description":"Scoped response.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"organizationId":{"type":"string"},"correlationId":{"type":"string","format":"uuid"}}}}}},"400":{"description":"Invalid configuration, ID or evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Organization scope or required permission is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization-scoped resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Paused policy, stale revision, consent or idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Evidence too large; no truncation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Evidence allowance exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation failed; inspect the correlation receipt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment allowlist or service configuration unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":200},"description":"Retain the identical key and request bytes on retry; changed evidence under the same identity is rejected."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["expectedRevision","config"],"additionalProperties":false,"properties":{"expectedRevision":{"type":"integer","minimum":1},"config":{"$ref":"#/components/schemas/LearningPolicy"}}}}}}}},"/api/v1/orgs/{orgId}/agent-fabric/learning-policies/{id}/preflight":{"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"post":{"operationId":"quoteNativeLearningRequest","summary":"Count the complete native evidence and settings without generation or financial admission","security":[{"organizationBearer":[]},{"learningAdminSession":[]}],"description":"Requires evals:read and current organization membership. Maximum 4 MiB UTF-8 JSON transport; existing image and consent limits apply independently. Requires current policy-bound evidence consent and the active server-owned ready generation binding. No customer credentials or project override. CountTokens receives all contents, images, system instructions and generation settings; generation-only labels and safetySettings are excluded from counting, with both wire hashes retained. Cost is provider-landed only, not the organization retail charge or a financial reservation. No generation, enrollment, reservation, accepted grade or model-execution attestation.","responses":{"200":{"description":"Scoped response.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"organizationId":{"type":"string"},"correlationId":{"type":"string","format":"uuid"},"policyId":{"type":"string","format":"uuid"},"receipt":{"type":"object","required":["schema","requestedModel","nativeRequestHash","tokenizationRequestHash","inputTokens","countedCostMicrousd","capacityCostMicrousd","financialAdmission","chargedMicrousd"],"properties":{"schema":{"const":"dharma.learning-free-preflight-receipt/v1"},"requestedModel":{"type":"string"},"executedModel":{"type":"null"},"providerExecutionVerified":{"const":false},"nativeRequestHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"tokenizationRequestHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"tokenizationProjection":{"const":"generation_evidence_and_settings/v1"},"excludedTokenizationFields":{"type":"array","items":{"enum":["safetySettings","labels"]}},"rateCardHash":{"type":"string"},"inputTokens":{"type":"integer","minimum":0},"maximumInputTokens":{"type":"integer","minimum":1},"maximumOutputTokens":{"type":"integer","minimum":1},"countedCostMicrousd":{"type":"integer","minimum":0},"capacityCostMicrousd":{"type":"integer","minimum":0},"costBasis":{"const":"provider_landed_rate_card"},"retailChargesIncluded":{"const":false},"framingAllowanceIncluded":{"const":false},"financialAdmission":{"const":false},"generationDispatched":{"const":false},"chargedMicrousd":{"const":0},"quotedAt":{"type":"string","format":"date-time"},"validUntil":{"type":"string","format":"date-time"}}}},"required":["ok","organizationId","policyId","receipt","correlationId"]}}}},"400":{"description":"Invalid configuration, ID or evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Organization scope or required permission is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization-scoped resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Paused policy, stale revision, consent or idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Evidence too large; no truncation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Evidence allowance exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation failed; inspect the correlation receipt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment allowlist or service configuration unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearningFreePreflightPacket"}}}}}},"/api/v1/orgs/{orgId}/agent-fabric/learning-policies/{id}/budget-reconciliations":{"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"readControlledProofBudgetSnapshot","summary":"Read the original budget, settled exposure and effective allocations","security":[{"organizationBearer":[]},{"learningAdminSession":[]}],"description":"Required permission: evals:read. Organization membership is checked before any lookup.","responses":{"200":{"description":"Scoped response.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"organizationId":{"type":"string"},"correlationId":{"type":"string","format":"uuid"},"snapshot":{"$ref":"#/components/schemas/ControlledProofBudgetSnapshot"}}}}}},"400":{"description":"Invalid configuration, ID or evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Organization scope or required permission is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization-scoped resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Paused policy, stale revision, consent or idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Evidence too large; no truncation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Evidence allowance exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation failed; inspect the correlation receipt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment allowlist or service configuration unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"appendControlledProofBudgetReconciliation","summary":"Append a complete revised forecast without changing the original experiment cap","security":[{"learningAdminSession":[]}],"description":"Quiet pre-review continuation only: pause with unchanged configuration except state, preserving the policy revision and partial membership. Submit all five original design workloads, exact source-quote-set and snapshot hashes, original scope/plan hashes, canonical settled receipts and bounded outside-ledger costs. Policy, proof and shared-budget locks reject outstanding/uncertain charges, concurrent changes, partial forecasts and any design exceeding the unchanged $100 cap. Original receipts and accepted forecast remain immutable; no model call or skill activation occurs. Resume with the same policy revision only after reconciliation acceptance.","responses":{"200":{"description":"Scoped response.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"organizationId":{"type":"string"},"correlationId":{"type":"string","format":"uuid"},"receipt":{"type":"object"}}}}}},"400":{"description":"Invalid configuration, ID or evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Organization scope or required permission is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization-scoped resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Paused policy, stale revision, consent or idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Evidence too large; no truncation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Evidence allowance exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation failed; inspect the correlation receipt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment allowlist or service configuration unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":200},"description":"Retain the identical key and request bytes on retry; changed evidence under the same identity is rejected."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ControlledProofBudgetReconciliation"}}}}}},"/api/v1/orgs/{orgId}/agent-fabric/learning-policies/{id}/windows":{"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"listLearningWindows","summary":"List immutable batch membership and canonical analysis status","security":[{"organizationBearer":[]},{"learningAdminSession":[]}],"description":"Required permission: evals:read. Organization membership is checked before any lookup.","responses":{"200":{"description":"Scoped response.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"organizationId":{"type":"string"},"correlationId":{"type":"string","format":"uuid"}}}}}},"400":{"description":"Invalid configuration, ID or evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Organization scope or required permission is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization-scoped resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Paused policy, stale revision, consent or idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Evidence too large; no truncation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Evidence allowance exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation failed; inspect the correlation receipt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment allowlist or service configuration unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","schema":{"type":"string","maxLength":512},"description":"Opaque nextCursor returned by a preceding response."}]}},"/api/v1/orgs/{orgId}/agent-fabric/learning-policies/{id}/windows/{windowId}":{"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"windowId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"readLearningWindowDetail","summary":"Inspect retained per-case results, Atlas changes, proposals and billing receipts without dispatching work","security":[{"organizationBearer":[]},{"learningAdminSession":[]}],"description":"Requires evals:read and current organization membership. One read-only tenant/policy/window-scoped database statement checks current consent and retained evidence throughout checkpoint ancestry. Private derived content is withheld on withdrawal, expiry or inconsistent lineage. Receipt amounts are decimal micro-USD strings; uncertain actual cost is null, not zero. No generation, review, acceptance or rollout occurs. Responses are private/no-store and limited to 2 MB; 413 requires a smaller page, never truncation.","responses":{"200":{"description":"Scoped response.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"organizationId":{"type":"string"},"correlationId":{"type":"string","format":"uuid"},"window":{"type":"object","required":["schema","organizationId","policyId","windowId","policyRevision","createdAt","members","section","contentAvailability","unavailabilityReason","sourceContentHash","items","modelJudgmentsProvisional","checkpoint","execution","pagination"],"properties":{"schema":{"const":"dharma.learning-window-detail/v1"},"organizationId":{"type":"string"},"policyId":{"type":"string","format":"uuid"},"windowId":{"type":"string","format":"uuid"},"policyRevision":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"members":{"type":"array","description":"Frozen manifest metadata, not raw request or response bodies.","items":{"type":"object"}},"section":{"enum":["results","atlas","changes","candidates","receipts"]},"contentAvailability":{"enum":["retained","not_recorded","withheld"]},"unavailabilityReason":{"type":["string","null"],"description":"Machine-readable reason for unavailable derived content. Receipts remain accessible as metadata."},"sourceContentHash":{"type":["string","null"],"description":"Stored source artifact hash, not a hash of the paginated response."},"items":{"type":"array","maxItems":100,"items":{"type":"object"},"description":"Section-specific original retained entries: per-trajectory results, Atlas families, proposed changes, candidate proposal envelopes, or allowlisted dispatch receipts. Proposals are not active skills. Missing or withheld content is an empty array, never an invented passing result."},"modelJudgmentsProvisional":{"const":true},"checkpoint":{"type":["object","null"],"description":"Accepted checkpoint metadata including parent, Atlas, grader and review hashes."},"execution":{"type":["object","null"],"description":"Execution state, redacted reason and update time only; no lease or claim secrets."},"pagination":{"type":"object","required":["offset","limit","total","asOf","nextOffset"],"properties":{"offset":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":1,"maximum":100},"total":{"type":"integer","minimum":0},"asOf":{"type":"string","format":"date-time"},"nextOffset":{"type":["integer","null"],"minimum":0}}}}}},"required":["ok","organizationId","window","correlationId"]}}}},"400":{"description":"Invalid configuration, ID or evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Organization scope or required permission is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization-scoped resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Paused policy, stale revision, consent or idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Evidence too large; no truncation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Evidence allowance exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation failed; inspect the correlation receipt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment allowlist or service configuration unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"section","in":"query","schema":{"enum":["results","atlas","changes","candidates","receipts"],"default":"results"}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"maximum":1000000,"default":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"asOf","in":"query","schema":{"type":"string","format":"date-time"},"description":"Reuse returned pagination.asOf for receipt pages to exclude later dispatch creation. Settlement state may still advance. This is not a historical authorization snapshot; consent and retention are always checked at read time."}]}},"/api/v1/orgs/{orgId}/agent-fabric/learning-policies/{id}/calibration-references":{"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"post":{"operationId":"submitLearningCalibrationReferences","summary":"Submit a signed independent reference set without dispatching calibration or activating a skill","security":[{"learningAdminSession":[]}],"description":"Organization administrator only; developer tokens cannot submit reference sets. Verify against a separately admitted tenant/endpoint signer, current consent, current policy revision and evaluation contract. The signed manifest must contain exactly 100 distinct original reference requests with independent labels and no learning or held-out overlap. This operation reserves calibration membership but does not enroll a signer, bind policy configuration, start paid work or activate a skill/grader. Reference IDs and bytes are immutable; identical retries return the original receipt. Responses are private/no-store.","responses":{"200":{"description":"Identical reference submission replayed.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"organizationId":{"type":"string"},"correlationId":{"type":"string","format":"uuid"},"receipt":{"type":"object","additionalProperties":false,"required":["setId","manifestHash","replayed"],"properties":{"setId":{"type":"string","format":"uuid"},"manifestHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"replayed":{"type":"boolean"}}}},"required":["ok","organizationId","receipt","correlationId"]}}}},"201":{"description":"Independent reference set admitted and reserved; no paid dispatch or activation.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"organizationId":{"type":"string"},"correlationId":{"type":"string","format":"uuid"},"receipt":{"type":"object","additionalProperties":false,"required":["setId","manifestHash","replayed"],"properties":{"setId":{"type":"string","format":"uuid"},"manifestHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"replayed":{"type":"boolean"}}}},"required":["ok","organizationId","receipt","correlationId"]}}}},"400":{"description":"Invalid configuration, ID or evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Organization scope or required permission is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization-scoped resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Paused policy, stale revision, consent or idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Evidence too large; no truncation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid signature or manifest, evidence unavailable, inadequate reference coverage, or learning/held-out overlap. Correct the evidence; never relabel it to bypass independence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Evidence allowance exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation failed; inspect the correlation receipt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment allowlist or service configuration unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":200},"description":"Retain the identical key and request bytes on retry; changed evidence under the same identity is rejected."}],"requestBody":{"required":true,"description":"Maximum 1 MiB wire envelope; signedManifest is the exact original UTF-8 JSON string, at most 512,000 bytes, described by CalibrationReferenceManifest. Sign its bytes with the separately admitted Ed25519 key; never submit private keys or provider credentials.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["expectedRevision","signedManifest","signatureBase64"],"properties":{"expectedRevision":{"type":"integer","minimum":1},"signedManifest":{"type":"string","minLength":1,"maxLength":512000},"signatureBase64":{"type":"string","pattern":"^[A-Za-z0-9+/]{86}==$"}}}}}}}},"/api/v1/orgs/{orgId}/agent-fabric/learning-policies/{id}/calibration-captures":{"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"post":{"operationId":"captureLearningCalibrationEvidence","summary":"Reserve and seal prospective external calibration evidence","security":[{"organizationBearer":[]}],"description":"Requires an explicitly scoped learning:calibration-ingest organization bearer token; ordinary learning:ingest and browser cookies are insufficient. Use only for a separately selected prospective reference cohort, never ordinary production intake. The server derives request identity from verified native bytes and atomically reserves calibration membership before sealing. Existing learning or held-out overlap returns 409; no request is reassigned. Calibration members are excluded from learning, held-out validation, canary/control and monitoring. No labels, signer enrollment, reference-set admission, model dispatch or activation occurs. Successful sealing returns original source identity for a later independently signed manifest. Provenance remains customer_attested. Responses are private/no-store.","responses":{"202":{"description":"Evidence durably accepted; evaluation remains asynchronous.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"organizationId":{"type":"string"},"correlationId":{"type":"string","format":"uuid"},"receipt":{"$ref":"#/components/schemas/CalibrationCaptureReceipt"}},"required":["ok","organizationId","receipt","correlationId"]}}}},"400":{"description":"Invalid configuration, ID or evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Organization scope or required permission is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization-scoped resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Paused policy, stale revision, consent or idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Evidence too large; no truncation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Evidence allowance exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation failed; inspect the correlation receipt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment allowlist or service configuration unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":200},"description":"Retain the identical key and request bytes on retry; changed evidence under the same identity is rejected."}],"requestBody":{"required":true,"description":"The same ExternalNativePacket chunk/seal format and limits as observations/native: 400,000 bytes per packet, 262,144-byte chunks, 8 MiB capture, at most 32 chunks. The sealed bytes may be an actual customer-attested ExternalNativeCapture or a CalibrationNativeFixture explicitly declaring an authored reference response, providerExecuted:false and providerReceiptId:null. Never manufacture provider responses for fixtures. Fixture captures are accepted only here, not through ordinary observation or replay paths. A derivation hash is lineage metadata, not authority to enroll a signer or admit labels; independent signed reference admission remains mandatory. Retain the original request pin, exact bytes and idempotency keys. Pin creation separately requires learning:ingest and evals:read. No purpose, labels or claimed verification fields are accepted in the upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalNativePacket"}}}}}},"/api/v1/orgs/{orgId}/agent-fabric/learning-policies/{id}/observations":{"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"post":{"operationId":"ingestLearningObservation","summary":"Upload authorized finalized evidence from an external service","security":[{"organizationBearer":[]},{"learningAdminSession":[]}],"description":"Required permission: learning:ingest. Organization membership is checked before any lookup.","responses":{"202":{"description":"Evidence durably accepted; evaluation remains asynchronous.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"organizationId":{"type":"string"},"correlationId":{"type":"string","format":"uuid"}}}}}},"400":{"description":"Invalid configuration, ID or evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Organization scope or required permission is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization-scoped resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Paused policy, stale revision, consent or idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Evidence too large; no truncation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Evidence allowance exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation failed; inspect the correlation receipt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment allowlist or service configuration unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":200},"description":"Retain the identical key and request bytes on retry; changed evidence under the same identity is rejected."}],"requestBody":{"required":true,"description":"Maximum 1 MiB JSON and depth 40. Provider credentials are rejected. The managed: request namespace is reserved. Attachment references are not evidence bytes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Observation"}}}}}},"/api/v1/orgs/{orgId}/agent-fabric/learning-policies/{id}/observations/native":{"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"post":{"operationId":"captureLearningNativeEvidence","summary":"Retain and seal exact external request/response JSON with inline images","security":[{"organizationBearer":[]}],"description":"Server-to-server organization bearer token with explicit learning:ingest scope only; cookies do not authorize this upload. Requires an enabled external-observer policy, current content consent and the original request pin. Chunk acceptance does not enroll a trajectory; a successful seal atomically creates one canonical observation. Customer-attested bytes are not independently verified provider execution, frozen validation qualification or runtime adoption.","responses":{"202":{"description":"Evidence durably accepted; evaluation remains asynchronous.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"organizationId":{"type":"string"},"correlationId":{"type":"string","format":"uuid"},"receipt":{"$ref":"#/components/schemas/ExternalNativeReceipt"}},"required":["ok","organizationId","receipt","correlationId"]}}}},"400":{"description":"Invalid configuration, ID or evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Organization scope or required permission is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization-scoped resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Paused policy, stale revision, consent or idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Evidence too large; no truncation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Evidence allowance exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation failed; inspect the correlation receipt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment allowlist or service configuration unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":200},"description":"Retain the identical key and request bytes on retry; changed evidence under the same identity is rejected."}],"requestBody":{"required":true,"description":"At most 400,000 JSON bytes per packet. Serialize ExternalNativeCapture once as UTF-8, SHA-256 hash those exact bytes, then split into 262,144-byte chunks (only the last may be smaller). Maximum 8 MiB total and 32 chunks. Upload every chunk then seal. Every packet carries the identical upload scope. Retry identical bytes/key, never re-create timestamps or pin. Native files must be inline PNG/JPEG/WebP; remote references are not fetched. Credentials and forged observation/proof fields are rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalNativePacket"}}}}}},"/api/v1/orgs/{orgId}/agent-fabric/learning-policies/{id}/skill":{"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"readLearningSkill","summary":"Preview the current signed skill without pinning or acknowledging adoption","security":[{"organizationBearer":[]},{"learningAdminSession":[]}],"description":"Required permission: evals:read. Organization membership is checked before any lookup.","responses":{"200":{"description":"Scoped response.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"organizationId":{"type":"string"},"correlationId":{"type":"string","format":"uuid"},"pinned":{"const":false},"status":{"enum":["baseline","canary","active"]},"skill":{"type":["object","null"],"description":"Exact signed payload bytes, parsed payload, signature and operator-pinned key version. Null means use existing baseline instructions."}}}}}},"400":{"description":"Invalid configuration, ID or evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Organization scope or required permission is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization-scoped resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Paused policy, stale revision, consent or idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Evidence too large; no truncation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Evidence allowance exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation failed; inspect the correlation receipt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment allowlist or service configuration unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"requestId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120}}]},"post":{"operationId":"pinLearningSkill","summary":"Create or replay an immutable request-level signed-skill assignment","security":[{"organizationBearer":[]},{"learningAdminSession":[]}],"description":"Required permission: learning:ingest and evals:read. Organization membership is checked before any lookup.","responses":{"200":{"description":"Scoped response.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"organizationId":{"type":"string"},"correlationId":{"type":"string","format":"uuid"},"pinned":{"const":true},"status":{"enum":["baseline","canary","active"]},"pin":{"type":"object","description":"Tenant/policy/endpoint/request-bound pin receipt with original bundle/skill hashes, assignment, expiry, and replayed flag. Baseline is pinned too; no runtime adoption is implied."},"skill":{"type":["object","null"],"description":"The original signed bundle envelope, not the latest assignment. A withdrawn or expired pin returns 409, never a different skill."}}}}}},"400":{"description":"Invalid configuration, ID or evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Organization scope or required permission is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization-scoped resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Paused policy, stale revision, consent or idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Evidence too large; no truncation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Evidence allowance exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation failed; inspect the correlation receipt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment allowlist or service configuration unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":200},"description":"Retain the identical key and request bytes on retry; changed evidence under the same identity is rejected."}],"requestBody":{"required":true,"description":"At most 4 KiB. Keep the same logicalRequestId, endpointId and key across workers and retries. A pin lasts at most 24 hours, bounded by source/skill expiry; retries do not renew it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillPinRequest"}}}}}}},"components":{"securitySchemes":{"organizationToken":{"type":"http","scheme":"bearer","bearerFormat":"Dharma organization token"},"clerkSession":{"type":"apiKey","in":"cookie","name":"__session","description":"Authenticated Dharma portal organization-admin session."},"organizationBearer":{"type":"http","scheme":"bearer","description":"An existing organization-scoped developer bearer token. Ingest permission is opt-in, not a default broad token scope. Developer tokens cannot create or revise policies."},"learningAdminSession":{"type":"apiKey","in":"cookie","name":"__session","description":"Existing authenticated Clerk session. Policy mutations additionally require verified organization administrator authority; ordinary developer-token scopes are insufficient."}},"parameters":{"orgId":{"name":"orgId","in":"path","required":true,"schema":{"type":"string","minLength":1}},"agentId":{"name":"agentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},"runId":{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},"sessionId":{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},"toolCallId":{"name":"toolCallId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},"afterSequence":{"name":"afterSequence","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},"targetId":{"name":"targetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},"decisionId":{"name":"decisionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},"idempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}},"schemas":{"Object":{"type":"object","additionalProperties":true},"OnboardingRequest":{"type":"object","additionalProperties":false,"properties":{"action":{"type":"string","enum":["start","advance"],"default":"start"},"companyName":{"type":"string","maxLength":120},"githubUsername":{"type":"string","pattern":"^[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?$"},"runtimeMode":{"type":"string","enum":["dharma_managed","gcp_vertex_byok","local_byok"],"default":"dharma_managed"},"spendCeilingUsd":{"type":"number","minimum":1,"maximum":300,"description":"Dharma-managed runtimes allow the package reserve up to USD 300; GCP Vertex BYOK and local BYOK remain capped at USD 100."}}},"GitHubRepositoryAccessRequest":{"type":"object","additionalProperties":false,"required":["githubUsername"],"properties":{"githubUsername":{"type":"string","pattern":"^[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?$"}}},"GcpByokRequest":{"oneOf":[{"type":"object","additionalProperties":false,"required":["action"],"properties":{"action":{"const":"verify"}}},{"type":"object","additionalProperties":false,"required":["projectId","projectNumber","region","runtimeUrl","runtimeServiceName","serviceAccountEmail"],"properties":{"action":{"const":"configure"},"projectId":{"type":"string"},"projectNumber":{"type":"string","pattern":"^[0-9]{6,20}$"},"region":{"type":"string"},"runtimeUrl":{"type":"string","format":"uri","pattern":"^https://"},"runtimeServiceName":{"type":"string"},"serviceAccountEmail":{"type":"string","format":"email","description":"Customer-project service account federated from Dharma and authorized to invoke Cloud Run."},"runtimeExecutionServiceAccountEmail":{"type":"string","format":"email","description":"Cloud Run execution identity that signs callbacks to Dharma. Defaults to dharma-customer-runtime@PROJECT_ID.iam.gserviceaccount.com."},"spendCeilingUsd":{"type":"number","minimum":1,"maximum":100}}}]},"ContentDisclosurePolicyRequest":{"type":"object","additionalProperties":false,"required":["confirmed","retentionDays","maximumCapsuleBytes","maximumDailyUploadBytes"],"properties":{"confirmed":{"const":true},"retentionDays":{"type":"integer","minimum":1,"maximum":365},"maximumCapsuleBytes":{"type":"integer","minimum":1,"maximum":1048576},"maximumDailyUploadBytes":{"type":"integer","minimum":1,"maximum":1073741824}}},"ContentDisclosurePolicyWithdrawal":{"type":"object","additionalProperties":false,"required":["confirmed"],"properties":{"confirmed":{"const":true},"policyId":{"type":"string","format":"uuid"}}},"RepositoryAgentRequest":{"type":"object","additionalProperties":false,"required":["sourceFingerprint","displayName"],"properties":{"sourceFingerprint":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"displayName":{"type":"string","minLength":1,"maxLength":120},"defaultSourceRef":{"type":["string","null"],"maxLength":240}}},"AgentEndpointRequest":{"oneOf":[{"type":"object","additionalProperties":false,"required":["endpointKind"],"properties":{"endpointKind":{"type":"string","enum":["external_observer"]}}},{"type":"object","additionalProperties":false,"required":["workspaceId","provider"],"properties":{"workspaceId":{"type":"string","format":"uuid"},"provider":{"type":"string","enum":["codex","claude","agy","hermes"]},"priority":{"type":"integer","minimum":0,"maximum":1000,"default":100}}},{"type":"object","additionalProperties":false,"required":["endpointKind","managedAgentId","runtimeBindingId"],"properties":{"endpointKind":{"type":"string","enum":["managed_runtime","cloud_byok"]},"managedAgentId":{"type":"string","format":"uuid"},"runtimeBindingId":{"type":"string","format":"uuid"},"priority":{"type":"integer","minimum":0,"maximum":1000,"default":100}}}]},"AnalysisScope":{"type":"object","additionalProperties":false,"required":["mode"],"properties":{"mode":{"type":"string","enum":["organization","agents","endpoints"]},"organizationAgentIds":{"type":"array","maxItems":500,"items":{"type":"string","format":"uuid"}},"endpointIds":{"type":"array","maxItems":500,"items":{"type":"string","format":"uuid"}}}},"AnalysisRequest":{"type":"object","additionalProperties":false,"properties":{"trajectoryTarget":{"type":"integer","minimum":1,"maximum":10000,"default":100},"retryWindowId":{"type":"string","format":"uuid"},"reprocessWindowId":{"type":"string","format":"uuid"},"scope":{"$ref":"#/components/schemas/AnalysisScope"}}},"EvaluationContractTransition":{"type":"object","additionalProperties":false,"required":["contractId","action","confirmation"],"properties":{"contractId":{"type":"string","format":"uuid"},"action":{"type":"string","enum":["activate","retire","reject"]},"confirmation":{"type":"string","description":"Exact uppercase action confirmation bound to the contract ID."}}},"RemediationTargetAction":{"type":"object","additionalProperties":false,"required":["action"],"properties":{"action":{"type":"string","enum":["stage_evaluation","run_backtest","retry_backtest","link_backtest","approve","merge_pr","release","retry_release","verify_release","expand","rollback"]},"endpointId":{"type":"string","format":"uuid","description":"Exact active local Codex, Claude, Agy, or Hermes endpoint used for an evaluation-only candidate rollout."},"candidateTrajectoryIds":{"type":"array","minItems":20,"maxItems":100,"uniqueItems":true,"description":"Candidate trajectories. The server resolves one distinct pre-install baseline with the same signed task contract for each candidate.","items":{"type":"string","format":"uuid"}},"matchedTrajectoryPairs":{"type":"array","minItems":20,"maxItems":100,"description":"Ordered non-source baseline and candidate trajectories produced by identical signed task contracts before and after candidate installation.","items":{"type":"object","additionalProperties":false,"required":["baselineTrajectoryId","candidateTrajectoryId"],"properties":{"baselineTrajectoryId":{"type":"string","format":"uuid"},"candidateTrajectoryId":{"type":"string","format":"uuid"}}}},"campaignId":{"type":"string","format":"uuid"},"establishAutoUpdatePolicy":{"type":"boolean","default":false}}},"PinnedEvidenceReference":{"type":"object","additionalProperties":false,"required":["trajectoryId","revision","capsuleHash"],"properties":{"trajectoryId":{"type":"string","format":"uuid"},"revision":{"type":"integer","minimum":1},"capsuleHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}}},"ActionDecisionStateEnvelope":{"type":"object","additionalProperties":false,"required":["intent","evidence_used","known_state","unknown_or_missing_state","allowed_next_actions","blocked_actions","decision_authority","tool_results","proposed_action"],"properties":{"intent":{"type":"string","minLength":1,"maxLength":1000},"evidence_used":{"type":"array","maxItems":50,"items":{"type":"string","minLength":1,"maxLength":500}},"known_state":{"type":"object","additionalProperties":true},"unknown_or_missing_state":{"type":"array","maxItems":50,"items":{"type":"string","minLength":1,"maxLength":1000}},"allowed_next_actions":{"type":"array","maxItems":50,"items":{"type":"string","minLength":1,"maxLength":500}},"blocked_actions":{"type":"array","maxItems":50,"items":{"type":"string","minLength":1,"maxLength":500}},"decision_authority":{"type":"string","minLength":1,"maxLength":1000},"tool_results":{"type":"array","maxItems":50},"proposed_action":{"type":"string","minLength":1,"maxLength":500}}},"ActionDecisionTask":{"type":"object","description":"The ordinary bounded task-dispatch request plus a stable taskId. The server computes consequentiality and the exact action digest.","required":["taskId","workspaceId","targetEndpointId","taskType","instructions","authority","execution","acceptance","budget"],"properties":{"taskId":{"type":"string","format":"uuid"},"workspaceId":{"type":"string","format":"uuid"},"targetEndpointId":{"type":"string","format":"uuid"},"taskType":{"const":"external_request"},"instructions":{"type":"string"},"requiredSkills":{"type":"array","items":{"type":"string"}},"authority":{"$ref":"#/components/schemas/Object"},"execution":{"$ref":"#/components/schemas/Object"},"acceptance":{"$ref":"#/components/schemas/Object"},"budget":{"$ref":"#/components/schemas/Object"},"expiresAt":{"type":"string","format":"date-time"}},"additionalProperties":true},"ActionDecisionRequest":{"type":"object","additionalProperties":false,"required":["evaluationContractId","task","stateEnvelope","evidenceReferences"],"properties":{"actionId":{"type":"string","format":"uuid"},"evaluationContractId":{"type":"string","format":"uuid"},"task":{"$ref":"#/components/schemas/ActionDecisionTask"},"stateEnvelope":{"$ref":"#/components/schemas/ActionDecisionStateEnvelope"},"evidenceReferences":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/PinnedEvidenceReference"}}}},"ActionDecisionReceipt":{"type":"object","additionalProperties":false,"required":["schema","decisionId","organizationId","actionId","taskId","targetEndpointId","workspaceId","evaluationContractId","evaluationContractVersion","actionDigest","stateEnvelopeHash","evidenceReferences","outcome","reasonCodes","confidence","evaluator","nonce","issuedAt","expiresAt"],"properties":{"schema":{"const":"dharma.action-decision-receipt/v1"},"decisionId":{"type":"string","format":"uuid"},"organizationId":{"type":"string"},"actionId":{"type":"string","format":"uuid"},"taskId":{"type":"string","format":"uuid"},"targetEndpointId":{"type":"string","format":"uuid"},"workspaceId":{"type":"string","format":"uuid"},"evaluationContractId":{"type":"string","format":"uuid"},"evaluationContractVersion":{"type":"integer","minimum":1},"actionDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"stateEnvelopeHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"evidenceReferences":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/PinnedEvidenceReference"}},"outcome":{"type":"string","enum":["release","block","escalate","withhold"]},"reasonCodes":{"type":"array","minItems":1,"maxItems":12,"items":{"type":"string","pattern":"^[a-z0-9_]{1,80}$"}},"confidence":{"type":"number","minimum":0,"maximum":1},"evaluator":{"$ref":"#/components/schemas/Object"},"nonce":{"type":"string"},"issuedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}}},"ActionDecisionEnforcement":{"type":"object","additionalProperties":false,"required":["taskId","endpointId","actionDigest","disposition","externalIdempotencyKeyHash","resultDigest","acknowledgedAt"],"properties":{"taskId":{"type":"string","format":"uuid"},"endpointId":{"type":"string","format":"uuid"},"actionDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"disposition":{"type":"string","enum":["executed","contained","unknown"]},"externalIdempotencyKeyHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"resultDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"acknowledgedAt":{"type":"string","format":"date-time"}}},"ManagedAgentRevisionInput":{"type":"object","additionalProperties":false,"properties":{"modelChain":{"type":"array","minItems":1,"maxItems":8,"uniqueItems":true,"items":{"type":"string","pattern":"^gemini-[A-Za-z0-9.-]+$"},"default":["gemini-3.7-flash"]},"runtimeProvider":{"type":"string","enum":["gcp_agent_platform","gcp_vertex_byok"]},"policyBundle":{"type":"object","additionalProperties":true,"maxProperties":100},"runtimeConfig":{"type":"object","additionalProperties":true,"maxProperties":100,"properties":{"systemInstruction":{"type":"string","minLength":1,"maxLength":20000,"description":"Immutable revision role and operating contract. Never include credentials."}}},"sourceRepository":{"type":["string","null"],"maxLength":300},"sourceCommitSha":{"type":["string","null"],"pattern":"^[0-9a-fA-F]{40,64}$"},"remediationOf":{"type":["string","null"],"maxLength":200}}},"ManagedAgentCreateRequest":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":2,"maxLength":100},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,62}$"},"description":{"type":["string","null"],"maxLength":2000},"modelChain":{"type":"array","minItems":1,"maxItems":8,"uniqueItems":true,"items":{"type":"string","pattern":"^gemini-[A-Za-z0-9.-]+$"},"default":["gemini-3.7-flash"]},"runtimeProvider":{"type":"string","enum":["gcp_agent_platform","gcp_vertex_byok"]},"policyBundle":{"type":"object","additionalProperties":true,"maxProperties":100},"runtimeConfig":{"type":"object","additionalProperties":true,"maxProperties":100,"properties":{"systemInstruction":{"type":"string","minLength":1,"maxLength":20000,"description":"Immutable revision role and operating contract. Never include credentials."}}},"sourceRepository":{"type":["string","null"],"maxLength":300},"sourceCommitSha":{"type":["string","null"],"pattern":"^[0-9a-fA-F]{40,64}$"}}},"ManagedAgentDeployRequest":{"type":"object","additionalProperties":false,"required":["revisionId"],"properties":{"revisionId":{"type":"string","minLength":1}}},"ManagedRunImageAttachment":{"type":"object","additionalProperties":false,"required":["displayName","mimeType","dataBase64","sha256"],"properties":{"displayName":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._-]{0,119}$"},"mimeType":{"type":"string","enum":["image/jpeg","image/png","image/webp"]},"dataBase64":{"type":"string","contentEncoding":"base64","maxLength":4194304,"description":"Inline image bytes. Up to eight images are accepted with a 3 MiB decoded aggregate request limit."},"sha256":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}}},"ManagedRunRequest":{"type":"object","additionalProperties":false,"required":["agentId","prompt"],"properties":{"agentId":{"type":"string","minLength":1},"model":{"type":"string","enum":["gemini-3.7-flash","gemini-3.8-flash"],"description":"Optional explicit selection for an authorized single-pass agent revision. The model must appear in that revision's model chain. No silent substitution. Omit to preserve configured runtime behavior. Reusing an idempotency key with a different model or request returns 409."},"prompt":{"type":"string","minLength":1,"maxLength":100000},"attachments":{"type":"array","maxItems":8,"items":{"$ref":"#/components/schemas/ManagedRunImageAttachment"}},"metadata":{"type":"object","additionalProperties":true},"maxRuntimeSeconds":{"type":"integer","minimum":30,"maximum":3600},"estimatedCredits":{"type":"integer","minimum":1,"maximum":500000}}},"ManagedEvaluationCustomerDimension":{"type":"object","additionalProperties":false,"required":["id","label","description","evaluator"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","maxLength":120},"label":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","minLength":1,"maxLength":2000},"evaluator":{"type":"string","enum":["semantic_judge","deterministic_verifier"]},"verifierId":{"type":"string","maxLength":160,"description":"Required only for a verifier registered by Dharma; executable scorer code is never accepted."},"weight":{"type":"number","minimum":0,"maximum":1}}},"ManagedEvaluationContract":{"type":"object","additionalProperties":false,"required":["version","standard","comparison","releaseDecision"],"properties":{"version":{"const":"managed-evaluation-contract-v1"},"standard":{"type":"object","additionalProperties":false,"required":["profile","hardGates"],"properties":{"profile":{"const":"cognitive-integrity-v1"},"hardGates":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","enum":["task_score_threshold","evidence_boundary_preserved","false_premise_resisted","blocked_action_avoidance","final_action_grounded","required_tool_discipline"]}}}},"customerDomainRubric":{"type":"object","additionalProperties":false,"required":["version","dimensions"],"properties":{"version":{"type":"string","minLength":1,"maxLength":120},"dimensions":{"type":"array","maxItems":0,"description":"Current managed campaigns reject non-empty custom dimensions. Configure supported task checks and thresholds instead.","items":{"$ref":"#/components/schemas/ManagedEvaluationCustomerDimension"}}}},"operationalCriteria":{"type":"object","additionalProperties":false,"properties":{"maxInputTokens":{"type":"integer","minimum":1,"maximum":2000000},"maxOutputTokens":{"type":"integer","minimum":1,"maximum":200000},"maxRuntimeSeconds":{"type":"integer","minimum":1,"maximum":3600},"requiredTraceFields":{"type":"array","maxItems":50,"items":{"type":"string","maxLength":160}}}},"comparison":{"type":"object","additionalProperties":false,"required":["mode","primaryArm"],"properties":{"mode":{"type":"string","enum":["paired_direct_stateful","single_held_out"]},"primaryArm":{"type":"string","enum":["direct_baseline","stateful_dharma_runtime","held_out_backtest"]},"baselineArm":{"type":"string","enum":["direct_baseline","stateful_dharma_runtime","held_out_backtest"]}}},"releaseDecision":{"type":"object","additionalProperties":false,"required":["expression"],"properties":{"expression":{"const":"primary_arm_all_standard_gates_and_threshold"}}}}},"ManagedEvaluationTask":{"type":"object","required":["task_id","scenario","hidden_ground_truth"],"properties":{"task_id":{"type":"string","minLength":1,"maxLength":200},"schema_version":{"type":"string","maxLength":120},"task_family_id":{"type":"string","maxLength":300},"task_family":{"type":"string","maxLength":300},"stage":{"type":"string","maxLength":160},"difficulty":{"type":"string","maxLength":120},"primary_skill_under_test":{"type":"string","maxLength":300},"scenario":{"type":"object","required":["user_message"],"properties":{"user_message":{"type":"string","minLength":1,"maxLength":20000}},"additionalProperties":true},"hidden_ground_truth":{"type":"object","description":"Scorer-only truth; never exposed to the evaluated agent."},"expected_state_gate":{"type":"object"},"tool_expectations":{"type":"object"},"success_criteria":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":2000},"description":"Non-gating customer observations unless bound to a governed evaluator in the evaluation contract."},"failure_labels_to_detect":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":200}},"remediation_requirements":{"type":"array","maxItems":100,"items":{"type":"object","additionalProperties":false,"required":["flag","rule"],"properties":{"flag":{"type":"string","maxLength":200},"rule":{"type":"string","maxLength":2000}}}},"scoring":{"type":"object"},"tau_style_adapter":{"type":"object"},"tags":{"type":"array","maxItems":50,"items":{"type":"string","maxLength":160}}}},"ManagedEvaluationCampaignRequest":{"type":"object","required":["name","agentId","arms","evaluationContract","tasks"],"properties":{"name":{"type":"string","minLength":3,"maxLength":160},"description":{"type":"string","maxLength":2000},"agentId":{"type":"string","minLength":1},"arms":{"type":"array","minItems":1,"maxItems":3,"uniqueItems":true,"items":{"type":"string","enum":["direct_baseline","stateful_dharma_runtime","held_out_backtest"]}},"policyCandidateId":{"type":"string"},"automationMode":{"type":"string","enum":["continuous_100"]},"evaluationContract":{"$ref":"#/components/schemas/ManagedEvaluationContract"},"tasks":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/ManagedEvaluationTask"}}}},"ManagedEvaluationPreflight":{"type":"object","additionalProperties":false,"required":["contractVersion","taskCount","trajectoryCount","arms","standardProfile","hardGates","estimatedCredits","estimatedInvoiceEquivalentUsd"],"properties":{"contractVersion":{"type":"string"},"taskCount":{"type":"integer"},"trajectoryCount":{"type":"integer"},"arms":{"type":"array","items":{"type":"string"}},"standardProfile":{"type":"string"},"hardGates":{"type":"array","items":{"type":"string"}},"customerRubric":{"type":["object","null"]},"operationalCriteria":{"type":"object"},"releaseDecision":{"type":"object"},"estimatedCredits":{"type":"integer"},"estimatedInvoiceEquivalentUsd":{"type":"number"}}},"ControlAgentSessionRequest":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","minLength":1,"maxLength":160,"default":"New conversation"}}},"ControlAgentMessageRequest":{"type":"object","additionalProperties":false,"required":["message"],"properties":{"message":{"type":"string","minLength":1,"maxLength":100000,"description":"Credential-like material is rejected before managed execution."},"attachments":{"type":"array","maxItems":2,"items":{"$ref":"#/components/schemas/ManagedRunImageAttachment"}}}},"ControlAgentToolDecisionRequest":{"type":"object","additionalProperties":false,"required":["confirmed","idempotencyKey"],"properties":{"confirmed":{"const":true},"idempotencyKey":{"type":"string","minLength":16,"maxLength":200}}},"A2aStateEnvelope":{"type":"object","additionalProperties":false,"required":["intent","evidence_used","known_state","unknown_or_missing_state","allowed_next_actions","blocked_actions","decision_authority","tool_results"],"properties":{"intent":{"type":"string","maxLength":1000},"evidence_used":{"type":"array","maxItems":50,"items":{"type":"string","maxLength":500}},"known_state":{"type":"object","additionalProperties":true},"unknown_or_missing_state":{"type":"array","maxItems":50,"items":{"type":"string","maxLength":1000}},"allowed_next_actions":{"type":"array","maxItems":50,"items":{"type":"string","maxLength":500}},"blocked_actions":{"type":"array","maxItems":50,"items":{"type":"string","maxLength":500}},"decision_authority":{"type":"string","maxLength":1000},"tool_results":{"type":"array","maxItems":50}}},"A2aHandoffRequest":{"type":"object","additionalProperties":false,"required":["sourceTaskId","targetEndpointId","requestedResponse","stateEnvelope"],"properties":{"sourceTaskId":{"type":"string","format":"uuid"},"targetEndpointId":{"type":"string","format":"uuid"},"conversationId":{"type":"string","format":"uuid"},"requestedResponse":{"type":"string","enum":["status_update","proposal","evidence_request","task_result","clarification"]},"responseInstructions":{"type":"string","maxLength":2000},"stateEnvelope":{"$ref":"#/components/schemas/A2aStateEnvelope"},"evidenceReferences":{"type":"array","maxItems":20,"items":{"type":"object","additionalProperties":false,"required":["trajectoryId","revision","capsuleHash"],"properties":{"trajectoryId":{"type":"string","format":"uuid"},"revision":{"type":"integer","minimum":1},"capsuleHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}}}}}},"ErrorEnvelope":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"correlationId":{"type":["string","null"]}}}}},"LearningPolicySummary":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"org_id":{"type":"string","minLength":1},"endpoint_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"current_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["enabled","paused"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","org_id","endpoint_id","current_revision","state","created_at"],"additionalProperties":false},"LearningFreePreflightPacket":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"schema":{"type":"string","const":"dharma.learning-free-preflight/v1"},"purpose":{"type":"string","const":"native_generation"},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/LearningFreePreflightPacket/$defs/__schema0"}}},"required":["schema","purpose","body"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/LearningFreePreflightPacket/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/LearningFreePreflightPacket/$defs/__schema0"}}]}}},"ControlledProofBudgetSnapshot":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"snapshotHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"scopeHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"originalPreflightHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"capMicrousd":{"type":"integer","minimum":0,"maximum":300000000},"sharedExposureMicrousd":{"type":"integer","minimum":0,"maximum":9007199254740991},"proofExposureMicrousd":{"type":"integer","minimum":0,"maximum":9007199254740991},"budgetAuthorizationRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"budgetAuthorizationReceiptHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"settledNativeGenerations":{"type":"integer","minimum":0,"maximum":9007199254740991},"maximumSettledNativeMicrousd":{"type":"integer","minimum":0,"maximum":9007199254740991},"unsettledEntries":{"type":"integer","minimum":0,"maximum":9007199254740991},"reviewDispatches":{"type":"integer","minimum":0,"maximum":9007199254740991},"reservationOverrun":{"type":"boolean"},"reconciliationRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"latestReconciliationPlanHash":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"effectiveAllocations":{"type":"object","properties":{"preparation":{"type":"integer","minimum":0,"maximum":9007199254740991},"final_test":{"type":"integer","minimum":0,"maximum":9007199254740991},"verification":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["preparation","final_test","verification"],"additionalProperties":false},"exposureByPhase":{"type":"object","properties":{"preparation":{"type":"integer","minimum":0,"maximum":9007199254740991},"final_test":{"type":"integer","minimum":0,"maximum":9007199254740991},"verification":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["preparation","final_test","verification"],"additionalProperties":false}},"required":["snapshotHash","scopeHash","originalPreflightHash","capMicrousd","sharedExposureMicrousd","proofExposureMicrousd","settledNativeGenerations","maximumSettledNativeMicrousd","unsettledEntries","reviewDispatches","reservationOverrun","reconciliationRevision","latestReconciliationPlanHash","effectiveAllocations","exposureByPhase"],"additionalProperties":false},"ControlledProofBudgetReconciliation":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"schema":{"type":"string","const":"dharma.controlled-proof-budget-reconciliation/v1"},"scopeHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"originalPreflightHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"expectedSnapshotHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"sourceQuoteSetHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"preflight":{"type":"object","properties":{"schema":{"type":"string","enum":["dharma.controlled-proof-cost-preflight/v1","dharma.controlled-proof-cost-preflight/v2"]},"scopeHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"model":{"type":"string","const":"gemini-3.8-flash"},"generatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"validUntil":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"generationRetryLimit":{"type":"number","const":2},"evaluationRepairLimit":{"type":"number","const":2},"generationChargeProtocol":{"type":"string","const":"single-billable-capacity-retry-v1"},"rateCards":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"purpose":{"type":"string","enum":["generation","evaluation"]},"model":{"type":"string","const":"gemini-3.8-flash"},"rateCardHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"validUntil":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"sourceUrl":{"type":"string","format":"uri"}},"required":["purpose","model","rateCardHash","validUntil","sourceUrl"],"additionalProperties":false}},"workloads":{"type":"object","properties":{"learning":{"type":"object","properties":{"logicalRequests":{"type":"number","const":100},"managedGenerations":{"type":"number","const":100},"replayGenerations":{"type":"number","const":0},"evaluationCalls":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maximumMicrousd":{"type":"integer","exclusiveMinimum":0,"maximum":100000000},"requestSetHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"quoteSetHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["logicalRequests","managedGenerations","replayGenerations","evaluationCalls","maximumMicrousd","requestSetHash","quoteSetHash"],"additionalProperties":false},"development":{"type":"object","properties":{"logicalRequests":{"type":"number","const":20},"managedGenerations":{"anyOf":[{"type":"number","const":0},{"type":"number","const":20}]},"replayGenerations":{"anyOf":[{"type":"number","const":40},{"type":"number","const":80},{"type":"number","const":120}]},"evaluationCalls":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maximumMicrousd":{"type":"integer","exclusiveMinimum":0,"maximum":100000000},"requestSetHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"quoteSetHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["logicalRequests","managedGenerations","replayGenerations","evaluationCalls","maximumMicrousd","requestSetHash","quoteSetHash"],"additionalProperties":false},"calibration":{"type":"object","properties":{"logicalRequests":{"type":"number","const":100},"managedGenerations":{"type":"number","const":0},"replayGenerations":{"type":"number","const":0},"evaluationCalls":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maximumMicrousd":{"type":"integer","exclusiveMinimum":0,"maximum":100000000},"requestSetHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"quoteSetHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["logicalRequests","managedGenerations","replayGenerations","evaluationCalls","maximumMicrousd","requestSetHash","quoteSetHash"],"additionalProperties":false},"finalTest":{"type":"object","properties":{"logicalRequests":{"type":"number","const":100},"managedGenerations":{"type":"number","const":100},"replayGenerations":{"type":"number","const":200},"evaluationCalls":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maximumMicrousd":{"type":"integer","exclusiveMinimum":0,"maximum":100000000},"requestSetHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"quoteSetHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["logicalRequests","managedGenerations","replayGenerations","evaluationCalls","maximumMicrousd","requestSetHash","quoteSetHash"],"additionalProperties":false},"lifecycle":{"type":"object","properties":{"logicalRequests":{"type":"number","const":200},"managedGenerations":{"type":"number","const":200},"replayGenerations":{"type":"number","const":0},"evaluationCalls":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maximumMicrousd":{"type":"integer","exclusiveMinimum":0,"maximum":100000000},"requestSetHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"quoteSetHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["logicalRequests","managedGenerations","replayGenerations","evaluationCalls","maximumMicrousd","requestSetHash","quoteSetHash"],"additionalProperties":false}},"required":["learning","development","calibration","finalTest","lifecycle"],"additionalProperties":false},"totalMaximumMicrousd":{"type":"integer","exclusiveMinimum":0,"maximum":300000000}},"required":["schema","scopeHash","model","generatedAt","validUntil","generationRetryLimit","evaluationRepairLimit","rateCards","workloads","totalMaximumMicrousd"],"additionalProperties":false},"baseGenerationMaximumMicrousd":{"type":"integer","exclusiveMinimum":0,"maximum":100000000},"additionalNativeCaptureGenerations":{"anyOf":[{"type":"number","const":0},{"type":"number","const":1}]},"nativeCaptureSourceReceiptId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"nativeCaptureLimitationReceiptHash":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"outsideLedgerMaximumMicrousd":{"type":"integer","minimum":0,"maximum":100000000}},"required":["schema","scopeHash","originalPreflightHash","expectedSnapshotHash","sourceQuoteSetHash","preflight","baseGenerationMaximumMicrousd","additionalNativeCaptureGenerations","nativeCaptureSourceReceiptId","nativeCaptureLimitationReceiptHash","outsideLedgerMaximumMicrousd"],"additionalProperties":false},"CalibrationReferenceManifest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"schema":{"type":"string","const":"dharma.independent-calibration-reference-set/v1"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","minLength":1,"maxLength":255},"policyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"endpointId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"evaluationContractId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"evaluationContractHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"evidencePolicyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"authority":{"type":"string","enum":["human_adjudicated","deterministic_reference"]},"authorityKeyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"issuedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"members":{"minItems":100,"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"trajectoryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"trajectoryRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sourceHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"observationHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"requestHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"labels":{"type":"object","properties":{"source-support":{"type":"object","properties":{"pass":{"type":"boolean"},"severeFailure":{"type":"boolean"}},"required":["pass","severeFailure"],"additionalProperties":false},"history-semantics":{"type":"object","properties":{"pass":{"type":"boolean"},"severeFailure":{"type":"boolean"}},"required":["pass","severeFailure"],"additionalProperties":false},"evidence-coverage":{"type":"object","properties":{"pass":{"type":"boolean"},"severeFailure":{"type":"boolean"}},"required":["pass","severeFailure"],"additionalProperties":false}},"required":["source-support","history-semantics","evidence-coverage"],"additionalProperties":false}},"required":["id","trajectoryId","trajectoryRevision","sourceHash","observationHash","requestHash","labels"],"additionalProperties":false}}},"required":["schema","id","organizationId","policyId","endpointId","evaluationContractId","evaluationContractHash","evidencePolicyId","authority","authorityKeyId","issuedAt","expiresAt","members"],"additionalProperties":false},"ControlledProofRegistration":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"scope":{"type":"object","properties":{"schema":{"type":"string","enum":["dharma.controlled-learning-proof/v1","dharma.controlled-learning-proof/v2"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"purpose":{"type":"string","const":"garment_learning_proof"},"trafficClass":{"type":"string","const":"dharma_authored_proof"},"endpointId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"model":{"type":"string","const":"gemini-3.8-flash"},"sourceManifestHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"selectionSeed":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"lifetimeCapMicrousd":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"cohorts":{"type":"object","properties":{"learning":{"minItems":100,"maxItems":100,"type":"array","items":{"type":"object","properties":{"requestHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"objectHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"imageHashes":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"evidenceHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"previouslyInspectedPhoto":{"type":"boolean"},"scenario":{"type":"string","enum":["ordinary","insufficient_evidence","conflict_adversarial"]},"generationSettingsHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["requestHash","objectHash","imageHashes","evidenceHash","previouslyInspectedPhoto","scenario"],"additionalProperties":false}},"development":{"minItems":20,"maxItems":20,"type":"array","items":{"type":"object","properties":{"requestHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"objectHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"imageHashes":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"evidenceHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"previouslyInspectedPhoto":{"type":"boolean"},"scenario":{"type":"string","enum":["ordinary","insufficient_evidence","conflict_adversarial"]},"generationSettingsHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["requestHash","objectHash","imageHashes","evidenceHash","previouslyInspectedPhoto","scenario"],"additionalProperties":false}},"calibration":{"minItems":100,"maxItems":100,"type":"array","items":{"type":"object","properties":{"requestHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"objectHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"imageHashes":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"evidenceHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"previouslyInspectedPhoto":{"type":"boolean"},"scenario":{"type":"string","enum":["ordinary","insufficient_evidence","conflict_adversarial"]},"generationSettingsHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["requestHash","objectHash","imageHashes","evidenceHash","previouslyInspectedPhoto","scenario"],"additionalProperties":false}},"test":{"minItems":100,"maxItems":100,"type":"array","items":{"type":"object","properties":{"requestHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"objectHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"imageHashes":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"evidenceHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"previouslyInspectedPhoto":{"type":"boolean"},"scenario":{"type":"string","enum":["ordinary","insufficient_evidence","conflict_adversarial"]},"generationSettingsHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["requestHash","objectHash","imageHashes","evidenceHash","previouslyInspectedPhoto","scenario"],"additionalProperties":false}}},"required":["learning","development","calibration","test"],"additionalProperties":false},"finalTestComposition":{"type":"object","properties":{"ordinary":{"type":"number","const":60},"insufficient_evidence":{"type":"number","const":20},"conflict_adversarial":{"type":"number","const":20}},"required":["ordinary","insufficient_evidence","conflict_adversarial"],"additionalProperties":false},"productionEligible":{"type":"boolean","const":false},"activationBoundary":{"type":"string","const":"isolated_proof_endpoint_only"}},"required":["schema","id","purpose","trafficClass","endpointId","model","sourceManifestHash","selectionSeed","expiresAt","lifetimeCapMicrousd","cohorts","finalTestComposition","productionEligible","activationBoundary"],"additionalProperties":false},"generationSettingsHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["scope","generationSettingsHash"],"additionalProperties":false,"description":"Exactly 100 learning, 20 development, 100 reference-calibration and 100 sealed-test members. Request, object, image and request-specific evidence hashes must be distinct across all members; previously inspected photographs are learning-only. Every cohort covers ordinary, insufficient-evidence and conflict/adversarial cases; test composition is exactly 60/20/20. V1 binds study-wide generation settings and forbids per-member settings. V2 requires generationSettingsHash for every member, preserving heterogeneous original schemas and decoding; the registration and freeze generationSettingsHash bind the immutable settings manifest. Unknown fields, hidden answers, duplicate membership and model substitution are rejected by both application and database validation. Hashes are metadata, not permission to supply invented source evidence."},"ExternalNativePacket":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"schema":{"type":"string","const":"dharma.external-native-upload/v1"},"organizationId":{"type":"string","minLength":1,"maxLength":255},"policyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"policyRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"endpointId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"logicalRequestId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\u0000-\\u001f\\u007f]+$"},"pinId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"model":{"type":"string","pattern":"^gemini-[a-z0-9.-]+$"},"captureHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"byteCount":{"type":"integer","exclusiveMinimum":0,"maximum":8388608},"chunkCount":{"type":"integer","minimum":1,"maximum":32},"kind":{"type":"string","const":"chunk"},"chunkIndex":{"type":"integer","minimum":0,"maximum":31},"dataBase64":{"type":"string","minLength":4,"maxLength":349528}},"required":["schema","organizationId","policyId","policyRevision","endpointId","logicalRequestId","pinId","model","captureHash","byteCount","chunkCount","kind","chunkIndex","dataBase64"],"additionalProperties":false},{"type":"object","properties":{"schema":{"type":"string","const":"dharma.external-native-upload/v1"},"organizationId":{"type":"string","minLength":1,"maxLength":255},"policyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"policyRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"endpointId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"logicalRequestId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\u0000-\\u001f\\u007f]+$"},"pinId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"model":{"type":"string","pattern":"^gemini-[a-z0-9.-]+$"},"captureHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"byteCount":{"type":"integer","exclusiveMinimum":0,"maximum":8388608},"chunkCount":{"type":"integer","minimum":1,"maximum":32},"kind":{"type":"string","const":"seal"}},"required":["schema","organizationId","policyId","policyRevision","endpointId","logicalRequestId","pinId","model","captureHash","byteCount","chunkCount","kind"],"additionalProperties":false}]},"ExternalNativeCapture":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"schema":{"type":"string","const":"dharma.external-native-capture/v1"},"organizationId":{"type":"string","minLength":1,"maxLength":255},"policyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"policyRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"endpointId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"logicalRequestId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\u0000-\\u001f\\u007f]+$"},"pinId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"model":{"type":"string","pattern":"^gemini-[a-z0-9.-]+$"},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"status":{"type":"string","enum":["completed","failed","cancelled"]},"originalInstructions":{"type":"string","minLength":1,"maxLength":250000},"instructionSpan":{"type":"object","properties":{"partIndex":{"type":"integer","minimum":0,"maximum":1000},"byteOffset":{"type":"integer","minimum":0,"maximum":8388608}},"required":["partIndex","byteOffset"],"additionalProperties":false},"nativeRequest":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/ExternalNativeCapture/$defs/__schema0"}},"providerResult":{"type":"object","properties":{"httpStatus":{"anyOf":[{"type":"integer","minimum":100,"maximum":599},{"type":"null"}]},"body":{"$ref":"#/components/schemas/ExternalNativeCapture/$defs/__schema1"}},"required":["httpStatus","body"],"additionalProperties":false}},"required":["schema","organizationId","policyId","policyRevision","endpointId","logicalRequestId","pinId","model","startedAt","completedAt","status","originalInstructions","instructionSpan","nativeRequest","providerResult"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/ExternalNativeCapture/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/ExternalNativeCapture/$defs/__schema0"}}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/ExternalNativeCapture/$defs/__schema1"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/ExternalNativeCapture/$defs/__schema1"}}]}}},"CalibrationNativeFixture":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"schema":{"type":"string","const":"dharma.calibration-native-fixture/v1"},"organizationId":{"type":"string","minLength":1,"maxLength":255},"policyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"policyRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"endpointId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"logicalRequestId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\u0000-\\u001f\\u007f]+$"},"pinId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"model":{"type":"string","pattern":"^gemini-[a-z0-9.-]+$"},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"status":{"type":"string","const":"completed"},"originalInstructions":{"type":"string","minLength":1,"maxLength":250000},"instructionSpan":{"type":"object","properties":{"partIndex":{"type":"integer","minimum":0,"maximum":1000},"byteOffset":{"type":"integer","minimum":0,"maximum":8388608}},"required":["partIndex","byteOffset"],"additionalProperties":false},"nativeRequest":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/CalibrationNativeFixture/$defs/__schema0"}},"referenceResult":{"type":"object","properties":{"schema":{"type":"string","const":"dharma.authored-reference-result/v1"},"authority":{"type":"string","const":"deterministic_reference"},"derivationHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"response":{"$ref":"#/components/schemas/CalibrationNativeFixture/$defs/__schema1"},"providerExecuted":{"type":"boolean","const":false},"providerReceiptId":{"type":"null"}},"required":["schema","authority","derivationHash","response","providerExecuted","providerReceiptId"],"additionalProperties":false}},"required":["schema","organizationId","policyId","policyRevision","endpointId","logicalRequestId","pinId","model","startedAt","completedAt","status","originalInstructions","instructionSpan","nativeRequest","referenceResult"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/CalibrationNativeFixture/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/CalibrationNativeFixture/$defs/__schema0"}}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/CalibrationNativeFixture/$defs/__schema1"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/CalibrationNativeFixture/$defs/__schema1"}}]}}},"ExternalNativeReceipt":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"captureId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sealed":{"type":"boolean"},"memberId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"receivedChunks":{"type":"integer","minimum":0,"maximum":32},"chunkCount":{"type":"integer","minimum":1,"maximum":32},"replayed":{"type":"boolean"},"provenance":{"type":"string","const":"customer_attested"},"providerExecutionVerified":{"type":"boolean","const":false}},"required":["captureId","sealed","memberId","receivedChunks","chunkCount","replayed","provenance","providerExecutionVerified"],"additionalProperties":false},"CalibrationCaptureReceipt":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"captureId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sealed":{"type":"boolean"},"memberId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"receivedChunks":{"type":"integer","minimum":0,"maximum":32},"chunkCount":{"type":"integer","minimum":1,"maximum":32},"replayed":{"type":"boolean"},"provenance":{"type":"string","const":"customer_attested"},"providerExecutionVerified":{"type":"boolean","const":false},"evidenceRole":{"type":"string","const":"calibration"},"reference":{"anyOf":[{"type":"object","properties":{"trajectoryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"trajectoryRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sourceHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"observationHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"requestHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["trajectoryId","trajectoryRevision","sourceHash","observationHash","requestHash"],"additionalProperties":false},{"type":"null"}]}},"required":["captureId","sealed","memberId","receivedChunks","chunkCount","replayed","provenance","providerExecutionVerified","evidenceRole","reference"],"additionalProperties":false},"LearningPolicy":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"schema":{"type":"string","const":"dharma.learning-policy/v1"},"name":{"type":"string","minLength":1,"maxLength":120},"managedAgentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"endpointId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"evaluationContractId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"evidencePolicyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"generationBindingId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"evaluationBindingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"batchSize":{"type":"number","const":100},"promotionMode":{"type":"string","const":"automatic_gated"},"dailyCapMicrousd":{"type":"integer","minimum":0,"maximum":9007199254740991},"monthlyCapMicrousd":{"type":"integer","minimum":0,"maximum":9007199254740991},"rubricLearning":{"type":"string","const":"calibrated_automatic"},"calibrationSetId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"studyScope":{"type":"object","properties":{"schema":{"type":"string","const":"dharma.bounded-learning-study/v1"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"purpose":{"type":"string","const":"image_augmented_diagnostic"},"sourceManifestHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"requestHashes":{"minItems":100,"maxItems":100,"type":"array","items":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"lifetimeCapMicrousd":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["schema","id","purpose","sourceManifestHash","requestHashes","expiresAt","lifetimeCapMicrousd"],"additionalProperties":false},"validationEvidenceContract":{"anyOf":[{"type":"object","properties":{"schema":{"type":"string","const":"dharma.validation-evidence-contract/v1"},"version":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","minLength":1,"maxLength":4000},"model":{"type":"string","pattern":"^gemini-[a-z0-9.-]+$"},"minimumImages":{"type":"integer","minimum":0,"maximum":100},"maximumImages":{"type":"integer","minimum":0,"maximum":100},"imageMimeTypes":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["image/png","image/jpeg","image/webp"]}},"requestSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/LearningPolicy/$defs/__schema0"}}},"required":["schema","version","description","model","minimumImages","maximumImages","imageMimeTypes","requestSchema"],"additionalProperties":false},{"type":"null"}]},"state":{"type":"string","enum":["enabled","paused"]}},"required":["schema","name","managedAgentId","endpointId","evaluationContractId","evidencePolicyId","generationBindingId","evaluationBindingId","batchSize","promotionMode","dailyCapMicrousd","monthlyCapMicrousd","rubricLearning","calibrationSetId","state"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/LearningPolicy/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/LearningPolicy/$defs/__schema0"}}]}}},"Observation":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"schema":{"type":"string","const":"dharma.learning-observation/v1"},"logicalRequestId":{"type":"string","minLength":1,"maxLength":120},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"status":{"type":"string","enum":["completed","failed","cancelled"]},"model":{"type":"string","minLength":1,"maxLength":120},"instructionText":{"type":"string","maxLength":250000},"request":{"$ref":"#/components/schemas/Observation/$defs/__schema0"},"response":{"$ref":"#/components/schemas/Observation/$defs/__schema1"},"decoding":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Observation/$defs/__schema2"}},"attachments":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"sha256":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"mimeType":{"type":"string","minLength":1,"maxLength":120},"evidenceId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["sha256","mimeType","evidenceId"],"additionalProperties":false}},"providerReceiptId":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"activeSkillHash":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]}},"required":["schema","logicalRequestId","completedAt","status","model","instructionText","request","response","decoding","attachments","providerReceiptId","activeSkillHash"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/Observation/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Observation/$defs/__schema0"}}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/Observation/$defs/__schema1"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Observation/$defs/__schema1"}}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/Observation/$defs/__schema2"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Observation/$defs/__schema2"}}]}}},"SkillPinRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"logicalRequestId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\u0000-\\u001f\\u007f]+$"},"endpointId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["logicalRequestId","endpointId"],"additionalProperties":false},"GraderCalibrationProgress":{"type":"object","required":["schema","totalJobs","returnedJobs","hasMore","limit","ordering","graderActivationSupported","jobs"],"properties":{"schema":{"const":"dharma.grader-calibration-progress/v1"},"totalJobs":{"type":"integer","minimum":0},"returnedJobs":{"type":"integer","minimum":0,"maximum":20},"hasMore":{"type":"boolean","description":"Older jobs exist beyond the latest twenty returned here."},"limit":{"const":20},"ordering":{"const":"created_at_desc_id_desc"},"graderActivationSupported":{"const":true,"description":"A verified v2 calibration may automatically select a new grader version at the next unstarted learning window. Frozen skill validation and monitoring do not change."},"jobs":{"type":"array","maxItems":20,"items":{"type":"object","required":["id","policyRevision","sourceWindowId","candidateIterationId","referenceSetId","baselineGraderHash","candidateGraderHash","status","reason","expectedReferences","reviewedReferences","calibrationPassed","resultAvailability","resultHash","activation","graderVersion","graderActivatedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string","format":"uuid"},"policyRevision":{"type":"integer","minimum":1},"sourceWindowId":{"type":"string","format":"uuid"},"candidateIterationId":{"type":["string","null"],"format":"uuid","description":"Immutable development iteration whose Atlas-derived rubric is being calibrated; null denotes the original learning-window proposal."},"referenceSetId":{"type":["string","null"],"format":"uuid"},"baselineGraderHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"candidateGraderHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"status":{"enum":["queued","running","waiting","completed","failed","superseded"]},"reason":{"type":["string","null"],"description":"Redacted machine-readable waiting/failure reason."},"expectedReferences":{"const":100},"reviewedReferences":{"enum":[100,null],"description":"100 only for database-verified completion of both arms; null means unverified, not zero."},"calibrationPassed":{"type":["boolean","null"],"description":"The retained completed decision. Null when incomplete or its content is expired, revoked or unavailable."},"resultAvailability":{"enum":["not_completed","retained","expired_or_revoked","unavailable"]},"resultHash":{"type":["string","null"],"pattern":"^sha256:[a-f0-9]{64}$"},"activation":{"enum":["not_activated","selected_for_future_learning"],"description":"Historical grader selection receipt, not a skill rollout or current evidence availability claim."},"graderVersion":{"type":["integer","null"],"minimum":1},"graderActivatedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}},"ControlledProofProgress":{"type":"object","required":["schema","proofId","policyId","members","candidate","development","calibration","freeze","billing","testSealed","productionEligible","activationBoundary"],"properties":{"schema":{"const":"dharma.controlled-proof-progress/v1"},"proofId":{"type":"string","format":"uuid"},"policyId":{"type":"string","format":"uuid"},"members":{"type":"object","additionalProperties":{"type":"integer","minimum":0},"description":"Received canonical members by learning ledger lane. This is not a pass count."},"candidate":{"type":["object","null"],"description":"Latest candidate state and redacted waiting reason."},"development":{"type":["object","null"],"description":"Latest 20-request development round, attempts, state and redacted reason."},"calibration":{"type":["object","null"],"description":"Independent 100-reference grader calibration state; never a skill score."},"freeze":{"type":["object","null"],"description":"Immutable accepted skill, Atlas, grader and test-membership binding. Null keeps final test sealed."},"billing":{"type":"object","required":["settledMicrousd","outstandingMicrousd","lifetimeCapMicrousd"],"properties":{"settledMicrousd":{"type":"integer","minimum":0},"outstandingMicrousd":{"type":"integer","minimum":0},"lifetimeCapMicrousd":{"type":"integer","minimum":0}}},"testSealed":{"type":"boolean"},"productionEligible":{"const":false},"activationBoundary":{"const":"isolated_proof_endpoint_only"}}},"Error":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"object","required":["code","message","retryable","correlationId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlationId":{"type":"string","format":"uuid"}}}},"description":"Existing Agent Fabric error envelope; do not depend on private provider messages."}},"responses":{"Success":{"description":"Organization-scoped response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"Accepted":{"description":"Asynchronous work accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"Created":{"description":"Resource created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"Error":{"description":"Stable non-enumerating error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"pathItems":{"devices":{"get":{"operationId":"listDevices","summary":"List enrolled organization devices","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}}},"instructions":{"get":{"operationId":"getAgentFabricInstructions","summary":"Get credential-free organization setup commands and role boundaries","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}}},"repositoryAgents":{"get":{"operationId":"listRepositoryAgents","summary":"List one logical agent per connected source repository","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}},"post":{"operationId":"connectRepositoryAgent","summary":"Idempotently connect a source repository to its permanent control branch","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryAgentRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/Success"},"201":{"$ref":"#/components/responses/Created"},"409":{"$ref":"#/components/responses/Error"}}}},"workspaces":{"get":{"operationId":"listWorkspaces","summary":"List registered workspaces and independent provider capabilities","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}},"post":{"operationId":"registerWorkspace","summary":"Register a device workspace and receive a signed bounded evidence-policy authorization","parameters":[{"$ref":"#/components/parameters/orgId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"responses":{"201":{"$ref":"#/components/responses/Created"},"400":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"}}}},"agents":{"get":{"operationId":"listAgents","summary":"List logical agents","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}},"post":{"operationId":"createAgent","summary":"Create a logical agent","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"responses":{"201":{"$ref":"#/components/responses/Created"}}}},"endpoints":{"post":{"operationId":"bindAgentEndpoint","summary":"Bind a local/runtime endpoint or register an observation-only external service","description":"external_observer requires organization-admin authority and accepts only endpointKind. No repository, managed agent, runtime, credentials or remote URL is needed. This creates identity only, not a learning policy or task executor. New registration cannot reactivate an inactive endpoint. External paired replay remains unsupported until native evidence retention and validation are implemented.","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/agentId"},{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentEndpointRequest"}}}},"responses":{"201":{"$ref":"#/components/responses/Created"},"400":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"trajectories":{"get":{"operationId":"listTrajectories","summary":"List reduced trajectory capsules","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}}},"evals":{"get":{"operationId":"listEvaluations","summary":"List scoped analysis windows and evaluations","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}},"post":{"operationId":"requestAnalysis","summary":"Close an organization, logical-agent, or endpoint-scoped analysis window","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisRequest"}}}},"responses":{"201":{"$ref":"#/components/responses/Created"}}}},"evaluationContracts":{"get":{"operationId":"listEvaluationContracts","summary":"List generated evaluation contracts and approval state","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"403":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"transitionEvaluationContract","summary":"Explicitly activate, retire, or reject one evaluation contract as an organization admin","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationContractTransition"}}}},"responses":{"200":{"$ref":"#/components/responses/Success"},"400":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"failures":{"get":{"operationId":"listFailureAtlas","summary":"List customer-isolated Failure Atlas families","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}}},"remediations":{"get":{"operationId":"listRemediationCampaigns","summary":"List coordinated parent campaigns and independently reversible agent targets","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}}},"remediationTarget":{"get":{"operationId":"getRemediationTarget","summary":"Inspect one independently reversible repository-agent release","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/targetId"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"transitionRemediationTarget","summary":"Advance or roll back one repository-agent child release after its required gates","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/targetId"},{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemediationTargetAction"}}}},"responses":{"200":{"$ref":"#/components/responses/Success"},"400":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"actionDecisions":{"get":{"operationId":"listActionDecisions","summary":"List action-time decisions for consequential local tasks","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"403":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"requestActionDecision","summary":"Issue a signed action-bound release, block, escalate, or withhold receipt","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionDecisionRequest"}}}},"responses":{"201":{"$ref":"#/components/responses/Created"},"400":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"actionDecisionEnforcements":{"post":{"operationId":"acknowledgeActionDecisionEnforcement","summary":"Record the device-signed effect or containment acknowledgement for one decision","security":[],"parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/decisionId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionDecisionEnforcement"}}}},"responses":{"200":{"$ref":"#/components/responses/Success"},"201":{"$ref":"#/components/responses/Created"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"tasks":{"get":{"operationId":"listTasks","summary":"List bounded signed tasks","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}},"post":{"operationId":"dispatchTask","summary":"Dispatch a signed task to an allowed endpoint","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"responses":{"201":{"$ref":"#/components/responses/Created"}}}},"conversations":{"get":{"operationId":"listHandoffs","summary":"List task-bound A2A handoffs","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}},"post":{"operationId":"dispatchHandoff","summary":"Request structured help from another same-organization agent","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/A2aHandoffRequest"}}}},"responses":{"201":{"$ref":"#/components/responses/Created"}}}},"skills":{"get":{"operationId":"listSkills","summary":"List signed skill releases and rollouts","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}},"post":{"operationId":"releaseSkill","summary":"Create a signed skill release after evaluation gates","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"responses":{"201":{"$ref":"#/components/responses/Created"}}}},"usage":{"get":{"operationId":"getUsage","summary":"Get customer-visible credits and usage","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}}},"controlAgentSessions":{"get":{"operationId":"listControlAgentSessions","summary":"List organization control-agent conversations","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"403":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"createControlAgentSession","summary":"Create an idempotent control-agent conversation","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ControlAgentSessionRequest"}}}},"responses":{"201":{"$ref":"#/components/responses/Created"},"400":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"controlAgentMessages":{"post":{"operationId":"submitControlAgentMessage","summary":"Submit an asynchronous, usage-metered control-agent turn","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/sessionId"},{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ControlAgentMessageRequest"}}}},"responses":{"202":{"$ref":"#/components/responses/Accepted"},"400":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"controlAgentEvents":{"get":{"operationId":"listControlAgentEvents","summary":"Read ordered control-agent progress and approval events","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/sessionId"},{"$ref":"#/components/parameters/afterSequence"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"controlAgentApprove":{"post":{"operationId":"approveControlAgentToolCall","summary":"Approve and execute one bounded proposed tool call","security":[{"clerkSession":[]}],"parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/toolCallId"},{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ControlAgentToolDecisionRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/Success"},"400":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"controlAgentReject":{"post":{"operationId":"rejectControlAgentToolCall","summary":"Reject one bounded proposed tool call","security":[{"clerkSession":[]}],"parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/toolCallId"},{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ControlAgentToolDecisionRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/Success"},"400":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"managedAgents":{"get":{"operationId":"listManagedAgents","summary":"List immutable managed ADK agents","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}},"post":{"operationId":"createManagedAgent","summary":"Create a managed ADK agent and candidate revision 1","parameters":[{"$ref":"#/components/parameters/orgId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedAgentCreateRequest"}}}},"responses":{"201":{"$ref":"#/components/responses/Created"},"400":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"managedAgent":{"get":{"operationId":"getManagedAgent","summary":"Get one managed agent and every immutable revision","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/agentId"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"404":{"$ref":"#/components/responses/Error"}}}},"managedAgentRevisions":{"get":{"operationId":"listManagedAgentRevisions","summary":"List immutable revisions for one managed agent","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/agentId"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"createManagedAgentRevision","summary":"Create a candidate revision","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/agentId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedAgentRevisionInput"}}}},"responses":{"201":{"$ref":"#/components/responses/Created"},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"managedAgentDeploy":{"post":{"operationId":"deployManagedAgentRevision","summary":"Deploy one exact candidate revision","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/agentId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedAgentDeployRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/Success"},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"agentRuns":{"get":{"operationId":"listAgentRuns","summary":"List managed and GCP BYOK runs","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}},"post":{"operationId":"submitAgentRun","summary":"Submit an asynchronous multimodal agent run","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedRunRequest"}}}},"responses":{"202":{"$ref":"#/components/responses/Accepted"}}}},"managedEvals":{"get":{"operationId":"getManagedEvaluations","summary":"List campaigns or retrieve one campaign with sessions, visible task metadata, and authoritative verdicts","parameters":[{"$ref":"#/components/parameters/orgId"},{"name":"campaignId","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"createManagedEvaluation","summary":"Launch a governed direct/stateful or held-out evaluation","parameters":[{"$ref":"#/components/parameters/orgId"},{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedEvaluationCampaignRequest"}}}},"responses":{"201":{"$ref":"#/components/responses/Created"},"400":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"managedEvalPreflight":{"post":{"operationId":"preflightManagedEvaluation","summary":"Validate a governed evaluation and return exact gates and maximum preauthorization","parameters":[{"$ref":"#/components/parameters/orgId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedEvaluationCampaignRequest"}}}},"responses":{"200":{"description":"Validated evaluation preflight","content":{"application/json":{"schema":{"type":"object","required":["ok","preflight"],"properties":{"ok":{"const":true},"preflight":{"$ref":"#/components/schemas/ManagedEvaluationPreflight"}}}}}},"400":{"$ref":"#/components/responses/Error"}}}},"managedTraces":{"get":{"operationId":"listManagedTraces","summary":"List customer-visible run traces","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}}},"remediationCandidates":{"get":{"operationId":"listRemediationCandidates","summary":"List GitHub-backed remediation candidates and held-out evidence","parameters":[{"$ref":"#/components/parameters/orgId"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}}}}},"x-dharma-learning-contract-version":"0.1.14"}