{"openapi":"3.1.0","info":{"title":"Roost API","version":"0.1.0"},"paths":{"/auth/register":{"post":{"tags":["auth"],"summary":"Register","operationId":"register_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh","operationId":"refresh_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/me":{"get":{"tags":["auth"],"summary":"Get Me","operationId":"get_me_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorRead"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["auth"],"summary":"Update Me","operationId":"update_me_auth_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/verify-email":{"post":{"tags":["auth"],"summary":"Verify Email","description":"Consume a one-time verification token. Unauthenticated — the token\nitself is the proof. Rate limited at 10/hour per IP so a brute-force\nagainst the 256-bit token space is structurally impossible (and even\none IP wouldn't make a dent regardless).","operationId":"verify_email_auth_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/resend-verification":{"post":{"tags":["auth"],"summary":"Resend Verification","description":"Mint a fresh verification token and email it to the current user.\n\nIdempotent for already-verified users — returns 204 without doing\nanything so a stale frontend banner can't spam fresh tokens.","operationId":"resend_verification_auth_resend_verification_post","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/account/password":{"post":{"tags":["account"],"summary":"Change Password","description":"Rotate the current operator's password.\n\n* 204 on success\n* 401 if ``current_password`` doesn't match the stored hash\n* 422 if the request body fails schema validation (min length,\n  new == current)\n\nRate-limited to 5 attempts per minute per IP — slow enough to\nmake brute-forcing the old password impractical while still\nallowing legitimate fat-finger retries.","operationId":"change_password_account_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChangeRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/oauth/{provider}":{"get":{"tags":["oauth"],"summary":"Oauth Initiate","operationId":"oauth_initiate_auth_oauth__provider__get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/oauth/{provider}/callback":{"get":{"tags":["oauth"],"summary":"Oauth Callback","operationId":"oauth_callback_auth_oauth__provider__callback_get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"oauth_state","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oauth State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents":{"get":{"tags":["agents"],"summary":"List Agents","operationId":"list_agents_agents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AgentResponse-Output"},"type":"array","title":"Response List Agents Agents Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["agents"],"summary":"Create Agent","operationId":"create_agent_agents_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse-Output"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/agents/{agent_id}":{"get":{"tags":["agents"],"summary":"Get Agent","operationId":"get_agent_agents__agent_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse-Output"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["agents"],"summary":"Update Agent","operationId":"update_agent_agents__agent_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse-Output"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agents"],"summary":"Delete Agent","operationId":"delete_agent_agents__agent_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/metrics":{"post":{"tags":["metrics"],"summary":"Ingest Metric","operationId":"ingest_metric_agents__agent_id__metrics_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricEventCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricEventResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["metrics"],"summary":"List Metrics","operationId":"list_metrics_agents__agent_id__metrics_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"metric_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/MetricType"},{"type":"null"}],"title":"Metric Type"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/performance":{"get":{"tags":["metrics"],"summary":"Get Performance","operationId":"get_performance_agents__agent_id__performance_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"period_days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":30,"title":"Period Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/risk/evaluate":{"post":{"tags":["risk"],"summary":"Evaluate Risk","operationId":"evaluate_risk_agents__agent_id__risk_evaluate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskEvaluateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/risk":{"get":{"tags":["risk"],"summary":"Get Risk","operationId":"get_risk_agents__agent_id__risk_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/credit/apply":{"post":{"tags":["credit"],"summary":"Apply For Credit","operationId":"apply_for_credit_agents__agent_id__credit_apply_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"x-roost-operator-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Operator-Id"}},{"name":"x-roost-agent-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Agent-Id"}},{"name":"x-roost-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Timestamp"}},{"name":"x-roost-nonce","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Nonce"}},{"name":"x-roost-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Signature"}},{"name":"x-roost-sdk-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Sdk-Version"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/credit":{"get":{"tags":["credit"],"summary":"Get Credit","operationId":"get_credit_agents__agent_id__credit_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"x-roost-operator-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Operator-Id"}},{"name":"x-roost-agent-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Agent-Id"}},{"name":"x-roost-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Timestamp"}},{"name":"x-roost-nonce","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Nonce"}},{"name":"x-roost-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Signature"}},{"name":"x-roost-sdk-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Sdk-Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/credit/spend":{"post":{"tags":["spend"],"summary":"Spend","operationId":"spend_agents__agent_id__credit_spend_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerEntryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/ledger":{"get":{"tags":["spend"],"summary":"List Ledger","operationId":"list_ledger_agents__agent_id__ledger_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"transaction_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/TransactionType"},{"type":"null"}],"title":"Transaction Type"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/revenue":{"post":{"tags":["repayment"],"summary":"Record Revenue","operationId":"record_revenue_agents__agent_id__revenue_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/credit/repay":{"post":{"tags":["repayment"],"summary":"Manual Repay","operationId":"manual_repay_agents__agent_id__credit_repay_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepayRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/llm-usage":{"post":{"tags":["llm-usage","llm-usage"],"summary":"Ingest Llm Usage","description":"Ingest a batch of LLM usage events for the agent.\n\nIdempotent at the per-event level: a retry of the same\n``idempotency_key`` increments the response's ``duplicates`` count\nrather than inserting again.\n\nThe agent must belong to the calling operator. Agent-signed calls\nare allowed and use the operator id embedded in the canonical bytes\nfor the ownership check.","operationId":"ingest_llm_usage_agents__agent_id__llm_usage_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"x-roost-operator-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Operator-Id"}},{"name":"x-roost-agent-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Agent-Id"}},{"name":"x-roost-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Timestamp"}},{"name":"x-roost-nonce","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Nonce"}},{"name":"x-roost-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Signature"}},{"name":"x-roost-sdk-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Sdk-Version"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMUsageIngestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMUsageIngestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/llm-usage/summary":{"get":{"tags":["llm-usage","llm-usage"],"summary":"Get Usage Summary","description":"Per-model usage breakdown for the last ``window_days``. Sorted by\ntotal spend descending — operators see their costliest models first.\n\nSingle-operator data only — no cohort comparisons. Cohort-level\nsurfaces gate on Phase 2 cost-recommendation data.","operationId":"get_usage_summary_agents__agent_id__llm_usage_summary_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","default":7,"title":"Window Days"}},{"name":"x-roost-operator-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Operator-Id"}},{"name":"x-roost-agent-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Agent-Id"}},{"name":"x-roost-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Timestamp"}},{"name":"x-roost-nonce","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Nonce"}},{"name":"x-roost-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Signature"}},{"name":"x-roost-sdk-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Sdk-Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/llm-usage/anomalies":{"get":{"tags":["llm-usage","llm-usage"],"summary":"Get Usage Anomalies","description":"7-vs-7 anomaly report. Empty ``anomalies`` is a successful response\n— most weeks for most agents are quiet, and that's information.","operationId":"get_usage_anomalies_agents__agent_id__llm_usage_anomalies_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","default":7,"title":"Window Days"}},{"name":"x-roost-operator-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Operator-Id"}},{"name":"x-roost-agent-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Agent-Id"}},{"name":"x-roost-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Timestamp"}},{"name":"x-roost-nonce","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Nonce"}},{"name":"x-roost-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Signature"}},{"name":"x-roost-sdk-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Sdk-Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalyReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/waitlist":{"post":{"tags":["waitlist"],"summary":"Submit Waitlist","operationId":"submit_waitlist_waitlist_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/waitlist/{entry_id}":{"patch":{"tags":["waitlist"],"summary":"Add Waitlist Answers","description":"Adds the form's follow-up answers to the entry `entry_id` names.\n\nThe id went only to the browser that created the entry, so holding it is\nthe permission. An answer is stored only where the entry is still blank.\nAlways 204: an id that names nothing looks the same as one that does.","operationId":"add_waitlist_answers_waitlist__entry_id__patch","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistAnswers"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/referrals":{"post":{"tags":["referrals","referrals"],"summary":"Submit Referral","operationId":"submit_referral_referrals_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connections":{"get":{"tags":["connections","connections"],"summary":"List Connections","operationId":"list_connections_connections_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DataConnectionRead"},"type":"array","title":"Response List Connections Connections Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/connections/{connection_id}":{"delete":{"tags":["connections","connections"],"summary":"Revoke Connection","operationId":"revoke_connection_connections__connection_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataConnectionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/verification/kyb":{"get":{"tags":["verification","verification"],"summary":"Get Kyb Status","operationId":"get_kyb_status_verification_kyb_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KYBStatusResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["verification","verification"],"summary":"Initiate Kyb","operationId":"initiate_kyb_verification_kyb_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/verification/kyc":{"get":{"tags":["verification","verification"],"summary":"Get Kyc Status","operationId":"get_kyc_status_verification_kyc_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KYCStatusResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["verification","verification"],"summary":"Initiate Kyc","operationId":"initiate_kyc_verification_kyc_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KYCInitiateResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/verification/webhooks/middesk":{"post":{"tags":["verification","verification"],"summary":"Middesk Webhook","operationId":"middesk_webhook_verification_webhooks_middesk_post","parameters":[{"name":"x-middesk-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Middesk-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/verification/webhooks/stripe":{"post":{"tags":["verification","verification"],"summary":"Stripe Identity Webhook","operationId":"stripe_identity_webhook_verification_webhooks_stripe_post","parameters":[{"name":"stripe-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connections/stripe/connect":{"get":{"tags":["stripe-connect","stripe-connect"],"summary":"Get Connect Url","operationId":"get_connect_url_connections_stripe_connect_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeConnectOAuthURL"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/connections/stripe/callback":{"get":{"tags":["stripe-connect","stripe-connect"],"summary":"Stripe Callback","operationId":"stripe_callback_connections_stripe_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connections/stripe/status":{"get":{"tags":["stripe-connect","stripe-connect"],"summary":"Get Stripe Status","operationId":"get_stripe_status_connections_stripe_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeConnectStatus"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/connections/plaid/link-token":{"post":{"tags":["plaid","plaid"],"summary":"Create Link Token","operationId":"create_link_token_connections_plaid_link_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaidLinkTokenResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/connections/plaid/exchange":{"post":{"tags":["plaid","plaid"],"summary":"Exchange Token","operationId":"exchange_token_connections_plaid_exchange_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaidExchangeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/connections/plaid/status":{"get":{"tags":["plaid","plaid"],"summary":"Get Plaid Status","operationId":"get_plaid_status_connections_plaid_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaidStatusResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/connections/observability/helicone":{"post":{"tags":["observability","observability"],"summary":"Submit Helicone Key","operationId":"submit_helicone_key_connections_observability_helicone_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeySubmit"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataConnectionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/connections/observability/openai":{"post":{"tags":["observability","observability"],"summary":"Submit Openai Key","operationId":"submit_openai_key_connections_observability_openai_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeySubmit"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataConnectionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/connections/observability/anthropic":{"post":{"tags":["observability","observability"],"summary":"Submit Anthropic Key","operationId":"submit_anthropic_key_connections_observability_anthropic_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeySubmit"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataConnectionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/connections/observability/status":{"get":{"tags":["observability","observability"],"summary":"Get Observability Status","operationId":"get_observability_status_connections_observability_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObservabilityStatusResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/pipeline/sync/{agent_id}":{"post":{"tags":["pipeline"],"summary":"Sync Agent","description":"Trigger a full feature sync pipeline for the given agent.\n\nVerifies the agent belongs to the authenticated operator, then runs the\npipeline to pull data from all connected sources (Stripe, Helicone, Plaid)\nand upsert a FeatureSnapshot for today.","operationId":"sync_agent_pipeline_sync__agent_id__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/features":{"get":{"tags":["pipeline"],"summary":"Get Agent Features","description":"Retrieve the latest FeatureSnapshot for the given agent.\n\nReturns 404 if no snapshot has been synced yet.","operationId":"get_agent_features_agents__agent_id__features_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureSnapshotRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/score":{"post":{"tags":["scoring"],"summary":"Score Agent","description":"Compute and save a TAPCO score for the given agent.\n\nVerifies agent ownership, checks that at least 7 days of data are available,\nthen runs the XGBoost scoring model and persists the result.","operationId":"score_agent_agents__agent_id__score_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TAPCOScoreRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["scoring"],"summary":"Get Latest Score","description":"Retrieve the latest TAPCO score for the given agent.\n\nReturns 404 if no score has been computed yet.","operationId":"get_latest_score_agents__agent_id__score_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TAPCOScoreRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/score/history":{"get":{"tags":["scoring"],"summary":"Get Score History","description":"Retrieve paginated TAPCO score history for the given agent.","operationId":"get_score_history_agents__agent_id__score_history_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/disclosures":{"get":{"tags":["disclosures"],"summary":"List Disclosures","operationId":"list_disclosures_agents__agent_id__disclosures_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/disclosures/{doc_id}":{"get":{"tags":["disclosures"],"summary":"Get Disclosure","operationId":"get_disclosure_agents__agent_id__disclosures__doc_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/disclosures/{doc_id}/sign":{"post":{"tags":["disclosures"],"summary":"Sign Disclosure Route","description":"Capture an e-signature on an offer-side disclosure (CA SB 1235 / NY CFDL).\n\nAdverse-action / ECOA notices use the ``/acknowledge`` route — they do not\nrequire a signature.","operationId":"sign_disclosure_route_agents__agent_id__disclosures__doc_id__sign_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Doc Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/disclosures/{doc_id}/acknowledge":{"post":{"tags":["disclosures"],"summary":"Acknowledge Disclosure Route","description":"Confirm receipt of an adverse-action / ECOA notice.\n\nReg B § 1002.9 requires only delivery, not consent — so we capture\ntimestamp + IP + user-agent rather than a signature.","operationId":"acknowledge_disclosure_route_agents__agent_id__disclosures__doc_id__acknowledge_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/disclosures/{doc_id}/certificate":{"get":{"tags":["disclosures"],"summary":"Get Disclosure Certificate","description":"Return the structured signed-certificate record for a disclosure.\n\nReturns 404 if the disclosure has not been signed yet — the certificate\nis generated only after the e-signature is captured.","operationId":"get_disclosure_certificate_agents__agent_id__disclosures__doc_id__certificate_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/offers/active":{"get":{"tags":["offers"],"summary":"Get Active Offer","description":"Return the operator's currently-actionable offer for this agent.\n\nActive means the latest offer in {ISSUED, ACCEPTED}. Returns 404 when\nnone exists. Ownership is enforced: the agent must belong to the caller.","operationId":"get_active_offer_agents__agent_id__offers_active_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"x-roost-operator-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Operator-Id"}},{"name":"x-roost-agent-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Agent-Id"}},{"name":"x-roost-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Timestamp"}},{"name":"x-roost-nonce","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Nonce"}},{"name":"x-roost-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Signature"}},{"name":"x-roost-sdk-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Sdk-Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/offers/{offer_id}/accept":{"post":{"tags":["offers"],"summary":"Accept Offer","description":"Accept an ISSUED offer.\n\nAgent-signed callers are double-gated: the ROOST_AUTO_APPLY_ENABLED\nplatform kill switch AND the operator's recorded auto-apply consent\n(User.auto_apply_enabled, granted via /operator/consents/auto-apply).\nOperator JWT calls bypass the gate — the operator can always accept\ntheir own offers.","operationId":"accept_offer_offers__offer_id__accept_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"offer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Offer Id"}},{"name":"x-roost-operator-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Operator-Id"}},{"name":"x-roost-agent-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Agent-Id"}},{"name":"x-roost-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Timestamp"}},{"name":"x-roost-nonce","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Nonce"}},{"name":"x-roost-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Signature"}},{"name":"x-roost-sdk-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Sdk-Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/offers/{offer_id}/decline":{"post":{"tags":["offers"],"summary":"Decline Offer","description":"Decline an ISSUED offer.\n\nNo auto-apply gate here — declining is always safe for the\noperator. However, a per-agent key may only decline offers that\nbelong to its own agent (declining another agent's wanted offer\ndestroys value and is therefore a binding-enforcement concern, not\nmerely a monetary one). Operator-level fallback keys and operator\nJWT callers are unrestricted within the operator account.","operationId":"decline_offer_offers__offer_id__decline_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"offer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Offer Id"}},{"name":"x-roost-operator-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Operator-Id"}},{"name":"x-roost-agent-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Agent-Id"}},{"name":"x-roost-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Timestamp"}},{"name":"x-roost-nonce","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Nonce"}},{"name":"x-roost-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Signature"}},{"name":"x-roost-sdk-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Sdk-Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/credit/spend-requests":{"post":{"tags":["spend-requests"],"summary":"Create Spend Request","description":"Submit an invoice payment request on behalf of an agent.\nRoost validates the vendor, checks credit availability and daily cap,\nthen pays the vendor directly and records the spend.","operationId":"create_spend_request_agents__agent_id__credit_spend_requests_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendRequestCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["spend-requests"],"summary":"List Spend Requests","description":"List spend requests for an agent with optional status filter.","operationId":"list_spend_requests_agents__agent_id__credit_spend_requests_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/credit/spend-requests/vendors":{"get":{"tags":["spend-requests"],"summary":"List Approved Vendors","description":"Return the approved vendor allowlist with categories.","operationId":"list_approved_vendors_agents__agent_id__credit_spend_requests_vendors_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/credit/spend-requests/{spend_request_id}/card":{"get":{"tags":["spend-requests"],"summary":"Get Card Ephemeral Key","description":"Return a Stripe ephemeral key for the virtual card attached to this spend request.\nPass the ephemeral key + card ID to Stripe.js Issuing Elements to display the PAN\nclient-side without the raw number passing through Roost's server.","operationId":"get_card_ephemeral_key_agents__agent_id__credit_spend_requests__spend_request_id__card_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"spend_request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Spend Request Id"}},{"name":"stripe_api_version","in":"query","required":false,"schema":{"type":"string","default":"2024-06-20","title":"Stripe Api Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/credit/spend-requests/{spend_request_id}":{"get":{"tags":["spend-requests"],"summary":"Get Spend Request","description":"Get a single spend request by ID.","operationId":"get_spend_request_agents__agent_id__credit_spend_requests__spend_request_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"spend_request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Spend Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/revenue-events":{"post":{"tags":["repayment-v2"],"summary":"Ingest Revenue Event","description":"Ingest a revenue event for an agent.\nVerified sources (Stripe Connect, Plaid) are automatically eligible for sweep.","operationId":"ingest_revenue_event_v1_revenue_events_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueEventCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/v1/credit-accounts/{credit_account_id}/repayments/sweep":{"post":{"tags":["repayment-v2"],"summary":"Sweep Repayment","description":"Apply a revenue-linked repayment sweep.","operationId":"sweep_repayment_v1_credit_accounts__credit_account_id__repayments_sweep_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"credit_account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Credit Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SweepRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/credit-accounts/{credit_account_id}/repayments/manual":{"post":{"tags":["repayment-v2"],"summary":"Manual Repayment","description":"Apply a manual repayment.","operationId":"manual_repayment_v1_credit_accounts__credit_account_id__repayments_manual_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"credit_account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Credit Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualRepaymentRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/credit-accounts/{credit_account_id}/repayments":{"get":{"tags":["repayment-v2"],"summary":"List Repayments","description":"List repayments for a credit account.","operationId":"list_repayments_v1_credit_accounts__credit_account_id__repayments_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"credit_account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Credit Account Id"}},{"name":"repayment_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repayment Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/credit-accounts/{credit_account_id}/repayment-summary":{"get":{"tags":["repayment-v2"],"summary":"Repayment Summary","description":"Return repayment health snapshot.","operationId":"repayment_summary_v1_credit_accounts__credit_account_id__repayment_summary_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"credit_account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Credit Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/stripe/issuing":{"post":{"tags":["webhooks","webhooks"],"summary":"Stripe Issuing Webhook","operationId":"stripe_issuing_webhook_webhooks_stripe_issuing_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/stripe/connect":{"post":{"tags":["webhooks","webhooks"],"summary":"Stripe Connect Webhook","operationId":"stripe_connect_webhook_webhooks_stripe_connect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/otlp/spans":{"post":{"tags":["otlp","otlp"],"summary":"Ingest Spans","description":"Ingest a batch of OTel spans (simplified JSON array format).\n\nBody: {\"agent_id\": \"uuid\", \"spans\": [...]}","operationId":"ingest_spans_v1_otlp_spans_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/v1/otlp/traces":{"post":{"tags":["otlp","otlp"],"summary":"Ingest Traces Otlp","description":"Ingest OpenTelemetry ExportTraceServiceRequest (JSON protobuf wrapper).\n\nThe agent_id is expected in the resource attributes under key 'roost.agent_id'.","operationId":"ingest_traces_otlp_v1_otlp_traces_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/connections/orchestration/temporal":{"post":{"tags":["orchestration","orchestration"],"summary":"Connect Temporal","operationId":"connect_temporal_connections_orchestration_temporal_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemporalKeySubmit"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataConnectionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/connections/orchestration/langsmith":{"post":{"tags":["orchestration","orchestration"],"summary":"Connect Langsmith","operationId":"connect_langsmith_connections_orchestration_langsmith_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LangSmithKeySubmit"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataConnectionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/connections/orchestration/prefect":{"post":{"tags":["orchestration","orchestration"],"summary":"Connect Prefect","operationId":"connect_prefect_connections_orchestration_prefect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrefectKeySubmit"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataConnectionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/connections/orchestration/modal":{"post":{"tags":["orchestration","orchestration"],"summary":"Connect Modal","operationId":"connect_modal_connections_orchestration_modal_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModalTokenSubmit"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataConnectionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/connections/orchestration/replicate":{"post":{"tags":["orchestration","orchestration"],"summary":"Connect Replicate","operationId":"connect_replicate_connections_orchestration_replicate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplicateTokenSubmit"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataConnectionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/connections/orchestration/status":{"get":{"tags":["orchestration","orchestration"],"summary":"Get Orchestration Status","operationId":"get_orchestration_status_connections_orchestration_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrchestrationStatusResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/audit/events":{"get":{"tags":["audit"],"summary":"List Audit Events","operationId":"list_audit_events_audit_events_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"operator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Operator Id"}},{"name":"event_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Event Type"}},{"name":"subject_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Type"}},{"name":"subject_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"}},{"name":"actor_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor Id"}},{"name":"actor_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Type"}},{"name":"correlation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correlation Id"}},{"name":"occurred_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Occurred After"}},{"name":"occurred_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Occurred Before"}},{"name":"include_synthetic","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Synthetic"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audit/events/{event_id}":{"get":{"tags":["audit"],"summary":"Get Audit Event","operationId":"get_audit_event_audit_events__event_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audit/operators/{operator_id}/export":{"get":{"tags":["audit"],"summary":"Export Audit Events For Operator","description":"Full audit-trail export for a single operator (ECOA / regulator response).","operationId":"export_audit_events_for_operator_audit_operators__operator_id__export_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"operator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Operator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users":{"get":{"tags":["admin-users"],"summary":"List Users","operationId":"list_users_admin_users_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/UserRole"},{"type":"null"}],"title":"Role"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}/role":{"post":{"tags":["admin-users"],"summary":"Set Role","operationId":"set_role_admin_users__user_id__role_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetRoleIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/portfolio":{"get":{"tags":["admin","portfolio"],"summary":"Get Portfolio","operationId":"get_portfolio_admin_portfolio_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/committee/decisions/pending":{"get":{"tags":["committee"],"summary":"List Pending Decisions","description":"List PENDING (and DEFERRED) decisions oldest-first for the review queue.","operationId":"list_pending_decisions_committee_decisions_pending_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/committee/decisions/{decision_id}":{"get":{"tags":["committee"],"summary":"Get Decision","description":"Full detail (proposed / finalized terms, reviewer audit, score link).\n\nThe score-card breakdown and KYB/KYC summary are post-MVP — the reviewer\nUI can resolve them from the linked `score_id` and `operator_id` via the\nexisting `/agents/{id}/score` and KYB/KYC endpoints.","operationId":"get_decision_committee_decisions__decision_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/committee/decisions/{decision_id}/approve":{"post":{"tags":["committee"],"summary":"Approve Decision","operationId":"approve_decision_committee_decisions__decision_id__approve_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/committee/decisions/{decision_id}/reject":{"post":{"tags":["committee"],"summary":"Reject Decision","operationId":"reject_decision_committee_decisions__decision_id__reject_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/committee/decisions/{decision_id}/counter-offer":{"post":{"tags":["committee"],"summary":"Counter Offer Decision","operationId":"counter_offer_decision_committee_decisions__decision_id__counter_offer_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterOfferIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/committee/decisions/{decision_id}/defer":{"post":{"tags":["committee"],"summary":"Defer Decision","operationId":"defer_decision_committee_decisions__decision_id__defer_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeferIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/identity/operators/{operator_id}/checks":{"get":{"tags":["identity"],"summary":"List Checks For Operator","operationId":"list_checks_for_operator_identity_operators__operator_id__checks_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"operator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Operator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/identity/checks":{"get":{"tags":["identity"],"summary":"List Checks Global","description":"Global triage view across all operators (underwriter workflow).\n\nDefault sort is ``created_at DESC`` (most-recent first) so the\nREVIEW_REQUIRED queue surfaces freshest items at the top — the\nunderwriter use case is \"what landed in my queue today\". Gated at\nADMIN+ because cross-operator identity data is more sensitive than\nthe per-operator view (which UNDERWRITER+ can already see).\n\nFilters compose additively; ``status=None`` + ``check_type=None``\nreturns the full unfiltered queue (most useful for paging through\nfresh activity, less so for triage).","operationId":"list_checks_global_identity_checks_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/IdentityCheckStatus"},{"type":"null"}],"title":"Status"}},{"name":"check_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/IdentityCheckType"},{"type":"null"}],"title":"Check Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/identity/operators/{operator_id}/kyb":{"post":{"tags":["identity"],"summary":"Trigger Kyb","operationId":"trigger_kyb_identity_operators__operator_id__kyb_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"operator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Operator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/identity/operators/{operator_id}/kyc":{"post":{"tags":["identity"],"summary":"Trigger Kyc","operationId":"trigger_kyc_identity_operators__operator_id__kyc_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"operator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Operator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/middesk":{"post":{"tags":["identity"],"summary":"Middesk Webhook","operationId":"middesk_webhook_webhooks_middesk_post","parameters":[{"name":"X-Middesk-Signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Middesk-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/stripe-identity":{"post":{"tags":["identity"],"summary":"Stripe Identity Webhook","operationId":"stripe_identity_webhook_webhooks_stripe_identity_post","parameters":[{"name":"Stripe-Signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/operators/me/section-1071":{"get":{"tags":["section-1071"],"summary":"Get My Section 1071","operationId":"get_my_section_1071_operators_me_section_1071_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Section1071ProfileResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["section-1071"],"summary":"Submit My Section 1071","operationId":"submit_my_section_1071_operators_me_section_1071_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Section1071Submission"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Section1071ProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/admin/treasury":{"get":{"tags":["treasury"],"summary":"Get Treasury","operationId":"get_treasury_admin_treasury_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/admin/treasury/set":{"post":{"tags":["treasury"],"summary":"Set Treasury","operationId":"set_treasury_admin_treasury_set_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TreasuryUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/v1/harness/policies/{agent_id}":{"get":{"tags":["harness","harness"],"summary":"Get Policy Bundle","description":"Fetch the latest policy bundle for `agent_id`.\n\nThe SDK passes its last-known `content_version` in the\n`Roost-Harness-Content-Version` header; if it matches the latest stored\nrevision, we return 304 with no body (cheap refresh). Otherwise we\nreturn 200 with the full bundle.\n\n`Roost-Harness-Schema-Version` is the SDK's highest-supported wire\nschema version. The service layer uses it to decide whether to serve\nthe stored bundle as-is or signal that the SDK must upgrade.","operationId":"get_policy_bundle_v1_harness_policies__agent_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"roost-harness-schema-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Roost-Harness-Schema-Version"}},{"name":"roost-harness-content-version","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Roost-Harness-Content-Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRefreshResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["harness","harness"],"summary":"Author Policy Bundle","description":"Author a new revision of the policy bundle for `agent_id`.\n\nAdmin-only. Each call writes a NEW row at `content_version =\nprev_max + 1`; there is no update-in-place. The incoming bundle's\n`content_version`, `operator_id`, and `agent_id` metadata are\noverwritten server-side to match the URL path + authenticated context.\n\nReturns the wrapped response so the admin tool can see what got\npersisted (including the freshly-assigned content_version).","operationId":"author_policy_bundle_v1_harness_policies__agent_id__post","security":[{"HTTPBearer":[]},{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HarnessPolicy"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRefreshResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/harness/attestations":{"post":{"tags":["harness-attestations"],"summary":"Submit Attestation","description":"Accept a signed attestation from a running SDK.\n\nReturns the ack with status reflecting the server's verdict. 409 on\nreplay (same nonce twice for the same operator+agent). 401 if auth\nfails. 422 on Pydantic validation. The endpoint is rate-limited per\nIP at 12/min — the SDK attests every ~5 minutes, so this comfortably\nabsorbs jitter and retries while shutting off a runaway loop.","operationId":"submit_attestation_v1_harness_attestations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttestationPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttestationAck"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/harness/attestations/{agent_id}/latest":{"get":{"tags":["harness-attestations"],"summary":"Get Latest Attestation","description":"Return the most recent stored attestation for the calling\noperator's named agent — with full SDK metadata for dashboards.\n\nReturns 404 when no attestation has ever been received for that\nagent. Tenant isolation is enforced by filtering on the authenticated\noperator id — never on a request-supplied id.","operationId":"get_latest_attestation_v1_harness_attestations__agent_id__latest_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LatestAttestationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/harness/keys":{"post":{"tags":["harness-keys"],"summary":"Register Key","description":"Register a fresh Ed25519 public key for an operator.\n\nIf a prior active key exists for the same ``(operator_id, agent_id)``\npair it is rotated (``is_active=False``, ``rotated_at`` set) before\nthe new row lands. The new row is the sole active key on success.","operationId":"register_key_v1_harness_keys_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"operator_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"The operator (User.id) the key belongs to.","title":"Operator Id"},"description":"The operator (User.id) the key belongs to."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorSDKKeyRegisterRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorSDKKeyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["harness-keys"],"summary":"List Keys","description":"List all keys for an operator (active + historical), newest first.","operationId":"list_keys_v1_harness_keys_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"operator_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"The operator whose keys to list.","title":"Operator Id"},"description":"The operator whose keys to list."},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional filter — only return keys for this agent id. Operator-level fallback rows (agent_id IS NULL) are NOT folded in when this filter is set.","title":"Agent Id"},"description":"Optional filter — only return keys for this agent id. Operator-level fallback rows (agent_id IS NULL) are NOT folded in when this filter is set."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OperatorSDKKeyOut"},"title":"Response List Keys V1 Harness Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/harness/keys/{key_id}":{"get":{"tags":["harness-keys"],"summary":"Get Key","description":"Fetch a single key by id.\n\nOperators see only their own keys (foreign ids 404 — no existence\noracle). Admins see any key. The PEM is omitted by default — pass\n``?include_pem=true`` to include it.","operationId":"get_key_v1_harness_keys__key_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}},{"name":"include_pem","in":"query","required":false,"schema":{"type":"boolean","description":"Set true to include the full public_key_pem in the response.","default":false,"title":"Include Pem"},"description":"Set true to include the full public_key_pem in the response."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorSDKKeyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/harness/keys/{key_id}/revoke":{"post":{"tags":["harness-keys"],"summary":"Revoke Key","description":"Revoke a key by id. The reason is required and stored on the row.\n\nOperators revoke only their own keys (foreign ids 404). Idempotency:\nre-revoking a previously-revoked key returns 409. Once revoked, a key\nnever reactivates — register a fresh key to layer on top.","operationId":"revoke_key_v1_harness_keys__key_id__revoke_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorSDKKeyRevokeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorSDKKeyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/roost/pay":{"post":{"tags":["roost-pay","roost-pay"],"summary":"Post Roost Pay","description":"Evaluate a single payment intent and return a decision.\n\nAlways returns 200 — even denials. A denial is a successful\ndecision, not a server error; the verdict lives in\n``response.decision``. The deeper decisioning (TAPCO, vendor rep,\nROI, coherence) runs via ``roost_pay_service.decide`` and is\nindependent of which auth surface the caller used.\n\nIdempotency: the service layer dedupes on\n``(operator_id, idempotency_key)``. A retry returns the same\n``decision_id`` and the same outcome.","operationId":"post_roost_pay_roost_pay_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"x-roost-operator-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Operator-Id"}},{"name":"x-roost-agent-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Agent-Id"}},{"name":"x-roost-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Timestamp"}},{"name":"x-roost-nonce","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Nonce"}},{"name":"x-roost-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Signature"}},{"name":"x-roost-sdk-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Sdk-Version"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoostPayRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoostPayDecision"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/roost/pay/decisions/{decision_id}":{"get":{"tags":["roost-pay","roost-pay"],"summary":"Get Roost Pay Decision","description":"Fetch a single decision by id, tenant-isolated to the caller.\n\nReturns 404 if the decision does not exist OR exists but belongs to\na different operator — we intentionally do NOT distinguish the two\ncases, so the endpoint can't be used to enumerate other operators'\ndecision ids.","operationId":"get_roost_pay_decision_roost_pay_decisions__decision_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}},{"name":"x-roost-operator-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Operator-Id"}},{"name":"x-roost-agent-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Agent-Id"}},{"name":"x-roost-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Timestamp"}},{"name":"x-roost-nonce","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Nonce"}},{"name":"x-roost-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Signature"}},{"name":"x-roost-sdk-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Sdk-Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoostPayDecision"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/roost/pay/decisions":{"get":{"tags":["roost-pay","roost-pay"],"summary":"List Roost Pay Decisions","description":"List the caller's own /roost/pay decisions, most-recent first.\n\nTenant-isolated: only rows where ``operator_id == caller.user.id``\nare returned. Pagination via ``limit`` / ``offset``; cap is 200 per\npage so the dashboard never blows the wire on a busy day.\n\nOperator dashboard uses ``?decision=needs_review`` to render the\npending-review queue. Agents can also call this endpoint (Lift C P1)\nto inspect their own decision history during retry / forensics flows.","operationId":"list_roost_pay_decisions_roost_pay_decisions_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision","in":"query","required":false,"schema":{"anyOf":[{"enum":["approved","denied","needs_review"],"type":"string"},{"type":"null"}],"description":"Filter by decision verdict. Operators querying for the needs_review queue should pass decision=needs_review.","title":"Decision"},"description":"Filter by decision verdict. Operators querying for the needs_review queue should pass decision=needs_review."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"x-roost-operator-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Operator-Id"}},{"name":"x-roost-agent-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Agent-Id"}},{"name":"x-roost-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Timestamp"}},{"name":"x-roost-nonce","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Nonce"}},{"name":"x-roost-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Signature"}},{"name":"x-roost-sdk-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Sdk-Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoostPayDecisionList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/roost-pay/needs-review":{"get":{"tags":["admin","roost-pay","admin","roost-pay"],"summary":"List Needs Review","description":"Cross-tenant list of decisions in the needs_review state.\n\nOrdered by ``created_at DESC`` so the most-recent flags float to\nthe top of the reviewer's queue.","operationId":"list_needs_review_admin_roost_pay_needs_review_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReviewListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/roost-pay/needs-review/{decision_id}/approve":{"post":{"tags":["admin","roost-pay","admin","roost-pay"],"summary":"Approve Needs Review","description":"Mark a needs_review decision as approved.\n\nDoes NOT mint a card. The agent's SDK should treat\n``decision=\"approved\"`` + ``spt is None`` as \"policy permission\ngranted, resubmit to execute\". The original idempotency_key\ncannot be reused (would short-circuit on idempotent replay); the\nagent must issue a new request with the same context.","operationId":"approve_needs_review_admin_roost_pay_needs_review__decision_id__approve_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReviewActionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoostPayDecision"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/roost-pay/needs-review/{decision_id}/reject":{"post":{"tags":["admin","roost-pay","admin","roost-pay"],"summary":"Reject Needs Review","description":"Reject a needs_review decision. Notes required.\n\nResulting row has ``decision=\"denied\"`` and\n``reason_code=\"admin_rejected_after_review\"``. The original gate's\nreason_code is preserved in the audit-event payload so the trail\nexplains \"which gate flagged this, what the reviewer added\".","operationId":"reject_needs_review_admin_roost_pay_needs_review__decision_id__reject_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReviewActionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoostPayDecision"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/harness/routed/bootstrap":{"get":{"tags":["harness-routed","harness-routed"],"summary":"Bootstrap","description":"SDK init endpoint at ``tier=\"routed\"``.\n\nP1 stub: even with valid preconditions, returns 503 because the\nproxy itself isn't deployed yet. Preconditions still run so the\nSDK can validate its bootstrap flow against real eligibility +\nredaction-policy gates.\n\nOnce the proxy lands (P2) the body changes to:\n  {\n    \"proxy_base_url\": \"https://llm.roostcapital.ai\",\n    \"proxy_api_key\": \"rpx_<plaintext>\",\n    \"redaction_policy_id\": \"<uuid>\",\n    \"redaction_policy_version\": N,\n    \"supported_models\": [\"gpt-4o\", ...]\n  }","operationId":"bootstrap_harness_routed_bootstrap_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/harness/routed/rotate-key":{"post":{"tags":["harness-routed","harness-routed"],"summary":"Rotate Key","description":"Revoke all live keys for the agent and issue a fresh one.\n\nOperator-initiated. The SDK does its own scheduled refresh; this\nendpoint exists for break-glass scenarios (compromised key, lost\nkey, etc.).","operationId":"rotate_key_harness_routed_rotate_key_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateKeyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/harness/routed/redaction-policies":{"get":{"tags":["harness-routed","harness-routed"],"summary":"List Redaction Policies","description":"List the operator's RedactionPolicy history.","operationId":"list_redaction_policies_harness_routed_redaction_policies_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"include_revoked","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Revoked"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedactionPolicyListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/harness/routed/redaction-policy":{"put":{"tags":["harness-routed","harness-routed"],"summary":"Upsert Redaction Policy","description":"Create a new RedactionPolicy version, revoking the prior live one.\n\nAvailable to operators on ANY tier — Standard / Instrumented\noperators can pre-configure their policy before upgrading to\nRouted (the tier-upgrade gate in harness_tier_service checks that\nthe policy is in place at flip time).\n\n**P3:** ``ruleset_json`` is validated against the v1 DSL grammar\nbefore persistence. Malformed rulesets surface as 422 with the\nunderlying field-path error from the validator (mirrors the\nexisting BootstrapError → 412 handler pattern below the imports).","operationId":"upsert_redaction_policy_harness_routed_redaction_policy_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedactionPolicyUpsertRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedactionPolicySummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/harness/routed/provider-keys/{provider}":{"put":{"tags":["harness-routed","harness-routed"],"summary":"Put Provider Key","description":"Store the operator's own upstream LLM key, encrypted.\n\nThe body is parsed by hand: FastAPI's default 422 body echoes the submitted\ninput, which here can be the key itself. Body must be ``{\"api_key\": str}``\nwith 1 to 512 characters.","operationId":"put_provider_key_harness_routed_provider_keys__provider__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"enum":["openai","anthropic","gemini"],"type":"string","title":"Provider"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["harness-routed","harness-routed"],"summary":"Delete Provider Key","operationId":"delete_provider_key_harness_routed_provider_keys__provider__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"enum":["openai","anthropic","gemini"],"type":"string","title":"Provider"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/goodhart/alerts":{"get":{"tags":["goodhart","goodhart"],"summary":"List Goodhart Alerts","description":"List Goodhart alerts for ``operator_id`` (admin-only).\n\n``include_resolved=False`` (default) returns only OPEN alerts. The\noperator_id MUST come from the query string — there is no implicit\n\"current admin's operator\" fallback. This makes the tenant boundary\nexplicit in the URL and keeps audit logs grep-able.","operationId":"list_goodhart_alerts_admin_goodhart_alerts_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"operator_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Operator to filter alerts by.","title":"Operator Id"},"description":"Operator to filter alerts by."},{"name":"include_resolved","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Resolved"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoodhartAlertListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/goodhart/alerts/{alert_id}/resolve":{"post":{"tags":["goodhart","goodhart"],"summary":"Resolve Goodhart Alert","description":"Mark ``alert_id`` resolved by the calling admin.\n\nIdempotent: resolving an already-resolved alert returns the existing\nrow unchanged (the original ``resolved_at`` and ``resolved_by_user_id``\nare preserved).","operationId":"resolve_goodhart_alert_admin_goodhart_alerts__alert_id__resolve_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoodhartAlertOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/goodhart/evaluate":{"post":{"tags":["goodhart","goodhart"],"summary":"Evaluate Operator Alerts","description":"Trigger an ad-hoc Goodhart evaluation for ``operator_id``.\n\nReturns the ids of alerts created on THIS invocation only — existing\nOPEN alerts for the same triple are not re-reported. The endpoint is\nsafe to call repeatedly (idempotent).","operationId":"evaluate_operator_alerts_admin_goodhart_evaluate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"operator_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Operator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoodhartEvaluateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/operator/consents/auto-apply":{"get":{"tags":["consents","consents"],"summary":"Get Auto Apply Consent","description":"Current consent state + the disclosure the dashboard must render.","operationId":"get_auto_apply_consent_operator_consents_auto_apply_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoApplyConsentState"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["consents","consents"],"summary":"Grant Auto Apply Consent","description":"Grant consent. Idempotent — re-granting refreshes timestamp/version.","operationId":"grant_auto_apply_consent_operator_consents_auto_apply_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoApplyConsentGrantRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoApplyConsentState"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["consents","consents"],"summary":"Revoke Auto Apply Consent","description":"Revoke consent. NOT flag-gated. Keeps the last-consent record\n(timestamp + version) for the audit trail; only the bool flips.","operationId":"revoke_auto_apply_consent_operator_consents_auto_apply_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoApplyConsentState"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/decisions":{"post":{"tags":["shadow-decisions"],"summary":"Create Decision","description":"Score a proposed payment and return the advisory verdict.\n\nAlways 200 — a WAIT or FINANCE verdict is a successful decision, not\na server error. Idempotent: a retry with the same\n``idempotency_key`` returns the original ``decision_id`` and verdict\nunchanged (see ``shadow_decision_service.decide``). An agent-signed\ncall decides only for itself: ``agent_ref`` must be the signer's id.","operationId":"create_decision_v1_decisions_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"x-roost-operator-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Operator-Id"}},{"name":"x-roost-agent-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Agent-Id"}},{"name":"x-roost-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Timestamp"}},{"name":"x-roost-nonce","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Nonce"}},{"name":"x-roost-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Signature"}},{"name":"x-roost-sdk-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Sdk-Version"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShadowDecisionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShadowDecisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["shadow-decisions"],"summary":"List Decisions","description":"List the calling operator's own shadow decisions, newest first.\n\nOrdering is business-time (``proposed_at`` desc) with ``created_at``\ndesc as a tiebreak — NOT insertion/creation order. Task 4's demo\nseeder backfills months of historical ``proposed_at`` values, and a\n6-month backfill isn't created in chronological order, so\n``created_at`` desc alone would show the seed script's insertion\norder rather than \"what was most recently proposed\" — the ordering\nevery consumer (dashboard, backtest report) actually wants.\n\nTenant-isolated: only rows where ``operator_id == current_user.id``\nare returned, regardless of ``source_system`` filter value.\n\n``unresolved`` (MCP shadow-era milestone, pinned contract C2 — backs\n``roost_review_pending``) narrows the result to rows with NO\n``DecisionResolution`` yet. Implemented as a correlated ``NOT EXISTS``\nsubquery rather than a join/``IN`` round-trip, so it stays a single\nquery with no N+1.\n\nEach row's ``resolution`` (demo-hardening Task 1) is populated from\nONE batched ``IN (decision_ids)`` query\n(``shadow_decision_service.get_resolutions_by_decision_ids``) — never\na per-row lookup — so this endpoint stays O(1) queries regardless of\n``limit``: ``null`` for rows nobody has resolved yet, the nested\nobject otherwise. When ``unresolved=True`` every returned row is\nguaranteed to have no resolution, so this batched lookup always comes\nback empty — cheap and still correct, kept for pattern consistency\nrather than special-cased away.\n\n``data_class`` (corpus-gates milestone, pinned contract C1) optionally\nnarrows the result to one provenance class (\"demo\" | \"sandbox\" |\n\"production\"). Opt-in, like ``source_system``/``unresolved`` — omitting\nit (the default) returns every ``data_class`` unchanged, so demo pages\nthat don't pass this param see identical behavior to before this\nmilestone. Composable with both other filters.","operationId":"list_decisions_v1_decisions_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"source_system","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"}},{"name":"unresolved","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unresolved"}},{"name":"data_class","in":"query","required":false,"schema":{"anyOf":[{"enum":["demo","sandbox","production","corpus"],"type":"string"},{"type":"null"}],"title":"Data Class"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ShadowDecisionResponse"},"title":"Response List Decisions V1 Decisions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scoreboard":{"get":{"tags":["shadow-decisions"],"summary":"Get Scoreboard","description":"Operator-scoped agreement-rate standing (Milestone D, Task 1 —\npinned \"Scoreboard\" contract).\n\nComputed over ALL of the calling operator's resolved decisions\n(optionally narrowed to one ``source_system`` and/or, corpus-gates\nmilestone pinned contract C1, one ``data_class``) — not just the\ncurrent page of ``GET /v1/decisions``. ``agreement_rate`` is ``null``\nwhen ``resolved_total == 0``; ``cleared`` requires both\n``resolved_total >= min_resolved`` and\n``agreement_rate >= threshold``. Both filters are opt-in — omitting\nthem (the default) preserves prior behavior, including for demo pages.\nSee ``shadow_decision_service.compute_scoreboard`` for the exact\naggregation.","operationId":"get_scoreboard_v1_scoreboard_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"source_system","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"}},{"name":"data_class","in":"query","required":false,"schema":{"anyOf":[{"enum":["demo","sandbox","production","corpus"],"type":"string"},{"type":"null"}],"title":"Data Class"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreboardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/exception-scoreboard":{"get":{"tags":["shadow-decisions"],"summary":"Get Exception Scoreboard","description":"Operator-scoped exception-intelligence confusion matrix + competence\nrates (docs/superpowers/plans/2026-09-16-exception-intelligence-capture.md).\n\nSibling to ``GET /v1/scoreboard`` — but where that measures *agreement*\n(human vs. machine verdict), this measures *correctness*: it joins\n``DecisionOutcome`` to classify each resolved decision into the payments\nconfusion matrix (correct_hold / false_hold / missed_error / correct_pay),\nwith PENDING for decisions whose outcome isn't known yet. Competence\nrates are ``null`` on a zero denominator. Same opt-in\n``source_system``/``data_class`` filters as the agreement scoreboard.\nObservability only — never wired into TAPCO scoring or any training path.","operationId":"get_exception_scoreboard_v1_exception_scoreboard_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"source_system","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"}},{"name":"data_class","in":"query","required":false,"schema":{"anyOf":[{"enum":["demo","sandbox","production","corpus"],"type":"string"},{"type":"null"}],"title":"Data Class"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionScoreboardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scoreboard/human-interaction":{"get":{"tags":["shadow-decisions"],"summary":"Get Human Interaction Breakdown","description":"Operator-scoped human-interaction analytics breakdown (Capture-Depth\nIncrement — Human-Interaction + Evidence-Provenance, Task 2 — Gap A\npayoff).\n\nSibling to ``GET /v1/exception-scoreboard`` — same resolved-decision\njoin and ``classify_outcome`` labeling, but the confusion matrix is\nbucketed per ``reviewer_role`` (Task 1's human-interaction capture\nfield, \"unspecified\" when a resolution didn't record one) instead of\naggregated operator-wide, plus a separate tally of\n``override_reason_code`` values captured on resolution. Optional\n``source_system`` filter mirrors the other scoreboard endpoints.\nAdvisory/observability only — never wired into TAPCO scoring or any\ntraining path.","operationId":"get_human_interaction_breakdown_v1_scoreboard_human_interaction_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"source_system","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HumanInteractionBreakdownResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decisions/{decision_id}":{"get":{"tags":["shadow-decisions"],"summary":"Get Decision","description":"Fetch a single shadow decision (Milestone C, Task 2 — pinned\ncontract \"Single decision\").\n\nThe full decision-field set flattened at the top level, plus nested\n``resolution``/``outcome`` (``null`` when the decision hasn't been\nresolved / has no recorded outcome yet). 404 if ``decision_id`` doesn't\nexist or belongs to another operator (indistinguishable — house\n``_get_owned_decision`` helper, same as the resolution/outcome POSTs\nabove).","operationId":"get_decision_v1_decisions__decision_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShadowDecisionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decisions/{decision_id}/evidence":{"get":{"tags":["shadow-decisions"],"summary":"Get Decision Evidence","description":"Fetch a shadow decision's evidence pack (Milestone C, Task 2 —\npinned contract \"Evidence pack\") — the \"decision defense record\" the\nfrontend drawer (Task 4) renders.\n\n``evidence_hash`` is stable across repeated calls for the same\nunderlying rows (``generated_at`` is wall-clock-of-the-call and\ndeliberately excluded from the hash — see\n``shadow_decision_service.compute_evidence_hash``). 404 if\n``decision_id`` doesn't exist or belongs to another operator\n(indistinguishable, same as ``get_decision`` above).","operationId":"get_decision_evidence_v1_decisions__decision_id__evidence_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decisions/{decision_id}/record":{"get":{"tags":["shadow-decisions"],"summary":"Get Decision Record","operationId":"get_decision_record_v1_decisions__decision_id__record_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionRecordBundle"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decisions/{decision_id}/aep-policy":{"get":{"tags":["shadow-decisions"],"summary":"Get Decision Aep Policy","operationId":"get_decision_aep_policy_v1_decisions__decision_id__aep_policy_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Decision Aep Policy V1 Decisions  Decision Id  Aep Policy Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decision-records":{"get":{"tags":["shadow-decisions"],"summary":"List Decision Records","operationId":"list_decision_records_v1_decision_records_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"after_seq","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"After Seq"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionRecordPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decisions/{decision_id}/resolution":{"post":{"tags":["shadow-decisions"],"summary":"Create Decision Resolution","description":"Record what the operator did with a shadow decision's verdict.\n\n404 if ``decision_id`` doesn't exist or belongs to another operator\n(indistinguishable); 409 if this decision already has a resolution;\n200 with the created record otherwise.","operationId":"create_decision_resolution_v1_decisions__decision_id__resolution_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}},{"name":"x-roost-operator-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Operator-Id"}},{"name":"x-roost-agent-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Agent-Id"}},{"name":"x-roost-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Timestamp"}},{"name":"x-roost-nonce","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Nonce"}},{"name":"x-roost-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Signature"}},{"name":"x-roost-sdk-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Sdk-Version"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolutionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolutionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decisions/{decision_id}/outcome":{"post":{"tags":["shadow-decisions"],"summary":"Create Decision Outcome","description":"Record what actually happened downstream of a shadow decision.\n\n404 if ``decision_id`` doesn't exist or belongs to another operator\n(indistinguishable); 409 if this decision already has an outcome;\n200 with the created record otherwise.","operationId":"create_decision_outcome_v1_decisions__decision_id__outcome_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}},{"name":"x-roost-operator-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Operator-Id"}},{"name":"x-roost-agent-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Agent-Id"}},{"name":"x-roost-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Timestamp"}},{"name":"x-roost-nonce","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Nonce"}},{"name":"x-roost-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Signature"}},{"name":"x-roost-sdk-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Sdk-Version"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/backtests":{"post":{"tags":["shadow-decisions"],"summary":"Ingest Backtest Csv","description":"Ingest a partner's CSV export of decision history (Milestone B,\nTask 2).\n\nMultipart upload, field name ``file``. Every row is scored through\nthe same heuristic engine ``POST /v1/decisions`` uses\n(``synthetic=False`` — this is real, not demo, data) and, where the\nrow carries them, its resolution and outcome are recorded too. A\nmalformed row never aborts the batch — it's reported in the\nresponse's ``failed`` list with its row number and reason (see\n``app.services.backtest_ingest_service``). 422 if the header is\nmissing a required column; 413 if the file has more than 10,000 data\nrows.","operationId":"ingest_backtest_csv_v1_backtests_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_ingest_backtest_csv_v1_backtests_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BacktestIngestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/v1/reports/backtest":{"post":{"tags":["backtest-reports"],"summary":"Create Backtest Report","description":"Generate and persist a mechanical backtest report.\n\nComputes over the calling operator's shadow-decision history,\nfiltered by optional ``source_system`` and the inclusive\n``[period_start, period_end]`` window on ``proposed_at`` (422 if\n``period_start >= period_end`` — enforced by the request schema). A\nwindow with zero contributing decisions is also a 422 (\"no decisions\nin window\"), raised by ``backtest_report_service.generate`` itself and\nsurfaced here unmodified — see that function's docstring for why\n(persisting an empty-window report would contaminate ``scripts.\ndemo_reset``'s sacred-rule check with a ``synthetic=False`` row).\n\n``generate`` commits and refreshes its own row before returning, so\nevery attribute the response schema reads (``id``, ``grade``,\n``score``, ``payload``, ``synthetic``, ``created_at``) is read here\nin the same breath, with no further session activity in between —\navoiding the expired-attribute/``MissingGreenlet`` trap Task 2 hit\nwhen chaining multiple commit-performing service calls on one\nsession before reading their results.","operationId":"create_backtest_report_v1_reports_backtest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BacktestReportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BacktestReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/v1/reports":{"get":{"tags":["backtest-reports"],"summary":"List Backtest Reports","description":"List the calling operator's own backtest reports, newest first.\n\nTenant-isolated: only rows where ``operator_id == current_user.id``\nare returned. ``limit`` defaults to 20, capped at 100.","operationId":"list_backtest_reports_v1_reports_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BacktestReportResponse"},"title":"Response List Backtest Reports V1 Reports Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/reports/{report_id}":{"get":{"tags":["backtest-reports"],"summary":"Get Backtest Report","description":"Fetch one backtest report by id.\n\n404 if the report doesn't exist or belongs to another operator — the\ntwo cases are indistinguishable to the caller, same pattern as\n``shadow_decision_service._get_owned_decision``. The fetch+404 itself\nlives in ``backtest_report_service.get_owned_report`` — shared with\n``GET /v1/reports/{id}/pdf`` in ``app.routers.backtest_pdf``.","operationId":"get_backtest_report_v1_reports__report_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BacktestReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/reports/{report_id}/pdf":{"get":{"tags":["backtest-pdf"],"summary":"Get Backtest Report Pdf","description":"Render the calling operator's own backtest report to a one-page PDF.\n\n404 if ``report_id`` doesn't exist or belongs to a different operator\n(indistinguishable) — same tenancy contract as the Milestone A\nresolution/outcome endpoints. The fetch+404 itself lives in\n``backtest_report_service.get_owned_report`` — shared with\n``GET /v1/reports/{id}`` in ``app.routers.backtest_reports``.","operationId":"get_backtest_report_pdf_v1_reports__report_id__pdf_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/partner-events/{source}":{"post":{"tags":["partner-events"],"summary":"Receive Partner Event","operationId":"receive_partner_event_v1_partner_events__source__post","parameters":[{"name":"source","in":"path","required":true,"schema":{"type":"string","title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Receive Partner Event V1 Partner Events  Source  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decisions/{decision_id}/jev-sense":{"post":{"tags":["jev"],"summary":"Create Jev Sense","description":"Run the Jev-Sense AP battery against one owned decision and persist\nthe result as an advisory overlay.\n\n404 if ``decision_id`` doesn't exist or belongs to another operator\n(indistinguishable, via\n``shadow_decision_service._get_owned_decision`` — same tenancy-scoped\nfetch the resolution/outcome endpoints use). 503 if Jev isn't\nconfigured; 502 on a Jev auth failure or any other non-2xx Jev\nresponse. Never leaks the Jev API key in any response detail.\n\nResponse shape: ``{\"sense\": SenseResult, \"agreement\": {...}}`` — see\n``_agreement`` above for the agreement dict's fields.","operationId":"create_jev_sense_v1_decisions__decision_id__jev_sense_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Jev Sense V1 Decisions  Decision Id  Jev Sense Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jev-reconcile":{"post":{"tags":["jev"],"summary":"Create Jev Reconcile","description":"Reconcile two opaque documents (e.g. a Peakflo bill and a Campfire\nbill) via the Jev reconciliation battery.\n\nDecision-independent — no ``ShadowDecision`` is loaded or touched, so\nthere is no tenancy check beyond \"caller is authenticated\". 503 if\nJev isn't configured; 502 on a Jev auth failure or any other non-2xx\nJev response. Never leaks the Jev API key in any response detail.","operationId":"create_jev_reconcile_v1_jev_reconcile_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconcileRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/v1/agents/{agent_ref}/authority":{"get":{"tags":["agent-authority","agent-authority"],"summary":"Get Agent Authority","description":"Advisory: an agent's earned authority from its calibrated track record.\n\nTrajectory faithfulness (Task 5) is merged into ``reliability`` before\n``compute_earned_authority`` runs, so an unfaithful agent version earns\nno autonomy even with an otherwise clean outcome record — see\n``agent_authority_service``'s faithfulness cap.","operationId":"get_agent_authority_v1_agents__agent_ref__authority_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_ref","in":"path","required":true,"schema":{"type":"string","title":"Agent Ref"}},{"name":"agent_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentAuthorityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decisions/{decision_id}/participations":{"post":{"tags":["agent-authority","agent-authority"],"summary":"Post Participation","description":"Record one agent's participation in a decision (404 not-owned, 409 dup).","operationId":"post_participation_v1_decisions__decision_id__participations_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParticipationRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParticipationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decisions/{decision_id}/swarm":{"get":{"tags":["agent-authority","agent-authority"],"summary":"Get Decision Swarm","description":"Swarm-risk signals for a decision (tenancy-scoped 404).","operationId":"get_decision_swarm_v1_decisions__decision_id__swarm_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwarmSignalsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent-pair-correlated-failure":{"get":{"tags":["agent-authority","agent-authority"],"summary":"Get Correlated Failure","description":"Agent pairs that co-failed across this operator's problem decisions.","operationId":"get_correlated_failure_v1_agent_pair_correlated_failure_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrelatedFailureResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/v1/agent-certifications":{"post":{"tags":["agent-certifications"],"summary":"Create Agent Certification","description":"Score an agent's scenario responses and issue a signed certificate.\n\nAlways 200 — a failing scorecard (``passed: false``) is still a\nsuccessfully issued, validly signed attestation record; ``passed`` is\nadvisory and never blocks a payment path (see the service module's\ndocstring).","operationId":"create_agent_certification_v1_agent_certifications_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCertificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCertificationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/v1/agent-certifications/{cert_id}":{"get":{"tags":["agent-certifications"],"summary":"Get Agent Certification","description":"Fetch a single certification record.\n\n404 if ``cert_id`` doesn't exist or belongs to another operator\n(indistinguishable, via ``_get_owned`` above).","operationId":"get_agent_certification_v1_agent_certifications__cert_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"cert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cert Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCertificationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent-certifications/{cert_id}/verify":{"post":{"tags":["agent-certifications"],"summary":"Verify Agent Certification","description":"Re-verify a certification's detached signature over its hashed\ncontent.\n\n404 if ``cert_id`` doesn't exist or belongs to another operator\n(indistinguishable, via ``_get_owned`` above).","operationId":"verify_agent_certification_v1_agent_certifications__cert_id__verify_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"cert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cert Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decisions/{decision_id}/trajectory/steps":{"post":{"tags":["agent-trajectory","agent-trajectory"],"summary":"Post Commit Intent","description":"Commit one agent's intent at one trajectory step (chained hash;\nimmutable — 409 on a different re-commit, idempotent on an identical\none; tenancy-scoped 404).","operationId":"post_commit_intent_v1_decisions__decision_id__trajectory_steps_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommitIntentRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommitIntentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decisions/{decision_id}/trajectory/steps/{step_index}/observation":{"post":{"tags":["agent-trajectory","agent-trajectory"],"summary":"Post Observation","description":"Record a tool observation for an already-committed step and score it\n(404 if the step wasn't committed first; tenancy-scoped 404).","operationId":"post_observation_v1_decisions__decision_id__trajectory_steps__step_index__observation_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}},{"name":"step_index","in":"path","required":true,"schema":{"type":"integer","title":"Step Index"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObservationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrajectoryStepOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decisions/{decision_id}/trajectory":{"get":{"tags":["agent-trajectory","agent-trajectory"],"summary":"Get Decision Trajectory","description":"Full trajectory ledger + rollup for one agent on one decision\n(tenancy-scoped 404).","operationId":"get_decision_trajectory_v1_decisions__decision_id__trajectory_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}},{"name":"agent_ref","in":"query","required":true,"schema":{"type":"string","title":"Agent Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrajectoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/verified/runs":{"post":{"tags":["verified-eval"],"summary":"Create Verified Run","description":"Issue a new verification challenge for ``body.agent_ref``.\n\n429 if the operator's daily ``VERIFIED_MAX_RUNS_PER_DAY`` cap is\nalready reached (``VerifiedRunError``).","operationId":"create_verified_run_v1_verified_runs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifiedRunCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifiedRunCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/v1/verified/runs/{run_id}/submit":{"post":{"tags":["verified-eval"],"summary":"Submit Verified Run","description":"Validate + score a submitted trace bundle, mint a signed attestation.\n\n422 if ``TraceBackedSource`` rejects the bundle (bad nonce, expired\ndeadline, missing/unknown scenario decisions, etc.) -- also fires the\n``verified.trace_rejected`` funnel event. 404 if the run doesn't exist\nfor this operator; 409 if it's not in \"issued\" state (already\nsubmitted, or otherwise not awaiting a submission).","operationId":"submit_verified_run_v1_verified_runs__run_id__submit_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifiedRunSubmit"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifiedRunSubmitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/verified/attestations/{slug}":{"get":{"tags":["verified-eval"],"summary":"Get Verified Attestation","description":"Check a verification badge by its public slug. NO auth -- a\ncounterparty verifying a shared badge has no Roost credentials.\n\n404 if no attestation with that slug exists.","operationId":"get_verified_attestation_v1_verified_attestations__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifiedAttestationVerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lending/operator/agreement":{"post":{"tags":["lending"],"summary":"Sign Agreement","operationId":"sign_agreement_v1_lending_operator_agreement_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgreementIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Sign Agreement V1 Lending Operator Agreement Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/v1/lending/operator/agents":{"post":{"tags":["lending"],"summary":"Register Agent","operationId":"register_agent_v1_lending_operator_agents_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRegistrationIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Register Agent V1 Lending Operator Agents Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/v1/lending/line-requests":{"post":{"tags":["lending"],"summary":"Request Line","operationId":"request_line_v1_lending_line_requests_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"x-roost-operator-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Operator-Id"}},{"name":"x-roost-agent-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Agent-Id"}},{"name":"x-roost-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Timestamp"}},{"name":"x-roost-nonce","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Nonce"}},{"name":"x-roost-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Signature"}},{"name":"x-roost-sdk-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Sdk-Version"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Request Line V1 Lending Line Requests Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lending/offers/{offer_id}/accept":{"post":{"tags":["lending"],"summary":"Accept Offer","operationId":"accept_offer_v1_lending_offers__offer_id__accept_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"offer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Offer Id"}},{"name":"x-roost-operator-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Operator-Id"}},{"name":"x-roost-agent-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Agent-Id"}},{"name":"x-roost-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Timestamp"}},{"name":"x-roost-nonce","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Nonce"}},{"name":"x-roost-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Signature"}},{"name":"x-roost-sdk-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Sdk-Version"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__lending__AcceptIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Accept Offer V1 Lending Offers  Offer Id  Accept Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lending/operator/offers/{offer_id}/approve":{"post":{"tags":["lending"],"summary":"Approve Offer","operationId":"approve_offer_v1_lending_operator_offers__offer_id__approve_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"offer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Offer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Approve Offer V1 Lending Operator Offers  Offer Id  Approve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lending/draws":{"post":{"tags":["lending"],"summary":"Create Draw","operationId":"create_draw_v1_lending_draws_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"x-roost-operator-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Operator-Id"}},{"name":"x-roost-agent-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Agent-Id"}},{"name":"x-roost-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Timestamp"}},{"name":"x-roost-nonce","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Nonce"}},{"name":"x-roost-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Signature"}},{"name":"x-roost-sdk-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Sdk-Version"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrawIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Draw V1 Lending Draws Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lending/repayments":{"post":{"tags":["lending"],"summary":"Create Repayment","operationId":"create_repayment_v1_lending_repayments_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"x-roost-operator-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Operator-Id"}},{"name":"x-roost-agent-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Agent-Id"}},{"name":"x-roost-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Timestamp"}},{"name":"x-roost-nonce","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Nonce"}},{"name":"x-roost-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Signature"}},{"name":"x-roost-sdk-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Sdk-Version"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepayIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Repayment V1 Lending Repayments Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lending/operator/agents/{agent_id}/compromised":{"post":{"tags":["lending"],"summary":"Report Compromise","operationId":"report_compromise_v1_lending_operator_agents__agent_id__compromised_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompromiseIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Report Compromise V1 Lending Operator Agents  Agent Id  Compromised Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lending/status":{"get":{"tags":["lending"],"summary":"Get Status","operationId":"get_status_v1_lending_status_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"x-roost-operator-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Operator-Id"}},{"name":"x-roost-agent-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Agent-Id"}},{"name":"x-roost-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Timestamp"}},{"name":"x-roost-nonce","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Nonce"}},{"name":"x-roost-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Signature"}},{"name":"x-roost-sdk-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Sdk-Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Status V1 Lending Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/program/applications":{"post":{"tags":["program"],"summary":"Apply","operationId":"apply_v1_program_applications_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/program/applications/{application_id}":{"get":{"tags":["program"],"summary":"Application Status","operationId":"application_status_v1_program_applications__application_id__get","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/program/applications/{application_id}/proofs/signature":{"post":{"tags":["program"],"summary":"Prove Signature","operationId":"prove_signature_v1_program_applications__application_id__proofs_signature_post","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureProofIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/program/applications/{application_id}/proofs/transfer":{"post":{"tags":["program"],"summary":"Prove Transfer","operationId":"prove_transfer_v1_program_applications__application_id__proofs_transfer_post","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferProofIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/program/applications/{application_id}/proof/{address}":{"get":{"tags":["program"],"summary":"X402 Proof","description":"Pay this URL once with x402 from the address it names. An address already proven is never charged.","operationId":"x402_proof_v1_program_applications__application_id__proof__address__get","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}},{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}},{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/program/claims/{token}":{"get":{"tags":["program"],"summary":"Claim View","operationId":"claim_view_v1_program_claims__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["program"],"summary":"Claim","operationId":"claim_v1_program_claims__token__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/program/admin/enrollments":{"get":{"tags":["program"],"summary":"List Enrollments","operationId":"list_enrollments_v1_program_admin_enrollments_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EnrollmentOut"},"title":"Response List Enrollments V1 Program Admin Enrollments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/program/admin/enrollments/{enrollment_id}/observe":{"post":{"tags":["program"],"summary":"Observe","operationId":"observe_v1_program_admin_enrollments__enrollment_id__observe_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"enrollment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Enrollment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/program/admin/enrollments/{enrollment_id}/decision":{"post":{"tags":["program"],"summary":"Decide","operationId":"decide_v1_program_admin_enrollments__enrollment_id__decision_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"enrollment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Enrollment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/program/operator/enrollments":{"get":{"tags":["program"],"summary":"Operator Enrollments","operationId":"operator_enrollments_v1_program_operator_enrollments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OperatorEnrollmentOut"},"type":"array","title":"Response Operator Enrollments V1 Program Operator Enrollments Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/v1/program/operator/enrollments/{enrollment_id}/accept":{"post":{"tags":["program"],"summary":"Accept Terms","operationId":"accept_terms_v1_program_operator_enrollments__enrollment_id__accept_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"enrollment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Enrollment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__program__AcceptIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorEnrollmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/program/operator/enrollments/{enrollment_id}/leave":{"post":{"tags":["program"],"summary":"Leave Program","operationId":"leave_program_v1_program_operator_enrollments__enrollment_id__leave_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"enrollment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Enrollment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorEnrollmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/program/decisions/{decision_id}/supplement":{"post":{"tags":["program"],"summary":"Supplement Decision","description":"Extras or a failure report for one decision. Refused unparsed (403) until the operator has accepted.","operationId":"supplement_decision_v1_program_decisions__decision_id__supplement_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}},{"name":"x-roost-operator-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Operator-Id"}},{"name":"x-roost-agent-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Agent-Id"}},{"name":"x-roost-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Timestamp"}},{"name":"x-roost-nonce","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Nonce"}},{"name":"x-roost-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Signature"}},{"name":"x-roost-sdk-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Sdk-Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionSupplementOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/program/admin/decisions/{decision_id}/audit":{"post":{"tags":["program"],"summary":"Audit Report","operationId":"audit_report_v1_program_admin_decisions__decision_id__audit_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionSupplementOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/program/statements":{"get":{"tags":["program"],"summary":"List Statements","operationId":"list_statements_v1_program_statements_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"x-roost-operator-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Operator-Id"}},{"name":"x-roost-agent-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Agent-Id"}},{"name":"x-roost-timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Timestamp"}},{"name":"x-roost-nonce","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Nonce"}},{"name":"x-roost-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Signature"}},{"name":"x-roost-sdk-version","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Roost-Sdk-Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StatementOut"},"title":"Response List Statements V1 Program Statements Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/program/statements/{statement_id}/dispute":{"post":{"tags":["program"],"summary":"Dispute Statement","operationId":"dispute_statement_v1_program_statements__statement_id__dispute_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"statement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Statement Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisputeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatementOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/program/admin/statements/{statement_id}/dispute-resolution":{"post":{"tags":["program"],"summary":"Resolve Statement Dispute","operationId":"resolve_statement_dispute_v1_program_admin_statements__statement_id__dispute_resolution_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"statement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Statement Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisputeResolutionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatementOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/program/admin/settle":{"post":{"tags":["program"],"summary":"Settle","description":"Run once a month: settle windows past their grace, promote undisputed statements, void stale ones. A window\nthat doesn't fit the budget is held and listed; raise PROGRAM_BUDGET_CENTS and run again.","operationId":"settle_v1_program_admin_settle_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettleOut"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/v1/program/admin/payouts/due":{"get":{"tags":["program"],"summary":"Payouts Due","description":"Every payable statement: send the unblocked ones from PROGRAM_ROOST_ADDRESS, then record each hash.","operationId":"payouts_due_v1_program_admin_payouts_due_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DueOut"},"type":"array","title":"Response Payouts Due V1 Program Admin Payouts Due Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/v1/program/admin/payouts":{"post":{"tags":["program"],"summary":"Record Payout","operationId":"record_payout_v1_program_admin_payouts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"APIKeySubmit":{"properties":{"api_key":{"type":"string","title":"Api Key"}},"type":"object","required":["api_key"],"title":"APIKeySubmit"},"AddressIn":{"properties":{"chain_id":{"type":"integer","const":8453,"title":"Chain Id","default":8453},"address":{"type":"string","maxLength":42,"minLength":42,"title":"Address"}},"additionalProperties":false,"type":"object","required":["address"],"title":"AddressIn"},"AddressOut":{"properties":{"chain_id":{"type":"integer","title":"Chain Id"},"address":{"type":"string","title":"Address"},"proven":{"type":"boolean","title":"Proven"},"proof_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proof Method"},"siwe_message":{"type":"string","title":"Siwe Message"},"transfer":{"anyOf":[{"$ref":"#/components/schemas/TransferQuote"},{"type":"null"}]},"x402_url":{"type":"string","title":"X402 Url"}},"type":"object","required":["chain_id","address","proven","proof_method","siwe_message","transfer","x402_url"],"title":"AddressOut"},"AdminReviewActionRequest":{"properties":{"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"}},"additionalProperties":false,"type":"object","title":"AdminReviewActionRequest","description":"Body for approve / reject.\n\n``notes`` is OPTIONAL on approve, REQUIRED on reject (validated at\nthe route handler, not the schema, so the error message is route-\nspecific). Empty / whitespace-only strings are treated as missing."},"AdminReviewListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RoostPayDecision"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"additionalProperties":false,"type":"object","required":["items","total"],"title":"AdminReviewListResponse","description":"List shape for the cross-tenant needs_review queue."},"AgentAuthorityResponse":{"properties":{"agent_ref":{"type":"string","title":"Agent Ref"},"agent_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Version"},"reliability":{"additionalProperties":true,"type":"object","title":"Reliability"},"earned_authority":{"additionalProperties":true,"type":"object","title":"Earned Authority"}},"additionalProperties":false,"type":"object","required":["agent_ref","reliability","earned_authority"],"title":"AgentAuthorityResponse"},"AgentCertificationRequest":{"properties":{"agent_ref":{"type":"string","title":"Agent Ref"},"corpus_version":{"type":"string","title":"Corpus Version","default":"ap_v1"},"sdk_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sdk Version"},"code_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Hash"},"responses":{"items":{"$ref":"#/components/schemas/AgentResponse-Input"},"type":"array","title":"Responses"}},"additionalProperties":false,"type":"object","required":["agent_ref","responses"],"title":"AgentCertificationRequest","description":"Wire-format request body for ``POST /v1/agent-certifications``."},"AgentCertificationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_ref":{"type":"string","title":"Agent Ref"},"corpus_version":{"type":"string","title":"Corpus Version"},"sdk_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sdk Version"},"code_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Hash"},"scorecard":{"additionalProperties":true,"type":"object","title":"Scorecard"},"passed":{"type":"boolean","title":"Passed"},"max_ap_limit_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Ap Limit Cents"},"content_hash":{"type":"string","title":"Content Hash"},"signature_hex":{"type":"string","title":"Signature Hex"},"public_key_pem":{"type":"string","title":"Public Key Pem"},"issued_at":{"type":"string","format":"date-time","title":"Issued At"},"valid_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Valid Until"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["id","agent_ref","corpus_version","sdk_version","code_hash","scorecard","passed","max_ap_limit_cents","content_hash","signature_hex","public_key_pem","issued_at","valid_until","created_at"],"title":"AgentCertificationResponse","description":"Wire-format response for issue/get — the certified attestation\nrecord, including its detached signature and the signer's public key so\na third party can verify it out-of-band."},"AgentCreate":{"properties":{"agent_name":{"type":"string","title":"Agent Name"},"agent_type":{"$ref":"#/components/schemas/AgentType"},"deployment_endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Endpoint"}},"type":"object","required":["agent_name","agent_type"],"title":"AgentCreate"},"AgentRegistrationIn":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"wallet_address":{"type":"string","title":"Wallet Address"},"erc8004_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Erc8004 Id"},"operational_traces":{"type":"boolean","title":"Operational Traces","default":false}},"type":"object","required":["agent_id","wallet_address"],"title":"AgentRegistrationIn"},"AgentResponse-Input":{"properties":{"scenario_id":{"type":"string","title":"Scenario Id"},"called_roost_decide":{"type":"boolean","title":"Called Roost Decide"},"verdict_received":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verdict Received"},"final_action":{"type":"string","enum":["schedule","hold"],"title":"Final Action"}},"additionalProperties":false,"type":"object","required":["scenario_id","called_roost_decide","verdict_received","final_action"],"title":"AgentResponse"},"AgentResponse-Output":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"owner_id":{"type":"string","format":"uuid","title":"Owner Id"},"agent_name":{"type":"string","title":"Agent Name"},"agent_type":{"$ref":"#/components/schemas/AgentType"},"deployment_endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Endpoint"},"status":{"$ref":"#/components/schemas/AgentStatus"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"wallet":{"$ref":"#/components/schemas/WalletResponse"},"aiuc_certified":{"type":"boolean","title":"Aiuc Certified","default":false},"aiuc_certification_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aiuc Certification Id"},"aiuc_certified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Aiuc Certified At"}},"type":"object","required":["id","owner_id","agent_name","agent_type","deployment_endpoint","status","created_at","wallet"],"title":"AgentResponse"},"AgentStatus":{"type":"string","enum":["ACTIVE","SUSPENDED","FROZEN"],"title":"AgentStatus"},"AgentType":{"type":"string","enum":["TRADING","AUTOMATION","DATA_PROCESSING","ARBITRAGE","CONTENT","API_ORCHESTRATION","OTHER"],"title":"AgentType"},"AgentUpdate":{"properties":{"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"agent_type":{"anyOf":[{"$ref":"#/components/schemas/AgentType"},{"type":"null"}]},"deployment_endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Endpoint"},"aiuc_certified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Aiuc Certified","description":"Whether the operator attests this agent holds an AIUC behavioral certification (AIUC-1 or later). Self-attested; not yet programmatically verified."},"aiuc_certification_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aiuc Certification Id","description":"AIUC-issued certification id (opaque string)."}},"type":"object","title":"AgentUpdate"},"AgreementIn":{"properties":{"entity_type":{"type":"string","enum":["LLC","CORPORATION"],"title":"Entity Type"},"agreement_version":{"type":"string","maxLength":32,"minLength":1,"title":"Agreement Version"},"acceptance_envelope_cents":{"type":"integer","minimum":0.0,"title":"Acceptance Envelope Cents"},"ach_payment_method_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Ach Payment Method Id"},"operator_wallets":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Operator Wallets"},"telemetry_consent":{"type":"boolean","const":true,"title":"Telemetry Consent"},"sweep_authorized":{"type":"boolean","const":true,"title":"Sweep Authorized"}},"type":"object","required":["entity_type","agreement_version","acceptance_envelope_cents","telemetry_consent","sweep_authorized"],"title":"AgreementIn"},"AllowedModelsPolicy":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"models":{"items":{"type":"string"},"type":"array","title":"Models"}},"additionalProperties":false,"type":"object","title":"AllowedModelsPolicy","description":"Restrict the LLM models this agent is allowed to call."},"AnomalyOut":{"properties":{"kind":{"type":"string","title":"Kind"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"summary":{"type":"string","title":"Summary"},"current_value":{"type":"number","title":"Current Value"},"prior_value":{"type":"number","title":"Prior Value"},"delta_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Delta Pct"}},"type":"object","required":["kind","model","summary","current_value","prior_value","delta_pct"],"title":"AnomalyOut"},"AnomalyReportResponse":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"current_period_start":{"type":"string","title":"Current Period Start"},"current_period_end":{"type":"string","title":"Current Period End"},"prior_period_start":{"type":"string","title":"Prior Period Start"},"prior_period_end":{"type":"string","title":"Prior Period End"},"current_total_cost_cents":{"type":"integer","title":"Current Total Cost Cents"},"prior_total_cost_cents":{"type":"integer","title":"Prior Total Cost Cents"},"current_event_count":{"type":"integer","title":"Current Event Count"},"prior_event_count":{"type":"integer","title":"Prior Event Count"},"anomalies":{"items":{"$ref":"#/components/schemas/AnomalyOut"},"type":"array","title":"Anomalies"}},"type":"object","required":["agent_id","current_period_start","current_period_end","prior_period_start","prior_period_end","current_total_cost_cents","prior_total_cost_cents","current_event_count","prior_event_count","anomalies"],"title":"AnomalyReportResponse"},"ApplicationIn":{"properties":{"declared":{"$ref":"#/components/schemas/DeclaredUsage"},"public_key_pem":{"type":"string","maxLength":1000,"minLength":1,"title":"Public Key Pem"},"addresses":{"items":{"$ref":"#/components/schemas/AddressIn"},"type":"array","maxItems":3,"title":"Addresses"}},"additionalProperties":false,"type":"object","required":["declared","public_key_pem"],"title":"ApplicationIn"},"ApplicationOut":{"properties":{"application_id":{"type":"string","title":"Application Id"},"status":{"type":"string","enum":["OPEN","CLAIMED","EXPIRED"],"title":"Status"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"review_flag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Flag"},"addresses":{"items":{"$ref":"#/components/schemas/AddressOut"},"type":"array","title":"Addresses"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"operator_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Id"},"enrollment_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enrollment Status"},"claim_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claim Url"}},"type":"object","required":["application_id","status","expires_at","review_flag","addresses"],"title":"ApplicationOut"},"ApproveIn":{"properties":{"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"overrides":{"anyOf":[{"$ref":"#/components/schemas/TermsOverrideIn"},{"type":"null"}]}},"type":"object","title":"ApproveIn"},"AttestationAck":{"properties":{"received_at":{"type":"string","format":"date-time","title":"Received At","description":"Server clock at receipt; UTC."},"attestation_id":{"type":"string","format":"uuid","title":"Attestation Id"},"status":{"type":"string","enum":["accepted","stale_policy","signature_invalid","version_unsupported"],"title":"Status"},"expected_content_version":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Expected Content Version","description":"Populated when status='stale_policy'; tells the SDK which version to refresh to."},"next_attestation_in_seconds":{"type":"integer","maximum":86400.0,"minimum":30.0,"title":"Next Attestation In Seconds","description":"Suggested cadence for the next attestation, in seconds.","default":300}},"additionalProperties":false,"type":"object","required":["received_at","attestation_id","status"],"title":"AttestationAck","description":"Server response to a POSTed attestation.\n\n``next_attestation_in_seconds`` lets the server dynamically nudge the\nSDK's cadence (e.g. shorter during incidents, longer for tier-Standard\noperators) without an SDK redeploy."},"AttestationPayload":{"properties":{"sdk_version":{"type":"string","maxLength":64,"minLength":1,"title":"Sdk Version"},"agt_version":{"type":"string","maxLength":64,"minLength":1,"title":"Agt Version"},"policy_content_version":{"type":"integer","minimum":0.0,"title":"Policy Content Version","description":"The bundle content_version the SDK currently has loaded. Compared against the server's latest to detect stale clients."},"policy_schema_version":{"type":"string","maxLength":16,"minLength":1,"title":"Policy Schema Version"},"sdk_integrity_hash":{"type":"string","maxLength":64,"minLength":64,"title":"Sdk Integrity Hash","description":"sha256 of the SDK bytes, lowercase hex."},"host_runtime":{"type":"string","maxLength":128,"minLength":1,"title":"Host Runtime","description":"e.g. \"python 3.11.4\" or \"node 20.10.0\"."},"host_os":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Host Os"},"agent_id":{"type":"string","maxLength":128,"minLength":1,"title":"Agent Id"},"nonce":{"type":"string","maxLength":128,"minLength":1,"title":"Nonce","description":"Client-chosen unique value; the (operator, agent, nonce) triple is enforced unique to prevent replay."},"signed_at":{"type":"string","format":"date-time","title":"Signed At","description":"SDK wall clock at signing — for drift analysis, NOT trust."},"signature":{"type":"string","maxLength":512,"minLength":1,"title":"Signature","description":"Ed25519 signature over the canonical payload hash, hex."}},"additionalProperties":false,"type":"object","required":["sdk_version","agt_version","policy_content_version","policy_schema_version","sdk_integrity_hash","host_runtime","agent_id","nonce","signed_at","signature"],"title":"AttestationPayload","description":"The signed payload the SDK posts.\n\nThe signature covers a canonical hash of every other field. The server\nre-derives the canonical form via\n``harness_attestation_service._canonical_attestation_bytes`` (sort\nkeys, tight separators, UTF-8 encode, sha256) and verifies the\nEd25519 signature against the operator's registered public key\n(Slice H). Attestations submitted with no registered key default to\n``status=\"signature_invalid\"`` so the system fails closed.\n\n``signed_at`` is the SDK's wall clock and is kept for context and\ndrift analysis. Tampering checks must use the server clock\n(``received_at`` on the stored row)."},"AuditIn":{"properties":{"passed":{"type":"boolean","title":"Passed"}},"additionalProperties":false,"type":"object","required":["passed"],"title":"AuditIn"},"AutoApplyConsentGrantRequest":{"properties":{"disclosure_version":{"type":"string","maxLength":64,"minLength":1,"title":"Disclosure Version"}},"additionalProperties":false,"type":"object","required":["disclosure_version"],"title":"AutoApplyConsentGrantRequest","description":"POST body. The client echoes the disclosure version it rendered —\na mismatch with the current version means the operator consented to\nstale wording (409)."},"AutoApplyConsentState":{"properties":{"feature_enabled":{"type":"boolean","title":"Feature Enabled"},"enabled":{"type":"boolean","title":"Enabled"},"consented_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Consented At"},"disclosure_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disclosure Version"},"current_disclosure":{"$ref":"#/components/schemas/DisclosureInfo"}},"type":"object","required":["feature_enabled","enabled","consented_at","disclosure_version","current_disclosure"],"title":"AutoApplyConsentState","description":"Response shape for all three consent endpoints."},"BacktestIngestResponse":{"properties":{"total_rows":{"type":"integer","title":"Total Rows"},"ingested":{"items":{"$ref":"#/components/schemas/BacktestRowResult"},"type":"array","title":"Ingested"},"replayed":{"items":{"$ref":"#/components/schemas/BacktestRowResult"},"type":"array","title":"Replayed"},"failed":{"items":{"$ref":"#/components/schemas/BacktestRowError"},"type":"array","title":"Failed"},"failed_total":{"type":"integer","title":"Failed Total"}},"additionalProperties":false,"type":"object","required":["total_rows","ingested","replayed","failed","failed_total"],"title":"BacktestIngestResponse","description":"Wire-format response for ``POST /v1/backtests``.\n\n``ingested`` holds rows that created a brand-new ``ShadowDecision``.\n``replayed`` holds rows whose derived ``(operator_id, idempotency_key)``\nalready existed — a repeat upload of the same export — where\nMilestone A's ``shadow_decision_service.decide`` returns the original\nrow unchanged, and any accompanying resolution/outcome 409s (already\nrecorded on the earlier upload) are expected, not failures.\n\n``failed`` is capped at 100 entries (the plan's binding CSV ingest\nspec); ``failed_total`` is the uncapped count so a caller can tell\nwhether more failures exist beyond the capped list. Every row number\nis 1-based over the *data* rows relative to the file, counting the\nheader as row 1 (so the first data row is row 2) — matching what a\npartner would see opening the file in a spreadsheet."},"BacktestReportRequest":{"properties":{"source_system":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Source System"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"}},"additionalProperties":false,"type":"object","required":["period_start","period_end"],"title":"BacktestReportRequest","description":"Wire-format request body for ``POST /v1/reports/backtest``.\n\n``source_system`` is optional — omitted/``None`` means \"all source\nsystems\" (mirrors ``BacktestReport.source_system``'s null semantics).\n``period_start``/``period_end`` bound the ``proposed_at`` window the\nreport is computed over (inclusive on both ends, per the plan's\n\"Metric definitions\")."},"BacktestReportResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"},"grade":{"type":"string","enum":["A","B","C","D","F"],"title":"Grade"},"score":{"type":"number","title":"Score"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"synthetic":{"type":"boolean","title":"Synthetic"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["id","source_system","period_start","period_end","grade","score","payload","synthetic","created_at"],"title":"BacktestReportResponse","description":"Wire-format response for all three report endpoints.\n\n``payload`` is the full metrics document ``backtest_report_service.\ncompute`` produced and ``generate`` persisted verbatim — grade and\nscore are duplicated here from their own typed columns (matching\n``BacktestReport``'s own duplication) so a caller can sort/display\nwithout parsing the JSON blob. ``source_system``/``period_start``/\n``period_end`` are likewise read straight off the model's own typed\ncolumns (``from_attributes=True`` picks them up with no extra\nmapping) so a caller — e.g. the dashboard's report picker — can\nlabel/filter reports without parsing ``payload``."},"BacktestRowError":{"properties":{"row":{"type":"integer","title":"Row"},"reason":{"type":"string","title":"Reason"}},"additionalProperties":false,"type":"object","required":["row","reason"],"title":"BacktestRowError","description":"One CSV row that failed validation and was skipped — no decision,\nresolution, or outcome row was written for it."},"BacktestRowResult":{"properties":{"row":{"type":"integer","title":"Row"},"decision_id":{"type":"string","format":"uuid","title":"Decision Id"},"external_ref":{"type":"string","title":"External Ref"},"verdict":{"type":"string","enum":["pay","wait","finance"],"title":"Verdict"}},"additionalProperties":false,"type":"object","required":["row","decision_id","external_ref","verdict"],"title":"BacktestRowResult","description":"One CSV row that was successfully scored — either newly ingested\n(a brand-new ``ShadowDecision``) or replayed (the row's derived\nidempotency key already existed on a prior upload)."},"Body_ingest_backtest_csv_v1_backtests_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_ingest_backtest_csv_v1_backtests_post"},"BundleMeta":{"properties":{"schema_version":{"type":"string","title":"Schema Version","description":"Semver of the wire-format schema itself (not of any policy values).","default":"1.0.0"},"content_version":{"type":"integer","minimum":0.0,"title":"Content Version","description":"Monotonic per (operator_id, agent_id); strictly increasing."},"operator_id":{"type":"string","maxLength":64,"minLength":1,"title":"Operator Id"},"agent_id":{"type":"string","maxLength":128,"minLength":1,"title":"Agent Id"},"issued_at":{"type":"string","format":"date-time","title":"Issued At","description":"UTC timestamp Roost issued this bundle."},"refresh_interval_seconds":{"type":"integer","maximum":86400.0,"minimum":60.0,"title":"Refresh Interval Seconds","description":"SDK re-fetches at this cadence. Clamped to [60, 86400].","default":300},"policy_ttl_seconds":{"type":"integer","maximum":604800.0,"minimum":120.0,"title":"Policy Ttl Seconds","description":"Hard expiry for a cached bundle. Older than this -> deny-by-default. Must be >= refresh_interval_seconds * 2.","default":1800}},"additionalProperties":false,"type":"object","required":["content_version","operator_id","agent_id"],"title":"BundleMeta","description":"Top-level metadata for a policy bundle.\n\n`schema_version` is the shape of this bundle itself (semver of the wire\nformat; bumped per `HARNESS_POLICY_SCHEMA.md` §6).\n\n`content_version` is a monotonically increasing integer per\n(operator_id, agent_id) that Roost bumps every time it issues a new\nbundle, regardless of whether content changed. The SDK uses this for\ncheap freshness checks and to ignore out-of-order bundles."},"BusinessHoursWindowPolicy":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"timezone":{"type":"string","title":"Timezone","description":"IANA timezone identifier.","default":"UTC"},"days_of_week":{"items":{"type":"integer"},"type":"array","title":"Days Of Week"},"start_local_time":{"type":"string","title":"Start Local Time","default":"00:00"},"end_local_time":{"type":"string","title":"End Local Time","default":"00:00"}},"additionalProperties":false,"type":"object","title":"BusinessHoursWindowPolicy","description":"Restrict tool calls to a configured business-hours window.\n\n`days_of_week` uses ISO 8601 weekday numbers: Mon=1, Sun=7. This matches\ncommon operator expectations and the wire format; the SDK does any\nnecessary translation to platform-native conventions internally.\n\nTime strings are 24-hour `HH:MM`."},"ClaimIn":{"properties":{"terms_version":{"type":"string","maxLength":64,"minLength":1,"title":"Terms Version"}},"additionalProperties":false,"type":"object","required":["terms_version"],"title":"ClaimIn"},"ClaimOut":{"properties":{"application_id":{"type":"string","title":"Application Id"},"agent_id":{"type":"string","title":"Agent Id"},"operator_id":{"type":"string","title":"Operator Id"},"enrollment_status":{"type":"string","title":"Enrollment Status"}},"type":"object","required":["application_id","agent_id","operator_id","enrollment_status"],"title":"ClaimOut"},"ClaimView":{"properties":{"application_id":{"type":"string","title":"Application Id"},"agent_name":{"type":"string","title":"Agent Name"},"declared":{"additionalProperties":true,"type":"object","title":"Declared"},"addresses":{"items":{"$ref":"#/components/schemas/AddressOut"},"type":"array","title":"Addresses"},"terms_version":{"type":"string","title":"Terms Version"},"terms":{"items":{"type":"string"},"type":"array","title":"Terms"}},"type":"object","required":["application_id","agent_name","declared","addresses","terms_version","terms"],"title":"ClaimView"},"CommitIntentRequest":{"properties":{"agent_ref":{"type":"string","maxLength":128,"minLength":1,"title":"Agent Ref"},"agent_version":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Agent Version"},"step_index":{"type":"integer","minimum":0.0,"title":"Step Index"},"committed_intent":{"type":"string","maxLength":1000,"minLength":1,"title":"Committed Intent"},"capture_mode":{"type":"string","enum":["in_band_mcp","out_of_band_api","reconstructed"],"title":"Capture Mode","default":"out_of_band_api"}},"additionalProperties":false,"type":"object","required":["agent_ref","step_index","committed_intent"],"title":"CommitIntentRequest","description":"Wire-format request body for\n``POST /v1/decisions/{decision_id}/trajectory/steps``.\n\n``capture_mode`` defaults to ``\"out_of_band_api\"`` (a direct API caller,\nnot an in-band MCP tool call) — see\n``trajectory_service._commit_trust_for`` for the capture_mode ->\ncommit_trust derivation this drives. Closed to the three known values\n(``Literal``, not a free ``str``) so a typo (e.g. ``\"in_band_mpc\"``)\n422s instead of silently downgrading to the weakest trust tier."},"CommitIntentResponse":{"properties":{"step_id":{"type":"string","format":"uuid","title":"Step Id"},"intent_hash":{"type":"string","title":"Intent Hash"},"prev_intent_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Intent Hash"},"committed_at":{"type":"string","format":"date-time","title":"Committed At"},"commit_trust":{"type":"string","title":"Commit Trust"}},"additionalProperties":false,"type":"object","required":["step_id","intent_hash","prev_intent_hash","committed_at","commit_trust"],"title":"CommitIntentResponse","description":"Wire-format response for\n``POST /v1/decisions/{decision_id}/trajectory/steps``."},"CompromiseIn":{"properties":{"since":{"type":"string","format":"date-time","title":"Since"}},"type":"object","required":["since"],"title":"CompromiseIn"},"ConnectionStatus":{"type":"string","enum":["ACTIVE","REVOKED","ERROR"],"title":"ConnectionStatus"},"ConnectionType":{"type":"string","enum":["STRIPE_CONNECT","PLAID","HELICONE","OPENAI","ANTHROPIC","TEMPORAL_CLOUD","LANGSMITH","PREFECT_CLOUD","MODAL","REPLICATE"],"title":"ConnectionType"},"CorrelatedFailurePair":{"properties":{"agent_a":{"type":"string","title":"Agent A"},"agent_b":{"type":"string","title":"Agent B"},"co_problem_decisions":{"type":"integer","title":"Co Problem Decisions"}},"additionalProperties":false,"type":"object","required":["agent_a","agent_b","co_problem_decisions"],"title":"CorrelatedFailurePair"},"CorrelatedFailureResponse":{"properties":{"pairs":{"items":{"$ref":"#/components/schemas/CorrelatedFailurePair"},"type":"array","title":"Pairs"}},"additionalProperties":false,"type":"object","required":["pairs"],"title":"CorrelatedFailureResponse"},"CounterOfferIn":{"properties":{"counter_terms":{"$ref":"#/components/schemas/TermsOverrideIn"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["counter_terms"],"title":"CounterOfferIn"},"DataConnectionRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"operator_id":{"type":"string","format":"uuid","title":"Operator Id"},"connection_type":{"$ref":"#/components/schemas/ConnectionType"},"external_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Account Id"},"scopes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Scopes"},"connected_at":{"type":"string","format":"date-time","title":"Connected At"},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Synced At"},"status":{"$ref":"#/components/schemas/ConnectionStatus"}},"type":"object","required":["id","operator_id","connection_type","external_account_id","scopes","connected_at","last_synced_at","status"],"title":"DataConnectionRead"},"DecisionIn":{"properties":{"approve":{"type":"boolean","title":"Approve"},"reason":{"type":"string","maxLength":500,"minLength":1,"title":"Reason"},"segment":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Segment"}},"additionalProperties":false,"type":"object","required":["approve","reason"],"title":"DecisionIn"},"DecisionRecordBundle":{"properties":{"decision_id":{"type":"string","title":"Decision Id"},"records":{"items":{"$ref":"#/components/schemas/SignedRecord"},"type":"array","title":"Records"},"matched":{"items":{"$ref":"#/components/schemas/SignedRecord"},"type":"array","title":"Matched"}},"additionalProperties":false,"type":"object","required":["decision_id","records","matched"],"title":"DecisionRecordBundle"},"DecisionRecordPage":{"properties":{"records":{"items":{"$ref":"#/components/schemas/SignedRecord"},"type":"array","title":"Records"},"next_after_seq":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next After Seq"}},"additionalProperties":false,"type":"object","required":["records","next_after_seq"],"title":"DecisionRecordPage"},"DecisionSupplementOut":{"properties":{"decision_id":{"type":"string","title":"Decision Id"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"},"failure":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Failure"},"submitted_by":{"type":"string","title":"Submitted By"},"audit_result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audit Result"}},"type":"object","required":["decision_id","extras","failure","submitted_by","audit_result"],"title":"DecisionSupplementOut"},"DeclaredUsage":{"properties":{"agent_name":{"type":"string","maxLength":128,"minLength":1,"title":"Agent Name"},"purpose_categories":{"items":{"type":"string","enum":["inference","compute","data","api_services","contractor","inventory","other"]},"type":"array","maxItems":7,"minItems":1,"title":"Purpose Categories"},"rails":{"items":{"type":"string","enum":["x402","usdc","card","token","other"]},"type":"array","maxItems":5,"minItems":1,"title":"Rails"},"monthly_spend_band":{"type":"string","enum":["under_100","100_to_1k","1k_to_10k","10k_to_100k","over_100k"],"title":"Monthly Spend Band"},"model":{"type":"string","maxLength":128,"minLength":1,"title":"Model"},"harness":{"type":"string","maxLength":128,"minLength":1,"title":"Harness"},"human_approval":{"type":"string","enum":["none","some","all"],"title":"Human Approval"},"operator_industry":{"type":"string","maxLength":128,"minLength":1,"title":"Operator Industry"},"trades_assets":{"type":"boolean","title":"Trades Assets","default":false},"worlds_score":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Worlds Score"}},"additionalProperties":false,"type":"object","required":["agent_name","purpose_categories","rails","monthly_spend_band","model","harness","human_approval","operator_industry"],"title":"DeclaredUsage"},"DeferIn":{"properties":{"notes":{"type":"string","title":"Notes"}},"type":"object","required":["notes"],"title":"DeferIn"},"DisclosureInfo":{"properties":{"version":{"type":"string","title":"Version"},"text":{"type":"string","title":"Text"}},"type":"object","required":["version","text"],"title":"DisclosureInfo"},"DisputeIn":{"properties":{"note":{"type":"string","maxLength":1000,"minLength":1,"title":"Note"}},"additionalProperties":false,"type":"object","required":["note"],"title":"DisputeIn"},"DisputeResolutionIn":{"properties":{"payable":{"type":"boolean","title":"Payable"},"note":{"type":"string","maxLength":1000,"minLength":1,"title":"Note"}},"additionalProperties":false,"type":"object","required":["payable","note"],"title":"DisputeResolutionIn"},"DrawIn":{"properties":{"idempotency_key":{"type":"string","maxLength":128,"minLength":8,"title":"Idempotency Key"},"amount_cents":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount Cents"},"term_days":{"type":"integer","enum":[7,14,30],"title":"Term Days"},"purpose_category":{"type":"string","enum":["inference","compute","data","api_services","contractor","inventory","other"],"title":"Purpose Category"},"purpose_text":{"type":"string","maxLength":500,"minLength":1,"title":"Purpose Text"},"plan":{"$ref":"#/components/schemas/PlanIn"}},"type":"object","required":["idempotency_key","amount_cents","term_days","purpose_category","purpose_text","plan"],"title":"DrawIn"},"DueOut":{"properties":{"statement_id":{"type":"string","title":"Statement Id"},"operator_id":{"type":"string","title":"Operator Id"},"to_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Address"},"amount_cents":{"type":"integer","title":"Amount Cents"},"amount_units":{"type":"integer","title":"Amount Units"},"blocked":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Blocked"}},"type":"object","required":["statement_id","operator_id","to_address","amount_cents","amount_units","blocked"],"title":"DueOut"},"EnforcementConfig":{"properties":{"on_violation":{"$ref":"#/components/schemas/OnViolationAction","default":"raise"},"on_refresh_failure":{"$ref":"#/components/schemas/OnRefreshFailureAction","default":"use_cached_until_ttl"},"fail_closed_on_agt_crash":{"type":"boolean","title":"Fail Closed On Agt Crash","default":true}},"additionalProperties":false,"type":"object","title":"EnforcementConfig","description":"How the SDK behaves on policy violation and on refresh failure.\n\n`fail_closed_on_agt_crash` defaults to True per HARNESS_SPEC_v0.2 §10.5\n(safer choice for a financial product than fail-open)."},"EnrollmentOut":{"properties":{"enrollment_id":{"type":"string","title":"Enrollment Id"},"application_id":{"type":"string","title":"Application Id"},"agent_id":{"type":"string","title":"Agent Id"},"operator_id":{"type":"string","title":"Operator Id"},"status":{"type":"string","title":"Status"},"labels":{"additionalProperties":true,"type":"object","title":"Labels"},"review_flag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Flag"},"addresses":{"items":{"$ref":"#/components/schemas/AddressOut"},"type":"array","title":"Addresses"}},"type":"object","required":["enrollment_id","application_id","agent_id","operator_id","status","labels","review_flag","addresses"],"title":"EnrollmentOut"},"EvidenceDecision":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"source_system":{"type":"string","title":"Source System"},"external_ref":{"type":"string","title":"External Ref"},"decision_type":{"type":"string","enum":["invoice","purchase_order","transfer"],"title":"Decision Type"},"agent_ref":{"type":"string","title":"Agent Ref"},"vendor_name":{"type":"string","title":"Vendor Name"},"vendor_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Country"},"amount_cents":{"type":"integer","title":"Amount Cents"},"currency":{"type":"string","title":"Currency"},"proposed_at":{"type":"string","format":"date-time","title":"Proposed At"},"terms_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Terms Days"},"early_pay_discount_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Early Pay Discount Bps"},"discount_deadline":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Discount Deadline"},"verdict":{"type":"string","enum":["pay","wait","finance"],"title":"Verdict"},"confidence":{"type":"number","title":"Confidence"},"expected_cash_impact_cents":{"type":"integer","title":"Expected Cash Impact Cents"},"reasoning":{"type":"string","title":"Reasoning"},"reason_codes":{"items":{"type":"string"},"type":"array","title":"Reason Codes"},"decided_in_ms":{"type":"integer","title":"Decided In Ms"},"idempotency_key":{"type":"string","title":"Idempotency Key"},"synthetic":{"type":"boolean","title":"Synthetic"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["id","source_system","external_ref","decision_type","agent_ref","vendor_name","vendor_country","amount_cents","currency","proposed_at","terms_days","early_pay_discount_bps","discount_deadline","verdict","confidence","expected_cash_impact_cents","reasoning","reason_codes","decided_in_ms","idempotency_key","synthetic","created_at"],"title":"EvidenceDecision","description":"The full decision-field set shared by ``GET /v1/decisions/{id}`` and\n``GET /v1/decisions/{id}/evidence`` — every request-side field plus the\nengine's verdict/reasoning/timing and ``created_at``.\n\nValues are lowercased the same way ``ShadowDecisionResponse.verdict``\nis (``decision_type``/``verdict`` come back as uppercase enum/str from\nthe ORM) — see ``shadow_decision_service._decision_payload``, which\nbuilds the plain dict this model (and the evidence hash) is built\nfrom."},"EvidenceEntry":{"properties":{"kind":{"type":"string","enum":["invoice","purchase_order","receipt","email","ledger_entry","bank_line","contract","other"],"title":"Kind"},"commitment":{"type":"string","pattern":"^hmac-sha256:[0-9a-f]{64}$","title":"Commitment"},"locator_ct":{"type":"string","pattern":"^[A-Za-z0-9_-]{38,4096}$","title":"Locator Ct"},"canon":{"type":"string","enum":["bytes","rfc5322","jcs"],"title":"Canon"},"captured_at":{"type":"string","format":"date-time","title":"Captured At"}},"additionalProperties":false,"type":"object","required":["kind","commitment","locator_ct","canon","captured_at"],"title":"EvidenceEntry","description":"One document the agent relied on, committed client-side: Roost sees only a keyed hash and\nan encrypted locator it cannot read."},"EvidenceOutcome":{"properties":{"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"final_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Final Amount Cents"},"discount_captured_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Discount Captured Cents"},"disputed":{"type":"boolean","title":"Disputed"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["paid_at","final_amount_cents","discount_captured_cents","disputed","notes","created_at"],"title":"EvidenceOutcome","description":"The nested ``outcome`` shape in both the detail and evidence-pack\nresponses — ``null`` (``None``) when nothing downstream has been\nrecorded yet."},"EvidencePackResponse":{"properties":{"decision":{"$ref":"#/components/schemas/EvidenceDecision"},"resolution":{"anyOf":[{"$ref":"#/components/schemas/EvidenceResolution"},{"type":"null"}]},"outcome":{"anyOf":[{"$ref":"#/components/schemas/EvidenceOutcome"},{"type":"null"}]},"evidence_hash":{"type":"string","title":"Evidence Hash"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"graduation_offer":{"anyOf":[{"$ref":"#/components/schemas/GraduationOffer"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["decision","resolution","outcome","evidence_hash","generated_at","graduation_offer"],"title":"EvidencePackResponse","description":"Wire-format response for ``GET /v1/decisions/{decision_id}/evidence``\n(pinned contract: \"Evidence pack\") — the \"decision defense record\" Task\n4's drawer renders. ``evidence_hash`` is stable for the same underlying\nrows across repeated calls; ``generated_at`` is wall-clock-of-the-call\nand deliberately excluded from the hash (see\n``shadow_decision_service.compute_evidence_hash``).\n\nMilestone D, Task 1 extended this ADDITIVELY with ``graduation_offer``\n(pinned \"Graduation offer\" contract, see ``ShadowDecisionDetailResponse``\nabove for the non-null gate). Critically: ``graduation_offer`` is NEVER\npassed to ``compute_evidence_hash`` — the hash inputs stay exactly\n``decision``/``resolution``/``outcome``, unchanged from M-C, so this\nfield's presence or absence never moves ``evidence_hash``."},"EvidenceResolution":{"properties":{"action":{"type":"string","enum":["approved","rejected","modified"],"title":"Action"},"actor":{"type":"string","title":"Actor"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["action","actor","occurred_at","created_at"],"title":"EvidenceResolution","description":"The nested ``resolution`` shape in both the detail and evidence-pack\nresponses — ``null`` (``None``) when the decision hasn't been resolved\nyet."},"ExceptionScoreboardResponse":{"properties":{"resolved_total":{"type":"integer","title":"Resolved Total"},"labeled_total":{"type":"integer","title":"Labeled Total"},"pending_total":{"type":"integer","title":"Pending Total"},"correct_hold":{"type":"integer","title":"Correct Hold"},"false_hold":{"type":"integer","title":"False Hold"},"missed_error":{"type":"integer","title":"Missed Error"},"correct_pay":{"type":"integer","title":"Correct Pay"},"reversal_total":{"type":"integer","title":"Reversal Total"},"hold_precision":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hold Precision"},"miss_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Miss Rate"},"false_hold_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"False Hold Rate"},"override_was_right_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Override Was Right Rate"}},"additionalProperties":false,"type":"object","required":["resolved_total","labeled_total","pending_total","correct_hold","false_hold","missed_error","correct_pay","reversal_total","hold_precision","miss_rate","false_hold_rate","override_was_right_rate"],"title":"ExceptionScoreboardResponse","description":"Wire-format response for ``GET /v1/exception-scoreboard`` (exception-\nintelligence capture, docs/superpowers/plans/2026-09-16-exception-\nintelligence-capture.md).\n\nDistinct from the pinned ``ScoreboardResponse`` above: that measures\n*agreement* (human vs. machine verdict). This measures *correctness* —\nit joins ``DecisionOutcome`` (which the agreement scoreboard never does)\nto classify each resolved decision into the payments confusion matrix\n(correct_hold / false_hold / missed_error / correct_pay), plus PENDING\nfor decisions whose outcome isn't known yet. Rates are ``None`` on a\nzero denominator (mirrors ``agreement_rate``'s null-when-empty\nconvention). Observability/analytics only — never wired into TAPCO\nscoring or any training path (the ``synthetic=True`` boundary holds)."},"FeatureSnapshotRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"snapshot_date":{"type":"string","format":"date","title":"Snapshot Date"},"revenue_cov_90d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revenue Cov 90D"},"revenue_growth_slope_90d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revenue Growth Slope 90D"},"revenue_growth_r2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revenue Growth R2"},"payer_concentration_hhi":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Payer Concentration Hhi"},"recurring_revenue_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recurring Revenue Ratio"},"task_completion_rate_30d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Task Completion Rate 30D"},"task_completion_trend_90d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Task Completion Trend 90D"},"dispute_rate_30d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dispute Rate 30D"},"retry_rate_7d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Retry Rate 7D"},"llm_cost_to_revenue_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Llm Cost To Revenue Ratio"},"llm_cost_slope_90d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Llm Cost Slope 90D"},"cost_per_successful_task":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per Successful Task"},"infrastructure_burn_multiple":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Infrastructure Burn Multiple"},"api_call_entropy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Api Call Entropy"},"operator_bank_balance_tier":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Operator Bank Balance Tier"},"operator_min_balance_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Operator Min Balance Ratio"},"operator_nsf_count_90d":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Operator Nsf Count 90D"},"agent_wallet_balance_usdc":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Agent Wallet Balance Usdc"},"kya_tier":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kya Tier"},"operator_entity_age_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Operator Entity Age Days"},"mandate_scope_hash_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Mandate Scope Hash Match"},"prior_repayment_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Prior Repayment Rate"},"data_days_available":{"type":"integer","title":"Data Days Available"},"computed_at":{"type":"string","format":"date-time","title":"Computed At"}},"type":"object","required":["id","agent_id","snapshot_date","revenue_cov_90d","revenue_growth_slope_90d","revenue_growth_r2","payer_concentration_hhi","recurring_revenue_ratio","task_completion_rate_30d","task_completion_trend_90d","dispute_rate_30d","retry_rate_7d","llm_cost_to_revenue_ratio","llm_cost_slope_90d","cost_per_successful_task","infrastructure_burn_multiple","api_call_entropy","operator_bank_balance_tier","operator_min_balance_ratio","operator_nsf_count_90d","agent_wallet_balance_usdc","kya_tier","operator_entity_age_days","mandate_scope_hash_match","prior_repayment_rate","data_days_available","computed_at"],"title":"FeatureSnapshotRead"},"GoodhartAlertListResponse":{"properties":{"alerts":{"items":{"$ref":"#/components/schemas/GoodhartAlertOut"},"type":"array","title":"Alerts"},"count":{"type":"integer","title":"Count"},"operator_id":{"type":"string","format":"uuid","title":"Operator Id"},"include_resolved":{"type":"boolean","title":"Include Resolved"}},"type":"object","required":["alerts","count","operator_id","include_resolved"],"title":"GoodhartAlertListResponse"},"GoodhartAlertOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"operator_id":{"type":"string","format":"uuid","title":"Operator Id"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"signal_type":{"type":"string","title":"Signal Type"},"severity":{"type":"string","title":"Severity"},"details_json":{"additionalProperties":true,"type":"object","title":"Details Json"},"detected_at":{"type":"string","format":"date-time","title":"Detected At"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"},"resolved_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resolved By User Id"}},"type":"object","required":["id","operator_id","signal_type","severity","details_json","detected_at"],"title":"GoodhartAlertOut","description":"Wire-format representation of a stored GoodhartAlert row."},"GoodhartEvaluateResponse":{"properties":{"operator_id":{"type":"string","format":"uuid","title":"Operator Id"},"created_alert_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Created Alert Ids"},"created_count":{"type":"integer","title":"Created Count"}},"type":"object","required":["operator_id","created_alert_ids","created_count"],"title":"GoodhartEvaluateResponse"},"GraduationOffer":{"properties":{"amount_cents":{"type":"integer","title":"Amount Cents"},"flat_fee_bps":{"type":"integer","title":"Flat Fee Bps"},"flat_fee_cents":{"type":"integer","title":"Flat Fee Cents"},"partner_share_bps":{"type":"integer","title":"Partner Share Bps"},"partner_share_cents":{"type":"integer","title":"Partner Share Cents"},"scoreboard":{"$ref":"#/components/schemas/GraduationOfferScoreboard"},"sandbox":{"type":"boolean","title":"Sandbox"}},"additionalProperties":false,"type":"object","required":["amount_cents","flat_fee_bps","flat_fee_cents","partner_share_bps","partner_share_cents","scoreboard","sandbox"],"title":"GraduationOffer","description":"The pinned \"Graduation offer\" contract's payload shape. Attached\nONLY on ``ShadowDecisionDetailResponse``/``EvidencePackResponse`` (as\n``graduation_offer``), and only when non-``None`` — see\n``shadow_decision_service._compute_graduation_offer`` for the\n``verdict == \"finance\" AND scoreboard.cleared`` gate. ``sandbox`` is\nalways ``True`` when this object exists at all — there is no\nnon-sandbox variant in this milestone."},"GraduationOfferScoreboard":{"properties":{"agreement_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Agreement Rate"},"threshold":{"type":"number","title":"Threshold"},"resolved_total":{"type":"integer","title":"Resolved Total"},"cleared":{"type":"boolean","title":"Cleared"}},"additionalProperties":false,"type":"object","required":["agreement_rate","threshold","resolved_total","cleared"],"title":"GraduationOfferScoreboard","description":"The scoreboard standing embedded in a ``GraduationOffer`` — a\nsmaller, distinct shape from the full ``ScoreboardResponse`` above (no\n``metric``/``definition``/``agreeing_total``): just the four fields the\npinned \"Graduation offer\" contract names."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HarnessPolicy":{"properties":{"bundle_meta":{"$ref":"#/components/schemas/BundleMeta"},"policies":{"$ref":"#/components/schemas/Policies"},"enforcement":{"$ref":"#/components/schemas/EnforcementConfig"}},"additionalProperties":false,"type":"object","required":["bundle_meta"],"title":"HarnessPolicy","description":"The complete policy bundle the SDK fetches from Roost.\n\nThis is the wire-format root. The Roost backend (Slice C) serves this\nfrom a policy-refresh endpoint; the SDK (Slice D) caches it locally and\nfeeds it into the embedded AGT instance after translating to AGT's\nnative policy language (YAML at v1)."},"HeldWindow":{"properties":{"window_id":{"type":"string","title":"Window Id"},"needed_cents":{"type":"integer","title":"Needed Cents"}},"type":"object","required":["window_id","needed_cents"],"title":"HeldWindow"},"HumanInteractionBreakdownResponse":{"properties":{"by_reviewer_role":{"additionalProperties":{"additionalProperties":{"type":"integer"},"type":"object"},"type":"object","title":"By Reviewer Role"},"override_reason_distribution":{"additionalProperties":{"type":"integer"},"type":"object","title":"Override Reason Distribution"},"roles_seen":{"items":{"type":"string"},"type":"array","title":"Roles Seen"}},"additionalProperties":false,"type":"object","required":["by_reviewer_role","override_reason_distribution","roles_seen"],"title":"HumanInteractionBreakdownResponse","description":"Wire-format response for ``GET /v1/scoreboard/human-interaction``\n(Capture-Depth Increment — Human-Interaction + Evidence-Provenance,\nTask 2 — Gap A payoff).\n\nSibling to ``ExceptionScoreboardResponse``: same resolved-decision join\nand ``classify_outcome`` labeling, but the confusion matrix is bucketed\nper ``reviewer_role`` (Task 1's human-interaction capture field —\n\"unspecified\" when a resolution didn't record one) instead of\naggregated operator-wide, plus a separate tally of\n``override_reason_code`` values captured on resolution. A role with\nzero resolved decisions is simply absent from ``by_reviewer_role`` — no\nsynthesized zero-rows; ``roles_seen`` is exactly that dict's key set.\n``override_reason_distribution`` omits resolutions that didn't capture\na reason code. Advisory/observability only — never wired into the\nevidence hash, ``feature_assembler``, or TAPCO scoring."},"IdentityCheckStatus":{"type":"string","enum":["PENDING","APPROVED","REJECTED","REVIEW_REQUIRED","ERROR"],"title":"IdentityCheckStatus","description":"Roost-neutral status enum.\n\nPENDING is the async-vendor case (Middesk's `pending`/`open` lifecycle,\nStripe's `requires_input`). REVIEW_REQUIRED is the indeterminate-but-not-\nrejected case (Middesk's `review` outcome) — Roost surfaces it as a\nsoft-fail to the committee queue. ERROR captures vendor outages so the\ncaller never sees an exception."},"IdentityCheckType":{"type":"string","enum":["KYB","KYC"],"title":"IdentityCheckType"},"KYBStatus":{"type":"string","enum":["PENDING","VERIFIED","FAILED"],"title":"KYBStatus"},"KYBStatusResponse":{"properties":{"kyb_status":{"$ref":"#/components/schemas/KYBStatus"},"kyb_provider_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kyb Provider Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["kyb_status","kyb_provider_id","message"],"title":"KYBStatusResponse"},"KYCInitiateResponse":{"properties":{"verification_session_id":{"type":"string","title":"Verification Session Id"},"client_secret":{"type":"string","title":"Client Secret"},"url":{"type":"string","title":"Url"}},"type":"object","required":["verification_session_id","client_secret","url"],"title":"KYCInitiateResponse"},"KYCStatus":{"type":"string","enum":["PENDING","VERIFIED","FAILED"],"title":"KYCStatus"},"KYCStatusResponse":{"properties":{"kyc_status":{"$ref":"#/components/schemas/KYCStatus"},"kyc_provider_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kyc Provider Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["kyc_status","kyc_provider_id","message"],"title":"KYCStatusResponse"},"KillSwitchPolicy":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"reason":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Reason"}},"additionalProperties":false,"type":"object","title":"KillSwitchPolicy","description":"Operator/Roost-controlled kill switch.\n\nWhen `enabled` is true, ALL enforced operations deny on the next\nenforcement cycle, regardless of any other policy. The kill switch has\nno grace period."},"LLMUsageEventIn":{"properties":{"provider":{"type":"string","title":"Provider","description":"Provider canonical name, lowercase. \"openai\", \"anthropic\", \"google\", \"azure\", \"bedrock\", etc."},"model":{"type":"string","title":"Model","description":"Model id as the provider names it."},"prompt_tokens":{"type":"integer","minimum":0.0,"title":"Prompt Tokens","default":0},"completion_tokens":{"type":"integer","minimum":0.0,"title":"Completion Tokens","default":0},"total_tokens":{"type":"integer","minimum":0.0,"title":"Total Tokens","default":0},"cost_cents":{"type":"integer","minimum":0.0,"title":"Cost Cents","description":"Provider-listed cost in integer cents. 0 when unavailable.","default":0},"latency_ms":{"type":"integer","minimum":0.0,"title":"Latency Ms","default":0},"success":{"type":"boolean","title":"Success","default":true},"error_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Class"},"task_classification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Classification","description":"Operator-supplied workload label (\"support\", \"summarization\", \"code-gen\", \"embed\"). Free-form."},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key","description":"Per-call UUID from the SDK callback. Retries with the same key no-op via the unique index."},"provider_request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Request Id","description":"Provider-side request id from response headers if available."}},"type":"object","required":["provider","model"],"title":"LLMUsageEventIn","description":"One LLM call's accounting record.\n\nShape mirrors what LiteLLM's response carries verbatim — the SDK\ncallback maps from ``response.usage`` and ``response._hidden_params``\nto this body without operator-side schema work."},"LLMUsageIngestRequest":{"properties":{"events":{"items":{"$ref":"#/components/schemas/LLMUsageEventIn"},"type":"array","minItems":1,"title":"Events"}},"type":"object","required":["events"],"title":"LLMUsageIngestRequest","description":"Batched ingest body. Callback collects events for ~10s or until a\nbatch hits the size limit, then ships the whole batch in one signed\ncall."},"LLMUsageIngestResponse":{"properties":{"inserted":{"type":"integer","title":"Inserted","description":"Events newly persisted (idempotency-deduped)."},"duplicates":{"type":"integer","title":"Duplicates","description":"Events whose (agent_id, idempotency_key) already existed."}},"type":"object","required":["inserted","duplicates"],"title":"LLMUsageIngestResponse"},"LangSmithKeySubmit":{"properties":{"api_key":{"type":"string","title":"Api Key"},"project_name":{"type":"string","title":"Project Name","default":"default"}},"type":"object","required":["api_key"],"title":"LangSmithKeySubmit"},"LatestAttestationResponse":{"properties":{"received_at":{"type":"string","format":"date-time","title":"Received At","description":"Server clock at receipt; UTC."},"attestation_id":{"type":"string","format":"uuid","title":"Attestation Id"},"status":{"type":"string","enum":["accepted","stale_policy","signature_invalid","version_unsupported"],"title":"Status"},"expected_content_version":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Expected Content Version","description":"Populated when status='stale_policy'; tells the SDK which version to refresh to."},"next_attestation_in_seconds":{"type":"integer","maximum":86400.0,"minimum":30.0,"title":"Next Attestation In Seconds","description":"Suggested cadence for the next attestation, in seconds.","default":300},"sdk_version":{"type":"string","title":"Sdk Version"},"agt_version":{"type":"string","title":"Agt Version"},"policy_content_version":{"type":"integer","title":"Policy Content Version"},"policy_schema_version":{"type":"string","title":"Policy Schema Version"},"host_runtime":{"type":"string","title":"Host Runtime"},"host_os":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Host Os"}},"additionalProperties":false,"type":"object","required":["received_at","attestation_id","status","sdk_version","agt_version","policy_content_version","policy_schema_version","host_runtime"],"title":"LatestAttestationResponse","description":"Response shape for ``GET /v1/harness/attestations/{agent_id}/latest``.\n\nExtends ``AttestationAck`` with the SDK metadata fields persisted on\nthe row. The POST response stays as ``AttestationAck`` (the SDK\nalready has those values; no need to echo them back), but dashboards\nfetching the latest stored attestation need them for display."},"LedgerEntryResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"transaction_type":{"$ref":"#/components/schemas/TransactionType"},"amount":{"type":"number","title":"Amount"},"balance_after":{"type":"number","title":"Balance After"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["id","agent_id","transaction_type","amount","balance_after","timestamp","description"],"title":"LedgerEntryResponse"},"LedgerListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LedgerEntryResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"LedgerListResponse"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"turnstile_token":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Turnstile Token"},"company_website":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Company Website"},"form_loaded_at":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Form Loaded At"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"ManualRepaymentRequest":{"properties":{"amount":{"type":"number","exclusiveMinimum":0.0,"title":"Amount"},"currency":{"type":"string","title":"Currency","default":"USD"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["amount"],"title":"ManualRepaymentRequest"},"MetricEventCreate":{"properties":{"metric_type":{"$ref":"#/components/schemas/MetricType"},"value":{"type":"number","title":"Value"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["metric_type","value"],"title":"MetricEventCreate"},"MetricEventResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"metric_type":{"$ref":"#/components/schemas/MetricType"},"value":{"type":"number","title":"Value"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"}},"type":"object","required":["id","agent_id","metric_type","value","timestamp"],"title":"MetricEventResponse"},"MetricListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MetricEventResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"MetricListResponse"},"MetricType":{"type":"string","enum":["REVENUE","COMPUTE_USAGE","API_USAGE","UPTIME","TASK_SUCCESS_RATE"],"title":"MetricType"},"ModalTokenSubmit":{"properties":{"token_id":{"type":"string","title":"Token Id"},"token_secret":{"type":"string","title":"Token Secret"},"environment":{"type":"string","title":"Environment","default":"main"}},"type":"object","required":["token_id","token_secret"],"title":"ModalTokenSubmit"},"ModelSummaryOut":{"properties":{"model":{"type":"string","title":"Model"},"provider":{"type":"string","title":"Provider"},"event_count":{"type":"integer","title":"Event Count"},"success_count":{"type":"integer","title":"Success Count"},"failure_count":{"type":"integer","title":"Failure Count"},"total_prompt_tokens":{"type":"integer","title":"Total Prompt Tokens"},"total_completion_tokens":{"type":"integer","title":"Total Completion Tokens"},"total_cost_cents":{"type":"integer","title":"Total Cost Cents"},"median_latency_ms":{"type":"integer","title":"Median Latency Ms"}},"type":"object","required":["model","provider","event_count","success_count","failure_count","total_prompt_tokens","total_completion_tokens","total_cost_cents","median_latency_ms"],"title":"ModelSummaryOut"},"ObservabilityStatusResponse":{"properties":{"helicone":{"anyOf":[{"$ref":"#/components/schemas/ConnectionStatus"},{"type":"null"}]},"openai":{"anyOf":[{"$ref":"#/components/schemas/ConnectionStatus"},{"type":"null"}]},"anthropic":{"anyOf":[{"$ref":"#/components/schemas/ConnectionStatus"},{"type":"null"}]}},"type":"object","title":"ObservabilityStatusResponse"},"ObservationRequest":{"properties":{"agent_ref":{"type":"string","maxLength":128,"minLength":1,"title":"Agent Ref"},"tool_name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tool Name"},"tool_args":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Args"},"tool_output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Output"},"recommendation":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Recommendation"}},"additionalProperties":false,"type":"object","required":["agent_ref"],"title":"ObservationRequest","description":"Wire-format request body for\n``POST /v1/decisions/{decision_id}/trajectory/steps/{step_index}/observation``.\n\nCannot alter ``committed_intent`` — that field is set exactly once, at\ncommit time, and is immutable thereafter (see\n``trajectory_service.commit_intent``)."},"OnRefreshFailureAction":{"type":"string","enum":["use_cached_until_ttl","deny_all","warn_only"],"title":"OnRefreshFailureAction"},"OnViolationAction":{"type":"string","enum":["raise","deny_silently","warn_only"],"title":"OnViolationAction"},"OperatorEnrollmentOut":{"properties":{"enrollment_id":{"type":"string","title":"Enrollment Id"},"agent_id":{"type":"string","title":"Agent Id"},"status":{"type":"string","title":"Status"},"terms_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms Version"},"terms_current":{"type":"boolean","title":"Terms Current"},"payout_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Address"},"shared_operator_data_unprompted":{"type":"integer","title":"Shared Operator Data Unprompted"},"window":{"anyOf":[{"$ref":"#/components/schemas/WindowOut"},{"type":"null"}]}},"type":"object","required":["enrollment_id","agent_id","status","terms_version","terms_current","payout_address","shared_operator_data_unprompted","window"],"title":"OperatorEnrollmentOut"},"OperatorRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Name"},"state_of_formation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Of Formation"},"kyb_status":{"$ref":"#/components/schemas/KYBStatus"},"kyc_status":{"$ref":"#/components/schemas/KYCStatus"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"email_verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Email Verified At"}},"type":"object","required":["id","email","entity_name","state_of_formation","kyb_status","kyc_status","is_active","created_at"],"title":"OperatorRead"},"OperatorSDKKeyOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"operator_id":{"type":"string","format":"uuid","title":"Operator Id"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"public_key_fingerprint":{"type":"string","title":"Public Key Fingerprint"},"public_key_pem":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Key Pem","description":"Populated only when explicitly requested (e.g. ?include_pem=true on the GET endpoint)."},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"rotated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Rotated At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"revoked_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revoked Reason"}},"type":"object","required":["id","operator_id","agent_id","public_key_fingerprint","label","is_active","created_at","rotated_at","revoked_at","revoked_reason"],"title":"OperatorSDKKeyOut","description":"Response shape for key endpoints.\n\nBy default we DO NOT echo ``public_key_pem`` to keep payloads\ncompact — operators can re-derive what's stored from\n``public_key_fingerprint`` or pull the full PEM via\n``GET /v1/harness/keys/{key_id}?include_pem=true``."},"OperatorSDKKeyRegisterRequest":{"properties":{"agent_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Agent Id","description":"Per-agent key id. For agent-direct signed calls this MUST be the Roost Agent UUID string (e.g. \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"); per-agent keys are then bound to that agent and may only act on it for UUID-addressed resources. Omit / null to register an operator-level fallback key that covers all agents the operator owns."},"public_key_pem":{"type":"string","maxLength":4096,"minLength":1,"title":"Public Key Pem","description":"Ed25519 public key in PEM ('BEGIN PUBLIC KEY') format."},"label":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Label","description":"Operator-chosen tag, e.g. \"prod-2026-05\"."}},"additionalProperties":false,"type":"object","required":["public_key_pem"],"title":"OperatorSDKKeyRegisterRequest","description":"Body for ``POST /v1/harness/keys``.\n\nThe ``operator_id`` the key belongs to is a QUERY PARAM on the\nendpoint (admin acts on behalf of an operator) — not in this body —\nso the schema stays focused on the key material itself."},"OperatorSDKKeyRevokeRequest":{"properties":{"reason":{"type":"string","maxLength":256,"minLength":4,"title":"Reason"}},"additionalProperties":false,"type":"object","required":["reason"],"title":"OperatorSDKKeyRevokeRequest","description":"Body for ``POST /v1/harness/keys/{key_id}/revoke``.\n\nA reason is mandatory: revocation is an audit-worthy event and the\noperator-facing dashboard surfaces this string so other admins can\ntell why a key was killed (compromise vs. routine rotation vs. lost\nhardware token, etc)."},"OperatorUpdate":{"properties":{"entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Name"},"ein":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ein"},"state_of_formation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Of Formation"}},"type":"object","title":"OperatorUpdate"},"OrchestrationStatusResponse":{"properties":{"temporal":{"anyOf":[{"$ref":"#/components/schemas/ConnectionStatus"},{"type":"null"}]},"langsmith":{"anyOf":[{"$ref":"#/components/schemas/ConnectionStatus"},{"type":"null"}]},"prefect":{"anyOf":[{"$ref":"#/components/schemas/ConnectionStatus"},{"type":"null"}]},"modal":{"anyOf":[{"$ref":"#/components/schemas/ConnectionStatus"},{"type":"null"}]},"replicate":{"anyOf":[{"$ref":"#/components/schemas/ConnectionStatus"},{"type":"null"}]}},"type":"object","title":"OrchestrationStatusResponse"},"OutcomeRequest":{"properties":{"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"final_amount_cents":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Final Amount Cents"},"discount_captured_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Discount Captured Cents"},"disputed":{"type":"boolean","title":"Disputed","default":false},"notes":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Notes"},"problem_confirmed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Problem Confirmed"},"business_outcome":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Business Outcome"},"financial_consequence_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Financial Consequence Cents"},"audit_finding":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Audit Finding"}},"additionalProperties":false,"type":"object","title":"OutcomeRequest","description":"Wire-format request body for\n``POST /v1/decisions/{decision_id}/outcome``.\n\nRecords what actually happened downstream of a resolved shadow\ndecision. Every field is optional except ``disputed`` (defaults\nFalse) — an empty body is a valid outcome record. At most one\noutcome per decision — a second POST for the same ``decision_id``\nis a 409 (see ``shadow_decision_service.create_outcome``)."},"OutcomeResponse":{"properties":{"decision_id":{"type":"string","format":"uuid","title":"Decision Id"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"final_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Final Amount Cents"},"discount_captured_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Discount Captured Cents"},"disputed":{"type":"boolean","title":"Disputed"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"problem_confirmed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Problem Confirmed"},"business_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Outcome"},"financial_consequence_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Financial Consequence Cents"},"audit_finding":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Audit Finding"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["decision_id","paid_at","final_amount_cents","discount_captured_cents","disputed","notes","problem_confirmed","created_at"],"title":"OutcomeResponse","description":"Wire-format response for ``POST .../outcome``."},"ParticipationRequest":{"properties":{"agent_ref":{"type":"string","maxLength":128,"minLength":1,"title":"Agent Ref"},"agent_version":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Agent Version"},"role":{"type":"string","maxLength":64,"minLength":1,"title":"Role"},"step_index":{"type":"integer","minimum":0.0,"title":"Step Index"},"recommendation":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Recommendation"},"confidence":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Confidence"},"shared_source_refs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Shared Source Refs"}},"additionalProperties":false,"type":"object","required":["agent_ref","role","step_index"],"title":"ParticipationRequest","description":"Wire-format request body for\n``POST /v1/decisions/{decision_id}/participation``.\n\nRecords one agent's participation in a shadow decision (multi-agent\nswarm capture, demo #5). Advisory/observability only — never fed into\nthe evidence hash."},"ParticipationResponse":{"properties":{"decision_id":{"type":"string","format":"uuid","title":"Decision Id"},"agent_ref":{"type":"string","title":"Agent Ref"},"agent_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Version"},"role":{"type":"string","title":"Role"},"step_index":{"type":"integer","title":"Step Index"},"recommendation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommendation"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"shared_source_refs":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Shared Source Refs"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["decision_id","agent_ref","agent_version","role","step_index","recommendation","confidence","shared_source_refs","created_at"],"title":"ParticipationResponse"},"PasswordChangeRequest":{"properties":{"current_password":{"type":"string","title":"Current Password"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"PasswordChangeRequest","description":"Body for ``POST /account/password``.\n\nThe min-length-8 rule mirrors ``schemas/user.UserCreate.password_min_length``\nso the schema layer behaves consistently with registration. The\n\"new must differ from current\" check runs at the model level once both\nfields are bound."},"PayoutIn":{"properties":{"statement_id":{"type":"string","format":"uuid","title":"Statement Id"},"tx_hash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$","title":"Tx Hash"}},"additionalProperties":false,"type":"object","required":["statement_id","tx_hash"],"title":"PayoutIn"},"PayoutOut":{"properties":{"payout_id":{"type":"string","title":"Payout Id"},"statement_id":{"type":"string","title":"Statement Id"},"tx_hash":{"type":"string","title":"Tx Hash"},"to_address":{"type":"string","title":"To Address"},"amount_units":{"type":"integer","title":"Amount Units"},"verified_at":{"type":"string","format":"date-time","title":"Verified At"}},"type":"object","required":["payout_id","statement_id","tx_hash","to_address","amount_units","verified_at"],"title":"PayoutOut"},"PerAgentSpendCapsPolicy":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"per_call_max_cents":{"type":"integer","minimum":0.0,"title":"Per Call Max Cents","default":0},"per_window_max_cents":{"type":"integer","minimum":0.0,"title":"Per Window Max Cents","default":0},"window_seconds":{"type":"integer","maximum":2592000.0,"minimum":1.0,"title":"Window Seconds","default":86400}},"additionalProperties":false,"type":"object","title":"PerAgentSpendCapsPolicy","description":"Spend caps for `agent.pay(...)` calls.\n\nAll monetary values are integer cents to match existing Roost convention\n(see `backend/app/schemas/credit.py`)."},"PerToolRateLimitsPolicy":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"limits":{"items":{"$ref":"#/components/schemas/ToolRateLimit"},"type":"array","title":"Limits"}},"additionalProperties":false,"type":"object","title":"PerToolRateLimitsPolicy","description":"Per-tool call-rate limits."},"PerToolReasoningRequiredPolicy":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"tools":{"items":{"$ref":"#/components/schemas/ToolReasoningRequirement"},"type":"array","title":"Tools"}},"additionalProperties":false,"type":"object","title":"PerToolReasoningRequiredPolicy","description":"Tools that require a minimum length of structured reasoning text."},"PerformanceResponse":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"period_days":{"type":"integer","title":"Period Days"},"avg_monthly_revenue":{"type":"number","title":"Avg Monthly Revenue"},"revenue_total":{"type":"number","title":"Revenue Total"},"revenue_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revenue Min"},"revenue_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revenue Max"},"avg_uptime":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Uptime"},"avg_compute_usage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Compute Usage"},"avg_api_usage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Api Usage"},"avg_task_success_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Task Success Rate"},"profit_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Margin"},"burn_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Burn Rate"},"data_points":{"type":"integer","title":"Data Points"},"has_sufficient_data":{"type":"boolean","title":"Has Sufficient Data"}},"type":"object","required":["agent_id","period_days","avg_monthly_revenue","revenue_total","revenue_min","revenue_max","avg_uptime","avg_compute_usage","avg_api_usage","avg_task_success_rate","profit_margin","burn_rate","data_points","has_sufficient_data"],"title":"PerformanceResponse"},"PlaidBalanceAccount":{"properties":{"account_name":{"type":"string","title":"Account Name"},"account_type":{"type":"string","title":"Account Type"},"current_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Balance"},"available_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Available Balance"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"}},"type":"object","required":["account_name","account_type","current_balance","available_balance","currency"],"title":"PlaidBalanceAccount"},"PlaidExchangeRequest":{"properties":{"public_token":{"type":"string","title":"Public Token"}},"type":"object","required":["public_token"],"title":"PlaidExchangeRequest"},"PlaidLinkTokenResponse":{"properties":{"link_token":{"type":"string","title":"Link Token"}},"type":"object","required":["link_token"],"title":"PlaidLinkTokenResponse"},"PlaidStatusResponse":{"properties":{"connected":{"type":"boolean","title":"Connected"},"item_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Id"},"accounts":{"items":{"$ref":"#/components/schemas/PlaidBalanceAccount"},"type":"array","title":"Accounts","default":[]}},"type":"object","required":["connected"],"title":"PlaidStatusResponse"},"PlanIn":{"properties":{"expected_source":{"type":"string","enum":["agent_revenue","operator_topup","other"],"title":"Expected Source"},"expected_payers":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Expected Payers"},"job_ref":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Job Ref"},"expected_date":{"type":"string","format":"date","title":"Expected Date"}},"type":"object","required":["expected_source","expected_date"],"title":"PlanIn"},"PlatformSummary":{"properties":{"operator_email":{"type":"string","title":"Operator Email"},"decisions_total":{"type":"integer","title":"Decisions Total"},"decided_amount_cents":{"type":"integer","title":"Decided Amount Cents"},"resolved_total":{"type":"integer","title":"Resolved Total"},"agreement_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Agreement Rate"},"finance_verdicts":{"type":"integer","title":"Finance Verdicts"},"synthetic":{"type":"boolean","title":"Synthetic"}},"additionalProperties":false,"type":"object","required":["operator_email","decisions_total","decided_amount_cents","resolved_total","agreement_rate","finance_verdicts","synthetic"],"title":"PlatformSummary","description":"One row per operator (\"platform\") appearing in the portfolio.\n\n``agreement_rate`` is ``None`` when the operator has zero resolved\ndecisions (mirrors the Scoreboard pinned contract's null-when-empty\nrule). ``synthetic`` is True iff ANY of the operator's decisions is\nsynthetic (demo-seeded) — per pinned contract, not \"all\"."},"Policies":{"properties":{"allowed_models":{"$ref":"#/components/schemas/AllowedModelsPolicy"},"token_budget":{"$ref":"#/components/schemas/TokenBudgetPolicy"},"business_hours_window":{"$ref":"#/components/schemas/BusinessHoursWindowPolicy"},"vendor_allowlist":{"$ref":"#/components/schemas/VendorAllowlistPolicy"},"per_tool_rate_limits":{"$ref":"#/components/schemas/PerToolRateLimitsPolicy"},"per_tool_reasoning_required":{"$ref":"#/components/schemas/PerToolReasoningRequiredPolicy"},"per_agent_spend_caps":{"$ref":"#/components/schemas/PerAgentSpendCapsPolicy"},"kill_switch":{"$ref":"#/components/schemas/KillSwitchPolicy"}},"additionalProperties":false,"type":"object","title":"Policies","description":"All policy categories. Every category has its own `enabled` flag;\na category with `enabled: false` is inert regardless of inner values."},"PolicyRefreshResponse":{"properties":{"status":{"$ref":"#/components/schemas/PolicyRefreshStatus"},"policy":{"anyOf":[{"$ref":"#/components/schemas/HarnessPolicy"},{"type":"null"}]},"next_refresh_hint_seconds":{"anyOf":[{"type":"integer","maximum":86400.0,"minimum":60.0},{"type":"null"}],"title":"Next Refresh Hint Seconds"},"message":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Message"}},"additionalProperties":false,"type":"object","required":["status"],"title":"PolicyRefreshResponse","description":"HTTP-friendly wrapper for the policy-refresh endpoint.\n\n`status` lets the SDK distinguish a cheap \"you're already current\"\nresponse from a full bundle, from a soft-failure that requires SDK\nreaction (e.g. the operator's tier was downgraded out from under the\nrunning SDK).\n\n`policy` is present when `status == ok`, omitted otherwise.\n\n`next_refresh_hint_seconds` lets the backend dynamically suggest a\nrefresh cadence different from what is encoded in the bundle itself\n(useful for rolling back-off during incidents)."},"PolicyRefreshStatus":{"type":"string","enum":["ok","not_modified","tier_downgrade_required","agent_unknown"],"title":"PolicyRefreshStatus"},"PortfolioResponse":{"properties":{"platforms":{"items":{"$ref":"#/components/schemas/PlatformSummary"},"type":"array","title":"Platforms"},"vendors":{"items":{"$ref":"#/components/schemas/VendorSummary"},"type":"array","title":"Vendors"}},"additionalProperties":false,"type":"object","required":["platforms","vendors"],"title":"PortfolioResponse","description":"Wire-format response for ``GET /admin/portfolio`` (pinned contract:\n\"Portfolio\")."},"PrefectKeySubmit":{"properties":{"api_key":{"type":"string","title":"Api Key"},"account_id":{"type":"string","title":"Account Id"},"workspace_id":{"type":"string","title":"Workspace Id"}},"type":"object","required":["api_key","account_id","workspace_id"],"title":"PrefectKeySubmit"},"ReconResult":{"properties":{"battery_version":{"type":"string","title":"Battery Version"},"model":{"type":"string","title":"Model"},"is_same_document":{"type":"number","title":"Is Same Document"},"discrepancy_kind":{"type":"string","title":"Discrepancy Kind"},"discrepancy_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discrepancy Confidence"},"usage":{"additionalProperties":{"type":"integer"},"type":"object","title":"Usage"}},"additionalProperties":false,"type":"object","required":["battery_version","model","is_same_document","discrepancy_kind","usage"],"title":"ReconResult"},"ReconcileRequest":{"properties":{"doc_a":{"additionalProperties":true,"type":"object","title":"Doc A"},"doc_b":{"additionalProperties":true,"type":"object","title":"Doc B"}},"additionalProperties":false,"type":"object","required":["doc_a","doc_b"],"title":"ReconcileRequest"},"RedactionPolicyListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RedactionPolicySummary"},"type":"array","title":"Items"}},"additionalProperties":false,"type":"object","required":["items"],"title":"RedactionPolicyListResponse"},"RedactionPolicySummary":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"version":{"type":"integer","title":"Version"},"created_at":{"type":"string","title":"Created At"},"revoked_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revoked At"}},"additionalProperties":false,"type":"object","required":["id","name","version","created_at","revoked_at"],"title":"RedactionPolicySummary"},"RedactionPolicyUpsertRequest":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name"},"ruleset_json":{"additionalProperties":true,"type":"object","title":"Ruleset Json"}},"additionalProperties":false,"type":"object","required":["name"],"title":"RedactionPolicyUpsertRequest"},"ReferralRequest":{"properties":{"recipient_name":{"type":"string","title":"Recipient Name"},"relationship":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relationship"},"channel":{"type":"string","enum":["sms","whatsapp","email","social"],"title":"Channel"},"contact":{"type":"string","title":"Contact"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"message":{"type":"string","title":"Message"},"turnstile_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turnstile Token"},"company_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Website"},"form_loaded_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Form Loaded At"}},"type":"object","required":["recipient_name","channel","contact","message"],"title":"ReferralRequest"},"ReferralResponse":{"properties":{"status":{"type":"string","title":"Status"},"queued_at":{"type":"string","title":"Queued At"},"channel":{"type":"string","title":"Channel"},"delivered":{"type":"boolean","title":"Delivered","default":false}},"type":"object","required":["status","queued_at","channel"],"title":"ReferralResponse"},"RefreshRequest":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"RefreshRequest"},"RejectIn":{"properties":{"rejection_reasons":{"items":{"type":"string"},"type":"array","title":"Rejection Reasons"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"RejectIn"},"RepayIn":{"properties":{"idempotency_key":{"type":"string","maxLength":128,"minLength":8,"title":"Idempotency Key"},"draw_id":{"type":"string","format":"uuid","title":"Draw Id"},"amount_cents":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount Cents"},"claimed_source":{"type":"string","enum":["agent_revenue","operator_topup","other"],"title":"Claimed Source"}},"type":"object","required":["idempotency_key","draw_id","amount_cents","claimed_source"],"title":"RepayIn"},"RepayRequest":{"properties":{"amount":{"type":"number","title":"Amount"}},"type":"object","required":["amount"],"title":"RepayRequest"},"ReplicateTokenSubmit":{"properties":{"api_token":{"type":"string","title":"Api Token"}},"type":"object","required":["api_token"],"title":"ReplicateTokenSubmit"},"ResolutionRequest":{"properties":{"action":{"type":"string","enum":["approved","rejected","modified"],"title":"Action"},"actor":{"type":"string","maxLength":128,"minLength":1,"title":"Actor"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"reviewer_role":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Reviewer Role"},"override_reason_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Override Reason Code"},"override_reason_note":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Override Reason Note"},"escalation_path":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":32},{"type":"null"}],"title":"Escalation Path"}},"additionalProperties":false,"type":"object","required":["action","actor","occurred_at"],"title":"ResolutionRequest","description":"Wire-format request body for\n``POST /v1/decisions/{decision_id}/resolution``.\n\nRecords what the operator actually did with a shadow decision's\nadvisory verdict. At most one resolution per decision — a second\nPOST for the same ``decision_id`` is a 409 (see\n``shadow_decision_service.create_resolution``).\n\nHuman-interaction capture fields (Task 1): reviewer_role, override_reason_code,\noverride_reason_note, escalation_path are all optional and additive."},"ResolutionResponse":{"properties":{"decision_id":{"type":"string","format":"uuid","title":"Decision Id"},"action":{"type":"string","enum":["approved","rejected","modified"],"title":"Action"},"actor":{"type":"string","title":"Actor"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"reviewer_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Role"},"override_reason_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Override Reason Code"},"override_reason_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Override Reason Note"},"escalation_path":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Escalation Path"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["decision_id","action","actor","occurred_at","created_at"],"title":"ResolutionResponse","description":"Wire-format response for ``POST .../resolution``."},"RevenueEventCreate":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"source_type":{"type":"string","title":"Source Type","description":"STRIPE_CONNECT, PLAID, or MANUAL","default":"MANUAL"},"source_name":{"type":"string","title":"Source Name","default":"manual"},"gross_amount":{"type":"number","exclusiveMinimum":0.0,"title":"Gross Amount","description":"Revenue amount in USD"},"currency":{"type":"string","title":"Currency","default":"USD"},"occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Occurred At"},"external_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference Id"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["agent_id","gross_amount"],"title":"RevenueEventCreate"},"RevenueRequest":{"properties":{"amount":{"type":"number","title":"Amount"}},"type":"object","required":["amount"],"title":"RevenueRequest"},"RiskEvaluateResponse":{"properties":{"profile":{"$ref":"#/components/schemas/RiskProfileResponse"},"message":{"type":"string","title":"Message"}},"type":"object","required":["profile","message"],"title":"RiskEvaluateResponse"},"RiskProfileResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"risk_score":{"type":"number","title":"Risk Score"},"revenue_stability":{"type":"number","title":"Revenue Stability"},"profit_margin_score":{"type":"number","title":"Profit Margin Score"},"uptime_score":{"type":"number","title":"Uptime Score"},"burn_rate_inv":{"type":"number","title":"Burn Rate Inv"},"recommended_credit_limit":{"type":"number","title":"Recommended Credit Limit"},"is_eligible":{"type":"boolean","title":"Is Eligible"},"evaluated_at":{"type":"string","format":"date-time","title":"Evaluated At"},"ineligibility_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ineligibility Reason"}},"type":"object","required":["id","agent_id","risk_score","revenue_stability","profit_margin_score","uptime_score","burn_rate_inv","recommended_credit_limit","is_eligible","evaluated_at"],"title":"RiskProfileResponse"},"RoostPayDecision":{"properties":{"decision_id":{"type":"string","format":"uuid","title":"Decision Id"},"decision":{"type":"string","enum":["approved","denied","needs_review"],"title":"Decision"},"spt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spt"},"spt_expiry":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Spt Expiry"},"scope":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Scope"},"card_last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Last4"},"card_exp_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Card Exp Month"},"card_exp_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Card Exp Year"},"card_ephemeral_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Ephemeral Key"},"reason_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason Code"},"plain_language_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plain Language Reason"},"recommended_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommended Action"},"adverse_action_notice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Adverse Action Notice Id"},"requires_review_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requires Review Reason"}},"additionalProperties":false,"type":"object","required":["decision_id","decision"],"title":"RoostPayDecision","description":"Wire-format response from ``POST /roost/pay``.\n\nThe response is always 200 — the decision lives in ``decision``. A\ndenial is a successful decision, not a server error. Fields that are\nonly meaningful on certain outcomes are nullable so the wire shape\nstays stable across all three branches.\n\nField names track SVE_SPEC_v0.7 §5.3.4 verbatim so the Python SDK\ncan be authored against the spec names directly."},"RoostPayDecisionList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RoostPayDecision"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"additionalProperties":false,"type":"object","required":["items","total"],"title":"RoostPayDecisionList","description":"List response for ``GET /roost/pay/decisions``."},"RoostPayRequest":{"properties":{"agent_id":{"type":"string","maxLength":128,"minLength":1,"title":"Agent Id"},"amount_cents":{"type":"integer","maximum":100000000.0,"exclusiveMinimum":0.0,"title":"Amount Cents"},"currency":{"type":"string","const":"USD","title":"Currency","default":"USD"},"vendor":{"type":"string","maxLength":256,"minLength":1,"title":"Vendor"},"vendor_category":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Vendor Category"},"reasoning":{"type":"string","maxLength":2000,"minLength":16,"title":"Reasoning"},"idempotency_key":{"type":"string","maxLength":128,"minLength":8,"title":"Idempotency Key"},"policy_content_version":{"type":"integer","minimum":0.0,"title":"Policy Content Version"},"expected_completion_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Completion At"},"expected_revenue_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Expected Revenue Cents"},"attribution_window_days":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":0.0},{"type":"null"}],"title":"Attribution Window Days"}},"additionalProperties":false,"type":"object","required":["agent_id","amount_cents","vendor","reasoning","idempotency_key","policy_content_version"],"title":"RoostPayRequest","description":"Wire-format request body for ``POST /roost/pay``.\n\nField-level limits enforce the obvious shape gates so the service layer\ncan focus on business decisioning. ``reasoning`` has a minimum length\nbecause the harness contract requires the agent to justify each spend\n— see HARNESS_SPEC_v0.2 §4 (\"reasoning provided?\" gate)."},"RotateKeyRequest":{"properties":{"agent_id":{"type":"string","maxLength":128,"minLength":1,"title":"Agent Id"}},"additionalProperties":false,"type":"object","required":["agent_id"],"title":"RotateKeyRequest"},"RotateKeyResponse":{"properties":{"proxy_api_key":{"type":"string","title":"Proxy Api Key"},"expires_at":{"type":"string","title":"Expires At"}},"additionalProperties":false,"type":"object","required":["proxy_api_key","expires_at"],"title":"RotateKeyResponse"},"ScoreboardResponse":{"properties":{"metric":{"type":"string","const":"agreement_rate","title":"Metric"},"definition":{"type":"string","title":"Definition"},"threshold":{"type":"number","title":"Threshold"},"min_resolved":{"type":"integer","title":"Min Resolved"},"agreement_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Agreement Rate"},"resolved_total":{"type":"integer","title":"Resolved Total"},"agreeing_total":{"type":"integer","title":"Agreeing Total"},"cleared":{"type":"boolean","title":"Cleared"}},"additionalProperties":false,"type":"object","required":["metric","definition","threshold","min_resolved","agreement_rate","resolved_total","agreeing_total","cleared"],"title":"ScoreboardResponse","description":"Wire-format response for ``GET /v1/scoreboard`` (pinned contract:\n\"Scoreboard\"). Computed over ALL of the calling operator's resolved\ndecisions (optionally narrowed to one ``source_system``) — see\n``shadow_decision_service.compute_scoreboard`` for the exact\naggregation and the M-C pinned \"Agreement\" definition it implements."},"Section1071ProfileResponse":{"properties":{"operator_id":{"type":"string","title":"Operator Id"},"refused_to_provide":{"type":"boolean","title":"Refused To Provide"},"gross_revenue_band":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gross Revenue Band"},"number_of_workers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Of Workers"},"time_in_business":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time In Business"},"naics_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Naics Code"},"number_of_principal_owners":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Of Principal Owners"},"business_ownership_status":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Business Ownership Status"},"owner_1_ethnicity":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Owner 1 Ethnicity"},"owner_1_race":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Owner 1 Race"},"owner_1_sex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner 1 Sex"},"owner_1_sex_self_described":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner 1 Sex Self Described"},"submitted_at":{"type":"string","title":"Submitted At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["operator_id","refused_to_provide","gross_revenue_band","number_of_workers","time_in_business","naics_code","number_of_principal_owners","business_ownership_status","owner_1_ethnicity","owner_1_race","owner_1_sex","owner_1_sex_self_described","submitted_at","updated_at"],"title":"Section1071ProfileResponse"},"Section1071Submission":{"properties":{"refused_to_provide":{"type":"boolean","title":"Refused To Provide","default":false},"gross_revenue_band":{"anyOf":[{"type":"string","enum":["UNDER_50K","K_50_TO_250","K_250_TO_500","K_500_TO_1M","M_1_TO_5","OVER_5M","PREFER_NOT"]},{"type":"null"}],"title":"Gross Revenue Band"},"number_of_workers":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Number Of Workers"},"time_in_business":{"anyOf":[{"type":"string","enum":["UNDER_2_YEARS","Y_2_TO_5","Y_5_TO_10","OVER_10_YEARS","PREFER_NOT"]},{"type":"null"}],"title":"Time In Business"},"naics_code":{"anyOf":[{"type":"string","pattern":"^\\d{4,6}$"},{"type":"null"}],"title":"Naics Code"},"number_of_principal_owners":{"anyOf":[{"type":"integer","maximum":4.0,"minimum":1.0},{"type":"null"}],"title":"Number Of Principal Owners"},"business_ownership_status":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Business Ownership Status"},"owner_1_ethnicity":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Owner 1 Ethnicity"},"owner_1_race":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Owner 1 Race"},"owner_1_sex":{"anyOf":[{"type":"string","enum":["MALE","FEMALE","NON_BINARY","SELF_DESCRIBED","PREFER_NOT"]},{"type":"null"}],"title":"Owner 1 Sex"},"owner_1_sex_self_described":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Owner 1 Sex Self Described"}},"additionalProperties":false,"type":"object","title":"Section1071Submission"},"SetRoleIn":{"properties":{"role":{"$ref":"#/components/schemas/UserRole"}},"type":"object","required":["role"],"title":"SetRoleIn"},"SettleOut":{"properties":{"settled":{"type":"integer","title":"Settled"},"payable":{"type":"integer","title":"Payable"},"voided":{"type":"integer","title":"Voided"},"budget_cents":{"type":"integer","title":"Budget Cents"},"committed_cents":{"type":"integer","title":"Committed Cents"},"held_for_budget":{"items":{"$ref":"#/components/schemas/HeldWindow"},"type":"array","title":"Held For Budget"}},"type":"object","required":["settled","payable","voided","budget_cents","committed_cents","held_for_budget"],"title":"SettleOut"},"ShadowDecisionDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"source_system":{"type":"string","title":"Source System"},"external_ref":{"type":"string","title":"External Ref"},"decision_type":{"type":"string","enum":["invoice","purchase_order","transfer"],"title":"Decision Type"},"agent_ref":{"type":"string","title":"Agent Ref"},"vendor_name":{"type":"string","title":"Vendor Name"},"vendor_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Country"},"amount_cents":{"type":"integer","title":"Amount Cents"},"currency":{"type":"string","title":"Currency"},"proposed_at":{"type":"string","format":"date-time","title":"Proposed At"},"terms_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Terms Days"},"early_pay_discount_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Early Pay Discount Bps"},"discount_deadline":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Discount Deadline"},"verdict":{"type":"string","enum":["pay","wait","finance"],"title":"Verdict"},"confidence":{"type":"number","title":"Confidence"},"expected_cash_impact_cents":{"type":"integer","title":"Expected Cash Impact Cents"},"reasoning":{"type":"string","title":"Reasoning"},"reason_codes":{"items":{"type":"string"},"type":"array","title":"Reason Codes"},"decided_in_ms":{"type":"integer","title":"Decided In Ms"},"idempotency_key":{"type":"string","title":"Idempotency Key"},"synthetic":{"type":"boolean","title":"Synthetic"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"agreed_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agreed Amount Cents"},"resolution":{"anyOf":[{"$ref":"#/components/schemas/EvidenceResolution"},{"type":"null"}]},"outcome":{"anyOf":[{"$ref":"#/components/schemas/EvidenceOutcome"},{"type":"null"}]},"graduation_offer":{"anyOf":[{"$ref":"#/components/schemas/GraduationOffer"},{"type":"null"}]},"jev_overlay":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Jev Overlay"},"evidence_provenance":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Evidence Provenance"},"evidence_behavior":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Evidence Behavior"},"agent_identity":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Agent Identity"},"participations":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Participations"}},"additionalProperties":false,"type":"object","required":["id","source_system","external_ref","decision_type","agent_ref","vendor_name","vendor_country","amount_cents","currency","proposed_at","terms_days","early_pay_discount_bps","discount_deadline","verdict","confidence","expected_cash_impact_cents","reasoning","reason_codes","decided_in_ms","idempotency_key","synthetic","created_at","resolution","outcome","graduation_offer"],"title":"ShadowDecisionDetailResponse","description":"Wire-format response for ``GET /v1/decisions/{decision_id}`` (pinned\ncontract: \"Single decision\") — the full ``EvidenceDecision`` field set,\nflattened at the top level, plus nested ``resolution``/``outcome``\n(``null`` when absent).\n\nMilestone D, Task 1 extended this ADDITIVELY with ``graduation_offer``\n(pinned \"Graduation offer\" contract) — ``null`` unless the decision's\nverdict is ``finance`` AND the operator's (unfiltered, operator-wide)\nscoreboard is cleared. This field is NOT part of the M-C evidence-hash\nrecipe (that lives on ``EvidencePackResponse`` below, not here) so its\naddition has no bearing on hash stability."},"ShadowDecisionRequest":{"properties":{"source_system":{"type":"string","maxLength":64,"minLength":1,"title":"Source System"},"external_ref":{"type":"string","maxLength":128,"minLength":1,"title":"External Ref"},"decision_type":{"type":"string","enum":["invoice","purchase_order","transfer"],"title":"Decision Type"},"agent_ref":{"type":"string","maxLength":128,"minLength":1,"title":"Agent Ref"},"vendor_name":{"type":"string","maxLength":256,"minLength":1,"title":"Vendor Name"},"vendor_country":{"anyOf":[{"type":"string","maxLength":2,"minLength":2,"pattern":"^[A-Za-z]{2}$"},{"type":"null"}],"title":"Vendor Country"},"amount_cents":{"type":"integer","maximum":100000000.0,"exclusiveMinimum":0.0,"title":"Amount Cents"},"currency":{"type":"string","const":"USD","title":"Currency","default":"USD"},"proposed_at":{"type":"string","format":"date-time","title":"Proposed At"},"terms_days":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":0.0},{"type":"null"}],"title":"Terms Days"},"early_pay_discount_bps":{"anyOf":[{"type":"integer","maximum":1000.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Early Pay Discount Bps"},"discount_deadline":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Discount Deadline"},"agreed_amount_cents":{"anyOf":[{"type":"integer","maximum":100000000.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Agreed Amount Cents"},"idempotency_key":{"type":"string","maxLength":128,"minLength":8,"title":"Idempotency Key"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"},"evidence_provenance":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Evidence Provenance"},"agent_model":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Agent Model"},"agent_version":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Agent Version"},"policy_version":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Policy Version"},"tool_scope":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Scope"},"evidence":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvidenceEntry"},"type":"array","maxItems":20},{"type":"null"}],"title":"Evidence"},"agent_reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Agent Reason"}},"additionalProperties":false,"type":"object","required":["source_system","external_ref","decision_type","agent_ref","vendor_name","amount_cents","proposed_at","idempotency_key"],"title":"ShadowDecisionRequest","description":"Wire-format request body for ``POST /v1/decisions``.\n\nAdvisory-only intent envelope: an operator's source system (ERP,\nprocurement tool, treasury platform) proposes a payment and Roost\nscores it with the deterministic heuristic engine — no credit\naccount, ledger, or card is ever touched (see the milestone plan's\n\"Advisory only\" global constraint)."},"ShadowDecisionResponse":{"properties":{"decision_id":{"type":"string","format":"uuid","title":"Decision Id"},"id":{"type":"string","format":"uuid","title":"Id"},"source_system":{"type":"string","title":"Source System"},"external_ref":{"type":"string","title":"External Ref"},"decision_type":{"type":"string","enum":["invoice","purchase_order","transfer"],"title":"Decision Type"},"agent_ref":{"type":"string","title":"Agent Ref"},"vendor_name":{"type":"string","title":"Vendor Name"},"vendor_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Country"},"amount_cents":{"type":"integer","title":"Amount Cents"},"currency":{"type":"string","title":"Currency"},"proposed_at":{"type":"string","format":"date-time","title":"Proposed At"},"terms_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Terms Days"},"early_pay_discount_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Early Pay Discount Bps"},"discount_deadline":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Discount Deadline"},"agreed_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agreed Amount Cents"},"verdict":{"type":"string","enum":["pay","wait","finance"],"title":"Verdict"},"confidence":{"type":"number","title":"Confidence"},"expected_cash_impact_cents":{"type":"integer","title":"Expected Cash Impact Cents"},"reasoning":{"type":"string","title":"Reasoning"},"reason_codes":{"items":{"type":"string"},"type":"array","title":"Reason Codes"},"decided_in_ms":{"type":"integer","title":"Decided In Ms"},"idempotency_key":{"type":"string","title":"Idempotency Key"},"synthetic":{"type":"boolean","title":"Synthetic"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"resolution":{"anyOf":[{"$ref":"#/components/schemas/EvidenceResolution"},{"type":"null"}]},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"},"data_class":{"type":"string","title":"Data Class"},"jev_overlay":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Jev Overlay"},"evidence_provenance":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Evidence Provenance"},"agent_identity":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Agent Identity"},"program":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Program"}},"additionalProperties":false,"type":"object","required":["decision_id","id","source_system","external_ref","decision_type","agent_ref","vendor_name","vendor_country","amount_cents","currency","proposed_at","terms_days","early_pay_discount_bps","discount_deadline","agreed_amount_cents","verdict","confidence","expected_cash_impact_cents","reasoning","reason_codes","decided_in_ms","idempotency_key","synthetic","created_at","data_class"],"title":"ShadowDecisionResponse","description":"Wire-format response for both ``POST`` and ``GET /v1/decisions``.\n\n``from_attributes=True`` is set for parity with the ``roost_pay``\nexemplar, but the field-name mismatch between the wire's\n``decision_id`` and the ORM's ``id`` (plus the uppercase-enum vs.\nlowercase-Literal ``verdict``/``decision_type`` mismatch) means\ncallers still build this explicitly from a ``ShadowDecision`` row\nrather than relying on automatic attribute validation — see\n``shadow_decision_service.to_response``.\n\nMilestone C, Task 3 (controller pass, docs/superpowers/plans/\n2026-07-31-lifecycle-demo-milestone-c.md) extended this ADDITIVELY:\nthe frontend live-feed page (``frontend/lib/feed.ts``,\n``frontend/app/dashboard/feed/page.tsx``) was coded against the same\nrich row shape as the evidence pack's ``EvidenceDecision`` (see\nbelow), keyed by ``id`` rather than ``decision_id``. Every field\nbelow beyond the original seven (``verdict`` .. ``synthetic``) is a\nnew addition; ``decision_id`` is kept unchanged for back-compat with\nany existing caller keyed on it. ``id`` carries the exact same UUID\nas ``decision_id`` — two names for one value, not two decisions.\n\nDemo-hardening (docs/superpowers/plans/2026-08-20-demo-hardening.md,\nTask 1) additively attaches ``resolution`` — the same\n``EvidenceResolution`` nested shape the detail/evidence endpoints\nalready return, reused here rather than duplicated. ``null`` when\nthe decision hasn't been resolved yet. ``POST /v1/decisions`` always\nreturns ``resolution: null`` (a just-created decision can't already\nhave one); ``GET /v1/decisions`` populates it per row from a single\nbatched query — see ``shadow_decision_service.get_resolutions_by_decision_ids``.\n\nCorpus-gates milestone (docs/superpowers/plans/2026-09-05-corpus-gates.md,\nTask 1, pinned contract C1) additively attaches ``data_class`` — the\nprovenance boundary (\"demo\" | \"sandbox\" | \"production\"). Excluded from\n``compute_evidence_hash`` the same way ``context`` is — see\n``shadow_decision_service._decision_payload``.\n\nJev-Sense Advisory Overlay milestone (Task 5) additively attaches\n``jev_overlay`` — the advisory battery-sensor overlay. Also excluded\nfrom ``compute_evidence_hash`` for the same reason as ``context``/\n``data_class``."},"SignIn":{"properties":{"intent_statement":{"type":"string","maxLength":2048,"minLength":10,"title":"Intent Statement"},"typed_signature":{"type":"string","maxLength":256,"minLength":1,"title":"Typed Signature"}},"type":"object","required":["intent_statement","typed_signature"],"title":"SignIn","description":"Body for the sign endpoint — `intent_statement` is the verbatim copy\nthe operator accepted on the client; `typed_signature` is what they typed\nto confirm. The service compares typed_signature against the operator's\nlegal name on file (case/whitespace-insensitive)."},"SignatureProofIn":{"properties":{"address":{"type":"string","maxLength":42,"minLength":42,"title":"Address"},"signature":{"type":"string","maxLength":4000,"minLength":2,"title":"Signature"},"signer":{"type":"string","enum":["agent","owner"],"title":"Signer","default":"agent"}},"additionalProperties":false,"type":"object","required":["address","signature"],"title":"SignatureProofIn"},"SignedRecord":{"properties":{"record":{"additionalProperties":true,"type":"object","title":"Record"},"record_hash":{"type":"string","title":"Record Hash"},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature"},"key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Id"}},"additionalProperties":false,"type":"object","required":["record","record_hash","signature","key_id"],"title":"SignedRecord"},"SpendRequest":{"properties":{"amount":{"type":"number","title":"Amount"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["amount"],"title":"SpendRequest"},"SpendRequestCreate":{"properties":{"credit_account_id":{"type":"string","format":"uuid","title":"Credit Account Id"},"vendor_name":{"type":"string","title":"Vendor Name","description":"Must match an approved vendor key (e.g. 'openai', 'aws')"},"invoice_amount_usd":{"type":"number","exclusiveMinimum":0.0,"title":"Invoice Amount Usd","description":"Invoice amount in USD"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"external_invoice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Invoice Id","description":"Your invoice ID for idempotency"}},"type":"object","required":["credit_account_id","vendor_name","invoice_amount_usd"],"title":"SpendRequestCreate"},"StatementOut":{"properties":{"statement_id":{"type":"string","title":"Statement Id"},"window_id":{"type":"string","title":"Window Id"},"status":{"type":"string","title":"Status"},"total_cents":{"type":"integer","title":"Total Cents"},"issued_at":{"type":"string","title":"Issued At"},"dispute_until":{"type":"string","title":"Dispute Until"},"record":{"additionalProperties":true,"type":"object","title":"Record"},"record_hash":{"type":"string","title":"Record Hash"},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature"},"key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Id"}},"type":"object","required":["statement_id","window_id","status","total_cents","issued_at","dispute_until","record","record_hash","signature","key_id"],"title":"StatementOut"},"StripeConnectOAuthURL":{"properties":{"oauth_url":{"type":"string","title":"Oauth Url"}},"type":"object","required":["oauth_url"],"title":"StripeConnectOAuthURL"},"StripeConnectStatus":{"properties":{"connected":{"type":"boolean","title":"Connected"},"stripe_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe User Id"},"charges_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Charges Enabled"},"payouts_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payouts Enabled"},"default_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Currency"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},"type":"object","required":["connected"],"title":"StripeConnectStatus"},"SwarmSignalsResponse":{"properties":{"decision_id":{"type":"string","title":"Decision Id"},"participant_count":{"type":"integer","title":"Participant Count"},"handoff_depth":{"type":"integer","title":"Handoff Depth"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles"},"recommendations":{"items":{"type":"string"},"type":"array","title":"Recommendations"},"conflict":{"type":"boolean","title":"Conflict"},"shared_evidence_overlap":{"type":"boolean","title":"Shared Evidence Overlap"},"swarm_risk":{"type":"string","title":"Swarm Risk"}},"additionalProperties":false,"type":"object","required":["decision_id","participant_count","handoff_depth","roles","recommendations","conflict","shared_evidence_overlap","swarm_risk"],"title":"SwarmSignalsResponse"},"SweepRequest":{"properties":{"revenue_event_id":{"type":"string","format":"uuid","title":"Revenue Event Id"},"override_sweep_rate":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Override Sweep Rate"}},"type":"object","required":["revenue_event_id"],"title":"SweepRequest"},"TAPCOScoreRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"snapshot_id":{"type":"string","format":"uuid","title":"Snapshot Id"},"tapco_score":{"type":"integer","title":"Tapco Score"},"task_reliability":{"type":"number","title":"Task Reliability"},"api_capacity":{"type":"number","title":"Api Capacity"},"principal_investment":{"type":"number","title":"Principal Investment"},"controls":{"type":"number","title":"Controls"},"operational_context":{"type":"number","title":"Operational Context"},"tier":{"$ref":"#/components/schemas/TAPCOTier"},"credit_limit_usd":{"type":"number","title":"Credit Limit Usd"},"shap_values":{"additionalProperties":true,"type":"object","title":"Shap Values"},"adverse_reason_1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Adverse Reason 1"},"adverse_reason_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Adverse Reason 2"},"adverse_reason_3":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Adverse Reason 3"},"adverse_reason_4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Adverse Reason 4"},"scored_at":{"type":"string","format":"date-time","title":"Scored At"}},"type":"object","required":["id","agent_id","snapshot_id","tapco_score","task_reliability","api_capacity","principal_investment","controls","operational_context","tier","credit_limit_usd","shap_values","adverse_reason_1","adverse_reason_2","adverse_reason_3","adverse_reason_4","scored_at"],"title":"TAPCOScoreRead"},"TAPCOTier":{"type":"string","enum":["DENY","STARTER","GROWTH","SCALE"],"title":"TAPCOTier"},"TemporalKeySubmit":{"properties":{"api_key":{"type":"string","title":"Api Key"},"namespace":{"type":"string","title":"Namespace","default":"default"}},"type":"object","required":["api_key"],"title":"TemporalKeySubmit"},"TermsOverrideIn":{"properties":{"credit_limit_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Credit Limit Cents"},"factor_rate":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Factor Rate"},"repayment_percentage":{"anyOf":[{"type":"number","maximum":1.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Repayment Percentage"},"expected_term_days":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Expected Term Days"}},"type":"object","title":"TermsOverrideIn"},"TokenBudgetPolicy":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"per_call_max_tokens":{"type":"integer","minimum":0.0,"title":"Per Call Max Tokens","default":0},"per_window_max_tokens":{"type":"integer","minimum":0.0,"title":"Per Window Max Tokens","default":0},"window_seconds":{"type":"integer","maximum":604800.0,"minimum":1.0,"title":"Window Seconds","default":3600}},"additionalProperties":false,"type":"object","title":"TokenBudgetPolicy","description":"Per-call and per-window token caps for LLM calls."},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["access_token","refresh_token"],"title":"TokenResponse"},"ToolRateLimit":{"properties":{"tool_name":{"type":"string","maxLength":128,"minLength":1,"title":"Tool Name"},"max_calls":{"type":"integer","minimum":1.0,"title":"Max Calls"},"window_seconds":{"type":"integer","maximum":86400.0,"minimum":1.0,"title":"Window Seconds"}},"additionalProperties":false,"type":"object","required":["tool_name","max_calls","window_seconds"],"title":"ToolRateLimit","description":"Rate limit configuration for one tool."},"ToolReasoningRequirement":{"properties":{"tool_name":{"type":"string","maxLength":128,"minLength":1,"title":"Tool Name"},"min_reasoning_chars":{"type":"integer","maximum":10000.0,"minimum":0.0,"title":"Min Reasoning Chars"}},"additionalProperties":false,"type":"object","required":["tool_name","min_reasoning_chars"],"title":"ToolReasoningRequirement","description":"Reasoning-text requirement for one tool."},"TraceDecision":{"properties":{"scenario_id":{"type":"string","title":"Scenario Id"},"action":{"type":"string","title":"Action"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"additionalProperties":false,"type":"object","required":["scenario_id","action"],"title":"TraceDecision"},"TrajectoryResponse":{"properties":{"steps":{"items":{"$ref":"#/components/schemas/TrajectoryStepOut"},"type":"array","title":"Steps"},"rollup":{"additionalProperties":true,"type":"object","title":"Rollup"}},"additionalProperties":false,"type":"object","required":["steps","rollup"],"title":"TrajectoryResponse","description":"Wire-format response for\n``GET /v1/decisions/{decision_id}/trajectory?agent_ref=``."},"TrajectoryStepOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"decision_id":{"type":"string","format":"uuid","title":"Decision Id"},"agent_ref":{"type":"string","title":"Agent Ref"},"agent_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Version"},"step_index":{"type":"integer","title":"Step Index"},"committed_intent":{"type":"string","title":"Committed Intent"},"intent_hash":{"type":"string","title":"Intent Hash"},"prev_intent_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Intent Hash"},"committed_at":{"type":"string","format":"date-time","title":"Committed At"},"tool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Name"},"tool_args":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Args"},"tool_output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Output"},"observed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Observed At"},"intent_fidelity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Intent Fidelity"},"output_validity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Output Validity"},"on_task":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"On Task"},"evidence_support":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Evidence Support"},"fidelity_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fidelity Confidence"},"abstained":{"type":"boolean","title":"Abstained"},"contradiction_flag":{"type":"boolean","title":"Contradiction Flag"},"scorer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scorer"},"scored_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scored At"},"capture_mode":{"type":"string","title":"Capture Mode"},"commit_trust":{"type":"string","title":"Commit Trust"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["id","decision_id","agent_ref","agent_version","step_index","committed_intent","intent_hash","prev_intent_hash","committed_at","tool_name","tool_args","tool_output","observed_at","intent_fidelity","output_validity","on_task","evidence_support","fidelity_confidence","abstained","contradiction_flag","scorer","scored_at","capture_mode","commit_trust","created_at"],"title":"TrajectoryStepOut","description":"Wire-format shape of one persisted ``AgentTrajectoryStep`` row —\nbuilt via ``TrajectoryStepOut.model_validate(row)`` (``from_attributes``),\nmirroring ``ParticipationResponse``'s handling of ``Numeric`` columns\n(pydantic v2 coerces ``Decimal`` -> ``float`` at validation time)."},"TransactionType":{"type":"string","enum":["SPEND","REPAYMENT","ADJUSTMENT"],"title":"TransactionType"},"TransferProofIn":{"properties":{"address":{"type":"string","maxLength":42,"minLength":42,"title":"Address"}},"additionalProperties":false,"type":"object","required":["address"],"title":"TransferProofIn"},"TransferQuote":{"properties":{"to":{"type":"string","title":"To"},"amount_units":{"type":"integer","title":"Amount Units"}},"type":"object","required":["to","amount_units"],"title":"TransferQuote"},"TreasuryUpdate":{"properties":{"total_capital_cents":{"type":"integer","minimum":0.0,"title":"Total Capital Cents"},"notes":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Notes"}},"type":"object","required":["total_capital_cents"],"title":"TreasuryUpdate"},"UsageSummaryResponse":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"window_days":{"type":"integer","title":"Window Days"},"total_cost_cents":{"type":"integer","title":"Total Cost Cents"},"total_event_count":{"type":"integer","title":"Total Event Count"},"by_model":{"items":{"$ref":"#/components/schemas/ModelSummaryOut"},"type":"array","title":"By Model"}},"type":"object","required":["agent_id","window_days","total_cost_cents","total_event_count","by_model"],"title":"UsageSummaryResponse","description":"Per-model breakdown of recent usage. Powers the agent profile\npage's LLM usage tab."},"UserCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"turnstile_token":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Turnstile Token"},"company_website":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Company Website"},"form_loaded_at":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Form Loaded At"}},"type":"object","required":["email","password"],"title":"UserCreate"},"UserResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","created_at"],"title":"UserResponse"},"UserRole":{"type":"string","enum":["OPERATOR","UNDERWRITER","ADMIN","SUPERADMIN"],"title":"UserRole","description":"Role hierarchy for the R1 RBAC gate.\n\nMonotonic: SUPERADMIN inherits everything ADMIN can do, ADMIN inherits\neverything UNDERWRITER can do, UNDERWRITER inherits everything OPERATOR\ncan do. The numeric ranks live in `app/routers/audit.py`."},"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"},"VendorAllowlistPolicy":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"vendors":{"items":{"type":"string"},"type":"array","title":"Vendors"}},"additionalProperties":false,"type":"object","title":"VendorAllowlistPolicy","description":"Allowlist of vendors this agent may invoke through tool calls."},"VendorSummary":{"properties":{"vendor_name":{"type":"string","title":"Vendor Name"},"platform_count":{"type":"integer","title":"Platform Count"},"decisions_total":{"type":"integer","title":"Decisions Total"},"amount_cents_total":{"type":"integer","title":"Amount Cents Total"},"disputed_outcomes":{"type":"integer","title":"Disputed Outcomes"},"late_payments":{"type":"integer","title":"Late Payments"}},"additionalProperties":false,"type":"object","required":["vendor_name","platform_count","decisions_total","amount_cents_total","disputed_outcomes","late_payments"],"title":"VendorSummary","description":"One row per vendor appearing for 2+ operators — the cross-platform\nvendor-intelligence table. Vendors seen on only one platform are\nfiltered out upstream in ``portfolio_service`` (they carry no\ncross-platform signal)."},"VerifiedAttestationVerifyResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"agent_ref":{"type":"string","title":"Agent Ref"},"code_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Hash"},"assurance_mode":{"type":"string","title":"Assurance Mode"},"eval_pack":{"type":"string","title":"Eval Pack"},"scorecard":{"additionalProperties":true,"type":"object","title":"Scorecard"},"issued_at":{"type":"string","format":"date-time","title":"Issued At"},"valid_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Valid Until"},"revoked":{"type":"boolean","title":"Revoked"},"signature_valid":{"type":"boolean","title":"Signature Valid"}},"additionalProperties":false,"type":"object","required":["slug","agent_ref","code_hash","assurance_mode","eval_pack","scorecard","issued_at","valid_until","revoked","signature_valid"],"title":"VerifiedAttestationVerifyResponse","description":"Response for the unauthenticated ``GET /v1/verified/attestations/{slug}``.\n\nA counterparty checking a shared badge gets this back with no auth --\n``signature_valid`` and ``revoked`` are the two fields that make the\nbadge trustworthy without requiring the counterparty to trust Roost's\nsay-so alone."},"VerifiedRunCreate":{"properties":{"agent_ref":{"type":"string","minLength":1,"title":"Agent Ref"},"agent_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Model"}},"additionalProperties":false,"type":"object","required":["agent_ref"],"title":"VerifiedRunCreate"},"VerifiedRunCreated":{"properties":{"run_id":{"type":"string","title":"Run Id"},"nonce":{"type":"string","title":"Nonce"},"deadline_at":{"type":"string","format":"date-time","title":"Deadline At"},"scenarios":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Scenarios"}},"additionalProperties":false,"type":"object","required":["run_id","nonce","deadline_at","scenarios"],"title":"VerifiedRunCreated","description":"Response for ``POST /v1/verified/runs``.\n\n``scenarios`` is the oracle-free public view returned by\n``holdout_scenario_service.public_view`` -- a list of dicts with ONLY\n``id`` (an opaque per-run alias, never the descriptive real id),\n``action``, and ``context``. Roost's taxonomy\n(failure_family/dimension/severity) and the oracle\n(expected_actions/remediation/...) are never served -- they correlate\nwith the answer in a curated holdout."},"VerifiedRunSubmit":{"properties":{"run_id":{"type":"string","title":"Run Id"},"nonce":{"type":"string","title":"Nonce"},"code_hash":{"type":"string","title":"Code Hash"},"sdk_version":{"type":"string","title":"Sdk Version"},"agent_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Model"},"decisions":{"items":{"$ref":"#/components/schemas/TraceDecision"},"type":"array","title":"Decisions"},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature"}},"additionalProperties":false,"type":"object","required":["run_id","nonce","code_hash","sdk_version","decisions"],"title":"VerifiedRunSubmit"},"VerifiedRunSubmitResponse":{"properties":{"attestation_slug":{"type":"string","title":"Attestation Slug"},"assurance_mode":{"type":"string","title":"Assurance Mode"},"summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Summary"},"valid_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Valid Until"}},"additionalProperties":false,"type":"object","required":["attestation_slug","assurance_mode","summary","valid_until"],"title":"VerifiedRunSubmitResponse","description":"Response for ``POST /v1/verified/runs/{run_id}/submit``."},"VerifyEmailRequest":{"properties":{"token":{"type":"string","maxLength":256,"minLength":1,"title":"Token"}},"type":"object","required":["token"],"title":"VerifyEmailRequest","description":"POST /auth/verify-email body. ``token`` is the raw URL token.\n\nThe 256-bit upper bound is a defense against pathological inputs — the\nserver-side token is 32 url-safe-base64 bytes (~43 chars). Anything\nlonger than 256 is definitely not one of ours and rejecting it cheaply\navoids hashing a megabyte before checking."},"VerifyEmailResponse":{"properties":{"verified":{"type":"boolean","title":"Verified"},"email":{"type":"string","title":"Email"}},"type":"object","required":["verified","email"],"title":"VerifyEmailResponse","description":"Success payload for /auth/verify-email.\n\nThe frontend uses ``email`` to render \"verified — sign in as you@x.com\"\nso the operator sees which inbox got confirmed (helps when they have\nmultiple tabs / accounts open)."},"VerifyResponse":{"properties":{"valid":{"type":"boolean","title":"Valid"}},"additionalProperties":false,"type":"object","required":["valid"],"title":"VerifyResponse","description":"Wire-format response for ``POST /v1/agent-certifications/{id}/verify``."},"WaitlistAnswers":{"properties":{"company_project":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Company Project"},"role":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Role"},"building_agents":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Building Agents"}},"type":"object","title":"WaitlistAnswers","description":"What the form asks after the email. Each is optional."},"WaitlistCreate":{"properties":{"company_project":{"type":"string","maxLength":256,"title":"Company Project","default":""},"role":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Role"},"building_agents":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Building Agents"},"full_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Full Name"},"work_email":{"type":"string","format":"email","title":"Work Email"},"agent_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Agent Types"},"estimated_monthly_revenue":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Estimated Monthly Revenue"},"primary_expenses":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Primary Expenses"},"website_github":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Website Github"},"about_agent":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"About Agent"},"contact_consent":{"type":"boolean","title":"Contact Consent","default":false},"turnstile_token":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Turnstile Token"},"company_website":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Company Website"},"form_loaded_at":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Form Loaded At"}},"type":"object","required":["work_email"],"title":"WaitlistCreate"},"WaitlistResponse":{"properties":{"id":{"type":"string","title":"Id"},"message":{"type":"string","title":"Message","default":"You're on the list. We'll reply within two business days."}},"type":"object","required":["id"],"title":"WaitlistResponse"},"WalletResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"balance":{"type":"number","title":"Balance"},"credit_limit":{"type":"number","title":"Credit Limit"},"available_credit":{"type":"number","title":"Available Credit"},"outstanding_balance":{"type":"number","title":"Outstanding Balance"}},"type":"object","required":["id","balance","credit_limit","available_credit","outstanding_balance"],"title":"WalletResponse"},"WindowOut":{"properties":{"window_id":{"type":"string","title":"Window Id"},"opens_at":{"type":"string","format":"date-time","title":"Opens At"},"closes_at":{"type":"string","format":"date-time","title":"Closes At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"settled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Settled At"}},"type":"object","required":["window_id","opens_at","closes_at","ended_at","settled_at"],"title":"WindowOut"},"app__schemas__lending__AcceptIn":{"properties":{"mode":{"type":"string","enum":["permit","approve"],"title":"Mode","default":"permit"},"permit_signature":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Permit Signature"}},"type":"object","title":"AcceptIn"},"app__schemas__program__AcceptIn":{"properties":{"terms_version":{"type":"string","maxLength":64,"minLength":1,"title":"Terms Version"},"payout_address":{"anyOf":[{"type":"string","maxLength":42,"minLength":42},{"type":"null"}],"title":"Payout Address"}},"additionalProperties":false,"type":"object","required":["terms_version"],"title":"AcceptIn"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/auth/login"}}}}}}