{"openapi":"3.1.0","info":{"title":"Cloud Credential Proxy","description":"API proxy for cloud credential storage and report dispatch","version":"1.0.0"},"paths":{"/agent/v1/register":{"post":{"tags":["Agent"],"summary":"Register","description":"Validate the license key + sign the agent's CSR. ITERATION 1 caveat:\nthe CSR signing uses a stub local-CA path. Production swap-in points:\n    SIGN_CA_BACKEND=acm-pca|vault|local\n    SIGN_CA_KEY_PATH=/etc/continueops/ca/key.pem\n    SIGN_CA_CERT_PATH=/etc/continueops/ca/cert.pem\nSee ARCHITECTURE.md for the production handoff.","operationId":"register_agent_v1_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/v1/heartbeat":{"post":{"tags":["Agent"],"summary":"Heartbeat","operationId":"heartbeat_agent_v1_heartbeat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/v1/jobs/poll":{"get":{"tags":["Agent"],"summary":"Poll Jobs","description":"Long-poll: returns 200 + Job when one becomes available, or 204\nNo Content if the wait_seconds elapsed first. The agent retries\nimmediately after either response.","operationId":"poll_jobs_agent_v1_jobs_poll_get","parameters":[{"name":"wait_seconds","in":"query","required":false,"schema":{"type":"integer","maximum":60,"minimum":0,"default":55,"title":"Wait Seconds"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/v1/runbooks/{runbook_id}":{"get":{"tags":["Agent"],"summary":"Fetch Runbook","description":"Returns the raw YAML for a builtin or tenant-uploaded runbook. The\nagent streams this into Zeroize<Vec<u8>> and never writes it to disk.","operationId":"fetch_runbook_agent_v1_runbooks__runbook_id__get","parameters":[{"name":"runbook_id","in":"path","required":true,"schema":{"type":"string","title":"Runbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/v1/runs/{run_id}/steps/{step_id}":{"post":{"tags":["Agent"],"summary":"Step Event","operationId":"step_event_agent_v1_runs__run_id__steps__step_id__post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"step_id","in":"path","required":true,"schema":{"type":"string","title":"Step Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepEventIn"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/v1/runs/{run_id}/complete":{"post":{"tags":["Agent"],"summary":"Run Complete","operationId":"run_complete_agent_v1_runs__run_id__complete_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteEventIn"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/v1/anthropic/{path}":{"delete":{"tags":["Agent","Agent LLM proxy"],"summary":"Anthropic Proxy","description":"Forward Anthropic API call from the agent → real Anthropic, injecting\nour key. Mirrors prompt + response (truncated to 64 KiB each) into\ndr_run_artifacts under artifact_type='llm_call' so the run page can\nshow what Claude actually asked the model.","operationId":"anthropic_proxy_agent_v1_anthropic__path__delete","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Agent","Agent LLM proxy"],"summary":"Anthropic Proxy","description":"Forward Anthropic API call from the agent → real Anthropic, injecting\nour key. Mirrors prompt + response (truncated to 64 KiB each) into\ndr_run_artifacts under artifact_type='llm_call' so the run page can\nshow what Claude actually asked the model.","operationId":"anthropic_proxy_agent_v1_anthropic__path__delete","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Agent","Agent LLM proxy"],"summary":"Anthropic Proxy","description":"Forward Anthropic API call from the agent → real Anthropic, injecting\nour key. Mirrors prompt + response (truncated to 64 KiB each) into\ndr_run_artifacts under artifact_type='llm_call' so the run page can\nshow what Claude actually asked the model.","operationId":"anthropic_proxy_agent_v1_anthropic__path__delete","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Agent","Agent LLM proxy"],"summary":"Anthropic Proxy","description":"Forward Anthropic API call from the agent → real Anthropic, injecting\nour key. Mirrors prompt + response (truncated to 64 KiB each) into\ndr_run_artifacts under artifact_type='llm_call' so the run page can\nshow what Claude actually asked the model.","operationId":"anthropic_proxy_agent_v1_anthropic__path__delete","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Agent","Agent LLM proxy"],"summary":"Anthropic Proxy","description":"Forward Anthropic API call from the agent → real Anthropic, injecting\nour key. Mirrors prompt + response (truncated to 64 KiB each) into\ndr_run_artifacts under artifact_type='llm_call' so the run page can\nshow what Claude actually asked the model.","operationId":"anthropic_proxy_agent_v1_anthropic__path__delete","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/v1/admin/licenses":{"post":{"tags":["Agent","Agent admin"],"summary":"Issue License","operationId":"issue_license_agent_v1_admin_licenses_post","security":[{"APIKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueLicenseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Agent","Agent admin"],"summary":"List Licenses","operationId":"list_licenses_agent_v1_admin_licenses_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"}},{"name":"include_revoked","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Revoked"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LicenseSummary"},"title":"Response List Licenses Agent V1 Admin Licenses Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/v1/admin/licenses/{license_id}/revoke":{"post":{"tags":["Agent","Agent admin"],"summary":"Revoke License","operationId":"revoke_license_agent_v1_admin_licenses__license_id__revoke_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"license_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"License Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/v1/unregister":{"post":{"tags":["Agent"],"summary":"Unregister","operationId":"unregister_agent_v1_unregister_post","responses":{"204":{"description":"Successful Response"}}}},"/health":{"get":{"tags":["Health"],"summary":"Health Check","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/auth":{"post":{"tags":["Credentials"],"summary":"Store Credentials","description":"Store cloud provider credentials (encrypted) in Supabase.\n\nFor AWS, validates against live AWS before storing so the user gets\nimmediate feedback if the role/keys aren't usable. Set\nCRED_VALIDATION_ENABLED=false to skip (emergency bypass).","operationId":"store_credentials_auth_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/auth/{tenant_id}":{"get":{"tags":["Credentials"],"summary":"List Credentials","description":"List all active credentials for a tenant.","operationId":"list_credentials_auth__tenant_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/report":{"post":{"tags":["Reports"],"summary":"Create Report","description":"Validate credentials, create run record, enqueue job to Redis.","operationId":"create_report_report_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/report/{run_id}":{"get":{"tags":["Reports"],"summary":"Get Report Status","description":"Query Supabase for run status.","operationId":"get_report_status_report__run_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/runbooks/catalog":{"get":{"tags":["DR Runbooks"],"summary":"Get Builtin Catalog","description":"List the ContinueOps-shipped runbook catalogue.\n\nRead from storage (`_catalog/runbooks/`), not from the image: runbooks are\npublished, not baked, so this endpoint reflects what the runner will\nactually execute.","operationId":"get_builtin_catalog_runbooks_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuiltinRunbookCatalogResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/runbooks/execute":{"post":{"tags":["DR Runbooks"],"summary":"Execute Runbook","description":"Create a dr_runs row, seed dr_run_steps from the YAML, enqueue the job.\n\nThe tenant_id is the Supabase auth user.id (uuid as string). All DB writes\nuse the user's uuid for RLS tenant isolation.","operationId":"execute_runbook_runbooks_execute_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteRunbookRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteRunbookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/runbooks/runs/{run_id}":{"get":{"tags":["DR Runbooks"],"summary":"Get Runbook Run","description":"Fetch the run header + joined steps + artifacts. FE uses this for hydration;\nlive updates come from Supabase Realtime.","operationId":"get_runbook_run_runbooks_runs__run_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/runbooks/runs/{run_id}/certificate/validate":{"get":{"tags":["DR Runbooks"],"summary":"Validate Run Certificate","description":"Recompute and verify the DR Test Certificate's integrity hash.\n\nReturns ``valid=true`` only when:\n  * The certificate JSON artifact exists for this run\n  * It contains all required fields (run, summary, steps, artifacts, etc.)\n  * Its claimed integrity_hash matches the SHA-256 of its canonical form\n    (sorted-keys, compact-separators) when the integrity_hash field is removed","operationId":"validate_run_certificate_runbooks_runs__run_id__certificate_validate_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificateValidateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/{tenant_id}/{provider}/decrypted":{"get":{"tags":["Internal"],"summary":"Get Decrypted Credential","description":"Decrypt and return a tenant's active credential. ONLY callable by the runner\n(X-Runner-Key). The runner passes run_id as a query param so every decrypt call\nis correlated in logs. Over same-GVC TLS only.","operationId":"get_decrypted_credential_auth__tenant_id___provider__decrypted_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"provider","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ProviderType"}},{"name":"run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecryptedCredentialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/demo/invoke":{"post":{"tags":["DR Demo"],"summary":"Demo Invoke","description":"Invoke primary Lambda; fall back to DR if primary is throttled or unavailable.","operationId":"demo_invoke_demo_invoke_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/demo/throttle":{"post":{"tags":["DR Demo"],"summary":"Demo Throttle","description":"Throttle primary Lambda (concurrency=0) or restore it. Used by the DR runbook.","operationId":"demo_throttle_demo_throttle_post","parameters":[{"name":"restore","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Restore"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"BuiltinRunbookCatalogEntry":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"provider":{"type":"string","title":"Provider"},"title":{"type":"string","title":"Title"},"runbook_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runbook Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"variables_required":{"items":{"type":"string"},"type":"array","title":"Variables Required"},"step_count":{"type":"integer","title":"Step Count"}},"type":"object","required":["name","slug","provider","title","step_count"],"title":"BuiltinRunbookCatalogEntry"},"BuiltinRunbookCatalogResponse":{"properties":{"runbooks":{"items":{"$ref":"#/components/schemas/BuiltinRunbookCatalogEntry"},"type":"array","title":"Runbooks"}},"type":"object","required":["runbooks"],"title":"BuiltinRunbookCatalogResponse"},"CertificateValidateResponse":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"},"valid":{"type":"boolean","title":"Valid"},"integrity_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integrity Hash"},"computed_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Computed Hash"},"issuer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issuer"},"issued_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Issued At"},"runbook_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runbook Name"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"summary":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Summary"},"issues":{"items":{"type":"string"},"type":"array","title":"Issues"},"rfc3161":{"anyOf":[{"$ref":"#/components/schemas/Rfc3161Status"},{"type":"null"}]}},"type":"object","required":["run_id","valid"],"title":"CertificateValidateResponse"},"CompleteEventIn":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"},"status":{"type":"string","title":"Status"},"finished_at":{"type":"string","format":"date-time","title":"Finished At"}},"type":"object","required":["run_id","status","finished_at"],"title":"CompleteEventIn"},"CredentialInfo":{"properties":{"provider":{"$ref":"#/components/schemas/ProviderType"},"credential_id":{"type":"string","format":"uuid","title":"Credential Id"},"stored_at":{"type":"string","format":"date-time","title":"Stored At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"is_active":{"type":"boolean","title":"Is Active"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"expires_in_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In Days"}},"type":"object","required":["provider","credential_id","stored_at","is_active"],"title":"CredentialInfo"},"CredentialListResponse":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"credentials":{"items":{"$ref":"#/components/schemas/CredentialInfo"},"type":"array","title":"Credentials"}},"type":"object","required":["tenant_id","credentials"],"title":"CredentialListResponse"},"CredentialRequest":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id","description":"Unique tenant identifier"},"provider":{"$ref":"#/components/schemas/ProviderType","description":"Cloud provider type"},"credentials":{"additionalProperties":true,"type":"object","title":"Credentials","description":"Provider credentials payload"}},"type":"object","required":["tenant_id","provider","credentials"],"title":"CredentialRequest"},"CredentialResponse":{"properties":{"status":{"type":"string","title":"Status","default":"success"},"tenant_id":{"type":"string","title":"Tenant Id"},"provider":{"$ref":"#/components/schemas/ProviderType"},"credential_id":{"type":"string","format":"uuid","title":"Credential Id"},"stored_at":{"type":"string","format":"date-time","title":"Stored At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"has_expiry":{"type":"boolean","title":"Has Expiry"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["tenant_id","provider","credential_id","stored_at","has_expiry"],"title":"CredentialResponse"},"DecryptedCredentialResponse":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"provider":{"$ref":"#/components/schemas/ProviderType"},"credential_id":{"type":"string","format":"uuid","title":"Credential Id"},"credentials":{"additionalProperties":true,"type":"object","title":"Credentials"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["tenant_id","provider","credential_id","credentials"],"title":"DecryptedCredentialResponse"},"DrArtifactOut":{"properties":{"artifact_id":{"type":"string","format":"uuid","title":"Artifact Id"},"artifact_type":{"$ref":"#/components/schemas/DrArtifactType"},"step_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Step Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"content_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Content Json"},"storage_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Path"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["artifact_id","artifact_type","created_at"],"title":"DrArtifactOut"},"DrArtifactType":{"type":"string","enum":["summary","step_output","session_log","report_md","metrics","aws_resource_snapshot","dr_certificate"],"title":"DrArtifactType"},"DrRunResponse":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"credential_id":{"type":"string","format":"uuid","title":"Credential Id"},"runbook_name":{"type":"string","title":"Runbook Name"},"runbook_path":{"type":"string","title":"Runbook Path"},"variables":{"additionalProperties":true,"type":"object","title":"Variables"},"status":{"$ref":"#/components/schemas/DrRunStatus"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"steps":{"items":{"$ref":"#/components/schemas/DrStepOut"},"type":"array","title":"Steps"},"artifacts":{"items":{"$ref":"#/components/schemas/DrArtifactOut"},"type":"array","title":"Artifacts"}},"type":"object","required":["run_id","tenant_id","credential_id","runbook_name","runbook_path","variables","status","started_at","steps","artifacts"],"title":"DrRunResponse"},"DrRunStatus":{"type":"string","enum":["pending","running","completed","failed","cancelled"],"title":"DrRunStatus"},"DrStepOut":{"properties":{"step_id":{"type":"string","format":"uuid","title":"Step Id"},"step_order":{"type":"integer","title":"Step Order"},"step_name":{"type":"string","title":"Step Name"},"step_type":{"$ref":"#/components/schemas/DrStepType"},"status":{"$ref":"#/components/schemas/DrStepStatus"},"command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Command"},"stdout":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stdout"},"stderr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stderr"},"exit_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exit Code"},"captured_vars":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Captured Vars"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["step_id","step_order","step_name","step_type","status"],"title":"DrStepOut"},"DrStepStatus":{"type":"string","enum":["pending","running","completed","failed","skipped"],"title":"DrStepStatus"},"DrStepType":{"type":"string","enum":["validate","execute","approve","monitor","rollback"],"title":"DrStepType"},"ExecuteRunbookRequest":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id","description":"Tenant (= Supabase auth user.id) as UUID string"},"credential_id":{"type":"string","format":"uuid","title":"Credential Id","description":"Which stored cloud credential to use"},"runbook_name":{"type":"string","title":"Runbook Name","description":"Display name / slug of the runbook"},"runbook_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runbook Path","description":"Supabase Storage path to a user-supplied runbook YAML. Mutually exclusive with runbook_builtin."},"runbook_builtin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runbook Builtin","description":"Slug of a baked-in runbook (e.g. 's3-route53-failover' or 'aws/s3-route53-failover'). Mutually exclusive with runbook_path."},"variables":{"additionalProperties":{"type":"string"},"type":"object","title":"Variables","description":"Resolved runbook variables"},"execute_on":{"type":"string","enum":["continueops","agent"],"title":"Execute On","description":"Which executor runs the job. 'continueops' (default) enqueues to the CPLN-hosted cont-dr-runner via Redis. 'agent' skips Redis and leaves the dr_runs row pending so an enrolled in-VPC dr-agent picks it up via /agent/v1/jobs/poll.","default":"continueops"}},"type":"object","required":["tenant_id","credential_id","runbook_name"],"title":"ExecuteRunbookRequest"},"ExecuteRunbookResponse":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"},"status":{"$ref":"#/components/schemas/DrRunStatus","default":"pending"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"steps":{"items":{"$ref":"#/components/schemas/DrStepOut"},"type":"array","title":"Steps"}},"type":"object","required":["run_id","started_at","steps"],"title":"ExecuteRunbookResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status","default":"healthy"},"service":{"type":"string","title":"Service","default":"cloud-cred-proxy"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"version":{"type":"string","title":"Version","default":"1.0.0"}},"type":"object","required":["timestamp"],"title":"HealthResponse"},"HeartbeatRequest":{"properties":{"deployment_id":{"type":"string","title":"Deployment Id"},"agent_version":{"type":"string","title":"Agent Version"},"os":{"type":"string","title":"Os"},"arch":{"type":"string","title":"Arch"},"uptime_seconds":{"type":"integer","title":"Uptime Seconds"},"runs_since_last_heartbeat":{"type":"integer","title":"Runs Since Last Heartbeat","default":0},"eula_acceptance_hash":{"type":"string","title":"Eula Acceptance Hash"}},"type":"object","required":["deployment_id","agent_version","os","arch","uptime_seconds","eula_acceptance_hash"],"title":"HeartbeatRequest"},"HeartbeatResponse":{"properties":{"license_valid":{"type":"boolean","title":"License Valid"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"cert_renewal_recommended":{"type":"boolean","title":"Cert Renewal Recommended","default":false},"next_heartbeat_seconds":{"type":"integer","title":"Next Heartbeat Seconds","default":3600}},"type":"object","required":["license_valid"],"title":"HeartbeatResponse"},"IssueLicenseRequest":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"not_after":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Not After"},"max_deployments":{"type":"integer","title":"Max Deployments","default":5},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["user_id"],"title":"IssueLicenseRequest"},"JobOut":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"},"runbook_id":{"type":"string","title":"Runbook Id"},"variables":{"additionalProperties":{"type":"string"},"type":"object","title":"Variables"},"sensitive":{"type":"boolean","title":"Sensitive","default":false}},"type":"object","required":["run_id","runbook_id"],"title":"JobOut"},"LicenseSummary":{"properties":{"license_id":{"type":"string","format":"uuid","title":"License Id"},"license_key":{"type":"string","title":"License Key"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"issued_at":{"type":"string","format":"date-time","title":"Issued At"},"not_after":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Not After"},"max_deployments":{"type":"integer","title":"Max Deployments"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"deployments_in_use":{"type":"integer","title":"Deployments In Use","default":0}},"type":"object","required":["license_id","license_key","user_id","issued_at","not_after","max_deployments","revoked_at","notes"],"title":"LicenseSummary"},"ProviderType":{"type":"string","enum":["aws","gcp","azure"],"title":"ProviderType"},"RegisterRequest":{"properties":{"license_key":{"type":"string","title":"License Key"},"csr_pem":{"type":"string","title":"Csr Pem"},"machine_id_short":{"type":"string","title":"Machine Id Short"},"eula_accepted_sha256":{"type":"string","title":"Eula Accepted Sha256"},"agent_version":{"type":"string","title":"Agent Version"},"os":{"type":"string","title":"Os"},"arch":{"type":"string","title":"Arch"}},"type":"object","required":["license_key","csr_pem","machine_id_short","eula_accepted_sha256","agent_version","os","arch"],"title":"RegisterRequest"},"RegisterResponse":{"properties":{"deployment_id":{"type":"string","title":"Deployment Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"client_cert_pem":{"type":"string","title":"Client Cert Pem"},"intermediate_chain_pem":{"type":"string","title":"Intermediate Chain Pem","default":""},"cert_not_after":{"type":"string","format":"date-time","title":"Cert Not After"}},"type":"object","required":["deployment_id","tenant_id","client_cert_pem","cert_not_after"],"title":"RegisterResponse"},"ReportRequest":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id","description":"Unique tenant identifier"},"provider":{"$ref":"#/components/schemas/ProviderType","description":"Cloud provider to report on"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name","description":"Customer name for report header"},"output_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Format","default":"html"},"shopping_list":{"anyOf":[{"$ref":"#/components/schemas/ShoppingListConfig"},{"type":"null"}]}},"type":"object","required":["tenant_id","provider"],"title":"ReportRequest"},"ReportResponse":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"status":{"$ref":"#/components/schemas/RunStatus"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"message":{"type":"string","title":"Message","default":"Report processing started"}},"type":"object","required":["run_id","tenant_id","status","started_at"],"title":"ReportResponse"},"ReportStatusResponse":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"status":{"$ref":"#/components/schemas/RunStatus"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"document_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Url"},"report_url_full":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Url Full"},"report_url_blurred":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Url Blurred"},"report_url_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Url Summary"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"progress_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Progress Message"}},"type":"object","required":["run_id","tenant_id","status","started_at"],"title":"ReportStatusResponse"},"Rfc3161Status":{"properties":{"present":{"type":"boolean","title":"Present","default":false},"tsa":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tsa"},"timestamped_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamped At"},"message_imprint_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Message Imprint Match"},"signature_valid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Signature Valid"},"issues":{"items":{"type":"string"},"type":"array","title":"Issues"}},"type":"object","title":"Rfc3161Status","description":"RFC 3161 timestamp verification outcome, populated when the cert\npayload carries an `rfc3161` block (cert-gen v23+)."},"RunStatus":{"type":"string","enum":["pending","processing","completed","failed"],"title":"RunStatus"},"SavingsOption":{"type":"string","enum":["arm64_graviton","schedule_scaling","right_sizing","resource_pooling_k8s"],"title":"SavingsOption"},"ShoppingListConfig":{"properties":{"savings_options":{"items":{"$ref":"#/components/schemas/SavingsOption"},"type":"array","title":"Savings Options","default":["arm64_graviton","schedule_scaling","right_sizing","resource_pooling_k8s"]},"vpc_exclusions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Vpc Exclusions"},"label_filters":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Filters"},"k8s_pooling_efficiency":{"anyOf":[{"type":"number","maximum":0.8,"minimum":0.1},{"type":"null"}],"title":"K8S Pooling Efficiency","default":0.3}},"type":"object","title":"ShoppingListConfig"},"StepEventIn":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"},"step_id":{"type":"string","title":"Step Id"},"step_order":{"type":"integer","title":"Step Order"},"step_name":{"type":"string","title":"Step Name"},"step_type":{"type":"string","title":"Step Type"},"status":{"type":"string","title":"Status"},"exit_code":{"type":"integer","title":"Exit Code"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"type":"string","format":"date-time","title":"Finished At"},"stdout_lines":{"type":"integer","title":"Stdout Lines","default":0},"stderr_lines":{"type":"integer","title":"Stderr Lines","default":0},"stdout_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stdout Content"},"stderr_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stderr Content"}},"type":"object","required":["run_id","step_id","step_order","step_name","step_type","status","exit_code","started_at","finished_at"],"title":"StepEventIn"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-Runner-Key"}}}}