{"openapi":"3.1.0","info":{"title":"orsel API","version":"0.1.0","description":"Web action layer for AI agents. Operations: find, read, act, watch, explain, approve, revoke. Errors share one envelope: `{ error: { code, message, requestId } }`."},"servers":[{"url":"/"}],"security":[{"bearer":[]}],"tags":[{"name":"health"},{"name":"whoami"},{"name":"keys"},{"name":"find"},{"name":"read"},{"name":"act"},{"name":"runs"},{"name":"approvals"},{"name":"revoke"},{"name":"actions"},{"name":"recipes"},{"name":"sites"},{"name":"claims"},{"name":"policy"},{"name":"delegations"},{"name":"watches"},{"name":"webhooks"},{"name":"providers"},{"name":"usage"},{"name":"ledger"},{"name":"benchmark"},{"name":"imports"},{"name":"explore"},{"name":"compat"},{"name":"publisher-keys"},{"name":"client"},{"name":"demo"}],"paths":{"/v1/health":{"get":{"operationId":"health","summary":"Liveness check","tags":["health"],"security":[],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/whoami":{"get":{"operationId":"whoami","summary":"Describe the presented key","tags":["whoami"],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"object","properties":{"prefix":{"type":"string"},"last4":{"type":"string"},"label":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["find","read","act:read","act:write","act:sensitive","admin"]}},"expiresAt":{"type":["number","null"]}},"required":["prefix","last4","label","scopes","expiresAt"],"additionalProperties":false},"project":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"demo":{"type":"boolean"}},"required":["key","project","demo"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/keys":{"get":{"operationId":"listKeys","summary":"List API keys of the project or org","tags":["keys"],"security":[{"bearer":[]}],"x-required-scope":"admin","responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string","pattern":"^orsel_[A-Za-z0-9_-]{8}$"},"last4":{"type":"string","minLength":4,"maxLength":4},"label":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["find","read","act:read","act:write","act:sensitive","admin"]}},"projectId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["id","prefix","last4","label","scopes","projectId","createdAt","expiresAt","lastUsedAt","revokedAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"operationId":"createKey","summary":"Create an API key","description":"The caller may only grant scopes it holds. The raw key is returned once and never stored.","tags":["keys"],"security":[{"bearer":[]}],"x-required-scope":"admin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"scopes":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","enum":["find","read","act:read","act:write","act:sensitive","admin"]}},"projectId":{"type":"string","minLength":1,"maxLength":128},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["label","scopes"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string","pattern":"^orsel_[A-Za-z0-9_-]{8}$"},"last4":{"type":"string","minLength":4,"maxLength":4},"label":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["find","read","act:read","act:write","act:sensitive","admin"]}},"projectId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"key":{"type":"string","pattern":"^orsel_([A-Za-z0-9_-]{8})\\.([A-Za-z0-9_-]{32})$"}},"required":["id","prefix","last4","label","scopes","projectId","createdAt","expiresAt","lastUsedAt","revokedAt","key"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/keys/{id}":{"delete":{"operationId":"revokeKey","summary":"Revoke an API key","tags":["keys"],"security":[{"bearer":[]}],"x-required-scope":"admin","parameters":[{"name":"id","in":"path","required":true,"description":"Key id","schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string","pattern":"^orsel_[A-Za-z0-9_-]{8}$"},"last4":{"type":"string","minLength":4,"maxLength":4},"label":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["find","read","act:read","act:write","act:sensitive","admin"]}},"projectId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["id","prefix","last4","label","scopes","projectId","createdAt","expiresAt","lastUsedAt","revokedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/find":{"post":{"operationId":"find","summary":"Find pages and executable actions for an intent","description":"Pages come from configured search providers; actions from the registry. One ranking: relevance times reliability, with an explanation per result. Action search works with no provider configured.","tags":["find"],"security":[{"bearer":[]}],"x-required-scope":"find","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"intent":{"type":"string","minLength":1,"maxLength":2000},"domains":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"}},"maxRisk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"auth":{"type":"string","enum":["none","session","oauth"]},"minReliability":{"type":"number","minimum":0,"maximum":1},"pages":{"default":5,"anyOf":[{"type":"string","const":"none"},{"type":"integer","minimum":1,"maximum":20}]},"actions":{"default":5,"type":"integer","minimum":0,"maximum":20}},"required":["intent"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"pages":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"title":{"type":"string"},"snippet":{"type":"string"},"provider":{"type":"string"},"score":{"type":"number"},"explanation":{"type":"object","properties":{"relevance":{"type":"number"},"reliability":{"type":["number","null"]},"score":{"type":"number"},"reasons":{"maxItems":8,"type":"array","items":{"type":"string"}}},"required":["relevance","reliability","score","reasons"],"additionalProperties":false}},"required":["url","title","snippet","provider","score","explanation"],"additionalProperties":false}},"actions":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"name":{"type":"string"},"description":{"type":"string"},"inputSummary":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"required":{"type":"boolean"}},"required":["name","type","required"],"additionalProperties":false}},"risk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"auth":{"type":"string","enum":["none","session","oauth"]},"reliability":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"recipeStatus":{"anyOf":[{"type":"string","enum":["candidate","verified","degraded","quarantined","revoked"]},{"type":"null"}]},"policy":{"type":"string","enum":["allow","deny","require_approval"]},"score":{"type":"number"},"explanation":{"type":"object","properties":{"relevance":{"type":"number"},"reliability":{"type":["number","null"]},"score":{"type":"number"},"reasons":{"maxItems":8,"type":"array","items":{"type":"string"}}},"required":["relevance","reliability","score","reasons"],"additionalProperties":false}},"required":["domain","actionId","name","description","inputSummary","risk","auth","reliability","recipeStatus","policy","score","explanation"],"additionalProperties":false}},"timings":{"type":"object","properties":{"totalMs":{"type":"number"},"cached":{"type":"boolean"}},"required":["totalMs","cached"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}}},"required":["pages","actions","timings","warnings"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/read":{"post":{"operationId":"read","summary":"Read a page as markdown","description":"Everything returned is page-derived and untrusted. Pages behind a login are only readable through the client-side runtime.","tags":["read"],"security":[{"bearer":[]}],"x-required-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"query":{"type":"string","minLength":1,"maxLength":500},"maxAgeSeconds":{"default":3600,"type":"integer","minimum":0,"maximum":2592000},"maxChars":{"default":20000,"type":"integer","minimum":200,"maximum":200000}},"required":["url"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"title":{"type":"string"},"markdown":{"type":"string"},"highlights":{"type":"array","items":{"type":"string"}},"fetchedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"cached":{"type":"boolean"},"untrusted":{"type":"boolean","const":true}},"required":["url","title","markdown","highlights","fetchedAt","cached","untrusted"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/act":{"post":{"operationId":"act","summary":"Run an action","description":"Needs `act:read`, `act:write` or `act:sensitive` depending on the action risk. Returns 200 with a finished run, 202 when the run waits for approval or a person, or 402 when the site owner charges for the action. Writes need `Idempotency-Key`. A run succeeds only when its postconditions pass.","tags":["act"],"security":[{"bearer":[]}],"x-required-scope":"act:read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"input":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128},"runtime":{"default":"hosted","type":"string","enum":["hosted","client","local"]},"recipeHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"maxTier":{"type":"string","enum":["api","webmcp","replay","dom","agent"]},"dryRun":{"default":false,"type":"boolean"}},"required":["domain","actionId"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]}}}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"status":{"type":"string","enum":["queued","running","awaiting_approval","needs_human","succeeded","failed","denied","canceled"]},"risk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"runtime":{"type":"string","enum":["hosted","client","local"]},"tierUsed":{"anyOf":[{"type":"string","enum":["api","webmcp","replay","dom","agent"]},{"type":"null"}]},"recipeHash":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"decision":{"anyOf":[{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny","require_approval"]},"ruleId":{"type":"string"},"reason":{"type":"string"},"matched":{"type":"array","items":{"type":"string"}}},"required":["effect","ruleId","reason","matched"],"additionalProperties":false},{"type":"null"}]},"approvalId":{"type":["string","null"]},"output":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},{"type":"null"}]},"postconditions":{"type":"array","items":{"type":"object","properties":{"condition":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"status_in"},"statuses":{"minItems":1,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_present"},"path":{"type":"string","minLength":1,"maxLength":256}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"path":{"type":"string","minLength":1,"maxLength":256},"value":{"$ref":"#/$defs/__schema1"}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_matches"},"path":{"type":"string","minLength":1,"maxLength":256},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","path","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text_contains"},"text":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"url_matches"},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"element_exists"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"signed_in"}},"required":["kind"],"additionalProperties":false}]},"passed":{"type":"boolean"}},"required":["condition","passed"],"additionalProperties":false}},"trace":{"type":"array","items":{"type":"object","properties":{"tier":{"type":"string","enum":["api","webmcp","replay","dom","agent"]},"ok":{"type":"boolean"},"ms":{"type":"number"},"note":{"type":"string","maxLength":300},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["tier","ok","ms","note","at"],"additionalProperties":false}},"errorCode":{"type":["string","null"]},"latencyMs":{"type":["number","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["id","domain","actionId","status","risk","runtime","tierUsed","recipeHash","decision","approvalId","output","postconditions","trace","errorCode","latencyMs","createdAt","finishedAt"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema1"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema1"}}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/runs":{"get":{"operationId":"listRuns","summary":"List runs","tags":["runs"],"security":[{"bearer":[]}],"x-required-scope":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":512}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"status":{"type":"string","enum":["queued","running","awaiting_approval","needs_human","succeeded","failed","denied","canceled"]},"risk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"runtime":{"type":"string","enum":["hosted","client","local"]},"tierUsed":{"anyOf":[{"type":"string","enum":["api","webmcp","replay","dom","agent"]},{"type":"null"}]},"recipeHash":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"decision":{"anyOf":[{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny","require_approval"]},"ruleId":{"type":"string"},"reason":{"type":"string"},"matched":{"type":"array","items":{"type":"string"}}},"required":["effect","ruleId","reason","matched"],"additionalProperties":false},{"type":"null"}]},"approvalId":{"type":["string","null"]},"output":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},{"type":"null"}]},"postconditions":{"type":"array","items":{"type":"object","properties":{"condition":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"status_in"},"statuses":{"minItems":1,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_present"},"path":{"type":"string","minLength":1,"maxLength":256}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"path":{"type":"string","minLength":1,"maxLength":256},"value":{"$ref":"#/$defs/__schema1"}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_matches"},"path":{"type":"string","minLength":1,"maxLength":256},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","path","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text_contains"},"text":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"url_matches"},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"element_exists"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"signed_in"}},"required":["kind"],"additionalProperties":false}]},"passed":{"type":"boolean"}},"required":["condition","passed"],"additionalProperties":false}},"trace":{"type":"array","items":{"type":"object","properties":{"tier":{"type":"string","enum":["api","webmcp","replay","dom","agent"]},"ok":{"type":"boolean"},"ms":{"type":"number"},"note":{"type":"string","maxLength":300},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["tier","ok","ms","note","at"],"additionalProperties":false}},"errorCode":{"type":["string","null"]},"latencyMs":{"type":["number","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["id","domain","actionId","status","risk","runtime","tierUsed","recipeHash","decision","approvalId","output","postconditions","trace","errorCode","latencyMs","createdAt","finishedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]}},"required":["items","nextCursor"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema1"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema1"}}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/runs/{id}":{"get":{"operationId":"getRun","summary":"Get a run with its step trace","tags":["runs"],"security":[{"bearer":[]}],"x-required-scope":"read","parameters":[{"name":"id","in":"path","required":true,"description":"Run id","schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"status":{"type":"string","enum":["queued","running","awaiting_approval","needs_human","succeeded","failed","denied","canceled"]},"risk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"runtime":{"type":"string","enum":["hosted","client","local"]},"tierUsed":{"anyOf":[{"type":"string","enum":["api","webmcp","replay","dom","agent"]},{"type":"null"}]},"recipeHash":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"decision":{"anyOf":[{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny","require_approval"]},"ruleId":{"type":"string"},"reason":{"type":"string"},"matched":{"type":"array","items":{"type":"string"}}},"required":["effect","ruleId","reason","matched"],"additionalProperties":false},{"type":"null"}]},"approvalId":{"type":["string","null"]},"output":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},{"type":"null"}]},"postconditions":{"type":"array","items":{"type":"object","properties":{"condition":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"status_in"},"statuses":{"minItems":1,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_present"},"path":{"type":"string","minLength":1,"maxLength":256}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"path":{"type":"string","minLength":1,"maxLength":256},"value":{"$ref":"#/$defs/__schema1"}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_matches"},"path":{"type":"string","minLength":1,"maxLength":256},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","path","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text_contains"},"text":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"url_matches"},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"element_exists"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"signed_in"}},"required":["kind"],"additionalProperties":false}]},"passed":{"type":"boolean"}},"required":["condition","passed"],"additionalProperties":false}},"trace":{"type":"array","items":{"type":"object","properties":{"tier":{"type":"string","enum":["api","webmcp","replay","dom","agent"]},"ok":{"type":"boolean"},"ms":{"type":"number"},"note":{"type":"string","maxLength":300},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["tier","ok","ms","note","at"],"additionalProperties":false}},"errorCode":{"type":["string","null"]},"latencyMs":{"type":["number","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["id","domain","actionId","status","risk","runtime","tierUsed","recipeHash","decision","approvalId","output","postconditions","trace","errorCode","latencyMs","createdAt","finishedAt"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema1"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema1"}}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/runs/{id}/events":{"get":{"operationId":"streamRun","summary":"Stream a run as server-sent events","description":"Events: `step`, `approval`, `result`. Ends when the run is finished.","tags":["runs"],"security":[{"bearer":[]}],"x-required-scope":"read","parameters":[{"name":"id","in":"path","required":true,"description":"Run id","schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"status":{"type":"string","enum":["queued","running","awaiting_approval","needs_human","succeeded","failed","denied","canceled"]},"risk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"runtime":{"type":"string","enum":["hosted","client","local"]},"tierUsed":{"anyOf":[{"type":"string","enum":["api","webmcp","replay","dom","agent"]},{"type":"null"}]},"recipeHash":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"decision":{"anyOf":[{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny","require_approval"]},"ruleId":{"type":"string"},"reason":{"type":"string"},"matched":{"type":"array","items":{"type":"string"}}},"required":["effect","ruleId","reason","matched"],"additionalProperties":false},{"type":"null"}]},"approvalId":{"type":["string","null"]},"output":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},{"type":"null"}]},"postconditions":{"type":"array","items":{"type":"object","properties":{"condition":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"status_in"},"statuses":{"minItems":1,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_present"},"path":{"type":"string","minLength":1,"maxLength":256}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"path":{"type":"string","minLength":1,"maxLength":256},"value":{"$ref":"#/$defs/__schema1"}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_matches"},"path":{"type":"string","minLength":1,"maxLength":256},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","path","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text_contains"},"text":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"url_matches"},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"element_exists"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"signed_in"}},"required":["kind"],"additionalProperties":false}]},"passed":{"type":"boolean"}},"required":["condition","passed"],"additionalProperties":false}},"trace":{"type":"array","items":{"type":"object","properties":{"tier":{"type":"string","enum":["api","webmcp","replay","dom","agent"]},"ok":{"type":"boolean"},"ms":{"type":"number"},"note":{"type":"string","maxLength":300},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["tier","ok","ms","note","at"],"additionalProperties":false}},"errorCode":{"type":["string","null"]},"latencyMs":{"type":["number","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["id","domain","actionId","status","risk","runtime","tierUsed","recipeHash","decision","approvalId","output","postconditions","trace","errorCode","latencyMs","createdAt","finishedAt"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema1"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema1"}}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/runs/{id}/explain":{"get":{"operationId":"explain","summary":"Explain a run: why this action, which recipe, which evidence","tags":["runs"],"security":[{"bearer":[]}],"x-required-scope":"read","parameters":[{"name":"id","in":"path","required":true,"description":"Run id","schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"status":{"type":"string","enum":["queued","running","awaiting_approval","needs_human","succeeded","failed","denied","canceled"]},"risk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"runtime":{"type":"string","enum":["hosted","client","local"]},"tierUsed":{"anyOf":[{"type":"string","enum":["api","webmcp","replay","dom","agent"]},{"type":"null"}]},"recipeHash":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"decision":{"anyOf":[{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny","require_approval"]},"ruleId":{"type":"string"},"reason":{"type":"string"},"matched":{"type":"array","items":{"type":"string"}}},"required":["effect","ruleId","reason","matched"],"additionalProperties":false},{"type":"null"}]},"approvalId":{"type":["string","null"]},"output":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},{"type":"null"}]},"postconditions":{"type":"array","items":{"type":"object","properties":{"condition":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"status_in"},"statuses":{"minItems":1,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_present"},"path":{"type":"string","minLength":1,"maxLength":256}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"path":{"type":"string","minLength":1,"maxLength":256},"value":{"$ref":"#/$defs/__schema1"}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_matches"},"path":{"type":"string","minLength":1,"maxLength":256},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","path","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text_contains"},"text":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"url_matches"},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"element_exists"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"signed_in"}},"required":["kind"],"additionalProperties":false}]},"passed":{"type":"boolean"}},"required":["condition","passed"],"additionalProperties":false}},"trace":{"type":"array","items":{"type":"object","properties":{"tier":{"type":"string","enum":["api","webmcp","replay","dom","agent"]},"ok":{"type":"boolean"},"ms":{"type":"number"},"note":{"type":"string","maxLength":300},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["tier","ok","ms","note","at"],"additionalProperties":false}},"errorCode":{"type":["string","null"]},"latencyMs":{"type":["number","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["id","domain","actionId","status","risk","runtime","tierUsed","recipeHash","decision","approvalId","output","postconditions","trace","errorCode","latencyMs","createdAt","finishedAt"],"additionalProperties":false},"action":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","minLength":1,"maxLength":1000},"inputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema2"}},"outputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema2"}},"risk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"preconditions":{"default":[],"maxItems":16,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"status_in"},"statuses":{"minItems":1,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_present"},"path":{"type":"string","minLength":1,"maxLength":256}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"path":{"type":"string","minLength":1,"maxLength":256},"value":{"$ref":"#/$defs/__schema1"}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_matches"},"path":{"type":"string","minLength":1,"maxLength":256},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","path","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text_contains"},"text":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"url_matches"},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"element_exists"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"signed_in"}},"required":["kind"],"additionalProperties":false}]}},"postconditions":{"default":[],"maxItems":16,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"status_in"},"statuses":{"minItems":1,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_present"},"path":{"type":"string","minLength":1,"maxLength":256}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"path":{"type":"string","minLength":1,"maxLength":256},"value":{"$ref":"#/$defs/__schema1"}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_matches"},"path":{"type":"string","minLength":1,"maxLength":256},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","path","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text_contains"},"text":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"url_matches"},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"element_exists"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"signed_in"}},"required":["kind"],"additionalProperties":false}]}},"auth":{"default":"none","type":"string","enum":["none","session","oauth"]},"idempotency":{"default":{"mode":"none"},"type":"object","properties":{"mode":{"type":"string","enum":["none","key","natural"]},"field":{"type":"string","maxLength":128}},"required":["mode"],"additionalProperties":false},"rateHints":{"default":{},"type":"object","properties":{"perMinute":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"perHour":{"type":"integer","exclusiveMinimum":0,"maximum":1000000}},"additionalProperties":false},"ownerPolicyRef":{"type":"string","maxLength":128}},"required":["id","name","description","inputSchema","outputSchema","risk","preconditions","postconditions","auth","idempotency","rateHints"],"additionalProperties":false},{"type":"null"}]},"recipe":{"anyOf":[{"type":"object","properties":{"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["candidate","verified","degraded","quarantined","revoked"]},"publisher":{"type":"string"},"tiers":{"type":"array","items":{"type":"string","enum":["api","webmcp","replay","dom","agent"]}}},"required":["hash","version","status","publisher","tiers"],"additionalProperties":false},{"type":"null"}]},"whyThisAction":{"type":"array","items":{"type":"string"}},"evidence":{"type":"array","items":{"type":"object","properties":{"ledgerSeq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string"},"summary":{"type":"string"}},"required":["ledgerSeq","type","summary"],"additionalProperties":false}}},"required":["run","action","recipe","whyThisAction","evidence"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema1"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema1"}}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema2"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema2"}}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/approvals":{"get":{"operationId":"listApprovals","summary":"List approvals","tags":["approvals"],"security":[{"bearer":[]}],"x-required-scope":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":512}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"status":{"type":"string","enum":["pending","approved","denied","expired","used"]},"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"risk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},"payloadHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"decidedBy":{"type":["string","null"]},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","runId","status","domain","actionId","risk","payload","payloadHash","expiresAt","decidedBy","decidedAt","createdAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]}},"required":["items","nextCursor"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/approvals/{id}":{"get":{"operationId":"getApproval","summary":"Get an approval","tags":["approvals"],"security":[{"bearer":[]}],"x-required-scope":"read","parameters":[{"name":"id","in":"path","required":true,"description":"Approval id","schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"status":{"type":"string","enum":["pending","approved","denied","expired","used"]},"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"risk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},"payloadHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"decidedBy":{"type":["string","null"]},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","runId","status","domain","actionId","risk","payload","payloadHash","expiresAt","decidedBy","decidedAt","createdAt"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/approvals/{id}/approve":{"post":{"operationId":"approve","summary":"Approve a pending run","description":"Single use and expiring. An edited payload creates a new approval for the edited payload hash instead of approving the original.","tags":["approvals"],"security":[{"bearer":[]}],"x-required-scope":"admin","parameters":[{"name":"id","in":"path","required":true,"description":"Approval id","schema":{"type":"string","minLength":1,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"edit":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}},"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]}}}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"status":{"type":"string","enum":["pending","approved","denied","expired","used"]},"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"risk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},"payloadHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"decidedBy":{"type":["string","null"]},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","runId","status","domain","actionId","risk","payload","payloadHash","expiresAt","decidedBy","decidedAt","createdAt"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/approvals/{id}/deny":{"post":{"operationId":"deny","summary":"Deny a pending run","tags":["approvals"],"security":[{"bearer":[]}],"x-required-scope":"admin","parameters":[{"name":"id","in":"path","required":true,"description":"Approval id","schema":{"type":"string","minLength":1,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":280}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"status":{"type":"string","enum":["pending","approved","denied","expired","used"]},"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"risk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},"payloadHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"decidedBy":{"type":["string","null"]},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","runId","status","domain","actionId","risk","payload","payloadHash","expiresAt","decidedBy","decidedAt","createdAt"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/revoke":{"post":{"operationId":"revoke","summary":"Revoke a recipe or a delegation","tags":["revoke"],"security":[{"bearer":[]}],"x-required-scope":"admin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"recipeHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"delegationId":{"type":"string"},"reason":{"type":"string","maxLength":280}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"revoked":{"type":"boolean","const":true}},"required":["revoked"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/actions":{"get":{"operationId":"listActions","summary":"List registry actions","tags":["actions"],"security":[{"bearer":[]}],"x-required-scope":"find","parameters":[{"name":"domain","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":512}}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"action":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","minLength":1,"maxLength":1000},"inputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},"outputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},"risk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"preconditions":{"default":[],"maxItems":16,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"status_in"},"statuses":{"minItems":1,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_present"},"path":{"type":"string","minLength":1,"maxLength":256}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"path":{"type":"string","minLength":1,"maxLength":256},"value":{"$ref":"#/$defs/__schema1"}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_matches"},"path":{"type":"string","minLength":1,"maxLength":256},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","path","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text_contains"},"text":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"url_matches"},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"element_exists"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"signed_in"}},"required":["kind"],"additionalProperties":false}]}},"postconditions":{"default":[],"maxItems":16,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"status_in"},"statuses":{"minItems":1,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_present"},"path":{"type":"string","minLength":1,"maxLength":256}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"path":{"type":"string","minLength":1,"maxLength":256},"value":{"$ref":"#/$defs/__schema1"}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_matches"},"path":{"type":"string","minLength":1,"maxLength":256},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","path","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text_contains"},"text":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"url_matches"},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"element_exists"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"signed_in"}},"required":["kind"],"additionalProperties":false}]}},"auth":{"default":"none","type":"string","enum":["none","session","oauth"]},"idempotency":{"default":{"mode":"none"},"type":"object","properties":{"mode":{"type":"string","enum":["none","key","natural"]},"field":{"type":"string","maxLength":128}},"required":["mode"],"additionalProperties":false},"rateHints":{"default":{},"type":"object","properties":{"perMinute":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"perHour":{"type":"integer","exclusiveMinimum":0,"maximum":1000000}},"additionalProperties":false},"ownerPolicyRef":{"type":"string","maxLength":128}},"required":["id","name","description","inputSchema","outputSchema","risk","preconditions","postconditions","auth","idempotency","rateHints"],"additionalProperties":false},"recipeStatus":{"type":["string","null"]},"reliability":{"type":["number","null"]}},"required":["domain","action","recipeStatus","reliability"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]}},"required":["items","nextCursor"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema1"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema1"}}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/recipes":{"get":{"operationId":"listRecipes","summary":"List recipes","tags":["recipes"],"security":[{"bearer":[]}],"x-required-scope":"find","parameters":[{"name":"domain","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":512}}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["candidate","verified","degraded","quarantined","revoked"]},"publisher":{"type":"string"},"tiers":{"type":"array","items":{"type":"string","enum":["api","webmcp","replay","dom","agent"]}},"risk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["hash","domain","actionId","version","status","publisher","tiers","risk","createdAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"operationId":"publishRecipe","summary":"Publish a signed recipe","description":"The signature must verify against a registered key of this organization. New recipes are `candidate` until canaries verify them.","tags":["recipes"],"security":[{"bearer":[]}],"x-required-scope":"admin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spec":{"type":"string","const":"orsel.recipe/1"},"siteDomain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"tiers":{"minItems":1,"maxItems":5,"type":"array","items":{"oneOf":[{"type":"object","properties":{"tier":{"type":"string","const":"api"},"request":{"type":"object","properties":{"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"url":{"type":"string","maxLength":4096},"headers":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":4096}},"body":{"type":"string","maxLength":4096},"expectStatus":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["method","url"],"additionalProperties":false},"extract":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"from":{"type":"string","enum":["json","text","html","header"]},"path":{"type":"string","minLength":1,"maxLength":512},"attr":{"type":"string","maxLength":64},"capture":{"type":"string","maxLength":256},"format":{"type":"string","enum":["markdown"]},"unique":{"type":"boolean"},"limit":{"type":"integer","minimum":1,"maximum":1000},"filter":{"type":"string","maxLength":256},"type":{"default":"string","type":"string","enum":["string","number","boolean","json"]},"required":{"default":true,"type":"boolean"}},"required":["name","from","path"],"additionalProperties":false}},"timeoutMs":{"default":10000,"type":"integer","exclusiveMinimum":0,"maximum":120000}},"required":["tier","request","extract"],"additionalProperties":false},{"type":"object","properties":{"tier":{"type":"string","const":"webmcp"},"tool":{"type":"string","minLength":1,"maxLength":128},"args":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":4096}},"timeoutMs":{"default":10000,"type":"integer","exclusiveMinimum":0,"maximum":120000}},"required":["tier","tool"],"additionalProperties":false},{"type":"object","properties":{"tier":{"type":"string","const":"replay"},"requests":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"object","properties":{"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"url":{"type":"string","maxLength":4096},"headers":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":4096}},"body":{"type":"string","maxLength":4096},"expectStatus":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["method","url"],"additionalProperties":false}},"extract":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"from":{"type":"string","enum":["json","text","html","header"]},"path":{"type":"string","minLength":1,"maxLength":512},"attr":{"type":"string","maxLength":64},"capture":{"type":"string","maxLength":256},"format":{"type":"string","enum":["markdown"]},"unique":{"type":"boolean"},"limit":{"type":"integer","minimum":1,"maximum":1000},"filter":{"type":"string","maxLength":256},"type":{"default":"string","type":"string","enum":["string","number","boolean","json"]},"required":{"default":true,"type":"boolean"}},"required":["name","from","path"],"additionalProperties":false}},"timeoutMs":{"default":15000,"type":"integer","exclusiveMinimum":0,"maximum":120000}},"required":["tier","requests","extract"],"additionalProperties":false},{"type":"object","properties":{"tier":{"type":"string","const":"dom"},"steps":{"minItems":1,"maxItems":64,"type":"array","items":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","const":"goto"},"url":{"type":"string","maxLength":4096}},"required":["op","url"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"click"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["op","selector"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"type"},"selector":{"type":"string","minLength":1,"maxLength":512},"text":{"type":"string","maxLength":4096}},"required":["op","selector","text"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"select"},"selector":{"type":"string","minLength":1,"maxLength":512},"value":{"type":"string","maxLength":4096}},"required":["op","selector","value"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"wait"},"selector":{"type":"string","minLength":1,"maxLength":512},"timeoutMs":{"default":5000,"type":"integer","minimum":-9007199254740991,"maximum":30000}},"required":["op","selector"],"additionalProperties":false}]}},"extract":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"from":{"type":"string","enum":["json","text","html","header"]},"path":{"type":"string","minLength":1,"maxLength":512},"attr":{"type":"string","maxLength":64},"capture":{"type":"string","maxLength":256},"format":{"type":"string","enum":["markdown"]},"unique":{"type":"boolean"},"limit":{"type":"integer","minimum":1,"maximum":1000},"filter":{"type":"string","maxLength":256},"type":{"default":"string","type":"string","enum":["string","number","boolean","json"]},"required":{"default":true,"type":"boolean"}},"required":["name","from","path"],"additionalProperties":false}},"timeoutMs":{"default":30000,"type":"integer","exclusiveMinimum":0,"maximum":120000}},"required":["tier","steps","extract"],"additionalProperties":false},{"type":"object","properties":{"tier":{"type":"string","const":"agent"},"instructions":{"type":"string","minLength":1,"maxLength":4000},"maxSteps":{"default":20,"type":"integer","exclusiveMinimum":0,"maximum":50},"timeoutMs":{"default":120000,"type":"integer","exclusiveMinimum":0,"maximum":300000}},"required":["tier","instructions"],"additionalProperties":false}]}},"canaries":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},"expect":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema1"}}},"required":["name","input"],"additionalProperties":false}},"allowedOrigins":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","format":"uri"}},"publisher":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","minLength":1,"maxLength":120},"keyId":{"type":"string","minLength":1,"maxLength":128}},"required":["id","name","keyId"],"additionalProperties":false},"provenance":{"type":"object","properties":{"method":{"type":"string","enum":["official_api","webmcp","har","recorded","agent_explore","repair","import","manual"]},"compiledBy":{"type":"string","maxLength":128},"runId":{"type":"string","maxLength":128},"model":{"type":"string","maxLength":128},"derivedFrom":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["method","compiledBy"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"contentHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"signature":{"type":"object","properties":{"alg":{"type":"string","const":"ed25519"},"keyId":{"type":"string","minLength":1,"maxLength":128},"value":{"type":"string","minLength":80,"maxLength":100}},"required":["alg","keyId","value"],"additionalProperties":false},"status":{"type":"string","enum":["candidate","verified","degraded","quarantined","revoked"]},"postconditions":{"default":[],"maxItems":16,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"status_in"},"statuses":{"minItems":1,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_present"},"path":{"type":"string","minLength":1,"maxLength":256}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"path":{"type":"string","minLength":1,"maxLength":256},"value":{"$ref":"#/$defs/__schema2"}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_matches"},"path":{"type":"string","minLength":1,"maxLength":256},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","path","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text_contains"},"text":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"url_matches"},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"element_exists"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"signed_in"}},"required":["kind"],"additionalProperties":false}]}}},"required":["spec","siteDomain","actionId","version","tiers","canaries","allowedOrigins","publisher","provenance","createdAt","contentHash","signature","status"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema1"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema1"}}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema2"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema2"}}]}}}}}},"responses":{"201":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"status":{"type":"string"},"created":{"type":"boolean"}},"required":["hash","status","created"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/recipes/{hash}":{"get":{"operationId":"getRecipe","summary":"Get a signed recipe by content hash","tags":["recipes"],"security":[{"bearer":[]}],"x-required-scope":"find","parameters":[{"name":"hash","in":"path","required":true,"description":"Recipe content hash","schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["candidate","verified","degraded","quarantined","revoked"]},"publisher":{"type":"string"},"tiers":{"type":"array","items":{"type":"string","enum":["api","webmcp","replay","dom","agent"]}},"risk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["hash","domain","actionId","version","status","publisher","tiers","risk","createdAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/sites":{"get":{"operationId":"listSites","summary":"List sites in the registry","tags":["sites"],"security":[{"bearer":[]}],"x-required-scope":"find","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":512}}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"title":{"type":["string","null"]},"actionCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"claimed":{"type":"boolean"},"reliability":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["domain","title","actionCount","claimed","reliability"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/sites/{domain}":{"get":{"operationId":"getSite","summary":"Get a site and its Action Manifest","tags":["sites"],"security":[{"bearer":[]}],"x-required-scope":"find","parameters":[{"name":"domain","in":"path","required":true,"description":"Domain","schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"object","properties":{"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"title":{"type":["string","null"]},"actionCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"claimed":{"type":"boolean"},"reliability":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["domain","title","actionCount","claimed","reliability"],"additionalProperties":false},"manifest":{"anyOf":[{"type":"object","properties":{"spec":{"type":"string","const":"orsel.manifest/1"},"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string","minLength":1,"maxLength":120},"actions":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","minLength":1,"maxLength":1000},"inputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},"outputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},"risk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"preconditions":{"default":[],"maxItems":16,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"status_in"},"statuses":{"minItems":1,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_present"},"path":{"type":"string","minLength":1,"maxLength":256}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"path":{"type":"string","minLength":1,"maxLength":256},"value":{"$ref":"#/$defs/__schema1"}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_matches"},"path":{"type":"string","minLength":1,"maxLength":256},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","path","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text_contains"},"text":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"url_matches"},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"element_exists"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"signed_in"}},"required":["kind"],"additionalProperties":false}]}},"postconditions":{"default":[],"maxItems":16,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"status_in"},"statuses":{"minItems":1,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_present"},"path":{"type":"string","minLength":1,"maxLength":256}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"path":{"type":"string","minLength":1,"maxLength":256},"value":{"$ref":"#/$defs/__schema1"}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_matches"},"path":{"type":"string","minLength":1,"maxLength":256},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","path","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text_contains"},"text":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"url_matches"},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"element_exists"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"signed_in"}},"required":["kind"],"additionalProperties":false}]}},"auth":{"default":"none","type":"string","enum":["none","session","oauth"]},"idempotency":{"default":{"mode":"none"},"type":"object","properties":{"mode":{"type":"string","enum":["none","key","natural"]},"field":{"type":"string","maxLength":128}},"required":["mode"],"additionalProperties":false},"rateHints":{"default":{},"type":"object","properties":{"perMinute":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"perHour":{"type":"integer","exclusiveMinimum":0,"maximum":1000000}},"additionalProperties":false},"ownerPolicyRef":{"type":"string","maxLength":128}},"required":["id","name","description","inputSchema","outputSchema","risk","preconditions","postconditions","auth","idempotency","rateHints"],"additionalProperties":false}}},"required":["spec","domain","version","actions"],"additionalProperties":false},{"type":"null"}]}},"required":["summary","manifest"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema1"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema1"}}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/sites/{domain}/manifest":{"put":{"operationId":"putManifest","summary":"Publish a manifest for a site you have claimed","tags":["sites"],"security":[{"bearer":[]}],"x-required-scope":"admin","parameters":[{"name":"domain","in":"path","required":true,"description":"Domain","schema":{"type":"string","minLength":1,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spec":{"type":"string","const":"orsel.manifest/1"},"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string","minLength":1,"maxLength":120},"actions":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","minLength":1,"maxLength":1000},"inputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},"outputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},"risk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"preconditions":{"default":[],"maxItems":16,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"status_in"},"statuses":{"minItems":1,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_present"},"path":{"type":"string","minLength":1,"maxLength":256}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"path":{"type":"string","minLength":1,"maxLength":256},"value":{"$ref":"#/$defs/__schema1"}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_matches"},"path":{"type":"string","minLength":1,"maxLength":256},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","path","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text_contains"},"text":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"url_matches"},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"element_exists"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"signed_in"}},"required":["kind"],"additionalProperties":false}]}},"postconditions":{"default":[],"maxItems":16,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"status_in"},"statuses":{"minItems":1,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_present"},"path":{"type":"string","minLength":1,"maxLength":256}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"path":{"type":"string","minLength":1,"maxLength":256},"value":{"$ref":"#/$defs/__schema1"}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_matches"},"path":{"type":"string","minLength":1,"maxLength":256},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","path","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text_contains"},"text":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"url_matches"},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"element_exists"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"signed_in"}},"required":["kind"],"additionalProperties":false}]}},"auth":{"default":"none","type":"string","enum":["none","session","oauth"]},"idempotency":{"default":{"mode":"none"},"type":"object","properties":{"mode":{"type":"string","enum":["none","key","natural"]},"field":{"type":"string","maxLength":128}},"required":["mode"],"additionalProperties":false},"rateHints":{"default":{},"type":"object","properties":{"perMinute":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"perHour":{"type":"integer","exclusiveMinimum":0,"maximum":1000000}},"additionalProperties":false},"ownerPolicyRef":{"type":"string","maxLength":128}},"required":["id","name","description","inputSchema","outputSchema","risk"],"additionalProperties":false}}},"required":["spec","domain","version","actions"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema1"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema1"}}]}}}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"object","properties":{"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"title":{"type":["string","null"]},"actionCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"claimed":{"type":"boolean"},"reliability":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["domain","title","actionCount","claimed","reliability"],"additionalProperties":false},"manifest":{"anyOf":[{"type":"object","properties":{"spec":{"type":"string","const":"orsel.manifest/1"},"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string","minLength":1,"maxLength":120},"actions":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","minLength":1,"maxLength":1000},"inputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},"outputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},"risk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"preconditions":{"default":[],"maxItems":16,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"status_in"},"statuses":{"minItems":1,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_present"},"path":{"type":"string","minLength":1,"maxLength":256}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"path":{"type":"string","minLength":1,"maxLength":256},"value":{"$ref":"#/$defs/__schema1"}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_matches"},"path":{"type":"string","minLength":1,"maxLength":256},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","path","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text_contains"},"text":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"url_matches"},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"element_exists"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"signed_in"}},"required":["kind"],"additionalProperties":false}]}},"postconditions":{"default":[],"maxItems":16,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"status_in"},"statuses":{"minItems":1,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_present"},"path":{"type":"string","minLength":1,"maxLength":256}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"path":{"type":"string","minLength":1,"maxLength":256},"value":{"$ref":"#/$defs/__schema1"}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_matches"},"path":{"type":"string","minLength":1,"maxLength":256},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","path","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text_contains"},"text":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"url_matches"},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"element_exists"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"signed_in"}},"required":["kind"],"additionalProperties":false}]}},"auth":{"default":"none","type":"string","enum":["none","session","oauth"]},"idempotency":{"default":{"mode":"none"},"type":"object","properties":{"mode":{"type":"string","enum":["none","key","natural"]},"field":{"type":"string","maxLength":128}},"required":["mode"],"additionalProperties":false},"rateHints":{"default":{},"type":"object","properties":{"perMinute":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"perHour":{"type":"integer","exclusiveMinimum":0,"maximum":1000000}},"additionalProperties":false},"ownerPolicyRef":{"type":"string","maxLength":128}},"required":["id","name","description","inputSchema","outputSchema","risk","preconditions","postconditions","auth","idempotency","rateHints"],"additionalProperties":false}}},"required":["spec","domain","version","actions"],"additionalProperties":false},{"type":"null"}]}},"required":["summary","manifest"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema1"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema1"}}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/claims":{"post":{"operationId":"startClaim","summary":"Start claiming a domain","tags":["claims"],"security":[{"bearer":[]}],"x-required-scope":"admin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"method":{"type":"string","enum":["dns_txt","well_known"]}},"required":["domain","method"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"method":{"type":"string","enum":["dns_txt","well_known"]},"status":{"type":"string","enum":["pending","verified","failed","revoked"]},"token":{"type":"string"},"recordName":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"verifiedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["id","domain","method","status","token","recordName","createdAt","verifiedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"operationId":"listClaims","summary":"List domain claims","tags":["claims"],"security":[{"bearer":[]}],"x-required-scope":"admin","responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"method":{"type":"string","enum":["dns_txt","well_known"]},"status":{"type":"string","enum":["pending","verified","failed","revoked"]},"token":{"type":"string"},"recordName":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"verifiedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["id","domain","method","status","token","recordName","createdAt","verifiedAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/claims/{id}/verify":{"post":{"operationId":"verifyClaim","summary":"Check the DNS record or well-known file for a claim","tags":["claims"],"security":[{"bearer":[]}],"x-required-scope":"admin","parameters":[{"name":"id","in":"path","required":true,"description":"Claim id","schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"claim":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"method":{"type":"string","enum":["dns_txt","well_known"]},"status":{"type":"string","enum":["pending","verified","failed","revoked"]},"token":{"type":"string"},"recordName":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"verifiedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["id","domain","method","status","token","recordName","createdAt","verifiedAt"],"additionalProperties":false},"checked":{"type":"string"}},"required":["claim","checked"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/sites/{domain}/owner-policy":{"get":{"operationId":"getOwnerPolicy","summary":"Get the owner policy of a claimed site","tags":["sites"],"security":[{"bearer":[]}],"x-required-scope":"admin","parameters":[{"name":"domain","in":"path","required":true,"description":"Domain","schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"policy":{"type":"object","properties":{"rules":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"description":{"default":"","type":"string","maxLength":280},"effect":{"type":"string","enum":["allow","deny","require_approval"]},"match":{"default":{},"type":"object","properties":{"domains":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":253}},"actions":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":64}},"risks":{"maxItems":5,"type":"array","items":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]}},"dataClasses":{"maxItems":5,"type":"array","items":{"type":"string","enum":["public","account","personal","payment","credentials"]}}},"additionalProperties":false},"limits":{"default":{},"type":"object","properties":{"maxAmount":{"type":"number","exclusiveMinimum":0},"amountField":{"type":"string","maxLength":128},"perHour":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"window":{"type":"object","properties":{"from":{"type":"integer","minimum":0,"maximum":23},"to":{"type":"integer","minimum":0,"maximum":23}},"required":["from","to"],"additionalProperties":false},"destinationField":{"type":"string","maxLength":128},"destinationAllowlist":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"}}},"additionalProperties":false}},"required":["id","description","effect","match","limits"],"additionalProperties":false}},"defaultAboveRead":{"default":"deny","type":"string","enum":["deny","require_approval"]}},"required":["rules","defaultAboveRead"],"additionalProperties":false},"ratePerMinute":{"default":60,"type":"integer","exclusiveMinimum":0,"maximum":100000},"pricing":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"actionId":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},{"type":"string","const":"*"}]},"usdCents":{"type":"integer","minimum":0,"maximum":100000}},"required":["actionId","usdCents"],"additionalProperties":false}},"agents":{"default":[],"maxItems":500,"type":"array","items":{"type":"object","properties":{"agent":{"type":"string","minLength":1,"maxLength":128},"effect":{"type":"string","enum":["allow","block"]}},"required":["agent","effect"],"additionalProperties":false}},"blockHosted":{"default":false,"type":"boolean"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["domain","policy","ratePerMinute","pricing","agents","blockHosted","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"operationId":"putOwnerPolicy","summary":"Set the owner policy, rate limit, pricing and agent rules of a claimed site","tags":["sites"],"security":[{"bearer":[]}],"x-required-scope":"admin","parameters":[{"name":"domain","in":"path","required":true,"description":"Domain","schema":{"type":"string","minLength":1,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"policy":{"type":"object","properties":{"rules":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"description":{"default":"","type":"string","maxLength":280},"effect":{"type":"string","enum":["allow","deny","require_approval"]},"match":{"default":{},"type":"object","properties":{"domains":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":253}},"actions":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":64}},"risks":{"maxItems":5,"type":"array","items":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]}},"dataClasses":{"maxItems":5,"type":"array","items":{"type":"string","enum":["public","account","personal","payment","credentials"]}}},"additionalProperties":false},"limits":{"default":{},"type":"object","properties":{"maxAmount":{"type":"number","exclusiveMinimum":0},"amountField":{"type":"string","maxLength":128},"perHour":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"window":{"type":"object","properties":{"from":{"type":"integer","minimum":0,"maximum":23},"to":{"type":"integer","minimum":0,"maximum":23}},"required":["from","to"],"additionalProperties":false},"destinationField":{"type":"string","maxLength":128},"destinationAllowlist":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"}}},"additionalProperties":false}},"required":["id","effect"],"additionalProperties":false}},"defaultAboveRead":{"default":"deny","type":"string","enum":["deny","require_approval"]}},"required":["rules"],"additionalProperties":false},"ratePerMinute":{"default":60,"type":"integer","exclusiveMinimum":0,"maximum":100000},"pricing":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"actionId":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},{"type":"string","const":"*"}]},"usdCents":{"type":"integer","minimum":0,"maximum":100000}},"required":["actionId","usdCents"],"additionalProperties":false}},"agents":{"default":[],"maxItems":500,"type":"array","items":{"type":"object","properties":{"agent":{"type":"string","minLength":1,"maxLength":128},"effect":{"type":"string","enum":["allow","block"]}},"required":["agent","effect"],"additionalProperties":false}},"blockHosted":{"default":false,"type":"boolean"}},"required":["policy"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"policy":{"type":"object","properties":{"rules":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"description":{"default":"","type":"string","maxLength":280},"effect":{"type":"string","enum":["allow","deny","require_approval"]},"match":{"default":{},"type":"object","properties":{"domains":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":253}},"actions":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":64}},"risks":{"maxItems":5,"type":"array","items":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]}},"dataClasses":{"maxItems":5,"type":"array","items":{"type":"string","enum":["public","account","personal","payment","credentials"]}}},"additionalProperties":false},"limits":{"default":{},"type":"object","properties":{"maxAmount":{"type":"number","exclusiveMinimum":0},"amountField":{"type":"string","maxLength":128},"perHour":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"window":{"type":"object","properties":{"from":{"type":"integer","minimum":0,"maximum":23},"to":{"type":"integer","minimum":0,"maximum":23}},"required":["from","to"],"additionalProperties":false},"destinationField":{"type":"string","maxLength":128},"destinationAllowlist":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"}}},"additionalProperties":false}},"required":["id","description","effect","match","limits"],"additionalProperties":false}},"defaultAboveRead":{"default":"deny","type":"string","enum":["deny","require_approval"]}},"required":["rules","defaultAboveRead"],"additionalProperties":false},"ratePerMinute":{"default":60,"type":"integer","exclusiveMinimum":0,"maximum":100000},"pricing":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"actionId":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},{"type":"string","const":"*"}]},"usdCents":{"type":"integer","minimum":0,"maximum":100000}},"required":["actionId","usdCents"],"additionalProperties":false}},"agents":{"default":[],"maxItems":500,"type":"array","items":{"type":"object","properties":{"agent":{"type":"string","minLength":1,"maxLength":128},"effect":{"type":"string","enum":["allow","block"]}},"required":["agent","effect"],"additionalProperties":false}},"blockHosted":{"default":false,"type":"boolean"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["domain","policy","ratePerMinute","pricing","agents","blockHosted","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/policy":{"get":{"operationId":"getPolicy","summary":"Get the project policy","tags":["policy"],"security":[{"bearer":[]}],"x-required-scope":"admin","responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"policy":{"type":"object","properties":{"rules":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"description":{"default":"","type":"string","maxLength":280},"effect":{"type":"string","enum":["allow","deny","require_approval"]},"match":{"default":{},"type":"object","properties":{"domains":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":253}},"actions":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":64}},"risks":{"maxItems":5,"type":"array","items":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]}},"dataClasses":{"maxItems":5,"type":"array","items":{"type":"string","enum":["public","account","personal","payment","credentials"]}}},"additionalProperties":false},"limits":{"default":{},"type":"object","properties":{"maxAmount":{"type":"number","exclusiveMinimum":0},"amountField":{"type":"string","maxLength":128},"perHour":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"window":{"type":"object","properties":{"from":{"type":"integer","minimum":0,"maximum":23},"to":{"type":"integer","minimum":0,"maximum":23}},"required":["from","to"],"additionalProperties":false},"destinationField":{"type":"string","maxLength":128},"destinationAllowlist":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"}}},"additionalProperties":false}},"required":["id","description","effect","match","limits"],"additionalProperties":false}},"defaultAboveRead":{"default":"deny","type":"string","enum":["deny","require_approval"]}},"required":["rules","defaultAboveRead"],"additionalProperties":false}},"required":["policy"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"operationId":"putPolicy","summary":"Replace the project policy","tags":["policy"],"security":[{"bearer":[]}],"x-required-scope":"admin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"policy":{"type":"object","properties":{"rules":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"description":{"default":"","type":"string","maxLength":280},"effect":{"type":"string","enum":["allow","deny","require_approval"]},"match":{"default":{},"type":"object","properties":{"domains":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":253}},"actions":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":64}},"risks":{"maxItems":5,"type":"array","items":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]}},"dataClasses":{"maxItems":5,"type":"array","items":{"type":"string","enum":["public","account","personal","payment","credentials"]}}},"additionalProperties":false},"limits":{"default":{},"type":"object","properties":{"maxAmount":{"type":"number","exclusiveMinimum":0},"amountField":{"type":"string","maxLength":128},"perHour":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"window":{"type":"object","properties":{"from":{"type":"integer","minimum":0,"maximum":23},"to":{"type":"integer","minimum":0,"maximum":23}},"required":["from","to"],"additionalProperties":false},"destinationField":{"type":"string","maxLength":128},"destinationAllowlist":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"}}},"additionalProperties":false}},"required":["id","effect"],"additionalProperties":false}},"defaultAboveRead":{"default":"deny","type":"string","enum":["deny","require_approval"]}},"required":["rules"],"additionalProperties":false}},"required":["policy"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"policy":{"type":"object","properties":{"rules":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"description":{"default":"","type":"string","maxLength":280},"effect":{"type":"string","enum":["allow","deny","require_approval"]},"match":{"default":{},"type":"object","properties":{"domains":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":253}},"actions":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":64}},"risks":{"maxItems":5,"type":"array","items":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]}},"dataClasses":{"maxItems":5,"type":"array","items":{"type":"string","enum":["public","account","personal","payment","credentials"]}}},"additionalProperties":false},"limits":{"default":{},"type":"object","properties":{"maxAmount":{"type":"number","exclusiveMinimum":0},"amountField":{"type":"string","maxLength":128},"perHour":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"window":{"type":"object","properties":{"from":{"type":"integer","minimum":0,"maximum":23},"to":{"type":"integer","minimum":0,"maximum":23}},"required":["from","to"],"additionalProperties":false},"destinationField":{"type":"string","maxLength":128},"destinationAllowlist":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"}}},"additionalProperties":false}},"required":["id","description","effect","match","limits"],"additionalProperties":false}},"defaultAboveRead":{"default":"deny","type":"string","enum":["deny","require_approval"]}},"required":["rules","defaultAboveRead"],"additionalProperties":false}},"required":["policy"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/policy/dry-run":{"post":{"operationId":"policyDryRun","summary":"Evaluate a policy against a sample request without running anything","tags":["policy"],"security":[{"bearer":[]}],"x-required-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","maxLength":64},"risk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"dataClasses":{"default":[],"type":"array","items":{"type":"string","enum":["public","account","personal","payment","credentials"]}},"input":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},"policy":{"type":"object","properties":{"rules":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"description":{"default":"","type":"string","maxLength":280},"effect":{"type":"string","enum":["allow","deny","require_approval"]},"match":{"default":{},"type":"object","properties":{"domains":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":253}},"actions":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":64}},"risks":{"maxItems":5,"type":"array","items":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]}},"dataClasses":{"maxItems":5,"type":"array","items":{"type":"string","enum":["public","account","personal","payment","credentials"]}}},"additionalProperties":false},"limits":{"default":{},"type":"object","properties":{"maxAmount":{"type":"number","exclusiveMinimum":0},"amountField":{"type":"string","maxLength":128},"perHour":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"window":{"type":"object","properties":{"from":{"type":"integer","minimum":0,"maximum":23},"to":{"type":"integer","minimum":0,"maximum":23}},"required":["from","to"],"additionalProperties":false},"destinationField":{"type":"string","maxLength":128},"destinationAllowlist":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"}}},"additionalProperties":false}},"required":["id","effect"],"additionalProperties":false}},"defaultAboveRead":{"default":"deny","type":"string","enum":["deny","require_approval"]}},"required":["rules"],"additionalProperties":false}},"required":["domain","actionId","risk"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]}}}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny","require_approval"]},"ruleId":{"type":"string"},"reason":{"type":"string"},"matched":{"type":"array","items":{"type":"string"}}},"required":["effect","ruleId","reason","matched"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/delegations":{"get":{"operationId":"listDelegations","summary":"List delegations","tags":["delegations"],"security":[{"bearer":[]}],"x-required-scope":"admin","responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"string","minLength":1,"maxLength":128},"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["find","read","act:read","act:write","act:sensitive","admin"]}},"domains":{"anyOf":[{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"}},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"revokedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","agent","scopes","domains","expiresAt","revokedAt","createdAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"operationId":"createDelegation","summary":"Grant a scoped, expiring delegation to another agent","tags":["delegations"],"security":[{"bearer":[]}],"x-required-scope":"admin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"string","minLength":1,"maxLength":128},"scopes":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","enum":["find","read","act:read","act:write","act:sensitive","admin"]}},"domains":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"}},"ttlSeconds":{"type":"integer","minimum":60,"maximum":2592000}},"required":["agent","scopes","ttlSeconds"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"string","minLength":1,"maxLength":128},"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["find","read","act:read","act:write","act:sensitive","admin"]}},"domains":{"anyOf":[{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"}},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"revokedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","agent","scopes","domains","expiresAt","revokedAt","createdAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/watches":{"get":{"operationId":"listWatches","summary":"List watches","tags":["watches"],"security":[{"bearer":[]}],"x-required-scope":"read","responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["search","page","action"]},"target":{"type":"string"},"everyMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"lastChangeAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","kind","target","everyMinutes","lastRunAt","lastChangeAt","createdAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"operationId":"createWatch","summary":"Watch a search, page or action result for changes","tags":["watches"],"security":[{"bearer":[]}],"x-required-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["search","page","action"]},"target":{"type":"string","minLength":1,"maxLength":2000},"everyMinutes":{"default":60,"type":"integer","minimum":15,"maximum":10080},"webhookId":{"type":"string"},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}},"required":["kind","target"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]}}}}}},"responses":{"201":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["search","page","action"]},"target":{"type":"string"},"everyMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastRunAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"lastChangeAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","kind","target","everyMinutes","lastRunAt","lastChangeAt","createdAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/watches/{id}":{"delete":{"operationId":"deleteWatch","summary":"Delete a watch","tags":["watches"],"security":[{"bearer":[]}],"x-required-scope":"read","parameters":[{"name":"id","in":"path","required":true,"description":"Watch id","schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/webhooks":{"get":{"operationId":"listWebhooks","summary":"List webhooks","tags":["webhooks"],"security":[{"bearer":[]}],"x-required-scope":"admin","responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["approval.requested","run.finished","watch.changed","recipe.status_changed","drift.detected","claim.verified"]}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"disabledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["id","url","events","createdAt","disabledAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"operationId":"createWebhook","summary":"Create a webhook","description":"The signing secret is returned once. Deliveries carry `X-Orsel-Signature: t=<unix>,v1=<hmac-sha256 of \"t.body\">` and are retried with backoff.","tags":["webhooks"],"security":[{"bearer":[]}],"x-required-scope":"admin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"events":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","enum":["approval.requested","run.finished","watch.changed","recipe.status_changed","drift.detected","claim.verified"]}}},"required":["url","events"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["approval.requested","run.finished","watch.changed","recipe.status_changed","drift.detected","claim.verified"]}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"disabledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"secret":{"type":"string"}},"required":["id","url","events","createdAt","disabledAt","secret"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/webhooks/{id}":{"delete":{"operationId":"deleteWebhook","summary":"Delete a webhook","tags":["webhooks"],"security":[{"bearer":[]}],"x-required-scope":"admin","parameters":[{"name":"id","in":"path","required":true,"description":"Webhook id","schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["approval.requested","run.finished","watch.changed","recipe.status_changed","drift.detected","claim.verified"]}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"disabledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["id","url","events","createdAt","disabledAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/providers":{"get":{"operationId":"listProviders","summary":"List search providers configured for the project","tags":["providers"],"security":[{"bearer":[]}],"x-required-scope":"admin","responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["exa","brave","tavily","parallel","firecrawl","jina"]},"enabled":{"type":"boolean"},"apiKeySet":{"type":"boolean"}},"required":["provider","enabled","apiKeySet"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"operationId":"setProvider","summary":"Configure a search provider key for the project","tags":["providers"],"security":[{"bearer":[]}],"x-required-scope":"admin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["exa","brave","tavily","parallel","firecrawl","jina"]},"apiKey":{"type":"string","minLength":8,"maxLength":512},"enabled":{"default":true,"type":"boolean"}},"required":["provider"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["exa","brave","tavily","parallel","firecrawl","jina"]},"enabled":{"type":"boolean"},"apiKeySet":{"type":"boolean"}},"required":["provider","enabled","apiKeySet"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/usage":{"get":{"operationId":"usage","summary":"Usage and per provider cost and latency","tags":["usage"],"security":[{"bearer":[]}],"x-required-scope":"read","responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["from","to"],"additionalProperties":false},"finds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reads":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"acts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"actsSucceeded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"approvalsRequested":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"providers":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"calls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"errors":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"p50Ms":{"type":["number","null"]},"costUsd":{"type":["number","null"]}},"required":["provider","calls","errors","p50Ms","costUsd"],"additionalProperties":false}}},"required":["period","finds","reads","acts","actsSucceeded","approvalsRequested","providers"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/ledger":{"get":{"operationId":"listLedger","summary":"Read the hash-chained ledger","tags":["ledger"],"security":[{"bearer":[]}],"x-required-scope":"read","parameters":[{"name":"afterSeq","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"seq":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["find","read","act_requested","policy_decision","approval","execution_step","effect_verified","error"]},"runId":{"type":["string","null"]},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},"prevHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["projectId","seq","type","runId","at","data","prevHash","hash"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]}},"required":["items","nextCursor"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/ledger/verify":{"get":{"operationId":"verifyLedger","summary":"Verify the whole ledger chain","tags":["ledger"],"security":[{"bearer":[]}],"x-required-scope":"read","responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"entries":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"head":{"anyOf":[{"type":"object","properties":{"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["seq","hash"],"additionalProperties":false},{"type":"null"}]}},"required":["ok","entries","head"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":false},"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reason":{"type":"string","enum":["seq","prev_hash","hash"]}},"required":["ok","index","reason"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/benchmark":{"get":{"operationId":"benchmark","summary":"ActionBench: reliability per site and action, plus injection results","tags":["benchmark"],"security":[],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"methodologyUrl":{"type":"string"},"scores":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"recipeHash":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"window":{"type":"string","enum":["24h","7d","30d"]},"runs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"successRate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"postconditionPassRate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"p50Ms":{"type":["number","null"]},"p95Ms":{"type":["number","null"]},"byTier":{"type":"object","propertyNames":{"type":"string","enum":["api","webmcp","replay","dom","agent"]},"additionalProperties":{"type":"object","properties":{"runs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"successRate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["runs","successRate"],"additionalProperties":false},"required":["api","webmcp","replay","dom","agent"]},"driftEvents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"medianRepairMinutes":{"type":["number","null"]},"source":{"type":"string","enum":["canary","client","all"]},"computedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["domain","actionId","recipeHash","window","runs","successRate","postconditionPassRate","p50Ms","p95Ms","byTier","driftEvents","medianRepairMinutes","source","computedAt"],"additionalProperties":false}},"injection":{"type":"array","items":{"type":"object","properties":{"suite":{"type":"string"},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"succeededWithoutTrustPlane":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"succeededWithTrustPlane":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ranAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["suite","total","succeededWithoutTrustPlane","succeededWithTrustPlane","ranAt"],"additionalProperties":false}}},"required":["generatedAt","methodologyUrl","scores","injection"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/benchmark/{domain}":{"get":{"operationId":"benchmarkSite","summary":"Reliability and drift for one site","tags":["benchmark"],"security":[],"parameters":[{"name":"domain","in":"path","required":true,"description":"Domain","schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"scores":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"recipeHash":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"window":{"type":"string","enum":["24h","7d","30d"]},"runs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"successRate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"postconditionPassRate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"p50Ms":{"type":["number","null"]},"p95Ms":{"type":["number","null"]},"byTier":{"type":"object","propertyNames":{"type":"string","enum":["api","webmcp","replay","dom","agent"]},"additionalProperties":{"type":"object","properties":{"runs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"successRate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["runs","successRate"],"additionalProperties":false},"required":["api","webmcp","replay","dom","agent"]},"driftEvents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"medianRepairMinutes":{"type":["number","null"]},"source":{"type":"string","enum":["canary","client","all"]},"computedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["domain","actionId","recipeHash","window","runs","successRate","postconditionPassRate","p50Ms","p95Ms","byTier","driftEvents","medianRepairMinutes","source","computedAt"],"additionalProperties":false}},"drift":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"recipeHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"kind":{"type":"string","enum":["schema","status","dom","postcondition"]},"detail":{"type":"string","maxLength":300},"detectedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"repairedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"repairHash":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]}},"required":["id","domain","actionId","recipeHash","kind","detail","detectedAt","repairedAt","repairHash"],"additionalProperties":false}}},"required":["scores","drift"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/imports":{"post":{"operationId":"import","summary":"Import HAR, Playwright traces, Stagehand caches, OpenAPI specs, MCP servers or recipes","description":"Defaults to a dry run that lists what would be created, merged or dropped.","tags":["imports"],"security":[{"bearer":[]}],"x-required-scope":"admin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","enum":["har","playwright","stagehand","openapi","mcp","recipes"]},"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"content":{"type":"string","maxLength":8388608},"dryRun":{"default":true,"type":"boolean"}},"required":["from","content"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"dryRun":{"type":"boolean"},"created":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"risk":{"type":"string"},"note":{"type":"string"}},"required":["domain","actionId","risk","note"],"additionalProperties":false}},"merged":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"note":{"type":"string"}},"required":["domain","actionId","note"],"additionalProperties":false}},"dropped":{"type":"array","items":{"type":"object","properties":{"what":{"type":"string"},"reason":{"type":"string"}},"required":["what","reason"],"additionalProperties":false}}},"required":["dryRun","created","merged","dropped"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/explore":{"post":{"operationId":"explore","summary":"Find read actions on a site from one public page","description":"Fetches a handful of pages (robots.txt first, identified as orsel-bot), proposes read actions (read a page, search the site) and keeps only those that run on the fetched pages. Kept actions are signed candidates that only this organization can run until canaries verify them. Refused for sites with a verified owner, which publish their own manifest.","tags":["explore"],"security":[{"bearer":[]}],"x-required-scope":"act:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["url"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"pagesFetched":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"actions":{"type":"array","items":{"type":"object","properties":{"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"name":{"type":"string"},"inputs":{"type":"array","items":{"type":"string"}},"kind":{"type":"string","enum":["read_page","list","search","sign_in","sign_up","contact","subscribe","form","api"]},"risk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"secrets":{"type":"array","items":{"type":"string"}},"ran":{"type":"boolean"},"route":{"type":"string"},"outputs":{"type":"array","items":{"type":"string"}},"example":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"recipeHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"status":{"type":"string","const":"candidate"}},"required":["actionId","name","inputs","kind","risk","secrets","ran","route","outputs","example","recipeHash","status"],"additionalProperties":false}},"rejected":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reason":{"type":"string"}},"required":["id","reason"],"additionalProperties":false}}},"required":["domain","pagesFetched","actions","rejected"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/compat/exa/search":{"post":{"operationId":"compatExaSearch","summary":"Exa-shaped search","description":"Migration endpoint: change the base URL and key. Unsupported request fields are listed in `x-orsel-unsupported` on the response.","tags":["compat"],"security":[{"bearer":[]}],"x-required-scope":"find","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":2000},"numResults":{"type":"integer","minimum":1,"maximum":20},"includeDomains":{"type":"array","items":{"type":"string"}},"excludeDomains":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"contents":{}},"required":["query"],"additionalProperties":{}}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/compat/exa/contents":{"post":{"operationId":"compatExaContents","summary":"Exa-shaped contents","tags":["compat"],"security":[{"bearer":[]}],"x-required-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"urls":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","format":"uri"}},"text":{"anyOf":[{"type":"boolean"},{"type":"object","properties":{},"additionalProperties":{}}]},"highlights":{}},"required":["urls"],"additionalProperties":{}}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/compat/tavily/search":{"post":{"operationId":"compatTavilySearch","summary":"Tavily-shaped search","tags":["compat"],"security":[{"bearer":[]}],"x-required-scope":"find","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":2000},"max_results":{"type":"integer","minimum":1,"maximum":20},"include_domains":{"type":"array","items":{"type":"string"}},"exclude_domains":{"type":"array","items":{"type":"string"}},"search_depth":{"type":"string"},"include_answer":{}},"required":["query"],"additionalProperties":{}}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":{}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/publisher-keys":{"post":{"operationId":"registerPublisherKey","summary":"Register a public Ed25519 key that may sign recipes for this organization","tags":["publisher-keys"],"security":[{"bearer":[]}],"x-required-scope":"admin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"publisherId":{"type":"string","minLength":1,"maxLength":128},"keyId":{"type":"string","minLength":1,"maxLength":128},"publicKey":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},"required":["publisherId","keyId","publicKey"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"registered":{"type":"boolean","const":true}},"required":["registered"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/client/runs/next":{"get":{"operationId":"nextClientRun","summary":"Claim the next run waiting for a client-side or local runtime","description":"Returns 204 when there is nothing to do. The client verifies the recipe signature before running.","tags":["client"],"security":[{"bearer":[]}],"x-required-scope":"act:read","parameters":[{"name":"install","in":"query","required":false,"schema":{"type":"string","maxLength":128}}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string"},"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},"action":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","minLength":1,"maxLength":1000},"inputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema1"}},"outputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema1"}},"risk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"preconditions":{"default":[],"maxItems":16,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"status_in"},"statuses":{"minItems":1,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_present"},"path":{"type":"string","minLength":1,"maxLength":256}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"path":{"type":"string","minLength":1,"maxLength":256},"value":{"$ref":"#/$defs/__schema2"}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_matches"},"path":{"type":"string","minLength":1,"maxLength":256},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","path","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text_contains"},"text":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"url_matches"},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"element_exists"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"signed_in"}},"required":["kind"],"additionalProperties":false}]}},"postconditions":{"default":[],"maxItems":16,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"status_in"},"statuses":{"minItems":1,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_present"},"path":{"type":"string","minLength":1,"maxLength":256}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"path":{"type":"string","minLength":1,"maxLength":256},"value":{"$ref":"#/$defs/__schema2"}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_matches"},"path":{"type":"string","minLength":1,"maxLength":256},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","path","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text_contains"},"text":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"url_matches"},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"element_exists"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"signed_in"}},"required":["kind"],"additionalProperties":false}]}},"auth":{"default":"none","type":"string","enum":["none","session","oauth"]},"idempotency":{"default":{"mode":"none"},"type":"object","properties":{"mode":{"type":"string","enum":["none","key","natural"]},"field":{"type":"string","maxLength":128}},"required":["mode"],"additionalProperties":false},"rateHints":{"default":{},"type":"object","properties":{"perMinute":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"perHour":{"type":"integer","exclusiveMinimum":0,"maximum":1000000}},"additionalProperties":false},"ownerPolicyRef":{"type":"string","maxLength":128}},"required":["id","name","description","inputSchema","outputSchema","risk","preconditions","postconditions","auth","idempotency","rateHints"],"additionalProperties":false},"recipe":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema3"}},"trustedKeys":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["runId","domain","actionId","input","action","recipe","trustedKeys"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema1"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema1"}}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema2"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema2"}}]},"__schema3":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema3"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema3"}}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/client/runs/{id}/result":{"post":{"operationId":"reportClientRun","summary":"Report the outcome of a client-side run","tags":["client"],"security":[{"bearer":[]}],"x-required-scope":"act:read","parameters":[{"name":"id","in":"path","required":true,"description":"Run id","schema":{"type":"string","minLength":1,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tierUsed":{"anyOf":[{"type":"string","enum":["api","webmcp","replay","dom","agent"]},{"type":"null"}]},"output":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},{"type":"null"}]},"trace":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"tier":{"type":"string","enum":["api","webmcp","replay","dom","agent"]},"ok":{"type":"boolean"},"ms":{"type":"number"},"note":{"type":"string","maxLength":300},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["tier","ok","ms","note","at"],"additionalProperties":false}},"evidence":{"default":{},"type":"object","properties":{"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string","maxLength":2048},"signedIn":{"type":"boolean"},"selectors":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}},"textMatches":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}}},"additionalProperties":false},"needsHuman":{"type":"string","enum":["captcha","two_factor","session_expired","payment_required","rate_limited"]},"errorCode":{"type":"string","maxLength":64},"telemetry":{"default":false,"type":"boolean"}},"required":["tierUsed","output","trace"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]}}}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"status":{"type":"string","enum":["queued","running","awaiting_approval","needs_human","succeeded","failed","denied","canceled"]},"risk":{"type":"string","enum":["read","write","sensitive","irreversible","financial"]},"runtime":{"type":"string","enum":["hosted","client","local"]},"tierUsed":{"anyOf":[{"type":"string","enum":["api","webmcp","replay","dom","agent"]},{"type":"null"}]},"recipeHash":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"decision":{"anyOf":[{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny","require_approval"]},"ruleId":{"type":"string"},"reason":{"type":"string"},"matched":{"type":"array","items":{"type":"string"}}},"required":["effect","ruleId","reason","matched"],"additionalProperties":false},{"type":"null"}]},"approvalId":{"type":["string","null"]},"output":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},{"type":"null"}]},"postconditions":{"type":"array","items":{"type":"object","properties":{"condition":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"status_in"},"statuses":{"minItems":1,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_present"},"path":{"type":"string","minLength":1,"maxLength":256}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"path":{"type":"string","minLength":1,"maxLength":256},"value":{"$ref":"#/$defs/__schema1"}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_matches"},"path":{"type":"string","minLength":1,"maxLength":256},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","path","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text_contains"},"text":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"url_matches"},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"element_exists"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"signed_in"}},"required":["kind"],"additionalProperties":false}]},"passed":{"type":"boolean"}},"required":["condition","passed"],"additionalProperties":false}},"trace":{"type":"array","items":{"type":"object","properties":{"tier":{"type":"string","enum":["api","webmcp","replay","dom","agent"]},"ok":{"type":"boolean"},"ms":{"type":"number"},"note":{"type":"string","maxLength":300},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["tier","ok","ms","note","at"],"additionalProperties":false}},"errorCode":{"type":["string","null"]},"latencyMs":{"type":["number","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["id","domain","actionId","status","risk","runtime","tierUsed","recipeHash","decision","approvalId","output","postconditions","trace","errorCode","latencyMs","createdAt","finishedAt"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema1"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema1"}}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, revoked or expired key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The key lacks the required scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. See Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/demo/sessions":{"post":{"operationId":"demoSession","summary":"Create an isolated, expiring demo account for the landing terminal","tags":["demo"],"security":[],"responses":{"201":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"projectId":{"type":"string"},"expiresAt":{"type":"number"}},"required":["key","projectId","expiresAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"API key of the form `orsel_<id>.<secret>`, sent as `Authorization: Bearer`. Scopes: find, read, act:read, act:write, act:sensitive, admin. Clients read it from `ORSEL_KEY`."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}},"x-limits":{"requestBytes":1048576,"keyRatePerMinute":600,"errorCodes":["unauthenticated","forbidden","not_found","invalid_request","conflict","idempotency_mismatch","payload_too_large","rate_limited","policy_denied","approval_required","payment_required","needs_human","internal"]}}