{"openapi":"3.1.0","info":{"title":"Keel API","version":"0.1.0"},"paths":{"/v1/me":{"get":{"tags":["identity"],"summary":"Get Me","description":"Return the current principal's profile, org, and entitlements.","operationId":"get_me_v1_me_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/onboarding":{"post":{"tags":["identity"],"summary":"Complete Onboarding","description":"Record onboarding PROVISIONING for the current principal's org.\n\nThis endpoint provisions only — it stamps ``onboarding.provisioned_at``.\nThe app's \"don't re-run onboarding\" gates read provisioned_at (falling\nback to the legacy ``onboarding_completed`` for existing orgs).\n\nIt no longer stamps ``onboarding_completed``: genuine completion is REAL\nactivation (a typed chat message), stamped server-side by\n``sync_activation_completion`` at /v1/me — never off a plan pick or a\nbacktest click (Q-0852; cohort F-03-2/F-13-8). The ``completed`` field is\nretained for wire-compatibility with older clients but no longer carries\ncompletion semantics.\n\nIdempotent (Q-1761): a repeated or overlapping call keeps the FIRST\n``provisioned_at`` and every recorded ``onboarding`` key the request does\nnot carry (``onboarding_records.stamp_provisioning``).","operationId":"complete_onboarding_v1_me_onboarding_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteOnboardingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/milestones":{"post":{"tags":["identity"],"summary":"Record Milestone","description":"Record a user milestone (e.g. first_strategy_created, first_backtest).\n\nfirst_* milestones are first-write-wins (Q-0491): a re-fired client\nevent must not move the recorded activation moment. Count milestones\noverwrite as before.\n\nA milestone is a REACH marker, never activation: recording one (a\nbacktest included) does not complete onboarding. ``onboarding_completed``\nis stamped only on real activation — a typed chat message — by\n``sync_activation_completion`` at /v1/me (Q-0852; cohort F-03-2/F-13-8).","operationId":"record_milestone_v1_me_milestones_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordMilestoneRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orgs":{"post":{"tags":["identity"],"summary":"Create Org","description":"Create a new org for the current principal.","operationId":"create_org_v1_orgs_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrgRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrgResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orgs/{org_id}":{"get":{"tags":["identity"],"summary":"Get Org","description":"Return org details. Org membership verified by get_principal().","operationId":"get_org_v1_orgs__org_id__get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["identity"],"summary":"Update Org","description":"Update org name/settings. Requires org.update authorization.","operationId":"update_org_v1_orgs__org_id__patch","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orgs/{org_id}/members":{"get":{"tags":["identity"],"summary":"List Org Members","description":"List org members with roles. Org membership verified by get_principal().","operationId":"list_org_members_v1_orgs__org_id__members_get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/legal-acceptances":{"post":{"tags":["identity"],"summary":"Record Legal Acceptances","description":"Record one or more legal document acceptances.\n\n``signup`` acceptances are idempotent per (principal, document, version)\n— a repeat returns the recorded row (Q-1761); ``deploy_modal`` acks append\na re-affirmation per deploy by design (``onboarding_records``).","operationId":"record_legal_acceptances_v1_me_legal_acceptances_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordLegalAcceptancesRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordLegalAcceptancesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["identity"],"summary":"List Legal Acceptances","description":"List the current user's legal document acceptances.","operationId":"list_legal_acceptances_v1_me_legal_acceptances_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLegalAcceptancesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/anonymous":{"post":{"tags":["auth-anon"],"summary":"Anonymous Grant","description":"Provision an anonymous principal + org and mint a restricted token.\n\nPublic (no Bearer). Rate limited three ways: the shared PUBLIC HTTP\ntier, per-real-client-IP, and per client fingerprint, plus the global\ndaily circuit breaker (R5).","operationId":"anonymous_grant_v1_auth_anonymous_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AnonymousGrantRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnonymousGrantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orgs/claim":{"post":{"tags":["auth-anon"],"summary":"Claim Anon Org","description":"Re-own an anonymous org into the calling (real) account.\n\nIdempotent per claimant; a second DIFFERENT claimant is rejected\n(token binding — possession of the anon token is necessary but not\nsufficient once the org is claimed).","operationId":"claim_anon_org_v1_orgs_claim_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimOrgRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimOrgResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/oauth/connect-attempts":{"post":{"tags":["auth-oauth"],"summary":"Record Connect Attempt","description":"Record a connect attempt from the keel-app server render (Q-2381).\n\nUnauthenticated, best-effort, always 200 once the body validates, with\n``{\"experiment_arm\": ...}`` -- the arm stored on the row\n(connect-onboarding §1.3). A database failure is logged and still\nanswers 200 with ``null``, so the page never depends on it. A malformed\nbody (bad id, enum or length, or any field the model does not declare)\nis a 422 and writes nothing.","operationId":"record_connect_attempt_v1_auth_oauth_connect_attempts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectAttemptRecordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectAttemptRecordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/oauth/connect-attempts/{attempt_id}/first-week":{"get":{"tags":["auth-oauth"],"summary":"Get First Week","description":"The consent page's first-week line (connect-onboarding §1.4).\n\nAuthenticated with the user's normal session. ``eligible`` is\n``platform_auth.welcome.welcome_eligibility`` -- the ONE rule\nauthorize-complete grants on -- so the page never promises a grant the\nconsent will not write. Never a 5xx into the page: any internal failure\nanswers ``eligible: false`` (and a malformed id is simply not eligible).","operationId":"get_first_week_v1_auth_oauth_connect_attempts__attempt_id__first_week_get","parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","title":"Attempt Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirstWeekResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/oauth/authorize-complete":{"post":{"tags":["auth-oauth"],"summary":"Authorize Complete","description":"User finished the /connect page — mint a short-lived code and\nreturn the redirect URL.\n\nAuth: the user must be signed in (Clerk session cookie validated by\nthe existing get_principal dependency). PKCE parameters and the\nredirect_uri come straight from the original client request via the\nkeel-app page; we re-validate redirect_uri server-side.\n\nRedirect validation, two mutually exclusive paths:\n* CIMD client (client_id is an HTTPS URL): fetch the metadata\n  document; its redirect_uris are AUTHORITATIVE for this client.\n* otherwise: the hardcoded static allow-list.\n\nThe response redirect carries RFC 9207 ``iss`` (always) and honours\nan RFC 8707 ``resource`` indicator when the client sent one.","operationId":"authorize_complete_v1_auth_oauth_authorize_complete_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeCompleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeCompleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/oauth/token":{"post":{"tags":["auth-oauth"],"summary":"Token Endpoint","description":"OAuth 2.1 token endpoint — both standard grants.\n\n* ``grant_type=authorization_code`` (default when absent, for the\n  shipped SDK): PKCE-verified single-use code exchange.\n* ``grant_type=refresh_token`` (RFC 6749 §6): rotation with reuse\n  detection — standards-following clients (Claude Code, Cursor,\n  ChatGPT) POST refresh grants HERE, per the AS metadata's\n  ``grant_types_supported``. The legacy ``/refresh`` route remains\n  for the shipped SDK.\n\nAccepts form-encoded and JSON bodies (see ``_parse_token_body``).","operationId":"token_endpoint_v1_auth_oauth_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}}}}},"/v1/auth/oauth/refresh":{"post":{"tags":["auth-oauth"],"summary":"Refresh Keel Token","description":"Legacy refresh route (shipped keel-trade SDK posts JSON here).\n\nStandards clients use ``grant_type=refresh_token`` at ``/token``;\nboth delegate to :func:`_do_refresh`. Accepts form + JSON.","operationId":"refresh_keel_token_v1_auth_oauth_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}}}}},"/v1/auth/oauth/revoke":{"post":{"tags":["auth-oauth"],"summary":"Revoke Endpoint","description":"RFC 7009 token revocation — the server half of a client's logout.\n\nQ-1575: until this existed the AS advertised no ``revocation_endpoint``,\nso a compliant client could only forget its copy of the token. Measured\non prod 2026-09-19: ``codex mcp logout keel`` cleared the local keychain\nentry while the org's ``platform.agent_credentials`` row kept\n``revoked_at = NULL`` — a live refresh credential, carrying whatever\nscopes it was minted with, on an org whose owner believed they had\ndisconnected that agent.\n\nPosture, deliberately identical to ``/token``:\n\n* **Public client, no client authentication.** That is what\n  ``token_endpoint_auth_methods_supported: [\"none\"]`` already advertises\n  and what every MCP client here is. The bearer of the token is the only\n  party who can present it, and presenting it IS the authorization to\n  destroy it — revocation only ever removes capability, so an attacker\n  who already holds the token gains nothing by calling this.\n* **Form-encoded or JSON body** (:func:`_parse_token_body`), and the same\n  ``invalid_request`` 401 as the token endpoint for a malformed call, so\n  this router has one error posture rather than two.\n\nRFC 7009 §2.2: an unknown, expired, or already-revoked token answers\n**200 with an empty body**. The endpoint never discloses whether a token\nwas ever valid, so it cannot be used as a validity oracle.\n\nA refresh token revokes its **whole rotation chain** (``lineage_id``),\nnot merely the row presented. Rotation means the token a client holds is\na descendant of the one it first received; killing one link while its\nsiblings live would leave the grant alive and the user's \"disconnect\"\nstill a lie. This is the same lineage burn reuse detection performs in\n:func:`_do_refresh`.\n\nAccess tokens are stateless 1h JWTs with no row to revoke, so a\n``token_type_hint=access_token`` call still answers 200 (RFC 7009 §2.1:\nthe server extends its search across its supported token types; finding\nnothing is not an error). Revoking the refresh chain stops renewal, and\nthe last access token minted from it expires on its own within the hour.","operationId":"revoke_endpoint_v1_auth_oauth_revoke_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/auth/oauth/connections":{"get":{"tags":["auth-oauth"],"summary":"List Oauth Connections","description":"The caller's live OAuth connections in their current org.\n\nOne item per rotation chain (``lineage_id``) that still has a link that\nis neither revoked nor expired — i.e. a chain its client can still\nrefresh. A revoked or lapsed chain is gone from this list; its client's\nlast access token dies on its own within the hour.","operationId":"list_oauth_connections_v1_auth_oauth_connections_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/oauth/connections/{connection_id}/revoke":{"post":{"tags":["auth-oauth"],"summary":"Revoke Oauth Connection","description":"Revoke one of the caller's OAuth connections — its whole chain.\n\n``connection_id`` is the ``id`` the list returns (the ``lineage_id``).\nA chain the caller does not hold in their current org — someone else's,\nanother org's, or one that never existed — is the ordinary 404, so the\nroute cannot be used to learn whether a lineage id exists.\n\nIdempotent for the owner: revoking a chain that is already dead answers\n200 with ``revoked: 0`` rather than an error, so a double-click or a\nstale list does not surface a failure.\n\nStops renewal immediately. The client's current access token is a\nstateless 1h JWT and lapses on its own within the hour.","operationId":"revoke_oauth_connection_v1_auth_oauth_connections__connection_id__revoke_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/pm-capabilities":{"get":{"tags":["accounts"],"summary":"Pm Capabilities","operationId":"pm_capabilities_v1_accounts_pm_capabilities_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PmCapabilities"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/check-deposit":{"get":{"tags":["accounts"],"summary":"Check Deposit","description":"The go-live Funds verdict for a wallet (spec 08 §3, Q-2592).\n\n``venue_seen`` (Q-2457): whether Hyperliquid knows the wallet at all\n(``userRole`` is not ``missing``), so the app shows the Add funds face\nbefore any signature. ``verdict`` is the server's own reading\n(``seen`` / ``unseen`` / ``mode_unsupported``), and an unsupported account\nmode is a 200 naming it (``account_mode``) rather than a 409.\n``account_value_usd`` counts spot USDC too; ``minimum_usd`` is the amount\nrule for ``universe_size`` assets. Never guessed: an unreadable venue is a\n502 ``venue_check_unavailable``. ``has_deposit`` keeps its meaning\n(mode-routed value > 0; null when the mode cannot be valued).\n\nWrites ``account.venue_checked`` (verdict + balance band, no address) to\nthe product-event spine on every answer, so the funnel's funds verdict\nsurvives a lost browser beacon.","operationId":"check_deposit_v1_accounts_check_deposit_get","parameters":[{"name":"wallet_address","in":"query","required":true,"schema":{"type":"string","title":"Wallet Address"}},{"name":"universe_size","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":1000,"minimum":1},{"type":"null"}],"title":"Universe Size"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts":{"post":{"tags":["accounts"],"summary":"Create Account","description":"Create a pending account and signing key. Returns EIP-712 payloads for wallet signing.\n\nThe body runs inside the account-flow boundary (Q-1601,\nservices/account_flow_events.py): every refusal is recorded once, there.","operationId":"create_account_v1_accounts_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccountRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["accounts"],"summary":"List Accounts","description":"List accounts for the current org, of the classes ``capital_class`` names.\n\nPaper Trading v2, S01 §3.10 / IC-01-9: one positive predicate,\n``a.capital_class = ANY(%s)``, with ``all`` naming ``CAPITAL_CLASSES``;\nan absent class means ``real``, so a client that sends none sees today's\nrows. Every row carries its venue block.","operationId":"list_accounts_v1_accounts_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"enrich","in":"query","required":false,"schema":{"type":"boolean","description":"Attach live HL account value + open positions (spec 03 §5.5).","default":false,"title":"Enrich"},"description":"Attach live HL account value + open positions (spec 03 §5.5)."},{"name":"capital_class","in":"query","required":false,"schema":{"enum":["real","practice","all"],"type":"string","description":"Money class to list: real, practice or all. Absent means real (PT2-28); all returns every account with its venue block.","default":"real","title":"Capital Class"},"description":"Money class to list: real, practice or all. Absent means real (PT2-28); all returns every account with its venue block."},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}":{"get":{"tags":["accounts"],"summary":"Get Account","description":"Get account detail with linked strategy.","operationId":"get_account_v1_accounts__account_id__get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["accounts"],"summary":"Delete Account","description":"Revoke agent key and disconnect account.","operationId":"delete_account_v1_accounts__account_id__delete","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/equity":{"get":{"tags":["accounts"],"summary":"Get Account Equity","description":"Observed venue equity for a connected account (deploy-wizard-v2 spec 03 §5).\n\nThe value+as-of sibling of the boolean ``check-deposit`` probe, built on\nthe SAME infrastructure: fresh mode resolution, then the mode-routed\nvaluation (``get_account_value_for_mode``). Fail-closed on venue trouble —\na 502/409 the client catches to degrade back to the boolean probe; the\nendpoint never fabricates or caches a value (funding is advisory, so a\nfailed read must read as \"unavailable\", not as a number).","operationId":"get_account_equity_v1_accounts__account_id__equity_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountEquityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/resume":{"post":{"tags":["accounts"],"summary":"Resume Account","description":"Get fresh EIP-712 payloads for a pending account so the user can retry signing.\n\nThe body runs inside the account-flow boundary (Q-1601,\nservices/account_flow_events.py): every refusal is recorded once, there.","operationId":"resume_account_v1_accounts__account_id__resume_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/authorize":{"post":{"tags":["accounts"],"summary":"Authorize Account","description":"Submit signed EIP-712 messages to Hyperliquid and activate the account.\n\nThe body runs inside the account-flow boundary (Q-1601,\nservices/account_flow_events.py): attempted/authorized/authorize_failed\nare recorded once, there, from the body's outcome — the body never emits\n(account.authorization_restored, the A8e trigger, stays in the reauth\nbranch because it is the domain transition itself).\n\nPostHog ``exchange_connected`` (Q-1573) is captured only after the\nauthorization COMMITS: the commit is where the V162 deferred drift guard\ncan still refuse it (Q-1471's shape), and an event describing an\nauthorization that rolled back is a phantom money-stage row.","operationId":"authorize_account_v1_accounts__account_id__authorize_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeAccountRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/reauthorize":{"post":{"tags":["accounts"],"summary":"Reauthorize Account","description":"Stage a replacement agent key and return the EIP-712 payload to sign.\n\nC9 (incident 2026-08-03 follow-up 1): this endpoint used to ROTATE the\nactive signing key (disabling the live KMS signer) and drop the account to\n'pending_authorization' BEFORE any wallet signature existed — abandoning\nthe wallet prompt stranded a previously healthy account on a dead signer.\n\nNow nothing about the live identity changes here. A replacement key is\nminted in 'pending' status ALONGSIDE the active one (it cannot sign), its\nidentity + fresh nonces are staged under meta.pending_reauth, and the swap\n(venue approval → key activation → account row update) happens atomically\nin /authorize only AFTER the new approveAgent signature succeeds. An\nabandoned or failed reauth leaves the account fully functional on its\nprevious agent; re-entering the flow reuses the staged pending key with\nfresh nonces.\n\nThe body runs inside the account-flow boundary (Q-2614,\nservices/account_flow_events.py, flow ``reauthorize``): every refusal is\nrecorded once, there.","operationId":"reauthorize_account_v1_accounts__account_id__reauthorize_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReauthorizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["accounts"],"summary":"Abandon Reauthorize","description":"Explicitly abandon a staged re-authorization session (spec 00b §2.5).\n\nRetires ONLY the staged pending key and clears ``meta.pending_reauth``;\nthe live authorization — status, signer, expiry, execution path — is\nuntouched, exactly as if the reauth had never been started. Idempotent:\nwith no staged session this is a no-op 204, so duplicate abandon calls\nconverge.\n\nThe \"only the pending key\" guard is real, not assumed: the staged key's\nstate is read from the signing service first. A staged key that already\nACTIVATED (a partially-completed reauth whose venue-side swap succeeded)\nis refused with 409 — abandoning at that point would retire the signer\nthe venue now recognizes; the recovery is to finish the swap by\nre-running authorization.","operationId":"abandon_reauthorize_v1_accounts__account_id__reauthorize_delete","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/refresh-mode":{"put":{"tags":["accounts"],"summary":"Refresh Account Mode","description":"Re-detect account mode from Hyperliquid and update if changed.","operationId":"refresh_account_mode_v1_accounts__account_id__refresh_mode_put","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshModeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents":{"post":{"tags":["agents"],"summary":"Create Agent","description":"Create an agent + credential. Token is returned ONCE.","operationId":"create_agent_v1_agents_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["agents"],"summary":"List Agents","description":"List agents in the current org, including revoked and expired keys.\n\nA revoked key stays listed as history, with ``status = \"revoked\"`` and the\nscopes it had. The built-in chat agent is listed too, with its\n``service_name``, so the UI can label it as internal.","operationId":"list_agents_v1_agents_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}":{"get":{"tags":["agents"],"summary":"Get Agent","description":"Get agent details + credential status.","operationId":"get_agent_v1_agents__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/revoke":{"post":{"tags":["agents"],"summary":"Revoke Agent","description":"Revoke all credentials for a user-created API key.\n\nIdempotent, and it reports what happened. Revoking a key that is already\nrevoked changes nothing, records nothing, and returns\n``already_revoked: true``.","operationId":"revoke_agent_v1_agents__agent_id__revoke_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/rotate":{"post":{"tags":["agents"],"summary":"Rotate Agent","description":"Rotate credential: revoke old, create new. Returns new token ONCE.\n\nA key that is revoked or expired is refused with 409. Rotation replaces a\nlive credential and copies its scopes; it never brings a dead key back.","operationId":"rotate_agent_v1_agents__agent_id__rotate_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateAgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/budget":{"get":{"tags":["agents"],"summary":"Get Agent Budget","description":"Get per-unit budget vs. spending for an agent.","operationId":"get_agent_budget_v1_agents__agent_id__budget_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentBudgetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/policies":{"post":{"tags":["policies"],"summary":"Create Policy","description":"Create an access control policy.","operationId":"create_policy_v1_policies_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePolicyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["policies"],"summary":"List Policies","description":"List policies in the current org.","operationId":"list_policies_v1_policies_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/policies/{policy_id}":{"get":{"tags":["policies"],"summary":"Get Policy","description":"Get policy details + bound principals.","operationId":"get_policy_v1_policies__policy_id__get","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["policies"],"summary":"Delete Policy","description":"Delete policy and cascade to bindings.","operationId":"delete_policy_v1_policies__policy_id__delete","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/policies/{policy_id}/bind":{"post":{"tags":["policies"],"summary":"Bind Policy","description":"Bind policy to principal. Idempotent -- duplicate binding returns 200.","operationId":"bind_policy_v1_policies__policy_id__bind_post","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BindPolicyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/policies/{policy_id}/bindings/{target_principal_id}":{"delete":{"tags":["policies"],"summary":"Unbind Policy","description":"Unbind policy from principal.","operationId":"unbind_policy_v1_policies__policy_id__bindings__target_principal_id__delete","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}},{"name":"target_principal_id","in":"path","required":true,"schema":{"type":"string","title":"Target Principal Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/entitlements":{"get":{"tags":["entitlements"],"summary":"Get Balances","description":"Return per-unit balance summary for the org.","operationId":"get_balances_v1_entitlements_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementBalanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/entitlements/history":{"get":{"tags":["entitlements"],"summary":"Get History","description":"Return paginated entitlement ledger (grants, spends, reservations).","operationId":"get_history_v1_entitlements_history_get","parameters":[{"name":"unit","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/entitlements/grants":{"post":{"tags":["entitlements"],"summary":"Create Grant","description":"Create admin/promo grant. Requires entitlement.grant authorization.","operationId":"create_grant_v1_entitlements_grants_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGrantRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGrantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/executions/{session_id}/revisions/{intent_rev}/receipt":{"get":{"tags":["execution-analytics"],"summary":"Get Execution Receipt","operationId":"get_execution_receipt_v1_deployments__deployment_id__executions__session_id__revisions__intent_rev__receipt_get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"intent_rev","in":"path","required":true,"schema":{"type":"integer","title":"Intent Rev"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Version"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionReceiptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/executions/{execution_run_id}/episodes":{"get":{"tags":["execution-analytics"],"summary":"Get Execution Run Episodes","description":"The run's per-episode receipt index (Q-0908).\n\nA run's receipts are per EPISODE and Q-0341 (still in force) refuses to\nlet one of them stand as the run's summary. Post-cutover no run has a\nsingle episode, so without this route the entire sealed-receipt surface\nwas unreachable from the executions timeline. Nothing here aggregates\nacross episodes.\n\nAn unknown or foreign run_id returns an EMPTY list rather than 404: the\norg/deployment scope is already enforced above, and \"this run has no\nnative episodes\" is a real answer (a legacy-routed run, a dispatch that\nhas not produced episodes yet). A 404 would make those indistinguishable\nfrom a deployment the caller cannot see.","operationId":"get_execution_run_episodes_v1_deployments__deployment_id__executions__execution_run_id__episodes_get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"execution_run_id","in":"path","required":true,"schema":{"type":"string","title":"Execution Run Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionRunEpisodesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/execution-quality":{"get":{"tags":["execution-analytics"],"summary":"Get Execution Quality","operationId":"get_execution_quality_v1_deployments__deployment_id__execution_quality_get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"}},{"name":"style","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"title":"Style"}},{"name":"style_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"title":"Style Version"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionQualityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/execution-impact-detector":{"get":{"tags":["execution-analytics"],"summary":"Get Execution Impact Detector","description":"Impact detector v0 (spec 11 §8) — observational, never causal impact.\n\nPer-asset OLS of arrival_bps vs abs(target_notional) over sealed SCORED\nreceipts. Ships ungated per D11 (the founder account is the research\nprofile); tiers will change visibility, never the numbers.","operationId":"get_execution_impact_detector_v1_deployments__deployment_id__execution_impact_detector_get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"points_limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":0,"default":1000,"title":"Points Limit"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionImpactDetectorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/execution-exports":{"post":{"tags":["execution-analytics"],"summary":"Post Execution Export","operationId":"post_execution_export_v1_deployments__deployment_id__execution_exports_post","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExecutionExportRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExecutionExportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/execution-exports/{export_id}":{"get":{"tags":["execution-analytics"],"summary":"Get Execution Export","operationId":"get_execution_export_v1_deployments__deployment_id__execution_exports__export_id__get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"export_id","in":"path","required":true,"schema":{"type":"string","title":"Export Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionExportStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/execution-exports/{export_id}/download":{"get":{"tags":["execution-analytics"],"summary":"Download Execution Export","operationId":"download_execution_export_v1_deployments__deployment_id__execution_exports__export_id__download_get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"export_id","in":"path","required":true,"schema":{"type":"string","title":"Export Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionExportDownloadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audit":{"get":{"tags":["audit"],"summary":"List Audit Events","description":"List audit events for the org with optional filters.","operationId":"list_audit_events_v1_audit_get","parameters":[{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"actor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audit/{event_id}":{"get":{"tags":["audit"],"summary":"Get Audit Event","description":"Get single audit event. Scoped to current org.","operationId":"get_audit_event_v1_audit__event_id__get","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditEventResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audit/events":{"post":{"tags":["audit"],"summary":"Ingest Audit Event","description":"Append a hosted-MCP tool-call event to the org's audit trail.\n\nIdempotent on event_id (retries from the mcp-server's forward path\nmust not error); returns 202 either way. Only a request whose INSERT\nactually inserted mirrors the row to PostHog (``RETURNING``), so a replay\nemits nothing; the mirror can never change the response.","operationId":"ingest_audit_event_v1_audit_events_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditEventIngestRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/actions/simulate":{"post":{"tags":["audit"],"summary":"Simulate Action","description":"Dry-run authorization. Side-effect-free -- no reservations or audit events.","operationId":"simulate_action_v1_actions_simulate_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulateActionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulateActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/generate":{"post":{"tags":["strategies"],"summary":"Generate Strategy","description":"Generate a Keel DSL strategy from a template kind + params payload.\n\nDispatches to `libs/strategy_templates/<kind>.py` via TEMPLATE_REGISTRY,\nthen bakes a resolved universe into the generated DSL so the handoff\nstrategy is never born failing validation (F-01-9 / Q-0847) AND reproduces\nthe set the source surface actually showed (Q-0852, Mechanism A).\n\nReproducibility: when the payload carries a resolved set + as-of\n(``params[\"resolved\"]`` / ``params[\"resolved_at\"]`` — the Momentum-Lab CTA\nnow transmits its displayed top-N membership + the snapshot instant), that\nset is baked as a manual-style PIN — the EXACT assets the Lab showed, not a\nfresh live re-resolve. Without a transmitted set (a legacy Lab client), the\nshared helper live-resolves as the honest fallback (born valid, editor can\nre-resolve). The `index` kind already ships an explicit resolved basket, so\nthe helper leaves it untouched. See `..universe_bake.bake_universe_resolution`.\n\nCurrently registered kinds: `screen`, `index`.\n\nBack-compat: if `kind` is omitted, the request is treated as a legacy\nmomentum-lab screen request and the flat fields are forwarded to the\nscreen generator. This shim will be removed after a deploy cycle.","operationId":"generate_strategy_v1_strategies_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_GenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_GenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/validate":{"post":{"tags":["strategies"],"summary":"Validate Strategy Endpoint","description":"Run full DSL validation (parse + 9 validation passes) without persisting.","operationId":"validate_strategy_endpoint_v1_strategies_validate_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateStrategyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateStrategyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/parse":{"post":{"tags":["strategies"],"summary":"Parse Strategy Endpoint","description":"Parse DSL source into a graph model for the visual builder.","operationId":"parse_strategy_endpoint_v1_strategies_parse_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseStrategyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseStrategyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies":{"post":{"tags":["strategies"],"summary":"Create Strategy","description":"Create a strategy with validation + compilation + initial commit.","operationId":"create_strategy_v1_strategies_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStrategyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["strategies"],"summary":"List Strategies","description":"List strategies in the current org.","operationId":"list_strategies_v1_strategies_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"updated_desc","title":"Sort"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}":{"get":{"tags":["strategies"],"summary":"Get Strategy","description":"Get strategy details including source from S3.","operationId":"get_strategy_v1_strategies__strategy_id__get","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional expansions, e.g. include=graph","title":"Include"},"description":"Optional expansions, e.g. include=graph"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["strategies"],"summary":"Update Strategy","description":"Update strategy metadata/source with optimistic concurrency + commits.","operationId":"update_strategy_v1_strategies__strategy_id__patch","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStrategyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["strategies"],"summary":"Delete Strategy","description":"Hard-delete a strategy and its backtest runs.\n\nRefuses with a coded 409 — never a 500 — when the strategy has work in\nflight or retains history the platform keeps (see\n``_DELETE_RETAINED_HISTORY_SQL`` above). Archive\n(``POST /v1/strategies/{id}/archive``) is the path for those.","operationId":"delete_strategy_v1_strategies__strategy_id__delete","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/source-ancestry":{"post":{"tags":["strategies"],"summary":"Check Source Ancestry","description":"How does a client source snapshot relate to this strategy's commits?\n\nBatch-11 seam for chat-api: a snapshot byte-identical to a SUPERSEDED\nmain-line commit is provably historical — the caller should prefer the\nsaved head rather than silently reverting newer work. A snapshot\nmatching nothing is novel text and stays authoritative (fail-open).\nThe server computes the hash of the exact bytes; callers never hash.","operationId":"check_source_ancestry_v1_strategies__strategy_id__source_ancestry_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceAncestryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceAncestryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/archive":{"post":{"tags":["strategies"],"summary":"Archive Strategy","description":"Archive a strategy (soft-delete). Must not have active deployments.","operationId":"archive_strategy_v1_strategies__strategy_id__archive_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/unarchive":{"post":{"tags":["strategies"],"summary":"Unarchive Strategy","description":"Restore an archived strategy back to DRAFT status.","operationId":"unarchive_strategy_v1_strategies__strategy_id__unarchive_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/deploy-intent":{"post":{"tags":["strategies"],"summary":"Record Deploy Intent","description":"Record durable deploy intent: emit `deploy_wizard.started` (02-AC-7.1).\n\nThe web deploy wizard calls this on entry, replacing the PostHog-only\ncapture as the trigger-engine source (PostHog stays supplementary and\nnever gates — spec 02 §7.1). The event row IS the domain write here\n(spec 01 AC-1.1's intent/edge-event rule), written via the one\nsanctioned emit path. Repeated wizard entries may emit repeated\nevents by design — once-only lives in the B3 trigger's dedupe key,\nnot in this producer. Headless (API/CLI) deploys never call this:\nthey produce durable deployment records directly (B3 is\nUI-wizard-scoped; B1 covers headless users).","operationId":"record_deploy_intent_v1_strategies__strategy_id__deploy_intent_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/lock":{"get":{"tags":["strategies"],"summary":"Get Strategy Lock","description":"Return the component lock for a saved strategy.","operationId":"get_strategy_lock_v1_strategies__strategy_id__lock_get","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LockGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/lock/validate":{"post":{"tags":["strategies"],"summary":"Validate Strategy With Lock","description":"Validate a saved strategy using its stored source and lock.","operationId":"validate_strategy_with_lock_v1_strategies__strategy_id__lock_validate_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LockValidateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/lock/compile":{"post":{"tags":["strategies"],"summary":"Compile Strategy With Lock","description":"Compile a saved strategy using its stored source and lock.","operationId":"compile_strategy_with_lock_v1_strategies__strategy_id__lock_compile_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LockCompileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/lock/status":{"get":{"tags":["strategies"],"summary":"Get Lock Drift Status","description":"What upgrading each pin would change (dollar-volume spec 02 §2).\n\nOne entry per drifting pin, from ``lock_upgrade.drift_entries`` (the\nowner shared with the agent tools): the changelog, the interface diff,\nand ``breaking`` — decided by validating the stored source with only\nthat pin bumped — with the issues the bump introduces. Read only.","operationId":"get_lock_drift_status_v1_strategies__strategy_id__lock_status_get","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LockDriftResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/lock/upgrade":{"post":{"tags":["strategies"],"summary":"Upgrade Strategy Lock","description":"Bump the NON-breaking pins and save them — a thin wrapper over PATCH.\n\nSpec 02 (Contract): of the requested drifting pins (all when\n``components`` is omitted), only those whose bump alone keeps the\nstrategy valid are moved; breaking ones (an interface change, a\ndeprecation, an unknown component) are listed in ``skipped_breaking`` for\na recomposition. The bumped lock is saved through ``PATCH`` (lock-only)\nand only when it validates: an invalid combination writes nothing. The\ncaller names the version it read — ``expected_head_commit_id``, or both\ncontent hashes — and a moved HEAD is a 409 before anything is computed.","operationId":"upgrade_strategy_lock_v1_strategies__strategy_id__lock_upgrade_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__strategies__LockUpgradeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__strategies__LockUpgradeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/versions":{"get":{"tags":["strategies"],"summary":"List Versions","description":"Get commit history for a strategy.","operationId":"list_versions_v1_strategies__strategy_id__versions_get","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VersionResponse"},"title":"Response List Versions V1 Strategies  Strategy Id  Versions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/versions/{ref}":{"get":{"tags":["strategies"],"summary":"Get Version","description":"Get a specific version by tag name, #N, or UUID.","operationId":"get_version_v1_strategies__strategy_id__versions__ref__get","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"ref","in":"path","required":true,"schema":{"type":"string","title":"Ref"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/versions/{ref}/source":{"get":{"tags":["strategies"],"summary":"Get Version Source","description":"Get the DSL source code for a specific version.","operationId":"get_version_source_v1_strategies__strategy_id__versions__ref__source_get","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"ref","in":"path","required":true,"schema":{"type":"string","title":"Ref"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionSourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/versions/restore":{"post":{"tags":["strategies"],"summary":"Restore Version","description":"Restore a historical version as new HEAD.\n\n``expected_head_commit_id``, when sent, is the version the caller is\nrestoring over: a moved HEAD is a 409 ``HEAD_MOVED`` and nothing is\nwritten (Q-2227 S1).","operationId":"restore_version_v1_strategies__strategy_id__versions_restore_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/versions/compile":{"post":{"tags":["strategies"],"summary":"Compile Version","description":"Compile strategy source to canonical pipeline spec.","operationId":"compile_version_v1_strategies__strategy_id__versions_compile_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__strategies__CompileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/versions/diff":{"post":{"tags":["strategies"],"summary":"Diff Versions","description":"Diff two versions of a strategy.","operationId":"diff_versions_v1_strategies__strategy_id__versions_diff_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiffRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiffResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/versions/checkpoint":{"post":{"tags":["strategies"],"summary":"Create Checkpoint","description":"Create a named checkpoint tag on the current HEAD.","operationId":"create_checkpoint_v1_strategies__strategy_id__versions_checkpoint_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckpointRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/versions/release":{"post":{"tags":["strategies"],"summary":"Create Release","description":"Create a release tag on the current HEAD.","operationId":"create_release_v1_strategies__strategy_id__versions_release_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/aliases":{"get":{"tags":["strategies"],"summary":"List Aliases","description":"List mutable aliases for a strategy.","operationId":"list_aliases_v1_strategies__strategy_id__aliases_get","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TagResponse"},"title":"Response List Aliases V1 Strategies  Strategy Id  Aliases Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/aliases/{alias_name}":{"put":{"tags":["strategies"],"summary":"Set Alias","description":"Set or update a mutable alias.","operationId":"set_alias_v1_strategies__strategy_id__aliases__alias_name__put","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"alias_name","in":"path","required":true,"schema":{"type":"string","title":"Alias Name"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AliasSetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/experiments":{"post":{"tags":["strategies"],"summary":"Create Experiment","description":"Create or refresh a durable experiment queue item for a strategy.","operationId":"create_experiment_v1_strategies__strategy_id__experiments_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["strategies"],"summary":"List Experiments","description":"List experiments for a strategy.","operationId":"list_experiments_v1_strategies__strategy_id__experiments_get","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Status"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExperimentResponse"},"title":"Response List Experiments V1 Strategies  Strategy Id  Experiments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/experiments/lifecycle":{"get":{"tags":["strategies"],"summary":"Get Strategy Experiments Lifecycle","description":"Experiments for a strategy, grouped by lifecycle position.\n\nBacks the strategy-info side-panel \"Experiments\" section. Returns:\n- `active`: at most one — the currently-selected or running experiment.\n- `backlog`: queued/proposed experiments not yet selected.\n- `completed`: terminal states (accepted, rejected, inconclusive,\n  completed, archived, stale). Most recently decided first.\n\nEach entry includes the latest trial summary so the frontend can render\na consolidated \"completed experiment\" card without a second round trip.","operationId":"get_strategy_experiments_lifecycle_v1_strategies__strategy_id__experiments_lifecycle_get","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyExperimentLifecycleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/experiments/{experiment_id}":{"patch":{"tags":["strategies"],"summary":"Patch Experiment","description":"Update queue metadata, status, or decision fields for one experiment.","operationId":"patch_experiment_v1_strategies__strategy_id__experiments__experiment_id__patch","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string","title":"Experiment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentPatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/experiments/{experiment_id}/select":{"post":{"tags":["strategies"],"summary":"Select Experiment","description":"Mark one experiment as the selected next test and requeue any prior selection.","operationId":"select_experiment_v1_strategies__strategy_id__experiments__experiment_id__select_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string","title":"Experiment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/experiments/{experiment_id}/archive":{"post":{"tags":["strategies"],"summary":"Archive Experiment","description":"Archive an experiment while preserving trials and events.","operationId":"archive_experiment_v1_strategies__strategy_id__experiments__experiment_id__archive_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string","title":"Experiment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ExperimentArchiveRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/experiments/reorder":{"post":{"tags":["strategies"],"summary":"Reorder Experiment","description":"Move one experiment in the sparse priority queue.","operationId":"reorder_experiment_v1_strategies__strategy_id__experiments_reorder_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentReorderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/experiments/{experiment_id}/events":{"get":{"tags":["strategies"],"summary":"Get Experiment Events","description":"Return the append-only event log for one experiment.","operationId":"get_experiment_events_v1_strategies__strategy_id__experiments__experiment_id__events_get","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string","title":"Experiment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExperimentEventResponse"},"title":"Response Get Experiment Events V1 Strategies  Strategy Id  Experiments  Experiment Id  Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/experiments/{experiment_id}/trials":{"post":{"tags":["strategies"],"summary":"Create Experiment Trial Endpoint","description":"Create one concrete attempt to evaluate or apply an experiment.","operationId":"create_experiment_trial_endpoint_v1_strategies__strategy_id__experiments__experiment_id__trials_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string","title":"Experiment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentTrialCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentTrialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/experiments/{experiment_id}/trials/{trial_id}":{"patch":{"tags":["strategies"],"summary":"Patch Experiment Trial Endpoint","description":"Update trial evidence refs, result summary, status, or decision.","operationId":"patch_experiment_trial_endpoint_v1_strategies__strategy_id__experiments__experiment_id__trials__trial_id__patch","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string","title":"Experiment Id"}},{"name":"trial_id","in":"path","required":true,"schema":{"type":"string","title":"Trial Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentTrialPatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentTrialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/experiments/{experiment_name}/promote":{"post":{"tags":["strategies"],"summary":"Promote Experiment","description":"Promote an experiment result to the main version line.","operationId":"promote_experiment_v1_strategies__strategy_id__experiments__experiment_name__promote_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"experiment_name","in":"path","required":true,"schema":{"type":"string","title":"Experiment Name"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/experiments/{experiment_name}/close":{"post":{"tags":["strategies"],"summary":"Close Experiment","description":"Close/archive an experiment.","operationId":"close_experiment_v1_strategies__strategy_id__experiments__experiment_name__close_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"experiment_name","in":"path","required":true,"schema":{"type":"string","title":"Experiment Name"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/memory":{"get":{"tags":["strategies"],"summary":"Get Strategy Memory Endpoint","description":"Return the most recent N notes for this strategy (newest first).\n\nBacks `keel_strategy_notes_read` (SDK outcome tool). The response\nis org-scoped: cross-org access returns 404 via `_get_strategy_or_404`.","operationId":"get_strategy_memory_endpoint_v1_strategies__strategy_id__memory_get","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Limit"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyMemoryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["strategies"],"summary":"Write Strategy Memory Endpoint","description":"Append a note to a strategy's memory. Append-only; no edits.\n\n`role` defaults to \"agent\" — the typical MCP path. Web/chat-api\ncallers may pass \"user\" if they want a note flagged as authored by\na human. The \"system\" role is reserved for chat-api's\nauto-summarization writes (which omit the column and rely on the\ndefault).","operationId":"write_strategy_memory_endpoint_v1_strategies__strategy_id__memory_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyMemoryWriteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyMemoryItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/validation/rules":{"get":{"tags":["validation"],"summary":"List Validation Rules","description":"Return the full generated rule catalog (spec 05 §3.4).","operationId":"list_validation_rules_v1_validation_rules_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Validation Rules V1 Validation Rules Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/validation/rules/{code}":{"get":{"tags":["validation"],"summary":"Get Validation Rule","description":"Return one rule catalog entry (including ``explain``) or 404.\n\n``staged_changes`` is the catalog's meta section, not a rule — a lookup\nfor it is a miss like any unknown code.","operationId":"get_validation_rule_v1_validation_rules__code__get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Validation Rule V1 Validation Rules  Code  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/library":{"get":{"tags":["library"],"summary":"List Library Entries","description":"List published launch-library entries (in-app Library tab source).","operationId":"list_library_entries_v1_library_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/library/{slug}":{"get":{"tags":["library"],"summary":"Get Library Entry","description":"Detail facts for one entry: metrics, config schema, and public variants.\n\nPackage reads only by default. The BTC hold ``reference`` is opt-in\n(``references=true``) — the same rule ``/v1/backtests/{id}/curve`` follows\n(Q-1886): a hold line is asked for, never volunteered, and the package\nstores no benchmark figure to show instead (Q-1901).","operationId":"get_library_entry_v1_library__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"references","in":"query","required":false,"schema":{"type":"boolean","description":"Also compute the BTC hold reference over the entry's backtest window (one price read). Off by default: the entry detail reads the package only.","default":false,"title":"References"},"description":"Also compute the BTC hold reference over the entry's backtest window (one price read). Off by default: the entry detail reads the package only."},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryEntryDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/library/{slug}/fork":{"post":{"tags":["library"],"summary":"Fork Library Entry","description":"Fork a library entry's selected variant into the caller's org.\n\nCreates a normal user strategy (S3 source + commit #0) with the selected\nvariant applied and library provenance recorded (spec 08 §5). The forked\nstrategy is a normal, editable, backtestable strategy from second one — no\nlibrary entry is mutated in place (entries are immutable, spec 03 B2.3).","operationId":"fork_library_entry_v1_library__slug__fork_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryForkRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryForkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/library/backtested/{slug}/fork":{"post":{"tags":["library"],"summary":"Fork Backtested Cell","description":"Fork one tested cell of a backtested strategy page into the caller's org.\n\nReads ``sources[cell_id]`` from the committed class P package — the exact\nprogram whose numbers the page publishes, a basket ``headline`` cell or a\n``per_coin`` cell (D-30) — and stores it verbatim as a\nnormal DRAFT strategy, through the same bake, validate, lock and upload\nsteps as :func:`fork_library_entry`.\n\nThere is no default cell: an unknown slug or cell is a 404 that names the\ncells the page does carry (Q-3119: a fork that silently drops its payload\nis worse than a refusal). A source the validator rejects is a 422.\n\nProvenance: a class P cell is not a library entry, so the ``library_*``\ncolumns stay NULL (keel-app links ``library_source_slug`` to\n``/library/<slug>``). The commit's ``meta.provenance`` records\n``{class: P, slug, cell_id, import_id, source_sha256}``.","operationId":"fork_backtested_cell_v1_library_backtested__slug__fork_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BacktestedForkRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BacktestedForkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/universe/instruments":{"get":{"tags":["universe"],"summary":"List Instruments","description":"List instruments for a market with their tags.","operationId":"list_instruments_v1_universe_instruments_get","parameters":[{"name":"market","in":"query","required":false,"schema":{"type":"string","default":"perp","title":"Market"}},{"name":"include_delisted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Delisted"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InstrumentResponse"},"title":"Response List Instruments V1 Universe Instruments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/universe/resolve":{"post":{"tags":["universe"],"summary":"Resolve Universe Endpoint","description":"Resolve universe criteria into a concrete symbol list.","operationId":"resolve_universe_endpoint_v1_universe_resolve_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveUniverseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveUniverseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/universe/categories":{"get":{"tags":["universe"],"summary":"List Categories","description":"List available instrument categories with counts.","operationId":"list_categories_v1_universe_categories_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryResponse"},"title":"Response List Categories V1 Universe Categories Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/share-previews":{"post":{"tags":["sharing"],"summary":"Generate Share Previews Endpoint","description":"Generate card preview PNGs for the share dialog (no share link created yet).","operationId":"generate_share_previews_endpoint_v1_strategies__strategy_id__share_previews_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateSharePreviewsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharePreviewsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/fork":{"post":{"tags":["sharing"],"summary":"Fork Strategy Endpoint","operationId":"fork_strategy_endpoint_v1_strategies__strategy_id__fork_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkStrategyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkStrategyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/fork-with-edits":{"post":{"tags":["sharing"],"summary":"Fork With Edits Endpoint","description":"Fork a shared strategy with optional client-side edits applied on top.","operationId":"fork_with_edits_endpoint_v1_strategies_fork_with_edits_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkWithEditsRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkWithEditsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/visibility":{"patch":{"tags":["sharing"],"summary":"Update Visibility Endpoint","operationId":"update_visibility_endpoint_v1_strategies__strategy_id__visibility_patch","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVisibilityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVisibilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/{strategy_id}/share-links":{"post":{"tags":["sharing"],"summary":"Create Share Link Endpoint","operationId":"create_share_link_endpoint_v1_strategies__strategy_id__share_links_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"wait_for_card","in":"query","required":false,"schema":{"type":"boolean","description":"Return only once the link's preview card exists (bounded at ~10 s; `artifacts_status` says whether it made it). Agent and CLI creators and the web share dialog ask for it.","default":false,"title":"Wait For Card"},"description":"Return only once the link's preview card exists (bounded at ~10 s; `artifacts_status` says whether it made it). Agent and CLI creators and the web share dialog ask for it."},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShareLinkRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["sharing"],"summary":"List Share Links Endpoint","operationId":"list_share_links_endpoint_v1_strategies__strategy_id__share_links_get","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ShareLinkResponse"},"title":"Response List Share Links Endpoint V1 Strategies  Strategy Id  Share Links Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/backtests/{backtest_id}/share-link":{"post":{"tags":["sharing"],"summary":"Create Backtest Share Link Endpoint","operationId":"create_backtest_share_link_endpoint_v1_backtests__backtest_id__share_link_post","parameters":[{"name":"backtest_id","in":"path","required":true,"schema":{"type":"string","title":"Backtest Id"}},{"name":"wait_for_card","in":"query","required":false,"schema":{"type":"boolean","description":"Return only once the link's preview card exists (bounded at ~10 s; `artifacts_status` says whether it made it). Agent and CLI creators and the web share dialog ask for it.","default":false,"title":"Wait For Card"},"description":"Return only once the link's preview card exists (bounded at ~10 s; `artifacts_status` says whether it made it). Agent and CLI creators and the web share dialog ask for it."},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBacktestShareLinkRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/share-links/{share_id}":{"delete":{"tags":["sharing"],"summary":"Revoke Share Link Endpoint","operationId":"revoke_share_link_endpoint_v1_share_links__share_id__delete","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/strategies/{strategy_id}":{"get":{"tags":["sharing-public"],"summary":"Get Public Strategy Endpoint","operationId":"get_public_strategy_endpoint_public_strategies__strategy_id__get","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicStrategyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/s/{share_id}":{"get":{"tags":["sharing-public"],"summary":"Resolve Share Link Endpoint","operationId":"resolve_share_link_endpoint_s__share_id__get","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PublicShareResponse"},{"$ref":"#/components/schemas/PublicLiveShareV1"},{"$ref":"#/components/schemas/PublicPaperShareV1"}],"title":"Response Resolve Share Link Endpoint S  Share Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/s/{share_id}/graph":{"get":{"tags":["sharing-public"],"summary":"Get Share Graph","description":"Get the visual graph model for a shared strategy.","operationId":"get_share_graph_s__share_id__graph_get","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShareGraphResponse"},{"$ref":"#/components/schemas/PublicLiveStrategyV1"}],"title":"Response Get Share Graph S  Share Id  Graph Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/s/{share_id}/curve":{"get":{"tags":["sharing-public"],"summary":"Get Share Curve","description":"Get a presigned URL for the equity curve of a shared backtest.","operationId":"get_share_curve_s__share_id__curve_get","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareCurveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/s/{share_id}/card-input":{"get":{"tags":["sharing-public"],"summary":"Get Shared Card Input","description":"Current public capability is the asynchronous renderer's sole authority.","operationId":"get_shared_card_input_s__share_id__card_input_get","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharedCardInput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/share-links/preview":{"post":{"tags":["live-sharing"],"summary":"Preview Live Share Endpoint","description":"Project the exact visitor shape without allocating a capability.","operationId":"preview_live_share_endpoint_v1_deployments__deployment_id__share_links_preview_post","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewLiveShareRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLiveShareV1"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/share-links":{"post":{"tags":["live-sharing"],"summary":"Create Live Share Endpoint","operationId":"create_live_share_endpoint_v1_deployments__deployment_id__share_links_post","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLiveShareRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveShareLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["live-sharing"],"summary":"List Live Shares Endpoint","operationId":"list_live_shares_endpoint_v1_deployments__deployment_id__share_links_get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"include_revoked","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Revoked"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LiveShareLinkResponse"},"title":"Response List Live Shares Endpoint V1 Deployments  Deployment Id  Share Links Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/live-share-links/{share_id}":{"get":{"tags":["live-sharing"],"summary":"Get Live Share Endpoint","operationId":"get_live_share_endpoint_v1_live_share_links__share_id__get","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveShareLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["live-sharing"],"summary":"Update Live Share Endpoint","operationId":"update_live_share_endpoint_v1_live_share_links__share_id__patch","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLiveShareRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLiveShareResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["live-sharing"],"summary":"Revoke Live Share Endpoint","operationId":"revoke_live_share_endpoint_v1_live_share_links__share_id__delete","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveShareLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/live-share-links/{share_id}/duplicate":{"post":{"tags":["live-sharing"],"summary":"Duplicate Live Share Endpoint","operationId":"duplicate_live_share_endpoint_v1_live_share_links__share_id__duplicate_post","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateLiveShareRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveShareLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/s/{share_id}/series":{"get":{"tags":["sharing-public"],"summary":"Get Public Live Series","description":"Return a bounded canonical live series; never increments page views.","operationId":"get_public_live_series_s__share_id__series_get","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}},{"name":"range","in":"query","required":false,"schema":{"enum":["1w","1m","3m","all"],"type":"string","default":"all","title":"Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PublicLiveSeriesV1"},{"$ref":"#/components/schemas/PublicLiveSeriesV2"}],"title":"Response Get Public Live Series S  Share Id  Series Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/s/{share_id}/view":{"post":{"tags":["sharing-public"],"summary":"Record Public Live View","description":"Count one mounted page session, never SSR/metadata/series polling.","operationId":"record_public_live_view_s__share_id__view_post","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLiveViewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLiveViewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/s/{share_id}/fork":{"post":{"tags":["sharing-public"],"summary":"Fork Public Live Strategy","description":"Fork the exact source-enabled deployed commit into the caller's org.","operationId":"fork_public_live_strategy_s__share_id__fork_post","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkStrategyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/s/{share_id}/card-input/{policy_revision}":{"get":{"tags":["sharing-public"],"summary":"Get Public Live Card Input","description":"Return the only DTO a Live Share social-card renderer may consume.","operationId":"get_public_live_card_input_s__share_id__card_input__policy_revision__get","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}},{"name":"policy_revision","in":"path","required":true,"schema":{"type":"integer","title":"Policy Revision"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PublicLiveSocialCardV1"},{"$ref":"#/components/schemas/PublicPaperSocialCardV1"}],"title":"Response Get Public Live Card Input S  Share Id  Card Input  Policy Revision  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/s/{share_id}/card/{policy_revision}/live.png":{"get":{"tags":["sharing-public"],"summary":"Get Public Live Card","description":"Authorize the canonical card URL before handing off to Next/OG.\n\nThe renderer independently calls the strict card-input endpoint, so a\nrevoke or revision change during the redirect is checked a second time.","operationId":"get_public_live_card_s__share_id__card__policy_revision__live_png_get","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}},{"name":"policy_revision","in":"path","required":true,"schema":{"type":"integer","title":"Policy Revision"}}],"responses":{"307":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/backtests":{"post":{"tags":["backtests"],"summary":"Submit Backtest","description":"Submit a backtest -- commit-then-publish flow.","operationId":"submit_backtest_v1_backtests_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitBacktestRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BacktestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["backtests"],"summary":"List Backtests","description":"List backtests in the current org.","operationId":"list_backtests_v1_backtests_get","parameters":[{"name":"strategy_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/backtests/{job_id}":{"get":{"tags":["backtests"],"summary":"Get Backtest","description":"Get backtest status + summary metrics.","operationId":"get_backtest_v1_backtests__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BacktestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/backtests/{job_id}/results":{"get":{"tags":["backtests"],"summary":"Get Backtest Results","description":"Generate presigned S3 URL for backtest results.\n\nAll users can access results data (equity curve, metrics, etc.).\nAdvanced analysis tabs (trades, allocation, analysis) are gated\nin the frontend via the feature:full_backtest entitlement.","operationId":"get_backtest_results_v1_backtests__job_id__results_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BacktestResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/backtests/{job_id}/curve":{"get":{"tags":["backtests"],"summary":"Get Backtest Curve","description":"Compact equity + drawdown series for a completed run (Q-1505).\n\nThe MCP result card draws its chart in-card, so it needs a series it\ncan carry in the tool envelope rather than the presigned pointer at\nthe full ``results.json``. Same access rule as ``/results``\n(``backtest.results.read``), same 409 before completion; warm-up is\ntrimmed and the series downsampled by ``utils.backtest_curve`` so the\ncard's chart starts and dips where the tearsheet's does.","operationId":"get_backtest_curve_v1_backtests__job_id__curve_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"points","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":2,"description":"Maximum points to return (extreme-preserving downsample).","default":240,"title":"Points"},"description":"Maximum points to return (extreme-preserving downsample)."},{"name":"references","in":"query","required":false,"schema":{"type":"boolean","description":"Serve the BTC/ETH/SOL price-only hold lines over the curve's span (or reference_start..reference_end). Off by default: the lines cost a multi-month price read, and only a caller that draws them asks.","default":false,"title":"References"},"description":"Serve the BTC/ETH/SOL price-only hold lines over the curve's span (or reference_start..reference_end). Off by default: the lines cost a multi-month price read, and only a caller that draws them asks."},{"name":"reference_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"description":"First UTC day (YYYY-MM-DD) of the span the hold references cover; with reference_end, replaces the curve's own trimmed span — a comparison asks for the span every run covers.","title":"Reference Start"},"description":"First UTC day (YYYY-MM-DD) of the span the hold references cover; with reference_end, replaces the curve's own trimmed span — a comparison asks for the span every run covers."},{"name":"reference_end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"description":"Exclusive end UTC day (YYYY-MM-DD) of that span.","title":"Reference End"},"description":"Exclusive end UTC day (YYYY-MM-DD) of that span."},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BacktestCurveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/backtests/{job_id}/cancel":{"post":{"tags":["backtests"],"summary":"Cancel Backtest","description":"Cancel a backtest (Q-1220, consume-at-scale O.21 / doc 10 §3).\n\nThe durable request is a status, and which status depends on who holds\nthe run:\n\n* **QUEUED** -- no worker holds it. The row goes straight to CANCELLED\n  here, with every cancellation stamp; the SQS message still arrives at a\n  worker, whose atomic claim (``WHERE status = 'QUEUED'``) refuses it --\n  that refusal IS the \"re-check at claim\". The compute-seconds spend\n  entry is zeroed (nothing ran); the run unit stays consumed (a\n  cancellation is the user's act -- the worker's cancelled arm makes the\n  same choice, and the founder ruling on it is doc 30 §4's).\n* **RUNNING** -- a worker is executing. The row becomes CANCEL_REQUESTED\n  and the worker honours it at its next phase boundary\n  (backtest-worker/src/cancellation.py): the response says\n  ``cancel_requested``, the client polls, and the row reaches CANCELLED\n  within one phase -- or completes anyway if the request landed after\n  the worker's last checkpoint (``cancel_requested_at`` is kept as the\n  evidence either way).\n* **CANCEL_REQUESTED** -- already asked. Idempotent: the current row.\n* anything else -- terminal. 409 ``BACKTEST_ALREADY_TERMINAL``.\n\nEvery write is guarded on the status it read, so a race with the worker\n(a claim landing between the read and the QUEUED write, a completion\nlanding before the RUNNING write) re-reads and falls through to the\ntruthful branch instead of overwriting a terminal row.","operationId":"cancel_backtest_v1_backtests__job_id__cancel_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BacktestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/backtests/{job_id}/trades":{"get":{"tags":["backtests"],"summary":"Get Backtest Trades","description":"A completed run's closed positions, bounded (Q-1893; ``utils.backtest_trades``).\n\nThe stored trade rows (one per order that reduced or closed a position)\ngrouped into positions, entry to exit. No ``asset``/``start``/``end``: a\nsummary only (counts, win rate, P&L by asset, the best and worst\npositions). With a scope: that scope's summary plus one page of\npositions and a cursor. ``run_trades`` and ``run_positions`` are the\nrun's own counts, each null when the run did not record it. One\n``results.json`` read, same access rule and 409 as ``/curve``.","operationId":"get_backtest_trades_v1_backtests__job_id__trades_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"asset","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"One asset's positions.","title":"Asset"},"description":"One asset's positions."},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Entry on/after (YYYY-MM-DD or ISO).","title":"Start"},"description":"Entry on/after (YYYY-MM-DD or ISO)."},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Entry before (YYYY-MM-DD or ISO).","title":"End"},"description":"Entry before (YYYY-MM-DD or ISO)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor from a previous page.","title":"Cursor"},"description":"Opaque cursor from a previous page."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(pnl|time)$","default":"pnl","title":"Sort"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/backtests/{job_id}/slice":{"get":{"tags":["backtests"],"summary":"Get Backtest Slice","description":"Part of a completed run, as it ran, scaled to ``capital`` (spec 07 §6).\n\nReturn, P&L on ``capital``, max drawdown, positions and bars over\n``start``..``end`` (inclusive UTC days) at the run's own bar clock, from\none ``results.json`` read (``utils.backtest_slice``, the one owner).\nPositions held at the slice start carry over; nothing is re-simulated. A\nbound outside the run is a 422 naming the run's window. Same access rule\nand 409 as ``/trades``.","operationId":"get_backtest_slice_v1_backtests__job_id__slice_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"description":"First day of the slice (UTC).","title":"Start"},"description":"First day of the slice (UTC)."},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"description":"Last day of the slice, inclusive (UTC).","title":"End"},"description":"Last day of the slice, inclusive (UTC)."},{"name":"capital","in":"query","required":false,"schema":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}],"description":"Value the slice starts from; default: the run's own.","title":"Capital"},"description":"Value the slice starts from; default: the run's own."},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/backtests/{job_id}/periods":{"get":{"tags":["backtests"],"summary":"Get Backtest Periods","description":"The slice per calendar period of a completed run, as one table (Q-2565).\n\n``utils.backtest_slice.build_periods`` — the slice owner over a partition\nof the run's bars by UTC month or quarter (every bar in the period\nholding the day it covers, Q-2577), from one ``results.json`` read: each\nrow's return, max drawdown (within the period), bars and positions, plus\nthe whole run's row; the rows' bars sum to the run's and their returns\ncompound to the run's. A run with more than ``MAX_PERIODS`` periods at the grain is a\n422 naming the count. Same access rule and 409 as ``/slice``; no\nbacktest unit is spent.","operationId":"get_backtest_periods_v1_backtests__job_id__periods_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"periods","in":"query","required":true,"schema":{"type":"string","pattern":"^(monthly|quarterly)$","description":"The period grain: monthly or quarterly (UTC calendar periods).","title":"Periods"},"description":"The period grain: monthly or quarterly (UTC calendar periods)."},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/deploy-intents":{"post":{"tags":["deployments"],"summary":"Create Deploy Intent","description":"Mint a deploy-intent token for a strategy the caller's org owns.","operationId":"create_deploy_intent_v1_deployments_deploy_intents_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeployIntentRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeployIntentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/deploy-intents/status":{"post":{"tags":["deployments"],"summary":"Deploy Intent Status","description":"Verify an intent token and report its lifecycle status (R6 groundwork).","operationId":"deploy_intent_status_v1_deployments_deploy_intents_status_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeployIntentStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeployIntentStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/update-intents":{"post":{"tags":["deployments"],"summary":"Create Update Intent","description":"Mint an update-intent token for a LIVE/PAUSED deployment the caller's org owns.","operationId":"create_update_intent_v1_deployments_update_intents_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUpdateIntentRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIntentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/update-intents/status":{"post":{"tags":["deployments"],"summary":"Update Intent Status","description":"Verify an update-intent token and report its lifecycle status.","operationId":"update_intent_status_v1_deployments_update_intents_status_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIntentStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIntentStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/embeds":{"post":{"tags":["embeds"],"summary":"Create Embed","description":"Mint a short-lived signed embed URL for a resource the org owns.\n\nSame authorization bucket as share-link creation (``sharing.create``) —\nan embed URL is a time-boxed share capability.","operationId":"create_embed_v1_embeds_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmbedRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/embed/backtest/{embed_id}":{"get":{"tags":["embeds-public"],"summary":"Get Embed Backtest","description":"Backtest render data: headline metrics + presigned curve artifact.\n\n``embed_id`` is either a backtest run id (``btr_…``, requires\n``?token=``) or a backtest share id (no token — existing share\ncapability).","operationId":"get_embed_backtest_embed_backtest__embed_id__get","parameters":[{"name":"embed_id","in":"path","required":true,"schema":{"type":"string","title":"Embed Id"}},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedBacktestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/embed/strategy/{embed_id}":{"get":{"tags":["embeds-public"],"summary":"Get Embed Strategy","description":"Strategy glass-box render data: pipeline, universe, params.\n\n``embed_id`` is either a strategy id (``str_…``, requires ``?token=``)\nor a strategy share id (no token). Share links that were created\nwithout ``include_source`` do NOT expose the glass box — the same\nboundary as ``GET /s/{id}/graph``.","operationId":"get_embed_strategy_embed_strategy__embed_id__get","parameters":[{"name":"embed_id","in":"path","required":true,"schema":{"type":"string","title":"Embed Id"}},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedStrategyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/embed/live/{deployment_id}":{"get":{"tags":["embeds-public"],"summary":"Get Embed Live","description":"Live render data: positions, P&L, drawdown vs expected.\n\nAlways token-gated — live account state has no public share capability.","operationId":"get_embed_live_embed_live__deployment_id__get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedLiveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments":{"post":{"tags":["deployments"],"summary":"Deploy Strategy","operationId":"deploy_strategy_v1_deployments_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeployLiveRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ManagedDeploymentResponse"},{"$ref":"#/components/schemas/DeploymentResponse"}],"title":"Response Deploy Strategy V1 Deployments Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["deployments"],"summary":"List Deployments","description":"List deployments in the current org, of the classes ``capital_class`` names.\n\nPaper Trading v2, S01 §3.10 / IC-01-9: one positive predicate for every\nvalue, ``COALESCE(a.capital_class, 'real') = ANY(%s)``, with ``all``\nnaming ``CAPITAL_CLASSES``. The account is LEFT JOINed so a deployment\nwhose account row does not exist keeps its pre-paper meaning: ``real``,\nin the default list and in ``all``, never in ``practice``, with a null\nvenue code. Every row carries its venue block.","operationId":"list_deployments_v1_deployments_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"include_stopped","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Stopped"}},{"name":"capital_class","in":"query","required":false,"schema":{"enum":["real","practice","all"],"type":"string","description":"Money class to list: real, practice or all. Absent means real (PT2-28); all returns every row with its venue block.","default":"real","title":"Capital Class"},"description":"Money class to list: real, practice or all. Absent means real (PT2-28); all returns every row with its venue block."},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/preview":{"post":{"tags":["deployments"],"summary":"Preview Deploy","description":"Preview the auto-derived schedule and universe hygiene for a strategy.","operationId":"preview_deploy_v1_deployments_preview_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeployPreviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeployPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/update":{"post":{"tags":["deployments"],"summary":"Update Live","operationId":"update_live_v1_deployments__deployment_id__update_post","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UpdateLiveRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/portfolio/summary":{"get":{"tags":["deployments"],"summary":"Portfolio Summary","description":"Aggregate stats across the org's deployments of ONE money class.\n\nPaper Trading v2, S01 §3.10 (R-71, PT2-28): the totals sum exactly the\nclass named, an absent parameter meaning ``real`` (the pre-paper meaning\nevery shipped ``keel-trade`` wheel relies on), and the response echoes the\nclass it summed. No request sums two classes into one number (GOAL\ninvariant 3). The account is LEFT JOINed under the lists' rule, so a\ndeployment whose account row does not exist stays in the ``real`` total.","operationId":"portfolio_summary_v1_deployments_portfolio_summary_get","parameters":[{"name":"capital_class","in":"query","required":false,"schema":{"enum":["real","practice"],"type":"string","description":"Money class to sum: real or practice. Absent means real; a total is summed per class, so all is refused (422).","default":"real","title":"Capital Class"},"description":"Money class to sum: real or practice. Absent means real; a total is summed per class, so all is refused (422)."},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"X-Keel-Performance-Contract","in":"header","required":false,"schema":{"type":"string","enum":["account_performance.v1"]},"description":"Selected after the server returns the exact activation witness."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PortfolioSummaryResponse"},{"$ref":"#/components/schemas/PerformanceView"}],"title":"Response Portfolio Summary V1 Deployments Portfolio Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/portfolio/equity":{"get":{"tags":["deployments"],"summary":"Portfolio Equity","description":"Aggregated equity curve across the org's active deployments of ONE class.\n\nSame class rule as ``portfolio_summary`` (S01 §3.10, R-71): exactly the\nnamed class, absent meaning ``real``, echoed on the response. ``range``\nis the unrelated time-window parameter (``all`` there is a window).","operationId":"portfolio_equity_v1_deployments_portfolio_equity_get","parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Range"}},{"name":"capital_class","in":"query","required":false,"schema":{"enum":["real","practice"],"type":"string","description":"Money class to sum: real or practice. Absent means real; a total is summed per class, so all is refused (422).","default":"real","title":"Capital Class"},"description":"Money class to sum: real or practice. Absent means real; a total is summed per class, so all is refused (422)."},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"X-Keel-Performance-Contract","in":"header","required":false,"schema":{"type":"string","enum":["account_performance.v1"]},"description":"Selected after the server returns the exact activation witness."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PortfolioEquityResponse"},{"$ref":"#/components/schemas/PerformanceView"}],"title":"Response Portfolio Equity V1 Deployments Portfolio Equity Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}":{"get":{"tags":["deployments"],"summary":"Get Deployment","description":"Get deployment status.","operationId":"get_deployment_v1_deployments__deployment_id__get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeploymentResponse"},{"$ref":"#/components/schemas/ManagedDeploymentResponse"}],"title":"Response Get Deployment V1 Deployments  Deployment Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["deployments"],"summary":"Stop Deployment","description":"Stop deployment (terminal) — LIVE|PAUSED -> STOPPED.","operationId":"stop_deployment_v1_deployments__deployment_id__delete","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/pause":{"post":{"tags":["deployments"],"summary":"Pause Deployment","description":"Pause a live deployment — LIVE -> PAUSED.","operationId":"pause_deployment_v1_deployments__deployment_id__pause_post","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/resume":{"post":{"tags":["deployments"],"summary":"Resume Deployment","description":"Resume a paused deployment — PAUSED -> LIVE.","operationId":"resume_deployment_v1_deployments__deployment_id__resume_post","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/stop":{"post":{"tags":["deployments"],"summary":"Stop Deployment Alias","description":"Stop deployment (POST alias for DELETE) — LIVE|PAUSED -> STOPPED.","operationId":"stop_deployment_alias_v1_deployments__deployment_id__stop_post","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/trigger":{"post":{"tags":["deployments"],"summary":"Trigger Deployment","description":"Manual trigger — bypasses EventBridge; SQS for classic, a command row for shard.\n\nTwo transports, chosen by the deployment's recorded ``shard_map`` route\n(consume-at-scale O.20, V258):\n\n* ``shard`` — the fleet owns this deployment's bars and eval-worker's\n  queue is the wrong arm. The trigger is a ``strategy.eval_commands``\n  row written on THIS request's transaction (it lands or rolls back with\n  the 202), announced by V258's NOTIFY at commit, consumed by the owning\n  shard with today's snap semantics. No SQS message is sent.\n* anything else (``classic``, or no row — a slow/irregular clock that\n  never faced the check) — the SQS message, byte for byte as before.\n\n``override=true`` additionally allows the eval to persist a run for a bar\nthat ALREADY has one. Without it, a trigger fired between bars recomputes\nthe pipeline, lands on the same completed bar, and is correctly deduped by\n``uq_signal_runs_strategy_time`` — which is why a daily strategy appears to\n\"do nothing\" when triggered after its bar has run.\n\nThe override loosens NOTHING else. Authorization, LIVE status and the\naccount-mode freshness check below all still apply, and the ordinary\ndedup still covers every non-override run. A single ``trigger_override_id``\nis minted here and carried on the message so at-least-once redelivery\ncannot turn one request into two executions (V68).","operationId":"trigger_deployment_v1_deployments__deployment_id__trigger_post","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"override","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Override"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/executions":{"get":{"tags":["deployments"],"summary":"List Executions","description":"Unified evaluation-to-execution attempt history.\n\nRows retain their real durable identity. An evaluation or supersede command\nappears before handoff without inventing an execution_run record; once a\ncommand is linked to an execution_run, only the real run row remains.","operationId":"list_executions_v1_deployments__deployment_id__executions_get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"expand_orders","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Expand Orders"}},{"name":"execution_run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"If set, return only the matching execution_run (still scoped to this deployment). Used by ExecutionsTab when expanding a row to fetch its orders without re-fetching the whole list.","title":"Execution Run Id"},"description":"If set, return only the matching execution_run (still scoped to this deployment). Used by ExecutionsTab when expanding a row to fetch its orders without re-fetching the whole list."},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EnhancedExecutionResponse"},"title":"Response List Executions V1 Deployments  Deployment Id  Executions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/positions":{"get":{"tags":["deployments"],"summary":"List Positions","description":"Current positions for the deployment's account, read through its venue (S02 §3.11).","operationId":"list_positions_v1_deployments__deployment_id__positions_get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpandedPositionsEnvelope"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/orders":{"get":{"tags":["deployments"],"summary":"List Orders","description":"Recent orders for a deployment.","operationId":"list_orders_v1_deployments__deployment_id__orders_get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrderResponse"},"title":"Response List Orders V1 Deployments  Deployment Id  Orders Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/weights":{"get":{"tags":["deployments"],"summary":"List Weights","description":"Latest target weights from the most recent signal run.","operationId":"list_weights_v1_deployments__deployment_id__weights_get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeightsEnvelope"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/stats":{"get":{"tags":["deployments"],"summary":"Get Stats","description":"Performance stats for a deployment.","operationId":"get_stats_v1_deployments__deployment_id__stats_get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"X-Keel-Performance-Contract","in":"header","required":false,"schema":{"type":"string","enum":["account_performance.v1"]},"description":"Selected after the server returns the exact activation witness."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LiveStatsResponse"},{"$ref":"#/components/schemas/PerformanceView"}],"title":"Response Get Stats V1 Deployments  Deployment Id  Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/equity":{"get":{"tags":["deployments"],"summary":"Get Equity","description":"Equity curve for a deployment.","operationId":"get_equity_v1_deployments__deployment_id__equity_get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Range"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"X-Keel-Performance-Contract","in":"header","required":false,"schema":{"type":"string","enum":["account_performance.v1"]},"description":"Selected after the server returns the exact activation witness."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EquityCurveResponse"},{"$ref":"#/components/schemas/PerformanceView"}],"title":"Response Get Equity V1 Deployments  Deployment Id  Equity Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/daily-pnl":{"get":{"tags":["deployments"],"summary":"Get Daily Pnl","description":"Daily P&L breakdown for a deployment.","operationId":"get_daily_pnl_v1_deployments__deployment_id__daily_pnl_get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Range"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"X-Keel-Performance-Contract","in":"header","required":false,"schema":{"type":"string","enum":["account_performance.v1"]},"description":"Selected after the server returns the exact activation witness."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DailyPnlResponse"},{"$ref":"#/components/schemas/PerformanceView"}],"title":"Response Get Daily Pnl V1 Deployments  Deployment Id  Daily Pnl Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/trades":{"get":{"tags":["deployments"],"summary":"List Trades","description":"Paginated trade history for a deployment.","operationId":"list_trades_v1_deployments__deployment_id__trades_get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"symbol","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"}},{"name":"side","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Side"}},{"name":"start_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Time"}},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"enum":["trade_time","notional","closed_pnl"],"type":"string"},{"type":"null"}],"title":"Sort By"}},{"name":"sort_dir","in":"query","required":false,"schema":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"title":"Sort Dir"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/weights/history":{"get":{"tags":["deployments"],"summary":"Weight History","description":"Historical weight snapshots across signal runs.","operationId":"weight_history_v1_deployments__deployment_id__weights_history_get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"default":500,"title":"Limit"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeightHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deployments/{deployment_id}/funding":{"get":{"tags":["deployments"],"summary":"Get Funding","description":"Funding events for a deployment.","operationId":"get_funding_v1_deployments__deployment_id__funding_get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FundingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/notifications":{"get":{"tags":["notifications"],"summary":"List Notifications Endpoint","description":"List the caller's notifications (04-AC-2 ordering, cursor pagination).","operationId":"list_notifications_endpoint_v1_notifications_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"unread_first","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Unread First"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/notifications/unread-count":{"get":{"tags":["notifications"],"summary":"Unread Count","description":"The caller's unread badge count — one cheap COUNT (04-AC-3).","operationId":"unread_count_v1_notifications_unread_count_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnreadCountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/notifications/read-all":{"post":{"tags":["notifications"],"summary":"Mark All Read","description":"Mark every one of the caller's notifications read (04-AC-4/AC-10).","operationId":"mark_all_read_v1_notifications_read_all_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkAllReadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/notifications/{notification_id}/read":{"post":{"tags":["notifications"],"summary":"Mark Read","description":"Mark one notification read; idempotent 204 (04-AC-4), foreign id 404s\n(04-AC-1 — the id never confirms existence across principals).","operationId":"mark_read_v1_notifications__notification_id__read_post","parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","title":"Notification Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/notification-preferences":{"get":{"tags":["notification-preferences"],"summary":"Get Preferences","description":"The caller's preferences, defaults lazily applied — never 404 (04-AC-23).\n\n``NotificationPreferences``'s model defaults ARE the spec 01 §3 / D6\nfrozen policy (proven byte-for-byte in libs/db), so an absent row\nrenders exactly the state the engine would lazily create.","operationId":"get_preferences_v1_notification_preferences_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferencesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["notification-preferences"],"summary":"Update Preferences","description":"Full replace of the caller's preferences (04-AC-23).\n\nField-level rules (operational always-on, IANA timezone, exactly the\nspec 01 §3 fields) live on the request model — an invalid write 422s\nbefore anything touches the database. Every changed boolean is also\nrecorded as a ``notification_preference.changed`` event (D17).","operationId":"update_preferences_v1_notification_preferences_put","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNotificationPreferencesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferencesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/notification-preferences/browser-timezone":{"put":{"tags":["notification-preferences"],"summary":"Report Browser Timezone","description":"Record the zone the caller's browser reports (Q-2797, D26 #10).\n\nThe notification send window schedules by it when Settings holds no zone.\nA name that is not an IANA zone is a 422; a UTC-equivalent report\n(privacy modes send ``UTC`` whatever the real zone) answers\n``stored: false, reason: \"uninformative\"`` and stores nothing.","operationId":"report_browser_timezone_v1_notification_preferences_browser_timezone_put","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserTimezoneRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserTimezoneResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategy-work-sessions":{"get":{"tags":["ownership"],"summary":"List Strategy Work Sessions","description":"List the caller's org's work sessions, newest first.\n\nA filtered list, never a resource read: an unknown or foreign\n``strategy_id`` yields ``{\"items\": []}``, never a 404 (§2.4 N2/N6).","operationId":"list_strategy_work_sessions_v1_strategy_work_sessions_get","parameters":[{"name":"strategy_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyWorkSessionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategy-work-sessions/{session_id}":{"get":{"tags":["ownership"],"summary":"Get Strategy Work Session","description":"One work session, org-scoped (§2.4 N8).","operationId":"get_strategy_work_session_v1_strategy_work_sessions__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyWorkSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategy-work-sessions/{session_id}/ownership":{"get":{"tags":["ownership"],"summary":"Get Strategy Work Session Ownership","description":"The session-scoped first-session ownership projection.\n\n``ui_state`` is the CALLING principal's, never the org's (spec 20 §9\nA-4): an API key is a distinct principal from the web user, so cards a\nperson dismissed in the browser read as undismissed here. An OAuth token\nminted by ``keel auth login`` carries the user's own principal and sees\nthe same UI state the browser does.","operationId":"get_strategy_work_session_ownership_v1_strategy_work_sessions__session_id__ownership_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnershipProjectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategy-work":{"get":{"tags":["ownership"],"summary":"Get Strategy Work","description":"The strategy-scoped projection — the one an agent should call.\n\nAnswers for a strategy with NO work session at all: ``session_id`` is\nnull and every other field is computed from the artifacts, backtests and\nexperiments that do (or do not) exist. That is the honest \"not started\"\nanswer, derived from queries that ran — the case the CLI and MCP surfaces\nmost need and the one that must never be a 404 (spec 20 §2.4 N1).","operationId":"get_strategy_work_v1_strategy_work_get","parameters":[{"name":"strategy_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Strategy Id"}},{"name":"journey_cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Journey Cursor"}},{"name":"journey_page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":30,"title":"Journey Page Size"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyWorkProjectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/unsubscribe/context":{"get":{"tags":["unsubscribe"],"summary":"Unsubscribe Context","description":"What a verified token would unsubscribe — read-only, zero writes.","operationId":"unsubscribe_context_v1_unsubscribe_context_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsubscribeContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/unsubscribe/one-click":{"post":{"tags":["unsubscribe"],"summary":"Unsubscribe One Click","description":"Act immediately on a verified token (04-AC-25 / 03-AC-4.6).\n\nThe request body is deliberately ignored: RFC 8058 mailbox providers\nPOST ``List-Unsubscribe=One-Click`` form data; the confirm page POSTs\nthe same token with no body. Repeat POSTs (provider retries, double\nclicks) are idempotent — the ledger flip is absorbing and an identical\nactive suppression is never duplicated.","operationId":"unsubscribe_one_click_v1_unsubscribe_one_click_post","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsubscribeAppliedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/components":{"get":{"tags":["components"],"summary":"List Components","description":"List all registered pipeline components.","operationId":"list_components_v1_components_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ComponentResponse"},"title":"Response List Components V1 Components Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/components/metadata":{"get":{"tags":["components"],"summary":"Get Components Metadata","description":"Get validation metadata used by the visual strategy builder.","operationId":"get_components_metadata_v1_components_metadata_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentsMetadataResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/components/{name}":{"get":{"tags":["components"],"summary":"Get Component","description":"Get details of a specific component by name.","operationId":"get_component_v1_components__name__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/components/metadata":{"get":{"tags":["components-public"],"summary":"Get Public Components Metadata","description":"Public component metadata for share page rendering. No auth required.","operationId":"get_public_components_metadata_public_components_metadata_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentsMetadataResponse"}}}}}}},"/v1/billing/checkout":{"post":{"tags":["billing"],"summary":"Create Checkout","description":"Create a Stripe Checkout session for first subscription (free → paid).\n\nIf the org already has an active subscription, returns 409 — use\nPOST /v1/billing/upgrade instead.","operationId":"create_checkout_v1_billing_checkout_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/preview-upgrade":{"post":{"tags":["billing"],"summary":"Preview Upgrade","description":"Preview proration for changing an existing subscription's plan.\n\nReturns the prorated amount, credit, and net charge so the frontend\ncan show a confirmation dialog before executing the change.","operationId":"preview_upgrade_v1_billing_preview_upgrade_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewUpgradeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewUpgradeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/upgrade":{"post":{"tags":["billing"],"summary":"Upgrade Subscription","description":"Upgrade an existing subscription in-place with proration.\n\nModifies the Stripe subscription's price and updates the org's plan\nimmediately. The prorated difference is charged to the customer.","operationId":"upgrade_subscription_v1_billing_upgrade_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/portal":{"post":{"tags":["billing"],"summary":"Create Portal","description":"Create a Stripe Customer Portal session for managing subscription.","operationId":"create_portal_v1_billing_portal_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/subscription":{"get":{"tags":["billing"],"summary":"Get Subscription","description":"Return current subscription details from Stripe.","operationId":"get_subscription_v1_billing_subscription_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/feedback":{"post":{"tags":["feedback"],"summary":"Submit Feedback","description":"Store feedback. Success-with-note on ANY input problem — never 4xx/5xx.","operationId":"submit_feedback_v1_feedback_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/feedback/suggestions":{"post":{"tags":["feedback"],"summary":"Submit Suggestion","description":"Store one in-app suggestion; 201 ``{\"id\": \"fbs_...\"}``.\n\n422 ``suggestion_empty`` / ``suggestion_too_long`` / ``suggestion_invalid``\nfor a refused message (a blank message passes pydantic's length check and\nis refused here), 429 ``suggestion_rate_limited`` with ``Retry-After`` when\nthe principal already sent the window's maximum.","operationId":"submit_suggestion_v1_feedback_suggestions_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestionCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/referrals/code":{"get":{"tags":["referrals"],"summary":"Get Code","description":"Return the caller's referral code, creating one if it doesn't exist.","operationId":"get_code_v1_referrals_code_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/referrals/status":{"get":{"tags":["referrals"],"summary":"Get Status","description":"Consolidated status: code + wallet link + key aggregates.","operationId":"get_status_v1_referrals_status_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/referrals/attribute":{"post":{"tags":["referrals"],"summary":"Attribute","description":"Record a referral attribution. Called when a user signs up with a referral code.","operationId":"attribute_v1_referrals_attribute_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/referrals/opt-in":{"post":{"tags":["referrals"],"summary":"Opt In","description":"Opt in to receive referral payouts by submitting a wallet address.\n\nRequires feature:referral_payouts (starter+ plans).","operationId":"opt_in_v1_referrals_opt_in_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptInRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/referrals/referrals":{"get":{"tags":["referrals"],"summary":"List Referrals","description":"List users the caller has referred, with stats and pagination.","operationId":"list_referrals_v1_referrals_referrals_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/referrals/earnings":{"get":{"tags":["referrals"],"summary":"Get Earnings","description":"Return paginated earnings history for the authenticated referrer.","operationId":"get_earnings_v1_referrals_earnings_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/compile":{"post":{"tags":["sdk"],"summary":"Compile Source","description":"Compile strategy source and return fingerprint + graph.","operationId":"compile_source_v1_strategies_compile_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__sdk__CompileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/update-source":{"post":{"tags":["sdk"],"summary":"Update Source","description":"Validate source, generate component lock, and return graph.\n\nCompound operation: validate + lock + graph in one call.","operationId":"update_source_v1_strategies_update_source_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSourceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/lock/generate":{"post":{"tags":["sdk"],"summary":"Lock Generate","description":"Generate a component version lock from strategy source.","operationId":"lock_generate_v1_strategies_lock_generate_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LockGenerateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LockGenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/lock/check":{"post":{"tags":["sdk"],"summary":"Lock Check","description":"Check component version drift for a strategy source and lock.","operationId":"lock_check_v1_strategies_lock_check_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LockCheckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LockCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/strategies/lock/upgrade":{"post":{"tags":["sdk"],"summary":"Lock Upgrade","description":"Bump the requested pins (every drifting pin when ``components`` is\nomitted) to latest and validate there — breaking or not. Persists\nnothing: the \"try it\" step of the agent's upgrade (dollar-volume spec 02\n§3), with the same semantics as ``strategy_components_upgrade``\n(lock_upgrade.bump_pins, one owner). ``changes`` are the drift entries\nof the requested pins; a breaking bump comes back ``valid: false`` with\nthe issues to recompose against.","operationId":"lock_upgrade_v1_strategies_lock_upgrade_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__sdk__LockUpgradeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__sdk__LockUpgradeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/clerk":{"post":{"tags":["webhooks"],"summary":"Clerk Webhook","description":"Handle Clerk webhook events with Svix signature verification.","operationId":"clerk_webhook_v1_webhooks_clerk_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/webhooks/stripe":{"post":{"tags":["webhooks"],"summary":"Stripe Webhook","description":"Handle Stripe webhook events with signature verification.\n\nPublic endpoint -- no Authorization header required.\nAuthentication is via Stripe signature.","operationId":"stripe_webhook_v1_webhooks_stripe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/webhooks/resend":{"post":{"tags":["webhooks"],"summary":"Resend Webhook","description":"Handle Resend engagement events with Svix signature verification.","operationId":"resend_webhook_v1_webhooks_resend_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/managed/permissions":{"get":{"tags":["managed"],"summary":"Dormant Permissions","operationId":"dormant_permissions_v1_managed_permissions_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedPermissions"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/paper":{"post":{"tags":["paper"],"summary":"Create Paper Deployment","description":"Start a paper run: one transaction mints the account and the deployment.","operationId":"create_paper_deployment_v1_paper_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaperCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaperDeploymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/paper/{deployment_id}/share-links/preview":{"post":{"tags":["paper"],"summary":"Preview Paper Share Endpoint","description":"The link a create would write, without allocating a capability.\n\nThe source resolves under ``{'practice'}``: a ``real`` id is the typed\n404 an unknown id gets (AC-05-25).","operationId":"preview_paper_share_endpoint_v1_paper__deployment_id__share_links_preview_post","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewLiveShareRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaperSharePreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/paper/{deployment_id}/share-links":{"post":{"tags":["paper"],"summary":"Create Paper Share Endpoint","description":"Write one ``share_type 'paper'`` link for a practice run (S05 §3.12.1).\n\nNot an owner visit (IC-01-9). ``paper_share_created`` fires here, after\nthe row is written (S07, R-69); no live share event or counter fires.","operationId":"create_paper_share_endpoint_v1_paper__deployment_id__share_links_post","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLiveShareRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaperShareLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["paper"],"summary":"List Paper Shares Endpoint","description":"A practice run's paper links, newest first (QA S1; the live list's twin).\n\n``sharing.read``, as ``GET /v1/deployments/{id}/share-links``. A ``real``\nor unknown id is the typed 404 (the run resolves under ``{'practice'}``).","operationId":"list_paper_shares_endpoint_v1_paper__deployment_id__share_links_get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"include_revoked","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Revoked"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PaperShareLinkResponse"},"title":"Response List Paper Shares Endpoint V1 Paper  Deployment Id  Share Links Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/paper/{deployment_id}/comparison":{"get":{"tags":["paper"],"summary":"Paper Comparison Endpoint","description":"The paper run's own comparison with its backtest over the same period,\nper bar, for the run page's chart (PT2-93).\n\n``runner.read``, as the deployment detail read. A ``real``, unknown or\nother org's id is the typed 404. Empty ``points`` until the first\ncomparison is written, the night after the first bar closes.","operationId":"paper_comparison_endpoint_v1_paper__deployment_id__comparison_get","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParityChart"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/paper/share-links/{share_id}":{"delete":{"tags":["paper"],"summary":"Revoke Paper Share Endpoint","description":"Stop sharing: revoke one paper link, terminally and idempotently (QA S1).\n\n``sharing.revoke``, as ``DELETE /v1/live-share-links/{id}``. Only a\n``share_type 'paper'`` row of the caller's org bound to a practice run\nresolves; any other id is the typed 404 (PT2-58 keeps the generic revoke\nrefusing paper rows, so this is a paper link's one revoke). Once revoked,\nthe link's public reads are the constant unavailable 404.","operationId":"revoke_paper_share_endpoint_v1_paper_share_links__share_id__delete","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaperShareLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/paper/{deployment_id}/pause":{"post":{"tags":["paper"],"summary":"Pause Paper Deployment","description":"Pause a paper run, LIVE -> PAUSED, through the one durable ordering.\n\n``PAUSED``, ``pause_reason = 'user'`` and the ``PAUSE`` event commit\nbefore the schedule is disabled; a Scheduler failure leaves the run\ndurably PAUSED and answers 503 (retry reconciles). No engine command is\nissued (S01 §3.13).","operationId":"pause_paper_deployment_v1_paper__deployment_id__pause_post","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/paper/{deployment_id}/resume":{"post":{"tags":["paper"],"summary":"Resume Paper Deployment","description":"Resume a paper run, PAUSED -> LIVE (S01 §3.13).\n\nThe running-count cap first (S01 §3.12; live's resume checks none), then\nthe known-issue gate, then in one transaction the pending-update refusal,\n``LIVE`` with ``pause_reason`` cleared and ``last_viewed_at = now()``, the\n``RESUME`` event, and the schedule repair and enable: a failed enable\nrolls the row back to PAUSED. No account-mode gate (that is Hyperliquid's).","operationId":"resume_paper_deployment_v1_paper__deployment_id__resume_post","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/paper/{deployment_id}":{"delete":{"tags":["paper"],"summary":"Stop Paper Deployment","description":"Stop a paper run (terminal), LIVE|PAUSED -> STOPPED (S01 §3.13).\n\nThe live stop's order (Q-2353): ``STOPPED`` with ``stopped_at``, the\nshard-route retirement, the equivalence cancel and the ``STOP_USER``\nrecord, then the schedule delete, then commit. The paper counter fires,\nnever ``DEPLOYMENTS_STOPPED``. The account stays ``authorized`` and its\n``KEEL_MINTED`` credential ``active``; positions are not liquidated.\nThen, in its own transaction, the final settlement at ``stopped_at``:\nbest-effort, a failure is logged and recorded as\n``STOP_SETTLEMENT_FAILED`` without changing the stop.","operationId":"stop_paper_deployment_v1_paper__deployment_id__delete","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/paper/{deployment_id}/stop":{"post":{"tags":["paper"],"summary":"Stop Paper Deployment Alias","description":"Stop a paper run (POST alias for DELETE).","operationId":"stop_paper_deployment_alias_v1_paper__deployment_id__stop_post","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/paper/{deployment_id}/update":{"post":{"tags":["paper"],"summary":"Update Paper Deployment","description":"Move a LIVE or PAUSED paper run onto the strategy's head (S01 §3.13).\n\nThe twin of ``update_live``: the same coordination marker\n(``UPDATE_PENDING`` / ``UPDATE_FAILED`` / ``UPDATE``), the same PAUSED\nbarrier with the Scheduler change behind it, and the same artifact gates\n(equivalence, validity, known issues, flow-series grade, serving with no\naccount), without the account-mode gate and without operator blocks.\nThe completing transaction restores the original status, binds a fresh\nconfig from the ONE builder through ``deployments.config_id`` (never\n``strategies.active_config_id``, PT2-45), sets ``last_viewed_at`` (an\nupdate is a visit) and writes the ``UPDATE`` row and\n``UPDATE_COMPLETED`` with the new commit; after commit\n``on_paper_update_completed`` fires once. A retry completes a pending\nupdate rather than starting a new one.\n\nThe label and the marker (SOAK-S2): the run is relabelled ``v{N}`` by the\ntarget commit's sequence, as the create labels it, and NO release tag is\nminted (live's ``_reserve_live_update_release`` is not called): a paper\nmove is not a release, and a reserved ``release-vN.0`` shifted the\nstrategy's live version sequence. The marker's ``version_string`` is the\npaper-owned key :func:`_paper_update_coordination_key`, unique per update\non the run, so live's resolver (unchanged) still pairs each pending\nupdate with its own ``UPDATE`` event.","operationId":"update_paper_deployment_v1_paper__deployment_id__update_post","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PaperUpdateRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/paper/{deployment_id}/trigger":{"post":{"tags":["paper"],"summary":"Trigger Paper Deployment","description":"One manual eval of a LIVE paper run, on the PAPER eval queue (S02 §3.16).\n\n``backtest.create`` permission-only (live's trigger checks\n``runner.resume``, which no paper route checks); no account-mode gate; a\npaper run has no shard route, so the message is the one transport.","operationId":"trigger_paper_deployment_v1_paper__deployment_id__trigger_post","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/paper/{deployment_id}/restart":{"post":{"tags":["paper"],"summary":"Restart Paper Deployment","description":"End a LIVE or PAUSED paper run and start a fresh run of the same thing.\n\nOne transaction: the class-scoped lock (a ``real`` id 404s; anything but\nLIVE/PAUSED, or a pending update, is 409), the stop half (``STOPPED``\nwith ``stopped_at``, shard route, equivalence, a ``STOP_REDEPLOY`` record\nnaming the new id), the COSTED ``backtest.create`` check on this\nconnection (so the stopped run no longer holds its slot and an org at\nits cap can restart), then the create chain on the old run's deployed\ncommit, schedule, config and baseline capital with a freshly minted\naccount. Any failure before commit rolls both halves back. After commit:\nthe old schedule is deleted (best-effort), the old run settles at its\n``stopped_at``, and ``on_paper_create_completed`` fires once for the new\nrun (S01 §3.13 steps 0-6).","operationId":"restart_paper_deployment_v1_paper__deployment_id__restart_post","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaperRestartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"tags":["infrastructure"],"summary":"Health","description":"Liveness probe — always returns 200.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ready":{"get":{"tags":["infrastructure"],"summary":"Ready","description":"Database connectivity and the shared minimum evaluation catalog.","operationId":"ready_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AccountBasisCoverageReference":{"properties":{"kind":{"type":"string","const":"coverage","title":"Kind","default":"coverage"},"account_id":{"type":"string","minLength":1,"pattern":"\\S","title":"Account Id"},"basis_id":{"type":"string","minLength":1,"pattern":"\\S","title":"Basis Id"},"source_class":{"type":"string","minLength":1,"pattern":"\\S","title":"Source Class"},"measure_role":{"anyOf":[{"type":"string","enum":["account_nav","perps_performance","fee_capital"]},{"type":"null"}],"title":"Measure Role"},"performance_scope_id":{"anyOf":[{"type":"string","minLength":1,"pattern":"\\S"},{"type":"null"}],"title":"Performance Scope Id"},"window_start":{"type":"string","format":"date-time","title":"Window Start"},"window_end":{"type":"string","format":"date-time","title":"Window End"},"revision":{"type":"integer","exclusiveMinimum":0.0,"title":"Revision"}},"additionalProperties":false,"type":"object","required":["account_id","basis_id","source_class","window_start","window_end","revision"],"title":"AccountBasisCoverageReference"},"AccountEquityQuote":{"properties":{"value":{"type":"string","title":"Value"},"basis_id":{"type":"string","title":"Basis Id"},"representation_id":{"type":"string","title":"Representation Id"},"value_kind":{"type":"string","const":"venue_balance_quote","title":"Value Kind","default":"venue_balance_quote"},"observed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Observed At"},"observed_interval_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Observed Interval Start"},"observed_interval_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Observed Interval End"},"quality":{"type":"string","enum":["current","stale","unavailable"],"title":"Quality"},"reason_codes":{"items":{"type":"string"},"type":"array","title":"Reason Codes"},"request_started_at":{"type":"string","format":"date-time","title":"Request Started At"},"response_ended_at":{"type":"string","format":"date-time","title":"Response Ended At"}},"type":"object","required":["value","basis_id","representation_id","quality","reason_codes","request_started_at","response_ended_at"],"title":"AccountEquityQuote"},"AccountEquityResponse":{"properties":{"account_id":{"type":"string","title":"Account Id"},"value":{"type":"number","title":"Value"},"as_of":{"type":"string","title":"As Of"},"quote":{"anyOf":[{"$ref":"#/components/schemas/AccountEquityQuote"},{"type":"null"}]}},"type":"object","required":["account_id","value","as_of"],"title":"AccountEquityResponse","description":"Observed venue equity for a connected account (deploy-wizard-v2 spec 03 §5).\n\n``value`` is the mode-routed Hyperliquid account value; ``as_of`` records transport completion\n(UTC ISO transport timestamp) — a display read served fresh\nfrom the venue, never fabricated and never cached server-side. On venue\nfailure the endpoint returns a 502 the client catches to degrade to the\nboolean ``check-deposit`` probe; it never serves a stand-in value."},"AccountReference":{"properties":{"kind":{"type":"string","const":"account_observation","title":"Kind","default":"account_observation"},"observation_id":{"type":"string","title":"Observation Id"},"verdict_revision":{"type":"integer","exclusiveMinimum":0.0,"title":"Verdict Revision"},"observed_at_lower":{"type":"string","format":"date-time","title":"Observed At Lower"},"observed_at_upper":{"type":"string","format":"date-time","title":"Observed At Upper"},"source_cutoff_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Source Cutoff Sha256"},"comparator_id":{"type":"string","title":"Comparator Id"},"comparator_version":{"type":"string","title":"Comparator Version"},"flow_inclusion_quality":{"type":"string","enum":["complete","pending","held"],"title":"Flow Inclusion Quality"}},"additionalProperties":false,"type":"object","required":["observation_id","verdict_revision","observed_at_lower","observed_at_upper","source_cutoff_sha256","comparator_id","comparator_version","flow_inclusion_quality"],"title":"AccountReference"},"AccountScope":{"properties":{"kind":{"type":"string","const":"account","title":"Kind","default":"account"},"scope_id":{"type":"string","title":"Scope Id"},"account_id":{"type":"string","title":"Account Id"},"deployment_id":{"type":"string","title":"Deployment Id"},"reporting_interval_id":{"type":"string","title":"Reporting Interval Id"},"start":{"type":"string","format":"date-time","title":"Start"},"end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End"}},"additionalProperties":false,"type":"object","required":["scope_id","account_id","deployment_id","reporting_interval_id","start","end"],"title":"AccountScope"},"AccountWarning":{"properties":{"kind":{"type":"string","enum":["EQUITY_BELOW_VENUE_MINIMUM","ORDERS_SKIPPED_MIN_NOTIONAL","EXITS_BELOW_VENUE_MINIMUM","POSITION_STRANDED_BELOW_MINIMUM"],"title":"Kind"},"account_value":{"type":"number","title":"Account Value"},"min_notional":{"type":"number","title":"Min Notional"},"detail":{"type":"string","title":"Detail"},"orders_skipped":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Orders Skipped"},"orders_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Orders Total"},"exits_skipped":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exits Skipped"},"window_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Window Days"},"exit_symbols":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Exit Symbols"}},"type":"object","required":["kind","account_value","min_notional","detail"],"title":"AccountWarning","description":"One account-level condition that stops a deployment trading fully (Q-0013, Q-0181).\n\n``ORDERS_SKIPPED_MIN_NOTIONAL`` is the OBSERVED condition and the primary\nsignal: over ``window_days``, ``orders_skipped`` of ``orders_total``\norders were refused pre-flight for falling under the venue's minimum\nnotional, so the strategy placed only part of the book it computed.\n``exits_skipped`` counts how many of those were reduce-only — a refused\nexit leaves risk the strategy already decided to shed (Q-0159).\n\n``EQUITY_BELOW_VENUE_MINIMUM`` is the PREDICTIVE fallback, emitted only\nwhen there is not yet enough order history to measure and the equity is\nunder the bound outright. The two are mutually exclusive: measurement\noutranks prediction, because order notional is equity × leverage and an\naccount under the bound can still place a concentrated position.\n\n``EXITS_BELOW_VENUE_MINIMUM`` (Q-0159/Q-0433) is a different question\nfrom either, and is emitted ALONGSIDE them rather than instead of them.\nThe two above ask whether the account is too small to trade its book; this\none reports a specific, observed fact — at least one order that would have\nREDUCED a position was under the venue minimum, so nothing was sent and\nthat position is still open. It is true independent of any rate or sample\nsize, which is why it carries neither: an account skipping 1 of 101 orders\nis perfectly funded and still holding a position its strategy exited.\n``exit_symbols`` names those positions so a user can match the sentence to\nthe row they are looking at; it may be shorter than ``exits_skipped``\n(several refusals per position) or empty (a legacy row whose instrument is\ngone), and an empty list is rendered as no naming clause, never as a\nplaceholder. Suppressed only when ``ORDERS_SKIPPED_MIN_NOTIONAL`` is\nalready reporting the same counts.\n\n``POSITION_STRANDED_BELOW_MINIMUM`` (Q-0881) is the third question again,\nsharpened, and it is the one the other three cannot answer. Every reducing\ndecision a position had in the window was refused under the venue minimum\n— so the whole holding is under the bound, and the exit will not complete\nby waiting. ``EXITS_BELOW_VENUE_MINIMUM`` ends \"will trade normally once\nthe amount to reduce reaches $10\"; for a whole-position strand that clause\nis false, which is why this is its own kind rather than a longer sentence\non that one. Its remedy is the only true one: the position grows past the\nbound, or the user closes it on the venue. The live customer's 56 AIXBT\n($1.10) has been re-refused at every 00:00Z bar since 2026-08-25, each a\nhealthy COMPLETED run. ``exit_symbols`` here names the STRANDED positions\nspecifically, and the refused-exit kind is suppressed when this one\nalready speaks for every symbol it would have named.\n\n``min_notional`` is the venue bound actually applied —\n``execution.engine_style.HYPERLIQUID_MIN_ORDER_NOTIONAL``, the same\nconstant the planners and broker enforce — never a local threshold.\n\n``detail`` is rendered server-side so every reader — the app banner, the\n``keel`` CLI, an agent over MCP — says the same thing about the same\naccount; the app formats its own copy from the numbers."},"AgeCriterion":{"properties":{"met":{"type":"boolean","title":"Met"},"days":{"type":"integer","title":"Days"},"required_days":{"type":"integer","title":"Required Days"}},"additionalProperties":false,"type":"object","required":["met","days","required_days"],"title":"AgeCriterion"},"AgentBudgetEntry":{"properties":{"unit":{"type":"string","title":"Unit"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"spent":{"type":"integer","title":"Spent","default":0},"period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"}},"type":"object","required":["unit"],"title":"AgentBudgetEntry"},"AgentBudgetResponse":{"properties":{"id":{"type":"string","title":"Id"},"budgets":{"items":{"$ref":"#/components/schemas/AgentBudgetEntry"},"type":"array","title":"Budgets"}},"type":"object","required":["id","budgets"],"title":"AgentBudgetResponse"},"AgentResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"credential":{"anyOf":[{"$ref":"#/components/schemas/CredentialStatus"},{"type":"null"}]},"service_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Name"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"}},"type":"object","required":["id","name","status","created_at"],"title":"AgentResponse"},"AliasSetRequest":{"properties":{"commit_ref":{"type":"string","title":"Commit Ref"}},"type":"object","required":["commit_ref"],"title":"AliasSetRequest"},"AnonymousGrantRequest":{"properties":{"client_name":{"type":"string","maxLength":200,"title":"Client Name","description":"Display label for the granting client (e.g. 'Keel CLI/0.5.7'). Carried on the token's client_name claim and used as one half of the abuse-limit fingerprint. Never used for authorization.","default":"anonymous"}},"type":"object","title":"AnonymousGrantRequest","description":"Body of POST /v1/auth/anonymous (spec 05 R1). Everything optional —\na bare POST is a valid grant request."},"AnonymousGrantResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","const":"Bearer","title":"Token Type","default":"Bearer"},"expires_in":{"type":"integer","title":"Expires In","description":"Access-token lifetime in seconds."},"scope":{"type":"string","title":"Scope","description":"Space-separated granted scope: the advertised tier tokens the credential fully covers (`base`, `live`) first, then the resolved credential_scopes (Q-1786)."},"anonymous":{"type":"boolean","title":"Anonymous","default":true},"org_id":{"type":"string","title":"Org Id"},"principal_id":{"type":"string","title":"Principal Id"},"plan":{"type":"string","title":"Plan","default":"anon"},"org_expires_at":{"type":"string","title":"Org Expires At","description":"ISO timestamp when the unclaimed org is garbage-collected."},"quota":{"additionalProperties":true,"type":"object","title":"Quota","description":"Anon plan limits from plans.yaml: backtest_runs, backtest_compute_seconds, strategies_max."},"notice":{"type":"string","title":"Notice","description":"One-line anonymous-mode notice for CLI/agent display."},"claim":{"additionalProperties":true,"type":"object","title":"Claim","description":"How to keep the work: sign in and POST /v1/orgs/claim."}},"type":"object","required":["access_token","refresh_token","expires_in","scope","org_id","principal_id","org_expires_at","quota","notice","claim"],"title":"AnonymousGrantResponse","description":"Token response plus the anonymous-org facts the client needs to\nrender the one-line notice and later claim the org. All quota numbers\ncome from plans.yaml (the enforcement source) — never invented."},"ArtifactResponse":{"properties":{"artifact_id":{"type":"string","title":"Artifact Id"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"org_id":{"type":"string","title":"Org Id"},"strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Id"},"artifact_type":{"type":"string","title":"Artifact Type"},"status":{"type":"string","title":"Status"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"display_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Summary"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"source_hashes":{"additionalProperties":true,"type":"object","title":"Source Hashes"},"evidence_refs":{"additionalProperties":true,"type":"object","title":"Evidence Refs"},"created_by_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Run Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["artifact_id","org_id","artifact_type","status","payload","source_hashes","evidence_refs","created_at","updated_at"],"title":"ArtifactResponse"},"AttributeRequest":{"properties":{"referral_code":{"type":"string","minLength":1,"title":"Referral Code"},"source":{"type":"string","minLength":1,"title":"Source"}},"type":"object","required":["referral_code","source"],"title":"AttributeRequest"},"AuditEventIngestRequest":{"properties":{"event_id":{"type":"string","maxLength":120,"minLength":8,"title":"Event Id"},"action":{"type":"string","maxLength":100,"minLength":1,"title":"Action"},"decision":{"type":"string","enum":["ALLOW","DENY"],"title":"Decision"},"tool_name":{"type":"string","maxLength":120,"minLength":1,"title":"Tool Name"},"client_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Client Name"},"client_version":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Client Version"},"duration_ms":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Duration Ms"},"error_code":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Error Code"},"args_hash":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Args Hash"},"ts":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ts"},"target_type":{"type":"string","enum":["mcp_tool","mcp_session"],"title":"Target Type","default":"mcp_tool"},"outcome":{"anyOf":[{"$ref":"#/components/schemas/OutcomeRef"},{"type":"null"}]},"tool_class":{"anyOf":[{"type":"string","enum":["orientation","discovery","build","run","inspect","share","live"]},{"type":"null"}],"title":"Tool Class"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"fault":{"anyOf":[{"type":"string","enum":["platform","agent","user_input","designed"]},{"type":"null"}],"title":"Fault"}},"type":"object","required":["event_id","action","decision","tool_name"],"title":"AuditEventIngestRequest","description":"One hosted-MCP tool-call audit event (services/mcp-server/src/audit.py).\n\nIdentity is NEVER taken from the body: the mcp-server forwards each\nevent with the CALLING principal's own Bearer, and actor/org are\nderived from that token here — a caller can only ever append to its\nown org's audit trail."},"AuditEventResponse":{"properties":{"id":{"type":"string","title":"Id"},"org_id":{"type":"string","title":"Org Id"},"actor_principal_id":{"type":"string","title":"Actor Principal Id"},"action":{"type":"string","title":"Action"},"decision":{"type":"string","title":"Decision"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","org_id","actor_principal_id","action","decision","created_at"],"title":"AuditEventResponse"},"AuthorizeAccountRequest":{"properties":{"approve_agent_signature":{"type":"string","maxLength":132,"minLength":132,"pattern":"^0x[0-9a-fA-F]{130}$","title":"Approve Agent Signature"},"approve_builder_fee_signature":{"anyOf":[{"type":"string","maxLength":132,"minLength":132,"pattern":"^0x[0-9a-fA-F]{130}$"},{"type":"null"}],"title":"Approve Builder Fee Signature"}},"type":"object","required":["approve_agent_signature"],"title":"AuthorizeAccountRequest"},"AuthorizeAccountResponse":{"properties":{"account_id":{"type":"string","title":"Account Id"},"status":{"type":"string","title":"Status"},"agent_address":{"type":"string","title":"Agent Address"},"expires_at":{"type":"string","title":"Expires At"}},"type":"object","required":["account_id","status","agent_address","expires_at"],"title":"AuthorizeAccountResponse"},"AuthorizeCompleteRequest":{"properties":{"redirect_uri":{"type":"string","maxLength":2048,"title":"Redirect Uri","description":"Where to redirect the browser with the issued code."},"code_challenge":{"type":"string","maxLength":128,"minLength":43,"title":"Code Challenge","description":"PKCE S256 code_challenge (base64url-encoded SHA-256 digest)."},"code_challenge_method":{"type":"string","const":"S256","title":"Code Challenge Method","description":"Only S256 is supported (plain is forbidden by OAuth 2.1).","default":"S256"},"state":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"State","description":"Opaque CSRF-protection value echoed back to the client."},"include_live":{"type":"boolean","title":"Include Live","description":"True if the user checked 'Include live trading'. Adds `runner.*` to the granted scopes — but ONLY when `requested_scope` permits the live tier (see the field below). The review-aware consent page (D6) never shows the checkbox for a base-only request; this server-side gate is the fail-safe that holds even if `include_live=on` is submitted anyway.","default":false},"requested_scope":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Requested Scope","description":"The OAuth `scope` request parameter the client sent to the authorization endpoint (space-delimited), forwarded by the /connect page. A value that is present and omits the `live` tier (the listed/directory connector requests `scope=base`) forbids minting `runner.*` regardless of `include_live`. Absent → no narrowing (full/custom-connector + CLI keep the checkbox-driven behavior)."},"include_execution_analytics_read":{"type":"boolean","title":"Include Execution Analytics Read","description":"True only when the user explicitly consented to detailed execution-analytics reads. The exact `execution_analytics.read` token must also be present in `requested_scope`; this flag alone never widens access.","default":false},"include_execution_analytics_export":{"type":"boolean","title":"Include Execution Analytics Export","description":"True only when the user explicitly consented to execution activity exports. The exact `execution_analytics.export` token must also be present in `requested_scope`; this flag alone never widens access.","default":false},"client_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Client Name","description":"Display label for this connection (e.g. 'Claude Code'). Stored on the refresh-token row so the user can revoke individual clients from the settings page. Not used for auth or scope decisions — security comes from redirect_uri."},"client_id":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Client Id","description":"OAuth client identifier. When it is an HTTPS URL it is treated as a Client ID Metadata Document (CIMD) per the current MCP auth spec: the server fetches the document and its `redirect_uris` become authoritative for this client (replacing the static allow-list). Non-URL client_ids are informational only."},"resource":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Resource","description":"RFC 8707 resource indicator — the canonical URL of the MCP server the token is being requested for, forwarded by the /connect page from the client's authorize request. Must exactly equal a hosted endpoint this authorization server issues tokens for (`invalid_target` otherwise). Absent → unchanged behaviour and no `aud` on the minted token."},"connect_attempt_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connect Attempt Id","description":"The platform.connect_attempts id the /connect page carried (the `ca` URL parameter, Q-2381). Analytics only: links the attempt to this principal and is stored on the code so the token exchange can stamp it. A malformed value is DROPPED, never rejected, so measurement can never fail a consent."},"prompt_copied":{"anyOf":[{"type":"string","enum":["clipboard","select_fallback","skipped"]},{"type":"null"}],"title":"Prompt Copied","description":"How the consent card's first prompt left the page (Q-2495): `clipboard` (the clipboard write resolved), `select_fallback` (the clipboard refused; the prompt was selected and the next click continued) or `skipped` (Return without copying). Absent for a card with no prompt (the Keel CLI). Measurement only: an unknown value is DROPPED, never rejected, so it can never fail a consent."},"device_class":{"anyOf":[{"type":"string","enum":["desktop","ios","android","unknown"]},{"type":"null"}],"title":"Device Class","description":"The consenting device's class (Q-2584), reduced by keel-app from the request UA AND the card's input hint (a coarse pointer). It only REVISES an attempt the server render recorded as `desktop` from the UA alone -- Chrome on Android's desktop-site mode sends a desktop UA. Measurement only: an unknown value is DROPPED, never rejected."}},"type":"object","required":["redirect_uri","code_challenge"],"title":"AuthorizeCompleteRequest","description":"Body of /v1/auth/oauth/authorize-complete.\n\nCalled by the /connect page after the user clicks Continue. The\nClerk session cookie is the auth surface (verified by the standard\nkeel-api middleware). The page passes the OAuth-flow parameters it\nreceived from the client through the URL."},"AuthorizeCompleteResponse":{"properties":{"redirect_to":{"type":"string","title":"Redirect To","description":"The full redirect_uri with `code` and `state` query parameters appended. The /connect page issues a 302 to this."}},"type":"object","required":["redirect_to"],"title":"AuthorizeCompleteResponse","description":"Returns the URL the browser should redirect to."},"BacktestConfig":{"properties":{"init_cash":{"type":"number","maximum":1000000000.0,"minimum":0.0,"title":"Init Cash","description":"Starting capital, in dollars (default 10000).","default":10000.0},"fees":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Fees","description":"Fee rate per fill, as a decimal (default 0.00045).","default":0.00045},"slippage":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Slippage","description":"Adverse slippage per fill, as a decimal (default 0.00045).","default":0.00045},"leverage":{"type":"number","maximum":100.0,"exclusiveMinimum":0.0,"title":"Leverage","description":"Account margin cap (max 100). Positions are sized by the pipeline; this only bounds borrowing. Default 20.","default":20.0}},"additionalProperties":false,"type":"object","title":"BacktestConfig","description":"Validated backtest financial settings with existing engine defaults.\n\n``as_overrides`` preserves which values the caller explicitly supplied so\nAPI, database, and queue payloads can remain sparse while both execution\nengines resolve the same defaults from this model."},"BacktestCurvePoint":{"properties":{"t":{"type":"string","title":"T"},"equity":{"type":"number","title":"Equity"},"drawdown_pct":{"type":"number","title":"Drawdown Pct"}},"type":"object","required":["t","equity","drawdown_pct"],"title":"BacktestCurvePoint"},"BacktestCurveResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"points":{"items":{"$ref":"#/components/schemas/BacktestCurvePoint"},"type":"array","title":"Points"},"start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start"},"end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End"},"source_points":{"type":"integer","title":"Source Points"},"references":{"items":{"anyOf":[{"$ref":"#/components/schemas/BacktestReference"},{"type":"null"}]},"type":"array","title":"References"},"reference_span":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Reference Span"}},"type":"object","required":["job_id","points","source_points"],"title":"BacktestCurveResponse","description":"Compact equity + drawdown series for the result card (Q-1505).\n\nWarm-up trimmed and extreme-preserving downsampled by\n``utils.backtest_curve`` — the ONE computation owner. ``points`` is\nempty (with ``source_points == 0``) when the run stored no curve.\n\n``references`` (spec 03 §2.2): BTC first, then ETH and SOL — one entry\nper symbol, ``null`` where the span has fewer than two daily closes for\nit (never a fabricated series). Empty when the curve itself is empty."},"BacktestReference":{"properties":{"label":{"type":"string","title":"Label"},"basis":{"type":"string","title":"Basis"},"symbol":{"type":"string","title":"Symbol"},"rebased_at":{"type":"string","title":"Rebased At"},"end_close_at":{"type":"string","title":"End Close At"},"start_close":{"type":"number","title":"Start Close"},"end_close":{"type":"number","title":"End Close"},"ret_pct":{"type":"number","title":"Ret Pct"},"dd_pct":{"type":"number","title":"Dd Pct"},"series":{"items":{"$ref":"#/components/schemas/BacktestReferencePoint"},"type":"array","title":"Series"}},"type":"object","required":["label","basis","symbol","rebased_at","end_close_at","start_close","end_close","ret_pct","dd_pct","series"],"title":"BacktestReference","description":"A price-only hold of one symbol over the run's charted span (spec 03 §2.2).\n\nComputed by ``utils.backtest_curve.build_reference`` — the ONE owner the\napp, the cards and the library entry read. ``rebased_at`` is the date of\nthe first close served (``start_close``), which can be later than the\nchart's start when the symbol's daily history begins later;\n``end_close_at`` is the date of the last close (``end_close``). The two\ncloses are the raw prices, so a reader can say \"BTC went from $X to $Y\"\nand catch a data problem a return alone cannot show."},"BacktestReferencePoint":{"properties":{"t":{"type":"string","title":"T"},"equity":{"type":"number","title":"Equity"}},"type":"object","required":["t","equity"],"title":"BacktestReferencePoint"},"BacktestResponse":{"properties":{"id":{"type":"string","title":"Id"},"strategy_id":{"type":"string","title":"Strategy Id"},"status":{"type":"string","title":"Status"},"commit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Id"},"sequence_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sequence Number"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"source_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Hash"},"data_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Fingerprint"},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"},"engine":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engine"},"backtest_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Backtest Config"},"experiment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Experiment Id"},"trial_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trial Id"},"progress":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Progress"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"queued_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Queued At"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"execution_time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Execution Time"},"cancel_requested_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Requested At"},"cancelled_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancelled At"},"remaining":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Remaining"},"quota":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Quota"},"warnings":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Warnings"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"},"strategy_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Name"},"window_policy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Window Policy"},"coverage_notes":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Coverage Notes"},"window":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Window"}},"type":"object","required":["id","strategy_id","status"],"title":"BacktestResponse"},"BacktestResultsResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"presigned_url":{"type":"string","title":"Presigned Url"},"expires_in":{"type":"integer","title":"Expires In","default":3600}},"type":"object","required":["job_id","presigned_url"],"title":"BacktestResultsResponse"},"BacktestedForkRequest":{"properties":{"cell_id":{"type":"string","maxLength":120,"minLength":1,"title":"Cell Id"},"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name"},"created_via":{"anyOf":[{"type":"string","enum":["app","cli","mcp-local","mcp-remote","sdk","chat","api"]},{"type":"null"}],"title":"Created Via"},"source_surface":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Source Surface"}},"type":"object","required":["cell_id"],"title":"BacktestedForkRequest","description":"Fork one cell of a class P backtested page (spec 12 §6.3, P-D8).\n\n``cell_id`` is required: there is no default cell to fall back to\n(Q-3119 is the failure this refuses to repeat)."},"BacktestedForkResponse":{"properties":{"strategy_id":{"type":"string","title":"Strategy Id"},"name":{"type":"string","title":"Name"},"page_slug":{"type":"string","title":"Page Slug"},"cell_id":{"type":"string","title":"Cell Id"},"import_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Import Id"},"source_sha256":{"type":"string","title":"Source Sha256"},"editor_path":{"type":"string","title":"Editor Path"}},"type":"object","required":["strategy_id","name","page_slug","cell_id","source_sha256","editor_path"],"title":"BacktestedForkResponse","description":"What the app needs to land the user on the forked cell in the editor."},"Baseline":{"properties":{"observation_ref":{"oneOf":[{"$ref":"#/components/schemas/AccountReference"},{"$ref":"#/components/schemas/PortfolioFrame"}],"title":"Observation Ref","discriminator":{"propertyName":"kind","mapping":{"account_observation":"#/components/schemas/AccountReference","portfolio_frame":"#/components/schemas/PortfolioFrame"}}},"observed_at":{"type":"string","format":"date-time","title":"Observed At"},"value":{"type":"string","title":"Value"}},"additionalProperties":false,"type":"object","required":["observation_ref","observed_at","value"],"title":"Baseline"},"BasisComponent":{"properties":{"account_id":{"type":"string","title":"Account Id"},"reporting_interval_id":{"type":"string","title":"Reporting Interval Id"},"basis_id":{"type":"string","title":"Basis Id"},"binding_revision":{"type":"integer","exclusiveMinimum":0.0,"title":"Binding Revision"}},"additionalProperties":false,"type":"object","required":["account_id","reporting_interval_id","basis_id","binding_revision"],"title":"BasisComponent"},"BindPolicyRequest":{"properties":{"principal_id":{"type":"string","title":"Principal Id"}},"type":"object","required":["principal_id"],"title":"BindPolicyRequest","description":"Request body for POST /v1/policies/{id}/bind."},"BoundPrincipal":{"properties":{"id":{"type":"string","title":"Id"},"display_name":{"type":"string","title":"Display Name"},"type":{"type":"string","title":"Type"}},"type":"object","required":["id","display_name","type"],"title":"BoundPrincipal"},"BrowserTimezoneRequest":{"properties":{"timezone":{"type":"string","maxLength":64,"minLength":1,"title":"Timezone"},"source":{"type":"string","enum":["app_load","oauth_consent"],"title":"Source"}},"additionalProperties":false,"type":"object","required":["timezone","source"],"title":"BrowserTimezoneRequest","description":"`PUT /v1/notification-preferences/browser-timezone` body (Q-2797).\n\nkeel-app sends the browser's own IANA zone\n(``Intl.DateTimeFormat().resolvedOptions().timeZone``) on app load and on\nthe OAuth connect page. Validation (an exact IANA name; a UTC-equivalent\nprivacy-mode report refused as uninformative) is the one writer's,\n``notifications.timezones.record_browser_timezone``."},"BrowserTimezoneResponse":{"properties":{"stored":{"type":"boolean","title":"Stored"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["stored"],"title":"BrowserTimezoneResponse","description":"Whether the report was stored; ``reason`` names why not."},"CarryOver":{"properties":{"strategy_id":{"type":"string","title":"Strategy Id"},"commit_id":{"type":"string","title":"Commit Id"},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule"},"source_paper_deployment_id":{"type":"string","title":"Source Paper Deployment Id"},"head_commit_id":{"type":"string","title":"Head Commit Id"},"commit_ahead":{"type":"boolean","title":"Commit Ahead"},"commit_seq":{"type":"integer","title":"Commit Seq"},"head_commit_seq":{"type":"integer","title":"Head Commit Seq"},"simulated_capital":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Simulated Capital"},"min_order_notional":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Min Order Notional"}},"additionalProperties":false,"type":"object","required":["strategy_id","commit_id","schedule","source_paper_deployment_id","head_commit_id","commit_ahead","commit_seq","head_commit_seq"],"title":"CarryOver","description":"IC-03-5 ``carry_over`` (S03 §3.9.5, R-32): no simulated capital."},"CategoryResponse":{"properties":{"tag":{"type":"string","title":"Tag"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["tag","count"],"title":"CategoryResponse"},"CheckoutRequest":{"properties":{"plan":{"type":"string","title":"Plan"},"billing_cycle":{"type":"string","title":"Billing Cycle","default":"monthly"},"success_url":{"type":"string","title":"Success Url"},"cancel_url":{"type":"string","title":"Cancel Url"}},"type":"object","required":["plan","success_url","cancel_url"],"title":"CheckoutRequest"},"CheckoutResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"}},"type":"object","required":["checkout_url"],"title":"CheckoutResponse"},"CheckpointRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["name"],"title":"CheckpointRequest"},"ClaimOrgRequest":{"properties":{"anon_token":{"type":"string","minLength":20,"title":"Anon Token"},"set_default":{"type":"boolean","title":"Set Default","default":true}},"type":"object","required":["anon_token"],"title":"ClaimOrgRequest","description":"Body of POST /v1/orgs/claim (spec 05 R3): the anon access token is\nthe proof of possession — the claim capability."},"ClaimOrgResponse":{"properties":{"org_id":{"type":"string","title":"Org Id"},"plan":{"type":"string","title":"Plan"},"already_claimed":{"type":"boolean","title":"Already Claimed"},"message":{"type":"string","title":"Message"},"strategies_claimed":{"type":"integer","title":"Strategies Claimed","default":0},"backtests_claimed":{"type":"integer","title":"Backtests Claimed","default":0}},"type":"object","required":["org_id","plan","already_claimed","message"],"title":"ClaimOrgResponse","description":"Result of a claim: the org now belongs to the caller, plan=free."},"ClassifiedCoverage":{"properties":{"classified_through":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Classified Through"},"revision_refs":{"items":{"$ref":"#/components/schemas/AccountBasisCoverageReference"},"type":"array","title":"Revision Refs"},"interval_start":{"type":"string","format":"date-time","title":"Interval Start"},"interval_end":{"type":"string","format":"date-time","title":"Interval End"},"unresolved_count":{"type":"integer","minimum":0.0,"title":"Unresolved Count"},"complete":{"type":"boolean","title":"Complete"}},"additionalProperties":false,"type":"object","required":["classified_through","revision_refs","interval_start","interval_end","unresolved_count","complete"],"title":"ClassifiedCoverage"},"CommitProvenance":{"properties":{"actor":{"type":"string","const":"agent","title":"Actor"},"run_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Run Id"},"conversation_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Conversation Id"}},"type":"object","required":["actor"],"title":"CommitProvenance","description":"Agent-commit provenance recorded into ``strategy.commits.meta``.\n\nExpand-only attribution (agent-edit-persistence spec stage 0): the\nchat-api server-side writer stamps WHO authored the commit content\n(``actor=\"agent\"``) and which run/conversation produced it, so an\nagent-minted commit is distinguishable at the data layer from the\nuser typing the same text. ``actor`` is a closed vocabulary — commit\nmeta is queryable provenance, never a free-text channel; new actors\nare added here deliberately. A real ``actor_principal_id`` column is\nthe recorded later step (spec §5 decision point 3); meta keys need\nno DDL."},"CompileRequest":{"properties":{"source":{"type":"string","maxLength":250000,"title":"Source"},"component_lock":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Component Lock"}},"type":"object","required":["source"],"title":"CompileRequest"},"CompleteOnboardingRequest":{"properties":{"onboarding":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Onboarding"},"completed":{"type":"boolean","title":"Completed","default":true}},"type":"object","title":"CompleteOnboardingRequest","description":"Request body for POST /v1/me/onboarding.\n\nThis endpoint provisions only — it stamps ``onboarding.provisioned_at``.\nGenuine completion (``onboarding_completed``) is real activation (a typed\nchat message) and is stamped server-side at /v1/me (Q-0852). ``completed``\nis retained for wire-compatibility with older clients but no longer\ncarries completion semantics."},"ComponentParameterConstraint":{"properties":{"params":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Params"},"rule":{"type":"string","title":"Rule"},"when":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"When"},"params_dict":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Params Dict"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"tolerance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tolerance"}},"type":"object","required":["rule"],"title":"ComponentParameterConstraint","description":"One declared cross-parameter constraint (constraint schema v2).\n\n``params`` carries the group/pairwise member names (absent for\n``sum_eq``, which names its dict-typed target via ``params_dict``);\n``when`` carries the ``requires`` condition; ``value``/``tolerance``\nare ``sum_eq``'s target sum and comparison tolerance (S5/M5,\ndsl-type-system spec 02 §2.5)."},"ComponentParameterResponse":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"type_structure":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Type Structure"},"default":{"title":"Default"},"required":{"type":"boolean","title":"Required"},"description":{"type":"string","title":"Description","default":""},"suggestions":{"items":{},"type":"array","title":"Suggestions","default":[]},"optimizable":{"type":"boolean","title":"Optimizable","default":true},"constraints":{"additionalProperties":true,"type":"object","title":"Constraints","default":{}},"tier":{"type":"string","title":"Tier","default":"strategy"},"slot_reference":{"type":"boolean","title":"Slot Reference","default":false},"expected_slot_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Slot Type"},"expected_slot_domain":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Expected Slot Domain"}},"type":"object","required":["name","type","required"],"title":"ComponentParameterResponse"},"ComponentResponse":{"properties":{"name":{"type":"string","title":"Name"},"category":{"type":"string","title":"Category"},"sub_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Category"},"description":{"type":"string","title":"Description","default":""},"usage_hint":{"type":"string","title":"Usage Hint","default":""},"input_type":{"type":"string","title":"Input Type"},"output_type":{"type":"string","title":"Output Type"},"deterministic":{"type":"boolean","title":"Deterministic","default":true},"parameters":{"items":{"$ref":"#/components/schemas/ComponentParameterResponse"},"type":"array","title":"Parameters","default":[]},"implicit_slot_reads":{"items":{"type":"string"},"type":"array","title":"Implicit Slot Reads","default":[]},"param_constraints":{"items":{"$ref":"#/components/schemas/ComponentParameterConstraint"},"type":"array","title":"Param Constraints","default":[]},"declaration_refs":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Declaration Refs"},"optional_declaration_refs":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Optional Declaration Refs"},"population_scope":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Population Scope"},"composer_inputs":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"type":"object"},{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Composer Inputs"},"type_relation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Type Relation"},"domain_transfer":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Domain Transfer"},"input_domain":{"title":"Input Domain"},"output_domain":{"title":"Output Domain"},"latest":{"type":"integer","title":"Latest","default":1},"version":{"type":"integer","title":"Version","default":1},"status":{"type":"string","title":"Status","default":"active"},"not_runnable":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Not Runnable"},"replacement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Replacement"},"binding":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Binding"},"trade_safe":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Trade Safe"},"preserves_size":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Preserves Size"},"causal":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Causal"},"factory_expansion":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Factory Expansion"},"known_issue":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Known Issue"},"replacement_shape":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Replacement Shape"},"changelog":{"additionalProperties":{"type":"string"},"type":"object","title":"Changelog","default":{}},"versions":{"additionalProperties":{"$ref":"#/components/schemas/ComponentVersionSpec"},"type":"object","title":"Versions","default":{}}},"type":"object","required":["name","category","input_type","output_type"],"title":"ComponentResponse","description":"One component as `/v1/components/metadata` serves it.\n\nThis model IS the browser's registry: `stores/strategy-builder.ts` fetches\nthe metadata endpoint into `RegistryMetadata`, and every client-side\nvalidation pass reads its `ComponentMeta` fields. A field the generated\nfixture registry carries but this model omits is therefore not \"missing\nfrom an API\" — it silently disables whatever browser check consumes it,\nwhile the TS parity tests (which load the fixture registry) stay green.\nThat is exactly how the J-COMPOSER role family and the A1 domain\nsynthesis shipped inert (Q-1292).\n\nSo: any key `generate_registry_metadata()` emits either appears here in\nthe SAME shape, or is listed as a deliberate omission in\n`tests/test_components.py::TestRegistryWireParity` — which fails when a\nnew generated key appears in neither place."},"ComponentVersionSpec":{"properties":{"parameters":{"items":{"$ref":"#/components/schemas/ComponentParameterResponse"},"type":"array","title":"Parameters","default":[]},"input_type":{"type":"string","title":"Input Type"},"output_type":{"type":"string","title":"Output Type"},"declaration_refs":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Declaration Refs"},"optional_declaration_refs":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Optional Declaration Refs"},"changelog_entry":{"type":"string","title":"Changelog Entry","default":""},"composer_inputs":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"type":"object"},{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Composer Inputs"},"type_relation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Type Relation"},"domain_transfer":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Domain Transfer"},"input_domain":{"title":"Input Domain"},"output_domain":{"title":"Output Domain"},"not_runnable":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Not Runnable"},"implicit_slot_reads":{"items":{"type":"string"},"type":"array","title":"Implicit Slot Reads","default":[]},"population_scope":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Population Scope"},"param_constraints":{"items":{"$ref":"#/components/schemas/ComponentParameterConstraint"},"type":"array","title":"Param Constraints","default":[]},"clock_transfer":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Clock Transfer"},"binding":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Binding"},"trade_safe":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Trade Safe"},"preserves_size":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Preserves Size"},"causal":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Causal"},"factory_expansion":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Factory Expansion"},"known_issue":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Known Issue"}},"type":"object","required":["input_type","output_type"],"title":"ComponentVersionSpec","description":"Per-version parameter/type spec for a component.\n\nEvery field below the changelog entry is served in the SAME shape the\ngenerated fixture registry emits for this version\n(``pipeline_engine.dsl.fixtures.loader.generate_registry_metadata``) —\nsee ``ComponentResponse`` for why that equality is load-bearing and for\nthe standing test that pins it."},"ComponentsMetadataResponse":{"properties":{"type_transitions":{"additionalProperties":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"type":"object","title":"Type Transitions"},"phase_index":{"additionalProperties":{"type":"integer"},"type":"object","title":"Phase Index"},"slot_compatible_as":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Slot Compatible As","default":{}},"type_compatible_as":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Type Compatible As","default":{}},"components":{"items":{"$ref":"#/components/schemas/ComponentResponse"},"type":"array","title":"Components"},"execution":{"anyOf":[{"$ref":"#/components/schemas/ExecutionMetadata"},{"type":"null"}]}},"type":"object","required":["type_transitions","phase_index","components"],"title":"ComponentsMetadataResponse"},"ConnectAttemptRecordRequest":{"properties":{"attempt_id":{"type":"string","pattern":"^cat_[0-9a-z]{26}$","title":"Attempt Id"},"signed_in_at_start":{"type":"boolean","title":"Signed In At Start"},"client_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Client Name"},"client_id":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Client Id"},"redirect_host":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Redirect Host"},"device_class":{"type":"string","enum":["desktop","ios","android","unknown"],"title":"Device Class","default":"unknown"},"referrer_host":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Referrer Host"},"consent_shown":{"type":"boolean","title":"Consent Shown","default":false},"decision":{"anyOf":[{"type":"string","const":"cancelled"},{"type":"null"}],"title":"Decision"}},"additionalProperties":false,"type":"object","required":["attempt_id","signed_in_at_start"],"title":"ConnectAttemptRecordRequest","description":"Body of the unauthenticated ``POST /v1/auth/oauth/connect-attempts`` (Q-2381).\n\nSent by the keel-app SERVER render of the connect flow, best-effort. It\ncarries only facts the page already holds. ``device_class`` is the page's\nreduction of the request's user agent: the raw user agent and the IP are\nnever sent and never stored, and ``extra=\"forbid\"`` turns any attempt to\nsend them into a 422 rather than a silently dropped field.\n\nMonotonic by construction: a later call with the same ``attempt_id`` can\nonly STAMP ``consent_shown_at`` once and record a first ``cancelled``\ndecision. It can never set a principal or an ``approved`` decision; only\nthe authenticated authorize-complete does that."},"ConnectAttemptRecordResponse":{"properties":{"experiment_arm":{"anyOf":[{"type":"string","enum":["control","welcome_bonus"]},{"type":"null"}],"title":"Experiment Arm"}},"type":"object","title":"ConnectAttemptRecordResponse","description":"``200`` body of ``POST /v1/auth/oauth/connect-attempts``\n(connect-onboarding spec 01 §1.3).\n\n``experiment_arm`` is the arm STORED on the attempt row -- written once,\non the first INSERT, from ``WELCOME_BONUS_PCT`` -- so a replay reports\nthe original assignment. ``null`` when the row predates the arm, or on\nany internal failure (the endpoint is best-effort and still answers\n200). keel-app treats ``null``, a non-200 or a network error alike as\n\"no bonus line\"."},"ConsentAcknowledgment":{"properties":{"subject_kind":{"type":"string","title":"Subject Kind"},"subject_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,160}$","title":"Subject Id"},"subject_version":{"type":"integer","exclusiveMinimum":0.0,"title":"Subject Version"},"subject_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Subject Hash"},"document_type":{"type":"string","title":"Document Type"},"document_version":{"type":"integer","exclusiveMinimum":0.0,"title":"Document Version"},"content_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Content Hash"}},"additionalProperties":false,"type":"object","required":["subject_kind","subject_id","subject_version","subject_hash","document_type","document_version","content_hash"],"title":"ConsentAcknowledgment","description":"Untrusted affirmative click; compared against a server-owned exact source."},"CreateAccountRequest":{"properties":{"wallet_address":{"type":"string","maxLength":42,"minLength":42,"pattern":"^0x[0-9a-fA-F]{40}$","title":"Wallet Address"},"label":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Label"}},"type":"object","required":["wallet_address"],"title":"CreateAccountRequest"},"CreateAccountResponse":{"properties":{"account_id":{"type":"string","title":"Account Id"},"agent_address":{"type":"string","title":"Agent Address"},"eip712_approve_agent":{"additionalProperties":true,"type":"object","title":"Eip712 Approve Agent"},"eip712_approve_builder_fee":{"additionalProperties":true,"type":"object","title":"Eip712 Approve Builder Fee"},"displacement_warning":{"anyOf":[{"$ref":"#/components/schemas/DisplacementWarning"},{"type":"null"}]}},"type":"object","required":["account_id","agent_address","eip712_approve_agent","eip712_approve_builder_fee"],"title":"CreateAccountResponse"},"CreateAgentRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"expires_in_days":{"type":"integer","maximum":3650.0,"minimum":1.0,"title":"Expires In Days","default":365}},"type":"object","required":["name"],"title":"CreateAgentRequest","description":"Request body for POST /v1/agents."},"CreateAgentResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"token":{"type":"string","title":"Token"},"credential_id":{"type":"string","title":"Credential Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","token","credential_id","created_at"],"title":"CreateAgentResponse"},"CreateBacktestShareLinkRequest":{"properties":{"include_source":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Source"},"permission":{"anyOf":[{"type":"string","enum":["view","fork"]},{"type":"null"}],"title":"Permission"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"additionalProperties":false,"type":"object","title":"CreateBacktestShareLinkRequest"},"CreateDeployIntentRequest":{"properties":{"strategy_id":{"type":"string","maxLength":64,"minLength":1,"title":"Strategy Id"}},"additionalProperties":false,"type":"object","required":["strategy_id"],"title":"CreateDeployIntentRequest","description":"Mint request. ``extra=\"forbid\"`` is the R2 hard rule made structural:\nno API path accepts agent-supplied sizing (or any other config) into the\nprefill — a body carrying ``sizing_usd``/``suggested_config``/anything\nelse is rejected with a 422, not silently ignored."},"CreateEmbedRequest":{"properties":{"resource_type":{"type":"string","maxLength":16,"minLength":1,"title":"Resource Type"},"resource_id":{"type":"string","maxLength":64,"minLength":1,"title":"Resource Id"},"ttl_seconds":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Ttl Seconds"}},"additionalProperties":false,"type":"object","required":["resource_type","resource_id"],"title":"CreateEmbedRequest"},"CreateExecutionExportRequest":{"properties":{"schema_version":{"type":"string","const":"execution_activity_export.v2","title":"Schema Version"},"start_time":{"type":"string","format":"date-time","title":"Start Time"},"end_time":{"type":"string","format":"date-time","title":"End Time"},"idempotency_key":{"type":"string","maxLength":255,"minLength":1,"title":"Idempotency Key"},"reporting_asset_id":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Reporting Asset Id"},"reporting_policy_version":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Reporting Policy Version"},"filters":{"$ref":"#/components/schemas/ExecutionExportFilters"},"require_complete":{"type":"boolean","title":"Require Complete","default":true}},"additionalProperties":false,"type":"object","required":["schema_version","start_time","end_time","idempotency_key"],"title":"CreateExecutionExportRequest"},"CreateExecutionExportResponse":{"properties":{"export_id":{"type":"string","title":"Export Id"},"status":{"type":"string","enum":["REQUESTED","RUNNING","READY","FAILED"],"title":"Status"},"status_url":{"type":"string","title":"Status Url"}},"additionalProperties":false,"type":"object","required":["export_id","status","status_url"],"title":"CreateExecutionExportResponse"},"CreateGrantRequest":{"properties":{"unit":{"type":"string","title":"Unit"},"amount":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount"},"source":{"type":"string","title":"Source","default":"admin"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["unit","amount"],"title":"CreateGrantRequest","description":"Request body for POST /v1/entitlements/grants."},"CreateGrantResponse":{"properties":{"grant_id":{"type":"string","title":"Grant Id"},"unit":{"type":"string","title":"Unit"},"amount":{"type":"integer","title":"Amount"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["grant_id","unit","amount"],"title":"CreateGrantResponse"},"CreateLiveShareRequest":{"properties":{"show_dollar_values":{"type":"boolean","title":"Show Dollar Values","default":false},"show_positions":{"type":"boolean","title":"Show Positions","default":false},"include_strategy_source":{"type":"boolean","title":"Include Strategy Source","default":false},"show_creator_profile":{"type":"boolean","title":"Show Creator Profile","default":false},"discoverability":{"type":"string","enum":["unlisted","public"],"title":"Discoverability","default":"unlisted"},"title_override":{"anyOf":[{"type":"string","maxLength":140},{"type":"null"}],"title":"Title Override"},"about_markdown":{"anyOf":[{"type":"string","maxLength":6000},{"type":"null"}],"title":"About Markdown"}},"additionalProperties":false,"type":"object","title":"CreateLiveShareRequest","description":"Create request. Every disclosure defaults off and unlisted."},"CreateOrgRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"CreateOrgRequest","description":"Request body for POST /v1/orgs."},"CreateOrgResponse":{"properties":{"org":{"$ref":"#/components/schemas/OrgResponse"}},"type":"object","required":["org"],"title":"CreateOrgResponse"},"CreatePolicyRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"scopes":{"additionalProperties":true,"type":"object","title":"Scopes","description":"Policy scopes with allowed_actions and denied_actions"}},"type":"object","required":["name","scopes"],"title":"CreatePolicyRequest","description":"Request body for POST /v1/policies."},"CreateShareLinkRequest":{"properties":{"include_source":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Source"},"permission":{"anyOf":[{"type":"string","enum":["view","fork"]},{"type":"null"}],"title":"Permission"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"backtest_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backtest Run Id"},"pin_latest_backtest":{"type":"boolean","title":"Pin Latest Backtest","default":false}},"additionalProperties":false,"type":"object","title":"CreateShareLinkRequest"},"CreateStrategyRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"source":{"anyOf":[{"type":"string","maxLength":250000},{"type":"null"}],"title":"Source"},"format":{"anyOf":[{"type":"string","enum":["dsl","graph"]},{"type":"null"}],"title":"Format"},"graph":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Graph"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"component_lock":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Component Lock"}},"type":"object","required":["name"],"title":"CreateStrategyRequest"},"CreateUpdateIntentRequest":{"properties":{"deployment_id":{"type":"string","maxLength":64,"minLength":1,"title":"Deployment Id"}},"additionalProperties":false,"type":"object","required":["deployment_id"],"title":"CreateUpdateIntentRequest","description":"Mint request. ``extra=\"forbid\"`` is the same hard rule as deploy\nintents made structural: no API path accepts agent-supplied config into\nthe prefill — a body carrying anything beyond ``deployment_id`` is\nrejected with a 422, not silently ignored (spec 04 §2)."},"CredentialStatus":{"properties":{"credential_id":{"type":"string","title":"Credential Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"active":{"type":"boolean","title":"Active"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"requests_7d":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requests 7D"},"errors_7d":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Errors 7D"},"last_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Status"}},"type":"object","required":["credential_id","active","created_at"],"title":"CredentialStatus"},"DailyPnlPoint":{"properties":{"date":{"type":"string","title":"Date"},"realized_pnl":{"type":"number","title":"Realized Pnl"},"funding":{"type":"number","title":"Funding"},"fees":{"type":"number","title":"Fees"},"net":{"type":"number","title":"Net"}},"type":"object","required":["date","realized_pnl","funding","fees","net"],"title":"DailyPnlPoint"},"DailyPnlResponse":{"properties":{"points":{"items":{"$ref":"#/components/schemas/DailyPnlPoint"},"type":"array","title":"Points"}},"type":"object","required":["points"],"title":"DailyPnlResponse"},"DeployAttribution":{"properties":{"source_kind":{"type":"string","const":"graduation","title":"Source Kind"},"source_run_id":{"type":"string","maxLength":255,"minLength":1,"title":"Source Run Id"}},"type":"object","required":["source_kind","source_run_id"],"title":"DeployAttribution","description":"Where a deploy came from, for telemetry only (S05 §3.4.6, IC-05-9; R-32).\n\nThe one source today is the graduation carry-over: the page host reads\n``source_run`` from its query and the live surface sends it back here.\n``source_kind`` is closed, so an unknown kind is a 422 rather than a\nsilently dropped key. The deploy route validates nothing else about it and\nno gate reads it; S07's reader (IC-07-6) owns the event it feeds."},"DeployIntentResponse":{"properties":{"intent_id":{"type":"string","title":"Intent Id"},"intent_token":{"type":"string","title":"Intent Token"},"handoff_url":{"type":"string","title":"Handoff Url"},"expires_at":{"type":"string","title":"Expires At"},"status":{"type":"string","title":"Status"},"strategy_id":{"type":"string","title":"Strategy Id"},"suggested_config":{"additionalProperties":true,"type":"object","title":"Suggested Config"}},"type":"object","required":["intent_id","intent_token","handoff_url","expires_at","status","strategy_id","suggested_config"],"title":"DeployIntentResponse"},"DeployIntentStatusRequest":{"properties":{"intent_token":{"type":"string","maxLength":8192,"minLength":1,"title":"Intent Token"}},"additionalProperties":false,"type":"object","required":["intent_token"],"title":"DeployIntentStatusRequest"},"DeployIntentStatusResponse":{"properties":{"status":{"type":"string","title":"Status"},"intent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent Id"},"strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Id"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"suggested_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Suggested Config"},"deployment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Id"},"deployment_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Status"},"remediation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remediation"}},"type":"object","required":["status"],"title":"DeployIntentStatusResponse"},"DeployLiveRequest":{"properties":{"strategy_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Strategy Id"},"managed_deployment":{"anyOf":[{"$ref":"#/components/schemas/ManagedDeploymentAcceptance"},{"type":"null"}]},"account_id":{"type":"string","minLength":1,"title":"Account Id"},"schedule":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Schedule","description":"Optional cron spelling; it must equal the selected commit's derived schedule."},"intent_token":{"anyOf":[{"type":"string","maxLength":8192},{"type":"null"}],"title":"Intent Token","description":"Optional deploy-intent token when this deploy completes a handoff flow. Telemetry-only: a valid, matching token makes the deploy emit handoff_completed; it never gates or alters the deploy and carries no configuration (sizing is never accepted via API)."},"tranching":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tranching","description":"Optional deployment-scoped tranche schedule block (Batch C): {\"mode\": \"equal_split\", \"count\": N, \"window\"?: M} or {\"mode\": \"custom\", \"times\": [\"HH:MM\", ...], \"window\"?: M}. Requires the org's 'tranching' execution grant (403 without it); an invalid block is a 422 with the exact reason. Absent/None deploys untranched — the config_json key is never written."},"execution_style":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Execution Style","description":"Optional deployment-scoped execution-style block: the closed-world maker document parse_execution_style_document accepts. Requires the org's 'maker' execution grant (403 without it); an invalid document is a 422 with the exact parse reason. Absent/None means CARRY the replaced deployment's style forward (or market on a first deploy) — market is always the absence of the block, never a style:'market' document, and an omitted key never disarms a carried style."},"attribution":{"anyOf":[{"$ref":"#/components/schemas/DeployAttribution"},{"type":"null"}],"description":"Optional, telemetry-only: where this deploy came from (the graduation carry-over names its source run). It never gates, alters or decorates the deploy; absent means an ordinary deploy."}},"type":"object","required":["account_id"],"title":"DeployLiveRequest"},"DeployPreviewRequest":{"properties":{"strategy_id":{"type":"string","minLength":1,"title":"Strategy Id"},"tranching":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tranching","description":"Optional tranche schedule block to preview — the same raw shape DeployLiveRequest accepts. A valid block populates the tranche_* response fields (and derived_schedule becomes the tranche cron the deploy would write); an invalid block is a 422 with the exact parse/derive reason, so the wizard can show it inline."},"deployment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Id","description":"Optional deployment to preview an UPDATE for (the Update-Live dialog). Must belong to the caller's org (404 otherwise) and reference strategy_id (422 otherwise). Its carried tranching block joins the schedule derivation exactly as update_live's re-derivation would use it, so a tranched deployment's update preview shows the tranche cron rather than a spurious anchor-cron schedule change. Block precedence: an explicit `tranching` in this request > the deployment's carried block > none."}},"type":"object","required":["strategy_id"],"title":"DeployPreviewRequest"},"DeployPreviewResponse":{"properties":{"strategy_name":{"type":"string","title":"Strategy Name"},"timeframe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timeframe"},"bar_offset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bar Offset"},"derived_schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Derived Schedule"},"schedule_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule Description"},"universe_warnings":{"anyOf":[{"items":{"$ref":"#/components/schemas/UniverseWarning"},"type":"array"},{"type":"null"}],"title":"Universe Warnings"},"universe_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Universe Size"},"tranching_available":{"type":"boolean","title":"Tranching Available"},"maker_available":{"type":"boolean","title":"Maker Available"},"tranche_event_times":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tranche Event Times"},"tranche_schedule_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tranche Schedule Description"},"tranching_block":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tranching Block"},"execution_style_block":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Execution Style Block"},"known_issues":{"anyOf":[{"items":{"$ref":"#/components/schemas/KnownIssueRef"},"type":"array"},{"type":"null"}],"title":"Known Issues"},"live_window_warnings":{"anyOf":[{"items":{"$ref":"#/components/schemas/LiveWindowWarning"},"type":"array"},{"type":"null"}],"title":"Live Window Warnings"}},"type":"object","required":["strategy_name","tranching_available","maker_available"],"title":"DeployPreviewResponse"},"DeploymentResponse":{"properties":{"deployment_id":{"type":"string","title":"Deployment Id"},"strategy_id":{"type":"string","title":"Strategy Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule"},"evaluation_grid":{"anyOf":[{"$ref":"#/components/schemas/EvaluationGrid"},{"type":"null"}]},"source_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Hash"},"s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Key"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"},"deployed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed At"},"stopped_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stopped At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"deployed_commit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed Commit Id"},"deployed_version_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed Version String"},"config_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Config Id"},"total_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Pnl"},"position_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Position Count"},"venue":{"anyOf":[{"$ref":"#/components/schemas/VenueBlock"},{"type":"null"}]},"remaining":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Remaining"},"universe_warnings":{"anyOf":[{"items":{"$ref":"#/components/schemas/UniverseWarning"},"type":"array"},{"type":"null"}],"title":"Universe Warnings"},"account_warnings":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccountWarning"},"type":"array"},{"type":"null"}],"title":"Account Warnings"},"execution_style":{"anyOf":[{"type":"string","enum":["market","maker"]},{"type":"null"}],"title":"Execution Style"},"paused_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paused Reason"},"paused_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paused At"},"tranching":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tranching"},"health":{"anyOf":[{"type":"string","enum":["running","degraded","stalled","stopped"]},{"type":"null"}],"title":"Health"},"health_detail":{"anyOf":[{"$ref":"#/components/schemas/HealthDetailResponse"},{"type":"null"}]},"parity":{"anyOf":[{"$ref":"#/components/schemas/ParityBlock"},{"type":"null"}]},"graduation":{"anyOf":[{"$ref":"#/components/schemas/GraduationBlock"},{"type":"null"}]},"money_freshness":{"anyOf":[{"$ref":"#/components/schemas/MoneyFreshness"},{"type":"null"}]},"serving_warnings":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Serving Warnings"},"known_issues":{"anyOf":[{"items":{"$ref":"#/components/schemas/KnownIssueRef"},"type":"array"},{"type":"null"}],"title":"Known Issues"},"live_window_warnings":{"anyOf":[{"items":{"$ref":"#/components/schemas/LiveWindowWarning"},"type":"array"},{"type":"null"}],"title":"Live Window Warnings"}},"type":"object","required":["deployment_id","strategy_id","name","status"],"title":"DeploymentResponse"},"DeploymentSummary":{"properties":{"deployment_id":{"type":"string","title":"Deployment Id"},"strategy_id":{"type":"string","title":"Strategy Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"total_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Pnl"},"position_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Position Count"},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule"},"deployed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed At"},"deployed_version_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed Version String"}},"type":"object","required":["deployment_id","strategy_id","name","status"],"title":"DeploymentSummary"},"DiffRequest":{"properties":{"ref_a":{"type":"string","title":"Ref A"},"ref_b":{"type":"string","title":"Ref B"}},"type":"object","required":["ref_a","ref_b"],"title":"DiffRequest"},"DiffResponse":{"properties":{"changes":{"additionalProperties":true,"type":"object","title":"Changes"}},"type":"object","required":["changes"],"title":"DiffResponse"},"DisplacementWarning":{"properties":{"scope":{"type":"string","enum":["other_org","same_org"],"title":"Scope"},"live_strategy_affected":{"type":"boolean","title":"Live Strategy Affected"},"strategy_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Name"}},"type":"object","required":["scope","live_strategy_affected"],"title":"DisplacementWarning","description":"Informed-evict nudge (Q-0324): approving this wallet's agent will displace\nthe wallet's existing Keel agent. Cross-org rows never carry the other org's\ndata — scope + live impact only; strategy_name is same-org only."},"DrawdownCriterion":{"properties":{"met":{"type":"boolean","title":"Met"},"paper_max_dd_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Paper Max Dd Pct"},"backtest_max_dd_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Backtest Max Dd Pct"}},"additionalProperties":false,"type":"object","required":["met","paper_max_dd_pct","backtest_max_dd_pct"],"title":"DrawdownCriterion","description":"Both drawdowns are positive magnitudes; the floor is null while pending."},"DuplicateLiveShareRequest":{"properties":{"configuration":{"anyOf":[{"$ref":"#/components/schemas/LiveShareConfigurationRequest"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"DuplicateLiveShareRequest","description":"Optional replacement configuration; absent means an exact duplicate."},"EmbedBacktestResponse":{"properties":{"resource_type":{"type":"string","title":"Resource Type","default":"backtest"},"backtest_run_id":{"type":"string","title":"Backtest Run Id"},"strategy_id":{"type":"string","title":"Strategy Id"},"strategy_name":{"type":"string","title":"Strategy Name"},"status":{"type":"string","title":"Status"},"period_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Start"},"period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period End"},"period_last_bar":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Last Bar"},"metrics":{"additionalProperties":true,"type":"object","title":"Metrics"},"curve_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curve Url"},"curve_expires_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Curve Expires In"}},"type":"object","required":["backtest_run_id","strategy_id","strategy_name","status","metrics"],"title":"EmbedBacktestResponse"},"EmbedLivePosition":{"properties":{"symbol":{"type":"string","title":"Symbol"},"side":{"type":"string","title":"Side"},"size":{"type":"number","title":"Size"},"entry_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entry Price"},"unrealized_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unrealized Pnl"},"leverage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Leverage"}},"type":"object","required":["symbol","side","size"],"title":"EmbedLivePosition"},"EmbedLiveResponse":{"properties":{"resource_type":{"type":"string","title":"Resource Type","default":"live"},"deployment_id":{"type":"string","title":"Deployment Id"},"strategy_id":{"type":"string","title":"Strategy Id"},"strategy_name":{"type":"string","title":"Strategy Name"},"status":{"type":"string","title":"Status"},"deployed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed At"},"stopped_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stopped At"},"baseline_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Baseline Value"},"current_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Value"},"net_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Pnl"},"total_return_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Return Pct"},"live_max_drawdown_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Live Max Drawdown Pct"},"expected_max_drawdown_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Expected Max Drawdown Pct"},"expected_basis_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Basis Run Id"},"positions_status":{"type":"string","title":"Positions Status"},"account_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Account Value"},"positions":{"items":{"$ref":"#/components/schemas/EmbedLivePosition"},"type":"array","title":"Positions","default":[]},"equity":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Equity","default":[]},"measured_series":{"anyOf":[{"$ref":"#/components/schemas/PublicLiveSeriesV2"},{"type":"null"}]}},"type":"object","required":["deployment_id","strategy_id","strategy_name","status","positions_status"],"title":"EmbedLiveResponse"},"EmbedResponse":{"properties":{"embed_id":{"type":"string","title":"Embed Id"},"embed_token":{"type":"string","title":"Embed Token"},"embed_url":{"type":"string","title":"Embed Url"},"expires_at":{"type":"string","title":"Expires At"},"resource_type":{"type":"string","title":"Resource Type"},"resource_id":{"type":"string","title":"Resource Id"}},"type":"object","required":["embed_id","embed_token","embed_url","expires_at","resource_type","resource_id"],"title":"EmbedResponse"},"EmbedStrategyResponse":{"properties":{"resource_type":{"type":"string","title":"Resource Type","default":"strategy"},"strategy_id":{"type":"string","title":"Strategy Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_live":{"type":"boolean","title":"Is Live","default":false},"pipeline":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Pipeline"},"globals_declaration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Globals Declaration"},"universe":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Universe"},"execution":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Execution"}},"type":"object","required":["strategy_id","name","pipeline"],"title":"EmbedStrategyResponse"},"EnhancedExecutionResponse":{"properties":{"attempt_id":{"type":"string","title":"Attempt Id"},"attempt_kind":{"type":"string","enum":["signal","supersede","execution"],"title":"Attempt Kind"},"execution_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Run Id"},"supersede_command_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supersede Command Id"},"signal_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signal Run Id"},"signal_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signal Status"},"signal_as_of_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signal As Of Time"},"signal_error_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signal Error Summary"},"execution_status":{"type":"string","title":"Execution Status"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"activity_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activity At"},"error_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Summary"},"weight_count":{"type":"integer","title":"Weight Count","default":0},"order_count":{"type":"integer","title":"Order Count","default":0},"filled_count":{"type":"integer","title":"Filled Count","default":0},"rejected_count":{"type":"integer","title":"Rejected Count","default":0},"skipped_count":{"type":"integer","title":"Skipped Count","default":0},"realized_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Realized Pnl"},"avg_slippage_bps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Slippage Bps"},"avg_slippage_lane":{"type":"string","const":"SESSION_ARRIVAL_LEDGER_PRICE_ONLY","title":"Avg Slippage Lane","default":"SESSION_ARRIVAL_LEDGER_PRICE_ONLY"},"slippage_measured_sessions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Slippage Measured Sessions"},"quality_episode_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quality Episode Count"},"quality_sealed_receipt_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quality Sealed Receipt Count"},"quality_provisional_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quality Provisional Count"},"session_outcomes":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Session Outcomes"},"halt":{"anyOf":[{"$ref":"#/components/schemas/ExecutionHaltResponse"},{"type":"null"}]},"signal_meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Signal Meta"},"execution_notices":{"items":{"$ref":"#/components/schemas/ExecutionNoticeResponse"},"type":"array","title":"Execution Notices"},"orders":{"anyOf":[{"items":{"$ref":"#/components/schemas/OrderResponse"},"type":"array"},{"type":"null"}],"title":"Orders"},"order_dispatch":{"anyOf":[{"type":"string","const":"pending"},{"type":"null"}],"title":"Order Dispatch"},"quality_summary":{"anyOf":[{"$ref":"#/components/schemas/ExecutionQualitySummary"},{"type":"null"}]}},"type":"object","required":["attempt_id","attempt_kind","execution_status"],"title":"EnhancedExecutionResponse"},"EntitlementBalance":{"properties":{"unit":{"type":"string","title":"Unit"},"type":{"type":"string","title":"Type"},"granted":{"type":"integer","title":"Granted"},"spent":{"type":"integer","title":"Spent"},"reserved":{"type":"integer","title":"Reserved"},"available":{"type":"integer","title":"Available"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"cap_current":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cap Current"},"period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"},"resets_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resets At"},"first_week":{"anyOf":[{"$ref":"#/components/schemas/FirstWeekBlock"},{"type":"null"}]},"unlimited":{"type":"boolean","title":"Unlimited","description":"Whether this grant is unbounded — SERVED, so no client needs the\nsentinel (Q-1614).\n\n``granted`` carries ``platform_auth.config.UNLIMITED`` (INT_MAX) for\nan unlimited plan, a storage artifact whose only job is to not be\nrendered. keel-app had re-typed that literal in three places with\nnothing comparing the copies, and a single miss shows a user a\nnine-digit quota. A computed field cannot be passed in and cannot\ndrift: it is recomputed from ``granted`` on every response, by the\nsame test ``platform_auth.quota.QuotaView`` applies.","readOnly":true}},"type":"object","required":["unit","type","granted","spent","reserved","available","unlimited"],"title":"EntitlementBalance","description":"One unit's balance for the org.\n\n``period``/``resets_at`` answer \"when does this come back\" — the\nquestion the product could not answer anywhere except from hardcoded\nstrings, two of which were five months stale (Q-1597). They are filled\nin by :meth:`MeResponse._attach_reset_instants` from the org's plan,\nwhich is why they carry defaults: a balance built without a plan in\nhand (``GET /v1/entitlements``) leaves them null, and a client that\nreads null renders NOTHING rather than guessing a reset."},"EntitlementBalanceResponse":{"properties":{"balances":{"items":{"$ref":"#/components/schemas/EntitlementBalance"},"type":"array","title":"Balances"},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"}},"type":"object","required":["balances"],"title":"EntitlementBalanceResponse","description":"Per-unit balances for an org.\n\nCarries ``plan`` so the reset instants below can be stamped HERE rather\nthan at the call site — the same reasoning as ``MeResponse``: a call site\nthat forgets to stamp is indistinguishable from a unit that genuinely does\nnot refill, and telling those apart is the whole point of Q-1597."},"EntitlementHistoryEntry":{"properties":{"type":{"type":"string","title":"Type"},"id":{"type":"string","title":"Id"},"unit":{"type":"string","title":"Unit"},"delta":{"type":"integer","title":"Delta"},"source":{"type":"string","title":"Source"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"period_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Start"},"period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period End"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["type","id","unit","delta","source"],"title":"EntitlementHistoryEntry"},"EntitlementHistoryPagination":{"properties":{"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","title":"EntitlementHistoryPagination"},"EntitlementHistoryResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/EntitlementHistoryEntry"},"type":"array","title":"Entries"},"pagination":{"$ref":"#/components/schemas/EntitlementHistoryPagination","default":{"has_more":false}}},"type":"object","required":["entries"],"title":"EntitlementHistoryResponse"},"EquityCurveResponse":{"properties":{"points":{"items":{"$ref":"#/components/schemas/EquityPoint"},"type":"array","title":"Points"},"baseline_value":{"type":"number","title":"Baseline Value"},"current_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Value"},"initial_deposit":{"type":"number","title":"Initial Deposit","default":0.0},"money_freshness":{"anyOf":[{"$ref":"#/components/schemas/MoneyFreshness"},{"type":"null"}]},"managed_segments":{"anyOf":[{"items":{"$ref":"#/components/schemas/ManagedSegmentResponse"},"type":"array"},{"type":"null"}],"title":"Managed Segments"},"today_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Today Pnl"},"today_flows":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Today Flows"},"pending_flows":{"anyOf":[{"items":{"$ref":"#/components/schemas/PendingFlow"},"type":"array"},{"type":"null"}],"title":"Pending Flows"},"gaps":{"anyOf":[{"items":{"$ref":"#/components/schemas/EquityGapResponse"},"type":"array"},{"type":"null"}],"title":"Gaps"}},"type":"object","required":["points","baseline_value"],"title":"EquityCurveResponse"},"EquityGapResponse":{"properties":{"from":{"type":"string","format":"date-time","title":"From"},"to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"},"kind":{"type":"string","enum":["missed","failed","stalled"],"title":"Kind"}},"type":"object","required":["from","to","kind"],"title":"EquityGapResponse","description":"One equity gap band (Paper Trading v2, S04 §3.11, IC-04-3).\n\nExpected bars lacking a COMPLETE signal run, grouped into a maximal\ncontiguous run. ``from`` is the first bar's label; ``to`` is the last\nbar's label plus one ``bar_width``, or null while the run reaches the\nnewest expected bar. A renderer draws a band and never interpolates the\nequity line across it."},"EquityPoint":{"properties":{"timestamp":{"type":"string","title":"Timestamp"},"equity":{"type":"number","title":"Equity"},"pnl":{"type":"number","title":"Pnl","default":0.0},"flow":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Flow"},"twr_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Twr Pct"}},"type":"object","required":["timestamp","equity"],"title":"EquityPoint"},"EvalsCriterion":{"properties":{"met":{"type":"boolean","title":"Met"},"count":{"type":"integer","title":"Count"},"required":{"type":"integer","title":"Required"}},"additionalProperties":false,"type":"object","required":["met","count","required"],"title":"EvalsCriterion"},"EvaluationGrid":{"properties":{"period_minutes":{"type":"integer","title":"Period Minutes"},"offset_minutes":{"type":"integer","title":"Offset Minutes"}},"type":"object","required":["period_minutes","offset_minutes"],"title":"EvaluationGrid","description":"The candle closes a deployment's runs evaluate (UX-8).\n\nCloses sit at ``offset_minutes`` past 00:00 UTC and every\n``period_minutes`` after it: the deployment's cron inverted under its\npersisted dispatch generation (``utils.schedule.evaluation_grid``), so a\npre-arm cron that fires at 11:59 reads as the 12:00 close it evaluates."},"ExecutableAccountMode":{"type":"string","enum":["standard","unified"],"title":"ExecutableAccountMode","description":"Modes whose balance and order-sizing semantics Keel operationally supports."},"ExecutionExportDownloadResponse":{"properties":{"export_id":{"type":"string","title":"Export Id"},"url":{"type":"string","title":"Url"},"expires_in_seconds":{"type":"integer","exclusiveMinimum":0.0,"title":"Expires In Seconds"},"object_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Object Sha256"},"object_bytes":{"type":"integer","minimum":0.0,"title":"Object Bytes"},"media_type":{"type":"string","const":"application/zip","title":"Media Type"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"additionalProperties":false,"type":"object","required":["export_id","url","expires_in_seconds","object_sha256","object_bytes","media_type","expires_at"],"title":"ExecutionExportDownloadResponse"},"ExecutionExportFile":{"properties":{"name":{"type":"string","title":"Name"},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Sha256"},"bytes":{"type":"integer","minimum":0.0,"title":"Bytes"},"rows":{"type":"integer","minimum":0.0,"title":"Rows"},"schema_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Schema Sha256"}},"additionalProperties":false,"type":"object","required":["name","sha256","bytes","rows","schema_sha256"],"title":"ExecutionExportFile"},"ExecutionExportFilters":{"properties":{},"additionalProperties":false,"type":"object","title":"ExecutionExportFilters","description":"Wave A Core v1 has no activated optional filters.\n\nKeeping a strict empty object makes the wire field forward-compatible\nwithout pretending that V60.2 freezes or applies filter membership that it\ndoes not yet enforce."},"ExecutionExportManifestResponse":{"properties":{"source_cutoff":{"type":"string","format":"date-time","title":"Source Cutoff"},"object_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Object Sha256"},"object_bytes":{"type":"integer","minimum":0.0,"title":"Object Bytes"},"media_type":{"type":"string","const":"application/zip","title":"Media Type"},"completeness":{"type":"string","enum":["COMPLETE","INCOMPLETE","BLOCKED"],"title":"Completeness"},"missing_reasons":{"items":{"type":"string"},"type":"array","title":"Missing Reasons"},"files":{"items":{"$ref":"#/components/schemas/ExecutionExportFile"},"type":"array","title":"Files"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"generator_version":{"type":"string","title":"Generator Version"},"object_policy_version":{"type":"string","title":"Object Policy Version"}},"additionalProperties":false,"type":"object","required":["source_cutoff","object_sha256","object_bytes","media_type","completeness","missing_reasons","files","expires_at","generator_version","object_policy_version"],"title":"ExecutionExportManifestResponse"},"ExecutionExportStatusResponse":{"properties":{"export_id":{"type":"string","title":"Export Id"},"schema_version":{"type":"string","title":"Schema Version"},"domain":{"type":"string","const":"EXECUTION_ACTIVITY","title":"Domain"},"scope":{"type":"string","const":"DEPLOYMENT","title":"Scope"},"deployment_id":{"type":"string","title":"Deployment Id"},"account_id":{"type":"string","title":"Account Id"},"start_time":{"type":"string","format":"date-time","title":"Start Time"},"end_time":{"type":"string","format":"date-time","title":"End Time"},"processing_status":{"type":"string","enum":["REQUESTED","RUNNING","READY","FAILED"],"title":"Processing Status"},"availability_status":{"anyOf":[{"type":"string","enum":["AVAILABLE","EXPIRED"]},{"type":"null"}],"title":"Availability Status"},"semantic_status":{"anyOf":[{"type":"string","enum":["CURRENT","SUPERSEDED"]},{"type":"null"}],"title":"Semantic Status"},"completeness":{"anyOf":[{"type":"string","enum":["COMPLETE","INCOMPLETE","BLOCKED"]},{"type":"null"}],"title":"Completeness"},"failure_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Code"},"superseding_export_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Superseding Export Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"latest_event_at":{"type":"string","format":"date-time","title":"Latest Event At"},"manifest":{"anyOf":[{"$ref":"#/components/schemas/ExecutionExportManifestResponse"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["export_id","schema_version","domain","scope","deployment_id","account_id","start_time","end_time","processing_status","created_at","latest_event_at"],"title":"ExecutionExportStatusResponse"},"ExecutionHaltResponse":{"properties":{"event_id":{"type":"integer","title":"Event Id"},"session_id":{"type":"string","title":"Session Id"},"terminal_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terminal Reason"},"session_count":{"type":"integer","title":"Session Count"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["event_id","session_id","session_count","detail"],"title":"ExecutionHaltResponse","description":"This bar hit a safety halt (Q-0909).\n\n``detail`` is rendered SERVER-SIDE, the same discipline as\n``AccountWarning.detail``: the app banner, the ``keel`` CLI and an agent\nover MCP all repeat one sentence about one event rather than each writing\ntheir own. Until this field existed the halted bar surfaced as the raw\n``error_summary`` — ``engine sessions terminal:\nexs_01m0wtkz1kng3f31p4cs8b76e1=HALTED:account_invariant_halt:572`` — an\ninternal session id and an invariant number as the user-facing text.\n\n``event_id`` is the durable ``strategy.execution_sessions\n.account_halt_event_id``; it is what an operator quotes to\n``/internal/v1/execution-safety/{account_id}``."},"ExecutionImpactDetectorResponse":{"properties":{"deployment_id":{"type":"string","title":"Deployment Id"},"account_id":{"type":"string","title":"Account Id"},"interpretation":{"type":"string","const":"OBSERVATIONAL_NOT_CAUSAL","title":"Interpretation"},"assets":{"items":{"$ref":"#/components/schemas/ImpactDetectorAsset"},"type":"array","title":"Assets"}},"additionalProperties":false,"type":"object","required":["deployment_id","account_id","interpretation","assets"],"title":"ExecutionImpactDetectorResponse","description":"Impact detector v0 (spec 11 §8) — a detector, not a model.\n\nIts job is firing spec 11 §10's un-defer trigger, not estimating\nimpact; the interpretation label travels with the payload so no\nconsumer can present these slopes as causal impact (spec 04:152-154)."},"ExecutionMetadata":{"properties":{"description":{"type":"string","title":"Description"},"usage_hint":{"type":"string","title":"Usage Hint"},"parameters":{"items":{"$ref":"#/components/schemas/ExecutionParameterResponse"},"type":"array","title":"Parameters"},"param_constraints":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Param Constraints"}},"type":"object","required":["description","usage_hint","parameters","param_constraints"],"title":"ExecutionMetadata","description":"Describes the Execution declaration and its parameters."},"ExecutionNativeFeeComponents":{"properties":{"currency":{"type":"string","title":"Currency"},"total":{"type":"string","title":"Total"},"builder":{"type":"string","title":"Builder"},"venue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Venue"}},"additionalProperties":false,"type":"object","required":["currency","total","builder"],"title":"ExecutionNativeFeeComponents"},"ExecutionNativeFeeTotal":{"properties":{"currency":{"type":"string","title":"Currency"},"amount":{"type":"string","title":"Amount"}},"additionalProperties":false,"type":"object","required":["currency","amount"],"title":"ExecutionNativeFeeTotal"},"ExecutionNoticeResponse":{"properties":{"kind":{"type":"string","const":"planning_omission","title":"Kind"},"symbol":{"type":"string","title":"Symbol"},"status":{"type":"string","const":"omitted","title":"Status"},"reason_code":{"type":"string","enum":["market_unavailable","market_unavailable_at_dispatch"],"title":"Reason Code"},"message":{"type":"string","title":"Message"}},"type":"object","required":["kind","symbol","status","reason_code","message"],"title":"ExecutionNoticeResponse","description":"Non-failing per-asset outcome that did not produce an order."},"ExecutionParameterResponse":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"default":{"title":"Default"},"description":{"type":"string","title":"Description","default":""},"required_when":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Required When"},"min":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}],"title":"Min"},"max":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}],"title":"Max"},"min_exclusive":{"type":"boolean","title":"Min Exclusive","default":false},"max_exclusive":{"type":"boolean","title":"Max Exclusive","default":false},"typical":{"anyOf":[{"items":{"anyOf":[{"type":"number"},{"type":"integer"}]},"type":"array"},{"type":"null"}],"title":"Typical"},"step":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Step"},"options":{"items":{"type":"string"},"type":"array","title":"Options","default":[]}},"type":"object","required":["name","type"],"title":"ExecutionParameterResponse","description":"Describes a single parameter of the Execution declaration."},"ExecutionQualityDailySummary":{"properties":{"reporting_date":{"type":"string","title":"Reporting Date"},"venue_id":{"type":"string","title":"Venue Id"},"instrument_id":{"type":"string","title":"Instrument Id"},"side":{"type":"string","enum":["BUY","SELL","NONE"],"title":"Side"},"style":{"type":"string","title":"Style"},"style_version":{"type":"string","title":"Style Version"},"metric_version":{"type":"string","title":"Metric Version"},"capture_profile":{"type":"string","title":"Capture Profile"},"sample_count":{"type":"integer","title":"Sample Count"},"complete_count":{"type":"integer","title":"Complete Count"},"incomplete_count":{"type":"integer","title":"Incomplete Count"},"not_applicable_count":{"type":"integer","title":"Not Applicable Count"},"target_notional_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Notional Sum"},"filled_at_e_quantity_sum":{"type":"string","title":"Filled At E Quantity Sum"},"final_filled_quantity_sum":{"type":"string","title":"Final Filled Quantity Sum"},"residual_at_e_quantity_sum":{"type":"string","title":"Residual At E Quantity Sum"},"child_count":{"type":"integer","title":"Child Count"},"decision_filled_price_cost_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Filled Price Cost Sum"},"decision_fee_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Fee Sum"},"decision_residual_cost_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Residual Cost Sum"},"decision_all_in_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision All In Sum"},"decision_bps_ratio_of_sums":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Bps Ratio Of Sums"},"arrival_filled_price_cost_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival Filled Price Cost Sum"},"arrival_fee_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival Fee Sum"},"arrival_residual_cost_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival Residual Cost Sum"},"arrival_all_in_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival All In Sum"},"arrival_bps_ratio_of_sums":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival Bps Ratio Of Sums"},"distribution_percentiles":{"additionalProperties":true,"type":"object","title":"Distribution Percentiles"},"missingness":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Missingness"},"rollup_generation":{"type":"integer","title":"Rollup Generation"},"maximum_correction_cursor":{"type":"integer","title":"Maximum Correction Cursor"},"arrival_notional_denominator_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival Notional Denominator Sum"},"completion_at_e_measured_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Completion At E Measured Count"},"final_completion_measured_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Final Completion Measured Count"},"decision_bps_measured_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Decision Bps Measured Count"},"arrival_bps_measured_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Arrival Bps Measured Count"},"decision_notional_measured_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Decision Notional Measured Count"},"arrival_notional_measured_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Arrival Notional Measured Count"},"scored_episode_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Scored Episode Count"},"arrival_scored_all_in_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival Scored All In Sum"},"arrival_scored_notional_denominator_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival Scored Notional Denominator Sum"},"arrival_scored_bps_ratio_of_sums":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival Scored Bps Ratio Of Sums"},"arrival_scored_bps_measured_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Arrival Scored Bps Measured Count"},"arrival_scored_notional_measured_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Arrival Scored Notional Measured Count"},"decision_scored_all_in_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Scored All In Sum"},"decision_scored_notional_denominator_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Scored Notional Denominator Sum"},"decision_scored_bps_ratio_of_sums":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Scored Bps Ratio Of Sums"},"decision_scored_bps_measured_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Decision Scored Bps Measured Count"},"decision_scored_notional_measured_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Decision Scored Notional Measured Count"}},"additionalProperties":false,"type":"object","required":["reporting_date","venue_id","instrument_id","side","style","style_version","metric_version","capture_profile","sample_count","complete_count","incomplete_count","not_applicable_count","target_notional_sum","filled_at_e_quantity_sum","final_filled_quantity_sum","residual_at_e_quantity_sum","child_count","decision_filled_price_cost_sum","decision_fee_sum","decision_residual_cost_sum","decision_all_in_sum","decision_bps_ratio_of_sums","arrival_filled_price_cost_sum","arrival_fee_sum","arrival_residual_cost_sum","arrival_all_in_sum","arrival_bps_ratio_of_sums","distribution_percentiles","missingness","rollup_generation","maximum_correction_cursor"],"title":"ExecutionQualityDailySummary"},"ExecutionQualityPooledSummary":{"properties":{"reporting_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reporting Date"},"style":{"type":"string","title":"Style"},"style_version":{"type":"string","title":"Style Version"},"metric_version":{"type":"string","title":"Metric Version"},"capture_profile":{"type":"string","title":"Capture Profile"},"pooled_rows":{"type":"integer","title":"Pooled Rows"},"sample_count":{"type":"integer","title":"Sample Count"},"complete_count":{"type":"integer","title":"Complete Count"},"scored_episode_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Scored Episode Count"},"decision_all_in_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision All In Sum"},"decision_notional_denominator_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Notional Denominator Sum"},"decision_bps_ratio_of_sums":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Bps Ratio Of Sums"},"decision_bps_measured_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Decision Bps Measured Count"},"arrival_all_in_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival All In Sum"},"arrival_notional_denominator_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival Notional Denominator Sum"},"arrival_bps_ratio_of_sums":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival Bps Ratio Of Sums"},"arrival_bps_measured_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Arrival Bps Measured Count"},"arrival_scored_all_in_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival Scored All In Sum"},"arrival_scored_notional_denominator_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival Scored Notional Denominator Sum"},"arrival_scored_bps_ratio_of_sums":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival Scored Bps Ratio Of Sums"},"arrival_scored_bps_measured_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Arrival Scored Bps Measured Count"},"decision_scored_all_in_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Scored All In Sum"},"decision_scored_notional_denominator_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Scored Notional Denominator Sum"},"decision_scored_bps_ratio_of_sums":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Scored Bps Ratio Of Sums"},"decision_scored_bps_measured_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Decision Scored Bps Measured Count"},"decision_bps_daily_sample_stddev":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Bps Daily Sample Stddev"},"decision_bps_daily_sample_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Decision Bps Daily Sample Days"}},"additionalProperties":false,"type":"object","required":["reporting_date","style","style_version","metric_version","capture_profile","pooled_rows","sample_count","complete_count","scored_episode_count","decision_all_in_sum","decision_notional_denominator_sum","decision_bps_ratio_of_sums","decision_bps_measured_count","arrival_all_in_sum","arrival_notional_denominator_sum","arrival_bps_ratio_of_sums","arrival_bps_measured_count","arrival_scored_all_in_sum","arrival_scored_notional_denominator_sum","arrival_scored_bps_ratio_of_sums","arrival_scored_bps_measured_count"],"title":"ExecutionQualityPooledSummary","description":"One SERVER-pooled reading of the rollup rows (census C3 R4, Q-0343).\n\nPools exactly the way the per-row ratios were built — sum the sealed\ncomponents, divide ONCE, on the receipt grid (HALF_UP, 1e-10) — across\nvenue / instrument / side only, never across the methodology keys\n(style, style_version, metric_version, capture_profile). Every figure\nships its population: ``pooled_rows`` (rollup rows summed),\n``sample_count`` / ``complete_count`` / ``scored_episode_count``\n(receipts), and a ``*_measured_count`` per family. Null means the\ncomponents were not all present (a pre-V139 row in the group, a family no\nrow measured) — never a fabricated number. The four families are four\ndifferent populations and are never pooled with each other:\n``decision_*`` and ``arrival_*`` over COMPLETE∧SCORED receipts,\n``arrival_scored_*`` over every SCORED receipt, and (V175, Q-0340)\n``decision_scored_*`` — the decision-measured cohort — over every SCORED\nreceipt whose decision family sealed; its ``_measured_count`` IS that\ncohort's population. Null on the V175 fields when any pooled row predates\nV175 (the guard populates the columns only for rows published after it).\n\n``reporting_date`` is the date for a per-day pool and None for the\ncohort's lifetime pool; ``decision_bps_daily_sample_stddev`` exists only\non the lifetime pool: the sample (n-1) standard deviation of this SAME\ncohort's per-day pooled decision bps (Q-0121's \"day variance\"), null\nbelow two measured days."},"ExecutionQualityResponse":{"properties":{"deployment_id":{"type":"string","title":"Deployment Id"},"account_id":{"type":"string","title":"Account Id"},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"},"style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Style"},"style_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Style Version"},"daily":{"items":{"$ref":"#/components/schemas/ExecutionQualityDailySummary"},"type":"array","title":"Daily"},"pooled_daily":{"items":{"$ref":"#/components/schemas/ExecutionQualityPooledSummary"},"type":"array","title":"Pooled Daily"},"pooled_lifetime":{"items":{"$ref":"#/components/schemas/ExecutionQualityPooledSummary"},"type":"array","title":"Pooled Lifetime"}},"additionalProperties":false,"type":"object","required":["deployment_id","account_id","daily"],"title":"ExecutionQualityResponse"},"ExecutionQualitySummary":{"properties":{"receipt_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Id"},"receipt_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Receipt Version"},"session_id":{"type":"string","title":"Session Id"},"intent_rev":{"type":"integer","title":"Intent Rev"},"state":{"type":"string","enum":["PROVISIONAL","SEALED","CORRECTED","INCOMPLETE","PROJECTION_MISMATCH","ZERO_ACTION"],"title":"State"},"corrected":{"type":"boolean","title":"Corrected"},"record_origin":{"type":"string","const":"NATIVE","title":"Record Origin"},"target_quantity":{"type":"string","title":"Target Quantity"},"filled_at_e_quantity":{"type":"string","title":"Filled At E Quantity"},"filled_final_quantity":{"type":"string","title":"Filled Final Quantity"},"residual_at_e_quantity":{"type":"string","title":"Residual At E Quantity"},"vwap_at_e":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vwap At E"},"vwap_final":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vwap Final"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"terminal_reason":{"type":"string","title":"Terminal Reason"},"outcome":{"type":"string","title":"Outcome"},"economics_state":{"type":"string","enum":["SCORED","UNSCORABLE","NOT_APPLICABLE"],"title":"Economics State"},"decision_mid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Mid"},"arrival_mid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival Mid"},"decision_filled_price_cost_reporting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Filled Price Cost Reporting"},"decision_fee_reporting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Fee Reporting"},"decision_residual_cost_reporting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Residual Cost Reporting"},"decision_all_in_shortfall_reporting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision All In Shortfall Reporting"},"arrival_filled_price_cost_reporting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival Filled Price Cost Reporting"},"arrival_fee_reporting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival Fee Reporting"},"arrival_residual_cost_reporting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival Residual Cost Reporting"},"arrival_all_in_shortfall_reporting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival All In Shortfall Reporting"},"decision_bps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Bps"},"arrival_bps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival Bps"},"fee_native_at_e":{"items":{"$ref":"#/components/schemas/ExecutionNativeFeeTotal"},"type":"array","title":"Fee Native At E"},"fee_reporting_at_e":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fee Reporting At E"},"fee_components_at_e":{"items":{"$ref":"#/components/schemas/ExecutionNativeFeeComponents"},"type":"array","title":"Fee Components At E"},"missing_fee_components":{"items":{"type":"string"},"type":"array","title":"Missing Fee Components"},"completion_at_e":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completion At E"},"final_completion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final Completion"},"reporting_asset_version_id":{"type":"string","title":"Reporting Asset Version Id"},"metric_version":{"type":"string","title":"Metric Version"},"completeness":{"type":"string","enum":["COMPLETE","INCOMPLETE","BLOCKED"],"title":"Completeness"},"missing_reasons":{"items":{"type":"string"},"type":"array","title":"Missing Reasons"},"markout_favorable_1s_bps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Markout Favorable 1S Bps"},"markout_favorable_5s_bps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Markout Favorable 5S Bps"},"markout_favorable_30s_bps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Markout Favorable 30S Bps"},"net_capture_30s_bps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Net Capture 30S Bps"},"markout_completeness":{"anyOf":[{"type":"string","enum":["COMPLETE","PARTIAL","MISSING","NOT_APPLICABLE"]},{"type":"null"}],"title":"Markout Completeness"},"markout_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Markout Source"},"interval_twap_mid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Interval Twap Mid"},"interval_vwap_mid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Interval Vwap Mid"},"interval_twap_bps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Interval Twap Bps"},"interval_vwap_bps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Interval Vwap Bps"},"participation_of_volume":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Participation Of Volume"},"interval_twap_required_seconds":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Interval Twap Required Seconds"},"interval_twap_covered_seconds":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Interval Twap Covered Seconds"},"interval_twap_max_gap_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval Twap Max Gap Ms"},"interval_twap_edge_covered_seconds":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Interval Twap Edge Covered Seconds"},"interval_twap_lead_carry_age_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval Twap Lead Carry Age Ms"},"interval_twap_tail_carry_age_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval Twap Tail Carry Age Ms"},"interval_twap_update_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval Twap Update Count"},"interval_vwap_print_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval Vwap Print Count"},"unfilled_opportunity_cost_reporting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unfilled Opportunity Cost Reporting"},"unfilled_reference_mid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unfilled Reference Mid"},"unfilled_reference_window_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Unfilled Reference Window Start"},"unfilled_reference_window_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Unfilled Reference Window End"},"unfilled_reference_max_gap_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Unfilled Reference Max Gap Ms"},"unfilled_horizon_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Unfilled Horizon At"},"unfilled_horizon_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unfilled Horizon Kind"},"unfilled_reference_missing_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unfilled Reference Missing Reason"},"decision_all_in_shortfall_ruled_horizon_reporting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision All In Shortfall Ruled Horizon Reporting"},"decision_benchmark_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Benchmark Source"},"decision_benchmark_venue_age_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Decision Benchmark Venue Age Ms"},"decision_benchmark_receive_age_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Decision Benchmark Receive Age Ms"},"arrival_benchmark_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrival Benchmark Source"},"arrival_benchmark_venue_age_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Arrival Benchmark Venue Age Ms"},"arrival_benchmark_receive_age_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Arrival Benchmark Receive Age Ms"},"end_benchmark_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Benchmark Source"},"end_benchmark_venue_age_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"End Benchmark Venue Age Ms"},"end_benchmark_receive_age_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"End Benchmark Receive Age Ms"}},"additionalProperties":false,"type":"object","required":["session_id","intent_rev","state","corrected","record_origin","target_quantity","filled_at_e_quantity","filled_final_quantity","residual_at_e_quantity","terminal_reason","outcome","economics_state","fee_native_at_e","fee_components_at_e","missing_fee_components","reporting_asset_version_id","metric_version","completeness","missing_reasons"],"title":"ExecutionQualitySummary","description":"Server-authored compact projection of provisional or sealed evidence.\n\nDecimal values remain canonical base-10 strings.  In particular, this\nresponse model must never turn exact NUMERIC values back into binary floats\nfor the existing execution timeline.  A provisional projection has no\nreceipt identity: immutable receipt IDs and versions begin only at sealing."},"ExecutionReceiptResponse":{"properties":{"deployment_id":{"type":"string","title":"Deployment Id"},"account_id":{"type":"string","title":"Account Id"},"summary":{"$ref":"#/components/schemas/ExecutionQualitySummary"},"prior_receipt_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prior Receipt Id"},"sealed_at":{"type":"string","format":"date-time","title":"Sealed At"},"correction_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correction Reason"},"reporting_asset_version_id":{"type":"string","title":"Reporting Asset Version Id"},"benchmark_completeness":{"type":"string","enum":["COMPLETE","PARTIAL","MISSING","NOT_APPLICABLE"],"title":"Benchmark Completeness"},"attribution":{"$ref":"#/components/schemas/ReceiptEpisodeAttribution"},"source_references":{"$ref":"#/components/schemas/ReceiptSourceReferences"},"children":{"items":{"$ref":"#/components/schemas/ReceiptChildTimeline"},"type":"array","title":"Children"}},"additionalProperties":false,"type":"object","required":["deployment_id","account_id","summary","sealed_at","reporting_asset_version_id","benchmark_completeness","attribution","source_references","children"],"title":"ExecutionReceiptResponse"},"ExecutionRunEpisode":{"properties":{"session_id":{"type":"string","title":"Session Id"},"intent_rev":{"type":"integer","title":"Intent Rev"},"symbol":{"type":"string","title":"Symbol"},"side":{"anyOf":[{"type":"string","enum":["BUY","SELL","NONE"]},{"type":"null"}],"title":"Side"},"action_state":{"type":"string","title":"Action State"},"zero_action_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zero Action Reason"},"style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Style"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"quality_summary":{"anyOf":[{"$ref":"#/components/schemas/ExecutionQualitySummary"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["session_id","intent_rev","symbol","action_state"],"title":"ExecutionRunEpisode","description":"One NATIVE episode of a run, with its OWN evidence (Q-0908).\n\nA run's receipts are PER EPISODE. Q-0341 established that one of them is\nnot the run's summary, and suppressed `quality_summary` on the timeline\nrow for any run with more than one episode — correctly, because\ncollapsing them needs a separately frozen aggregate formula that does not\nexist. Post-cutover EVERY run is multi-episode (prod: {11, 15, 169}\nepisodes over 64 runs, none with 1), so that suppression left the whole\nreceipt surface unreachable: 292 sealed FILLED receipts and zero requests\nto the receipt route in seven days.\n\nThis model is the reachability half, and nothing more. It carries no\ncross-episode aggregate of any kind — the identity fields are what make\n`GET .../executions/{session_id}/revisions/{intent_rev}/receipt`\nopenable, and `quality_summary` is the SAME projection the one-episode\ntimeline row and the receipt detail serve.\n\n`quality_summary` is None when the episode has neither a sealed eligible\nreceipt nor a provisional draft yet — an honest \"no evidence yet\", never\nan empty summary. The identity, symbol and action state are still true,\nwhich is what lets a zero-action episode explain itself\n(`action_state = SKIPPED` with its `zero_action_reason`) without any\nmeasurement at all."},"ExecutionRunEpisodesResponse":{"properties":{"execution_run_id":{"type":"string","title":"Execution Run Id"},"episode_count":{"type":"integer","title":"Episode Count"},"sealed_receipt_count":{"type":"integer","title":"Sealed Receipt Count"},"provisional_count":{"type":"integer","title":"Provisional Count"},"episodes":{"items":{"$ref":"#/components/schemas/ExecutionRunEpisode"},"type":"array","title":"Episodes"}},"additionalProperties":false,"type":"object","required":["execution_run_id","episode_count","sealed_receipt_count","provisional_count","episodes"],"title":"ExecutionRunEpisodesResponse","description":"The per-episode receipt index for ONE run (Q-0908).\n\n`episode_count` is `len(episodes)` by construction — both come from the\nsame NATIVE-episode selector `_RUN_EPISODE_COUNT_SQL` counts, so the\nnumber the timeline row shows and the number of rows this returns cannot\ndisagree. `sealed_receipt_count` / `provisional_count` are counted over\nthe returned episodes for the same reason.\n\nThere is deliberately NO run-level quality field here. See\n`ExecutionRunEpisode`."},"ExpandedPositionResponse":{"properties":{"symbol":{"type":"string","title":"Symbol"},"side":{"type":"string","title":"Side"},"size":{"type":"number","title":"Size"},"entry_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entry Price"},"unrealized_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unrealized Pnl"},"leverage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Leverage"},"liquidation_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Liquidation Price"},"dex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dex"}},"type":"object","required":["symbol","side","size"],"title":"ExpandedPositionResponse"},"ExpandedPositionsEnvelope":{"properties":{"account_value":{"type":"number","title":"Account Value"},"account_mode":{"$ref":"#/components/schemas/ExecutableAccountMode"},"perp_positions":{"items":{"$ref":"#/components/schemas/ExpandedPositionResponse"},"type":"array","title":"Perp Positions","default":[]},"spot_balances":{"items":{"$ref":"#/components/schemas/SpotBalanceResponse"},"type":"array","title":"Spot Balances","default":[]},"margin_summary":{"anyOf":[{"$ref":"#/components/schemas/MarginSummaryResponse"},{"type":"null"}]}},"type":"object","required":["account_value","account_mode"],"title":"ExpandedPositionsEnvelope"},"ExperimentArchiveRequest":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"ExperimentArchiveRequest"},"ExperimentCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"base_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Ref"},"objective_metric":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objective Metric"},"experiment_type":{"anyOf":[{"type":"string","enum":["analysis_only","cost","parameter_edit","robustness","structural_edit","universe_edit","risk_control"]},{"type":"null"}],"title":"Experiment Type"},"hypothesis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hypothesis"},"proposed_change":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Change"},"expected_tradeoff":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Tradeoff"},"success_criteria":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success Criteria"},"priority_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority Rank"},"source_hash_at_proposal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Hash At Proposal"},"control_backtest_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Control Backtest Id"},"control_artifact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Control Artifact Id"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"}},"type":"object","required":["name"],"title":"ExperimentCreateRequest"},"ExperimentEventResponse":{"properties":{"event_id":{"type":"string","title":"Event Id"},"org_id":{"type":"string","title":"Org Id"},"strategy_id":{"type":"string","title":"Strategy Id"},"experiment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Experiment Id"},"trial_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trial Id"},"event_type":{"type":"string","title":"Event Type"},"actor_type":{"type":"string","title":"Actor Type"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Id"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"artifact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artifact Id"},"backtest_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backtest Run Id"},"payload":{"additionalProperties":true,"type":"object","title":"Payload","default":{}},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["event_id","org_id","strategy_id","event_type","actor_type","created_at"],"title":"ExperimentEventResponse"},"ExperimentPatchRequest":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"type":"string","enum":["proposed","queued","selected","running","completed","accepted","rejected","inconclusive","stale","archived"]},{"type":"null"}],"title":"Status"},"experiment_type":{"anyOf":[{"type":"string","enum":["analysis_only","cost","parameter_edit","robustness","structural_edit","universe_edit","risk_control"]},{"type":"null"}],"title":"Experiment Type"},"hypothesis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hypothesis"},"proposed_change":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Change"},"expected_tradeoff":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Tradeoff"},"success_criteria":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success Criteria"},"priority_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority Rank"},"decision":{"anyOf":[{"type":"string","enum":["accept","reject","revise","keep_observing","defer"]},{"type":"null"}],"title":"Decision"},"decision_rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Rationale"},"archived_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archived Reason"}},"type":"object","title":"ExperimentPatchRequest"},"ExperimentReorderRequest":{"properties":{"experiment_id":{"type":"string","title":"Experiment Id"},"priority_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority Rank"},"before_experiment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before Experiment Id"},"after_experiment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After Experiment Id"}},"type":"object","required":["experiment_id"],"title":"ExperimentReorderRequest"},"ExperimentResponse":{"properties":{"experiment_id":{"type":"string","title":"Experiment Id"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"},"strategy_id":{"type":"string","title":"Strategy Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","title":"Status"},"base_commit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Commit Id"},"objective_metric":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objective Metric"},"kind":{"type":"string","title":"Kind","default":"research_test"},"experiment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Experiment Type"},"hypothesis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hypothesis"},"proposed_change":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Change"},"expected_tradeoff":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Tradeoff"},"success_criteria":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success Criteria"},"priority_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority Rank"},"source_hash_at_proposal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Hash At Proposal"},"control_backtest_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Control Backtest Id"},"control_artifact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Control Artifact Id"},"created_by_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Run Id"},"selected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selected At"},"decided_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decided At"},"decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"},"decision_rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Rationale"},"archived_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archived Reason"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["experiment_id","strategy_id","name","status","created_at"],"title":"ExperimentResponse"},"ExperimentTrialCreateRequest":{"properties":{"trial_kind":{"anyOf":[{"type":"string","enum":["analysis_only","parameter_edit","structural_edit","universe_edit","risk_control"]},{"type":"null"}],"title":"Trial Kind"},"status":{"type":"string","enum":["proposed","queued","running","completed","failed","cancelled","archived"],"title":"Status","default":"proposed"},"experiment_plan_artifact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Experiment Plan Artifact Id"},"diff_artifact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Diff Artifact Id"},"control_commit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Control Commit Id"},"candidate_commit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Candidate Commit Id"},"control_backtest_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Control Backtest Id"},"candidate_backtest_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Candidate Backtest Id"},"source_hash_before":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Hash Before"},"source_hash_after":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Hash After"},"metrics_delta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics Delta"},"result_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Summary"}},"type":"object","title":"ExperimentTrialCreateRequest"},"ExperimentTrialPatchRequest":{"properties":{"status":{"anyOf":[{"type":"string","enum":["proposed","queued","running","completed","failed","cancelled","archived"]},{"type":"null"}],"title":"Status"},"experiment_plan_artifact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Experiment Plan Artifact Id"},"diff_artifact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Diff Artifact Id"},"control_commit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Control Commit Id"},"candidate_commit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Candidate Commit Id"},"control_backtest_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Control Backtest Id"},"candidate_backtest_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Candidate Backtest Id"},"source_hash_before":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Hash Before"},"source_hash_after":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Hash After"},"metrics_delta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics Delta"},"result_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Summary"},"decision":{"anyOf":[{"type":"string","enum":["accept","reject","revise","keep_observing","defer"]},{"type":"null"}],"title":"Decision"},"decision_rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Rationale"}},"type":"object","title":"ExperimentTrialPatchRequest"},"ExperimentTrialResponse":{"properties":{"trial_id":{"type":"string","title":"Trial Id"},"org_id":{"type":"string","title":"Org Id"},"strategy_id":{"type":"string","title":"Strategy Id"},"experiment_id":{"type":"string","title":"Experiment Id"},"trial_kind":{"type":"string","title":"Trial Kind"},"status":{"type":"string","title":"Status"},"created_by_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Run Id"},"experiment_plan_artifact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Experiment Plan Artifact Id"},"diff_artifact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Diff Artifact Id"},"control_commit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Control Commit Id"},"candidate_commit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Candidate Commit Id"},"control_backtest_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Control Backtest Id"},"candidate_backtest_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Candidate Backtest Id"},"source_hash_before":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Hash Before"},"source_hash_after":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Hash After"},"metrics_delta":{"additionalProperties":true,"type":"object","title":"Metrics Delta","default":{}},"result_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Summary"},"decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"},"decision_rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Rationale"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["trial_id","org_id","strategy_id","experiment_id","trial_kind","status","created_at","updated_at"],"title":"ExperimentTrialResponse"},"ExperimentWithTrial":{"properties":{"experiment_id":{"type":"string","title":"Experiment Id"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"},"strategy_id":{"type":"string","title":"Strategy Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","title":"Status"},"base_commit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Commit Id"},"objective_metric":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objective Metric"},"kind":{"type":"string","title":"Kind","default":"research_test"},"experiment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Experiment Type"},"hypothesis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hypothesis"},"proposed_change":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Change"},"expected_tradeoff":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Tradeoff"},"success_criteria":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success Criteria"},"priority_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority Rank"},"source_hash_at_proposal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Hash At Proposal"},"control_backtest_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Control Backtest Id"},"control_artifact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Control Artifact Id"},"created_by_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Run Id"},"selected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selected At"},"decided_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decided At"},"decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"},"decision_rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Rationale"},"archived_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archived Reason"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"latest_trial":{"anyOf":[{"$ref":"#/components/schemas/ExperimentTrialResponse"},{"type":"null"}]}},"type":"object","required":["experiment_id","strategy_id","name","status","created_at"],"title":"ExperimentWithTrial","description":"Experiment row enriched with its latest trial summary.\n\nUsed by the lifecycle endpoint so the frontend can render one\nconsolidated card per experiment without needing per-row trial\nfetches."},"FirstWeekBlock":{"properties":{"granted":{"type":"integer","title":"Granted"},"remaining":{"type":"integer","title":"Remaining"},"ends_at":{"type":"string","title":"Ends At"}},"type":"object","required":["granted","remaining","ends_at"],"title":"FirstWeekBlock","description":"An active first-week welcome grant on one unit (connect-onboarding §1.8).\n\nThe wire shape of :meth:`platform_auth.quota.FirstWeek.to_dict`:\n``granted`` is the grant's own delta, ``remaining`` what is left of it\n(``WELCOME_POOL_SQL``), ``ends_at`` its expiry (ISO-8601, ``Z``). The key\nis ABSENT -- not null -- whenever no welcome grant is active; the\nserializers below drop a ``None``."},"FirstWeekResponse":{"properties":{"eligible":{"type":"boolean","title":"Eligible"},"backtest_runs":{"type":"integer","title":"Backtest Runs"},"ends_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ends At"}},"type":"object","required":["eligible","backtest_runs"],"title":"FirstWeekResponse","description":"``GET /v1/auth/oauth/connect-attempts/{attempt_id}/first-week``\n(connect-onboarding spec 01 §1.4): the consent page's first-week line.\n\n``backtest_runs`` is the free plan's weekly limit plus the bonus delta,\ncomputed (50 + 200), never typed. ``ends_at`` is the existing welcome\ngrant's expiry, else ``now + 7 days`` as a preview, and ``null`` when not\neligible. ``eligible`` comes from ``platform_auth.welcome\n.welcome_eligibility`` -- the same rule authorize-complete grants on."},"ForkStrategyRequest":{"properties":{"target_workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Workspace Id"},"share_link_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Link Id"},"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"}},"type":"object","title":"ForkStrategyRequest"},"ForkStrategyResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"visibility":{"type":"string","title":"Visibility"},"forked_from_id":{"type":"string","title":"Forked From Id"},"forked_from_version_hash":{"type":"string","title":"Forked From Version Hash"},"org_id":{"type":"string","title":"Org Id"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"source_org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Org Id"}},"type":"object","required":["id","name","status","visibility","forked_from_id","forked_from_version_hash","org_id"],"title":"ForkStrategyResponse"},"ForkWithEditsRequest":{"properties":{"share_id":{"type":"string","title":"Share Id"},"graph":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Graph"},"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"target_workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Workspace Id"}},"type":"object","required":["share_id"],"title":"ForkWithEditsRequest"},"ForkWithEditsResponse":{"properties":{"strategy_id":{"type":"string","title":"Strategy Id"},"name":{"type":"string","title":"Name"},"has_edits":{"type":"boolean","title":"Has Edits"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"}},"type":"object","required":["strategy_id","name","has_edits"],"title":"ForkWithEditsResponse"},"FrameConstituent":{"properties":{"account_id":{"type":"string","title":"Account Id"},"reporting_interval_id":{"type":"string","title":"Reporting Interval Id"},"basis_id":{"type":"string","title":"Basis Id"},"binding_revision":{"type":"integer","exclusiveMinimum":0.0,"title":"Binding Revision"},"opening_observation_id":{"type":"string","title":"Opening Observation Id"},"closing_observation_id":{"type":"string","title":"Closing Observation Id"},"common_boundary_proof_ref":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Common Boundary Proof Ref"},"observation_id":{"type":"string","title":"Observation Id"},"verdict_revision":{"type":"integer","exclusiveMinimum":0.0,"title":"Verdict Revision"},"observed_at":{"type":"string","format":"date-time","title":"Observed At"},"observed_at_lower":{"type":"string","format":"date-time","title":"Observed At Lower"},"observed_at_upper":{"type":"string","format":"date-time","title":"Observed At Upper"},"source_cutoff_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Source Cutoff Sha256"},"comparator_id":{"type":"string","title":"Comparator Id"},"comparator_version":{"type":"string","title":"Comparator Version"},"flow_inclusion_quality":{"type":"string","enum":["complete","pending","held"],"title":"Flow Inclusion Quality"},"absorbed_from":{"type":"string","format":"date-time","title":"Absorbed From"},"absorbed_through":{"type":"string","format":"date-time","title":"Absorbed Through"},"absorbed_principal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Absorbed Principal"},"membership_capital":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Membership Capital"}},"additionalProperties":false,"type":"object","required":["account_id","reporting_interval_id","basis_id","binding_revision","opening_observation_id","closing_observation_id","common_boundary_proof_ref","observation_id","verdict_revision","observed_at","observed_at_lower","observed_at_upper","source_cutoff_sha256","comparator_id","comparator_version","flow_inclusion_quality","absorbed_from","absorbed_through","absorbed_principal","membership_capital"],"title":"FrameConstituent"},"FundingEventResponse":{"properties":{"event_time":{"type":"string","title":"Event Time"},"symbol":{"type":"string","title":"Symbol"},"payment_amount":{"type":"number","title":"Payment Amount"},"funding_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Funding Rate"},"position_size":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Position Size"},"position_side":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position Side"}},"type":"object","required":["event_time","symbol","payment_amount"],"title":"FundingEventResponse"},"FundingResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/FundingEventResponse"},"type":"array","title":"Events"},"total_funding":{"type":"number","title":"Total Funding"},"total_by_symbol":{"additionalProperties":{"type":"number"},"type":"object","title":"Total By Symbol"}},"type":"object","required":["events","total_funding","total_by_symbol"],"title":"FundingResponse"},"GenerateSharePreviewsRequest":{"properties":{"types":{"items":{"type":"string","enum":["strategy","strategy_backtest","backtest"]},"type":"array","title":"Types"},"backtest_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backtest Id"}},"type":"object","required":["types"],"title":"GenerateSharePreviewsRequest"},"GraduationBlock":{"properties":{"ready":{"type":"boolean","title":"Ready"},"ready_since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ready Since"},"nudged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Nudged At"},"evaluated_at":{"type":"string","format":"date-time","title":"Evaluated At"},"record":{"anyOf":[{"$ref":"#/components/schemas/GraduationRecord"},{"type":"null"}]},"thresholds":{"$ref":"#/components/schemas/GraduationThresholds"},"criteria":{"$ref":"#/components/schemas/GraduationCriteria"},"carry_over":{"anyOf":[{"$ref":"#/components/schemas/CarryOver"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["ready","ready_since","nudged_at","evaluated_at","record","thresholds","criteria","carry_over"],"title":"GraduationBlock","description":"IC-03-5: the graduation criteria state, computed on read.\n\n``record`` and ``carry_over`` are null only for a deployment with no\ndeployed commit (the record has no commit to name)."},"GraduationCriteria":{"properties":{"age":{"$ref":"#/components/schemas/AgeCriterion"},"evals":{"$ref":"#/components/schemas/EvalsCriterion"},"parity":{"$ref":"#/components/schemas/ParityCriterion"},"drawdown":{"$ref":"#/components/schemas/DrawdownCriterion"}},"additionalProperties":false,"type":"object","required":["age","evals","parity","drawdown"],"title":"GraduationCriteria"},"GraduationRecord":{"properties":{"started_at":{"type":"string","format":"date-time","title":"Started At"},"commit_id":{"type":"string","title":"Commit Id"},"commit_seq":{"type":"integer","title":"Commit Seq"},"commit_changed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Commit Changed At"}},"additionalProperties":false,"type":"object","required":["started_at","commit_id","commit_seq","commit_changed_at"],"title":"GraduationRecord","description":"IC-03-5 ``record``: the record the criteria run over (R-27)."},"GraduationThresholds":{"properties":{"min_age_days":{"type":"integer","title":"Min Age Days"},"min_evals":{"type":"integer","title":"Min Evals"},"parity_band_bps":{"type":"number","title":"Parity Band Bps"},"backtest_max_dd_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Backtest Max Dd Pct"},"dd_floor_pending":{"type":"boolean","title":"Dd Floor Pending"},"defaults_version":{"type":"integer","title":"Defaults Version"}},"additionalProperties":false,"type":"object","required":["min_age_days","min_evals","parity_band_bps","backtest_max_dd_pct","dd_floor_pending","defaults_version"],"title":"GraduationThresholds","description":"IC-03-5 ``thresholds``: frozen at create from the defaults version (IC-03-6)."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthDetailResponse":{"properties":{"reason":{"anyOf":[{"type":"string","enum":["consecutive_missing","latest_eval_failed","latest_execution_failed","dispatch_exhausted","execution_missing","rail_blocked","funding_stalled","equity_stale","failure_rate","silence","halted","schedule_unreadable"]},{"type":"null"}],"title":"Reason"},"consecutive_missing":{"type":"integer","title":"Consecutive Missing"},"last_complete_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Complete At"},"since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},"type":"object","required":["reason","consecutive_missing","last_complete_at","since"],"title":"HealthDetailResponse","description":"IC-04-2's ``health_detail`` (S04 §3.10.2): the first predicate that\nmatched, the count of most recent consecutive missing bars, the newest\nCOMPLETE bar, and the bar label the current state began at."},"ImpactDetectorAsset":{"properties":{"instrument_id":{"type":"string","title":"Instrument Id"},"sample_count":{"type":"integer","title":"Sample Count"},"slope_bps_per_notional":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Slope Bps Per Notional"},"slope_ci95_low":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Slope Ci95 Low"},"slope_ci95_high":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Slope Ci95 High"},"intercept_bps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Intercept Bps"},"points":{"items":{"$ref":"#/components/schemas/ImpactDetectorPoint"},"type":"array","title":"Points"}},"additionalProperties":false,"type":"object","required":["instrument_id","sample_count","points"],"title":"ImpactDetectorAsset","description":"Per-asset OLS of arrival_bps on abs(target_notional) (spec 11 §8).\n\nSlope/CI/intercept are diagnostic floats from PostgreSQL's regr_*\naggregates — observational associations, never money and never a causal\nimpact estimate. ``slope_bps_per_notional`` is NULL when the regression\nis undefined (fewer than two receipts, or zero size variance); the CI is\nNULL below three samples. Absent statistics stay NULL — never zero."},"ImpactDetectorPoint":{"properties":{"session_id":{"type":"string","title":"Session Id"},"intent_rev":{"type":"integer","title":"Intent Rev"},"sealed_at":{"type":"string","format":"date-time","title":"Sealed At"},"abs_target_notional":{"type":"string","title":"Abs Target Notional"},"arrival_bps":{"type":"string","title":"Arrival Bps"}},"additionalProperties":false,"type":"object","required":["session_id","intent_rev","sealed_at","abs_target_notional","arrival_bps"],"title":"ImpactDetectorPoint","description":"One sealed SCORED receipt observation on the detector's two axes."},"InstrumentResponse":{"properties":{"symbol":{"type":"string","title":"Symbol"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"status":{"type":"string","title":"Status","default":"active"}},"type":"object","required":["symbol","tags"],"title":"InstrumentResponse"},"KnownIssueRef":{"properties":{"id":{"type":"string","title":"Id"},"summary":{"type":"string","title":"Summary"}},"type":"object","required":["id","summary"],"title":"KnownIssueRef","description":"One known issue a commit's pinned component versions carry (spec 04-R34).\n\n``id`` is the quality-ledger entry (``Q-2448``); ``summary`` its one-line\nagent-facing description, as the registry declares it."},"LegalAcceptanceResponse":{"properties":{"id":{"type":"string","title":"Id"},"doc_type":{"type":"string","title":"Doc Type"},"doc_version":{"type":"string","title":"Doc Version"},"accepted_at":{"type":"string","format":"date-time","title":"Accepted At"},"surface":{"type":"string","title":"Surface"}},"type":"object","required":["id","doc_type","doc_version","accepted_at","surface"],"title":"LegalAcceptanceResponse"},"LegalDocAcceptance":{"properties":{"doc_type":{"type":"string","enum":["terms","privacy","risk_ack"],"title":"Doc Type"},"version":{"type":"string","maxLength":20,"minLength":1,"title":"Version"}},"type":"object","required":["doc_type","version"],"title":"LegalDocAcceptance","description":"A single legal document acceptance."},"LibraryEntryDetail":{"properties":{"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"risk_band":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Band"},"public_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Path"},"primary_keyword":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Keyword"},"is_index_variant":{"type":"boolean","title":"Is Index Variant","default":false},"live_badge":{"type":"boolean","title":"Live Badge","default":false},"headline":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Headline"},"default_variant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Variant Id"},"equity_curve":{"anyOf":[{"items":{"items":{},"type":"array"},"type":"array"},{"type":"null"}],"title":"Equity Curve"},"import_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Import Id"},"entry_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entry Version"},"data_as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data As Of"},"stale":{"type":"boolean","title":"Stale","default":false},"backtest_window":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Backtest Window"},"trade_count_caveat":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trade Count Caveat"},"variant_selection_rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variant Selection Rationale"},"config_schema":{"additionalProperties":true,"type":"object","title":"Config Schema"},"variants":{"items":{"$ref":"#/components/schemas/LibraryVariantSummary"},"type":"array","title":"Variants"},"thesis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thesis"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"coverage_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coverage Kind"},"coverage_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coverage Note"},"selected_knobs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Selected Knobs"},"canonical_equity":{"anyOf":[{"items":{"items":{},"type":"array"},"type":"array"},{"type":"null"}],"title":"Canonical Equity"},"source_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Hash"},"canonical":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Canonical"},"monthly_returns":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Monthly Returns"},"regime_breakdown":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Regime Breakdown"},"per_asset_stats":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Per Asset Stats"},"graph":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Graph"},"dsl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dsl"},"reference":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Reference"},"basket_resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Basket Resolved At"},"delisted_members":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Delisted Members"},"basket_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Basket Note"}},"type":"object","required":["slug","name"],"title":"LibraryEntryDetail","description":"Detail-view facts for the in-app compact library entry surface."},"LibraryEntrySummary":{"properties":{"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"risk_band":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Band"},"public_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Path"},"primary_keyword":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Keyword"},"is_index_variant":{"type":"boolean","title":"Is Index Variant","default":false},"live_badge":{"type":"boolean","title":"Live Badge","default":false},"headline":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Headline"},"default_variant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Variant Id"},"equity_curve":{"anyOf":[{"items":{"items":{},"type":"array"},"type":"array"},{"type":"null"}],"title":"Equity Curve"}},"type":"object","required":["slug","name"],"title":"LibraryEntrySummary","description":"List-view facts for one library entry (mirrors the public card)."},"LibraryForkRequest":{"properties":{"variant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variant Id"},"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name"},"created_via":{"anyOf":[{"type":"string","enum":["app","cli","mcp-local","mcp-remote","sdk","chat","api"]},{"type":"null"}],"title":"Created Via"},"source_surface":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Source Surface"}},"type":"object","title":"LibraryForkRequest","description":"Fork a library entry's selected variant into the caller's org."},"LibraryForkResponse":{"properties":{"strategy_id":{"type":"string","title":"Strategy Id"},"name":{"type":"string","title":"Name"},"source_slug":{"type":"string","title":"Source Slug"},"entry_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entry Version"},"variant_id":{"type":"string","title":"Variant Id"},"is_default_variant":{"type":"boolean","title":"Is Default Variant"},"import_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Import Id"},"library_source_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Library Source Hash"},"applied":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Applied"},"config_summary":{"additionalProperties":true,"type":"object","title":"Config Summary"},"headline":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Headline"},"basket_resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Basket Resolved At"},"delisted_members":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Delisted Members"},"basket_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Basket Note"},"editor_path":{"type":"string","title":"Editor Path"}},"type":"object","required":["strategy_id","name","source_slug","variant_id","is_default_variant","editor_path"],"title":"LibraryForkResponse","description":"Enough for the app to show 'loaded from Keel Library' and land the user."},"LibraryListResponse":{"properties":{"import_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Import Id"},"data_as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data As Of"},"count":{"type":"integer","title":"Count","default":0},"entries":{"items":{"$ref":"#/components/schemas/LibraryEntrySummary"},"type":"array","title":"Entries"}},"type":"object","title":"LibraryListResponse"},"LibraryVariantSummary":{"properties":{"variant_id":{"type":"string","title":"Variant Id"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"params":{"additionalProperties":true,"type":"object","title":"Params"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"is_default":{"type":"boolean","title":"Is Default","default":false},"publishable":{"type":"boolean","title":"Publishable","default":true},"forkable":{"type":"boolean","title":"Forkable","default":false},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"},"equity_curve":{"anyOf":[{"items":{"items":{},"type":"array"},"type":"array"},{"type":"null"}],"title":"Equity Curve"}},"type":"object","required":["variant_id"],"title":"LibraryVariantSummary","description":"A single public config-grid variant (a real precomputed backtest cell)."},"ListLegalAcceptancesResponse":{"properties":{"acceptances":{"items":{"$ref":"#/components/schemas/LegalAcceptanceResponse"},"type":"array","title":"Acceptances"}},"type":"object","required":["acceptances"],"title":"ListLegalAcceptancesResponse"},"LiveShareConfigurationRequest":{"properties":{"show_dollar_values":{"type":"boolean","title":"Show Dollar Values","default":false},"show_positions":{"type":"boolean","title":"Show Positions","default":false},"include_strategy_source":{"type":"boolean","title":"Include Strategy Source","default":false},"show_creator_profile":{"type":"boolean","title":"Show Creator Profile","default":false},"discoverability":{"type":"string","enum":["unlisted","public"],"title":"Discoverability","default":"unlisted"},"title_override":{"anyOf":[{"type":"string","maxLength":140},{"type":"null"}],"title":"Title Override"},"about_markdown":{"anyOf":[{"type":"string","maxLength":6000},{"type":"null"}],"title":"About Markdown"}},"additionalProperties":false,"type":"object","title":"LiveShareConfigurationRequest","description":"Complete next configuration; omitted options retain safe defaults."},"LiveShareLinkResponse":{"properties":{"share_id":{"type":"string","title":"Share Id"},"share_type":{"type":"string","const":"live","title":"Share Type","default":"live"},"deployment_id":{"type":"string","title":"Deployment Id"},"strategy_id":{"type":"string","title":"Strategy Id"},"commit_id":{"type":"string","title":"Commit Id"},"deployed_version_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed Version String"},"deployment_status":{"type":"string","title":"Deployment Status"},"effective_title":{"type":"string","title":"Effective Title"},"title_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title Override"},"about_markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"About Markdown"},"show_dollar_values":{"type":"boolean","title":"Show Dollar Values"},"show_positions":{"type":"boolean","title":"Show Positions"},"include_strategy_source":{"type":"boolean","title":"Include Strategy Source"},"show_creator_profile":{"type":"boolean","title":"Show Creator Profile"},"discoverability":{"type":"string","enum":["unlisted","public"],"title":"Discoverability"},"policy_schema_version":{"type":"integer","title":"Policy Schema Version"},"policy_revision":{"type":"integer","title":"Policy Revision"},"permission":{"type":"string","enum":["view","fork"],"title":"Permission"},"created_by_principal_id":{"type":"string","title":"Created By Principal Id"},"updated_by_principal_id":{"type":"string","title":"Updated By Principal Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"view_count":{"type":"integer","title":"View Count"},"fork_count":{"type":"integer","title":"Fork Count"},"last_accessed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Accessed At"},"artifacts_status":{"type":"string","title":"Artifacts Status"},"url":{"type":"string","title":"Url"},"disclosure_summary":{"items":{"type":"string"},"type":"array","title":"Disclosure Summary"}},"type":"object","required":["share_id","deployment_id","strategy_id","commit_id","deployed_version_string","deployment_status","effective_title","title_override","about_markdown","show_dollar_values","show_positions","include_strategy_source","show_creator_profile","discoverability","policy_schema_version","policy_revision","permission","created_by_principal_id","updated_by_principal_id","created_at","updated_at","revoked_at","view_count","fork_count","last_accessed_at","artifacts_status","url","disclosure_summary"],"title":"LiveShareLinkResponse"},"LiveStatsResponse":{"properties":{"sharpe":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sharpe"},"sortino":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sortino"},"total_return_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Return Pct"},"max_drawdown_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Drawdown Pct"},"max_drawdown_duration_days":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Drawdown Duration Days"},"current_drawdown_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Drawdown Pct"},"today_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Today Pnl"},"today_flows":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Today Flows"},"win_rate_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Win Rate Pct"},"profit_factor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Factor"},"total_realized_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Realized Pnl"},"total_funding":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Funding"},"total_fees":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Fees"},"fee_trade_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fee Trade Count"},"fee_builder_malformed_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fee Builder Malformed Count"},"net_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Pnl"},"avg_slippage_bps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Slippage Bps"},"avg_slippage_lane":{"type":"string","const":"SESSION_ARRIVAL_LEDGER_PRICE_ONLY","title":"Avg Slippage Lane","default":"SESSION_ARRIVAL_LEDGER_PRICE_ONLY"},"order_fill_rate_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Order Fill Rate Pct"},"slippage_measured_sessions":{"type":"integer","title":"Slippage Measured Sessions","default":0},"eval_success_rate_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Eval Success Rate Pct"},"avg_execution_latency_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Execution Latency S"},"total_trades":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Trades"},"trade_count_winning":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trade Count Winning"},"trade_count_losing":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trade Count Losing"},"total_orders":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Orders"},"rejected_orders":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rejected Orders"},"skipped_min_notional_orders":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Skipped Min Notional Orders"},"cancelled_orders":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cancelled Orders"},"skipped_below_min_trade_sessions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Skipped Below Min Trade Sessions"}},"type":"object","title":"LiveStatsResponse"},"LiveWindowWarning":{"properties":{"code":{"type":"string","const":"LIVE_WINDOW_SHORTER_THAN_TRADES","title":"Code"},"message":{"type":"string","title":"Message"},"backtest_run_id":{"type":"string","title":"Backtest Run Id"}},"type":"object","required":["code","message","backtest_run_id"],"title":"LiveWindowWarning","description":"The live-window warning at deploy time (spec 02-R12, D-46). Non-blocking.\n\nCarried from the latest completed backtest of the commit being deployed:\na position there stayed open (or re-entered without a flat bar) longer\nthan live's rolling window can re-derive."},"LockCheckRequest":{"properties":{"source":{"type":"string","maxLength":250000,"title":"Source"},"component_lock":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Component Lock"}},"type":"object","required":["source"],"title":"LockCheckRequest"},"LockCheckResponse":{"properties":{"status":{"type":"string","title":"Status"},"drift":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Drift","default":[]},"component_lock":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Component Lock"}},"type":"object","required":["status"],"title":"LockCheckResponse"},"LockCompileResponse":{"properties":{"compiled":{"type":"boolean","title":"Compiled"},"spec":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Spec"},"component_lock":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Component Lock"}},"type":"object","required":["compiled"],"title":"LockCompileResponse"},"LockDriftResponse":{"properties":{"source_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Hash"},"lock_hash":{"type":"string","title":"Lock Hash"},"drifts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Drifts"},"outdated_count":{"type":"integer","title":"Outdated Count"},"breaking_count":{"type":"integer","title":"Breaking Count"},"total_components":{"type":"integer","title":"Total Components"},"current_count":{"type":"integer","title":"Current Count"}},"type":"object","required":["lock_hash","drifts","outdated_count","breaking_count","total_components","current_count"],"title":"LockDriftResponse","description":"``GET /{id}/lock/status`` (spec 02 §2, Contract). ``drifts`` are\n``pipeline_engine.base.lock_upgrade.drift_entries`` for the stored source\nat the stored lock: component, locked/latest_version, drift_type\n(outdated | deprecated | missing | unknown), changes, replacement,\ninterface {params_added [{name, required, slot_type}], params_removed},\nbreaking, issues_at_target. ``source_hash`` / ``lock_hash`` are what an\nupgrade must name back (``expected_source_hash`` / ``expected_lock_hash``)."},"LockGenerateRequest":{"properties":{"source":{"type":"string","maxLength":250000,"title":"Source"}},"type":"object","required":["source"],"title":"LockGenerateRequest"},"LockGenerateResponse":{"properties":{"component_lock":{"additionalProperties":{"type":"integer"},"type":"object","title":"Component Lock"}},"type":"object","required":["component_lock"],"title":"LockGenerateResponse"},"LockGetResponse":{"properties":{"component_lock":{"additionalProperties":{"type":"integer"},"type":"object","title":"Component Lock"}},"type":"object","required":["component_lock"],"title":"LockGetResponse"},"LockValidateResponse":{"properties":{"valid":{"type":"boolean","title":"Valid"},"issues":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Issues","default":[]},"component_lock":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Component Lock"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"parse_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parse Error"}},"type":"object","required":["valid"],"title":"LockValidateResponse"},"ManagedCapability":{"properties":{"allowed":{"type":"boolean","title":"Allowed"},"disabled_reasons":{"items":{"type":"string"},"type":"array","title":"Disabled Reasons","default":[]},"required_actor":{"type":"string","enum":["manager_operator","manager_owner","client_owner","party_owner","party_reader","party_operator"],"title":"Required Actor"}},"additionalProperties":false,"type":"object","required":["allowed","required_actor"],"title":"ManagedCapability","description":"Permission prerequisites only; domain readiness is checked at the write."},"ManagedDeploymentAcceptance":{"properties":{"intent_token":{"type":"string","maxLength":8192,"minLength":1,"title":"Intent Token"},"consent":{"$ref":"#/components/schemas/ConsentAcknowledgment"}},"type":"object","required":["intent_token","consent"],"title":"ManagedDeploymentAcceptance"},"ManagedDeploymentResponse":{"properties":{"kind":{"type":"string","const":"managed","title":"Kind","default":"managed"},"deployment_id":{"type":"string","title":"Deployment Id"},"link_id":{"type":"string","title":"Link Id"},"offering_id":{"type":"string","title":"Offering Id"},"account_id":{"type":"string","title":"Account Id"},"org_id":{"type":"string","title":"Org Id"},"status":{"type":"string","title":"Status"},"deployed_commit_id":{"type":"string","title":"Deployed Commit Id"},"deployed_version_string":{"type":"string","title":"Deployed Version String"},"schedule":{"type":"string","title":"Schedule"},"deployed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deployed At"}},"additionalProperties":false,"type":"object","required":["deployment_id","link_id","offering_id","account_id","org_id","status","deployed_commit_id","deployed_version_string","schedule","deployed_at"],"title":"ManagedDeploymentResponse","description":"Positive managed activation projection; no artifact or config fields."},"ManagedPermissions":{"properties":{"acting_org_id":{"type":"string","title":"Acting Org Id"},"enabled":{"type":"boolean","title":"Enabled"},"profile_exists":{"type":"boolean","title":"Profile Exists"},"has_retained_relationships":{"type":"boolean","title":"Has Retained Relationships"},"capabilities":{"additionalProperties":{"$ref":"#/components/schemas/ManagedCapability"},"type":"object","title":"Capabilities"}},"additionalProperties":false,"type":"object","required":["acting_org_id","enabled","profile_exists","has_retained_relationships","capabilities"],"title":"ManagedPermissions"},"ManagedSegmentResponse":{"properties":{"start":{"type":"string","title":"Start"},"end":{"type":"string","title":"End"},"managed":{"type":"boolean","title":"Managed"}},"type":"object","required":["start","end","managed"],"title":"ManagedSegmentResponse","description":"One piece of the requested interval: managed window or explicit break.\n\nSpec 04 §5.3 — performance series are per managed window; cross-window\ndisplays concatenate segments with explicit breaks, never flat lines.\nThe list these appear in is a contiguous, ordered partition of the\nrequested interval."},"MarginSummaryResponse":{"properties":{"account_value":{"type":"number","title":"Account Value","default":0.0},"total_ntl_pos":{"type":"number","title":"Total Ntl Pos","default":0.0},"total_raw_usd":{"type":"number","title":"Total Raw Usd","default":0.0},"total_margin_used":{"type":"number","title":"Total Margin Used","default":0.0}},"type":"object","title":"MarginSummaryResponse"},"MarkAllReadResponse":{"properties":{"updated":{"type":"integer","title":"Updated"}},"type":"object","required":["updated"],"title":"MarkAllReadResponse","description":"`POST /v1/notifications/read-all` — how many rows were updated (04-AC-4)."},"MeResponse":{"properties":{"principal":{"$ref":"#/components/schemas/PrincipalResponse"},"org":{"$ref":"#/components/schemas/OrgResponse"},"entitlements":{"items":{"$ref":"#/components/schemas/EntitlementBalance"},"type":"array","title":"Entitlements"},"credential_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Credential Scopes"},"plan_status":{"anyOf":[{"$ref":"#/components/schemas/PlanStatusResponse"},{"type":"null"}]},"paper_enabled":{"type":"boolean","title":"Paper Enabled","default":false}},"type":"object","required":["principal","org","entitlements"],"title":"MeResponse"},"MoneyFreshness":{"properties":{"state":{"type":"string","enum":["COVERED","SYNCING","LEGACY","UNMANAGED"],"title":"State"},"fresh_as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fresh As Of"},"synced_through":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Synced Through"}},"type":"object","required":["state"],"title":"MoneyFreshness","description":"Coverage state of the money facts behind a performance read (spec 04 §5.1, M4).\n\nFreshness is part of the answer: the number beside this block is only as\nfresh as the capture coverage that produced its inputs, and this block\nsays exactly how fresh —\n\n* ``COVERED``   — coverage reaches the requested interval's end;\n  ``fresh_as_of`` is the weakest fact class's reach.\n* ``SYNCING``   — the interval is managed and post-epoch but coverage has\n  not reached its end yet; ``synced_through`` is how far it has (null\n  when no coverage row speaks for the interval at all — absence never\n  reads as fresh).\n* ``LEGACY``    — the interval predates the account's first coverage row\n  (the epoch cutover): pre-capture history, served ungated but labeled.\n  Until the capture lane goes live, every account reads this.\n* ``UNMANAGED`` — the interval overlaps no managed window; strategy\n  performance is not defined there.\n\nPhase 1 labels only — no numeric field elsewhere in the response changes\nbecause of this block."},"NotificationPreferencesResponse":{"properties":{"operational":{"type":"boolean","title":"Operational"},"product_updates":{"type":"boolean","title":"Product Updates"},"announcements":{"type":"boolean","title":"Announcements"},"email_enabled":{"type":"boolean","title":"Email Enabled"},"in_app_enabled":{"type":"boolean","title":"In App Enabled"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"}},"type":"object","required":["operational","product_updates","announcements","email_enabled","in_app_enabled","timezone"],"title":"NotificationPreferencesResponse","description":"`GET/PUT /v1/notification-preferences` — exactly the spec 01 §3 fields.\n\n``principal_id``/``created_at``/``updated_at`` are scoping/storage\ninternals and stay unexposed (same stance as §1.2's send_id)."},"OptInRequest":{"properties":{"wallet_address":{"type":"string","minLength":1,"title":"Wallet Address"}},"type":"object","required":["wallet_address"],"title":"OptInRequest"},"OrderResponse":{"properties":{"order_id":{"type":"string","title":"Order Id"},"symbol":{"type":"string","title":"Symbol"},"side":{"type":"string","title":"Side"},"order_type":{"type":"string","title":"Order Type"},"quantity":{"type":"number","title":"Quantity"},"limit_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Limit Price"},"status":{"type":"string","title":"Status"},"venue_order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Venue Order Id"},"submit_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Submit Time"},"reject_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reject Reason"},"skip_notional":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Skip Notional"},"skip_floor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Skip Floor"}},"type":"object","required":["order_id","symbol","side","order_type","quantity","status"],"title":"OrderResponse"},"OrgDetailResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"plan":{"type":"string","title":"Plan"},"status":{"type":"string","title":"Status"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"has_billing":{"type":"boolean","title":"Has Billing"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","slug","plan","status","has_billing","created_at"],"title":"OrgDetailResponse"},"OrgResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"plan":{"type":"string","title":"Plan"},"status":{"type":"string","title":"Status"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","slug","plan","status","created_at"],"title":"OrgResponse"},"OutcomeRef":{"properties":{"strategy_id":{"anyOf":[{"type":"string","pattern":"^[a-z]{3}_[0-9a-z]{26}$"},{"type":"null"}],"title":"Strategy Id"},"commit_id":{"anyOf":[{"type":"string","pattern":"^[a-z]{3}_[0-9a-z]{26}$"},{"type":"null"}],"title":"Commit Id"},"backtest_run_id":{"anyOf":[{"type":"string","pattern":"^[a-z]{3}_[0-9a-z]{26}$"},{"type":"null"}],"title":"Backtest Run Id"},"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run"},"is_error":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Error"},"validation_ok":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Validation Ok"},"issue_codes":{"anyOf":[{"items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,63}$"},"type":"array","maxItems":10,"minItems":1},{"type":"null"}],"title":"Issue Codes"},"doc_ref":{"anyOf":[{"type":"string","pattern":"^(\\(index\\)|skill:[a-z0-9_-]{1,64}|rule:[A-Z0-9_]{1,64}|[a-z0-9_-]{1,64})$"},{"type":"null"}],"title":"Doc Ref"}},"additionalProperties":false,"type":"object","title":"OutcomeRef","description":"The object(s) one hosted-MCP tool call produced or touched (Q-1617).\n\nA closed set of platform ids, booleans and two closed Keel vocabularies\n(rule codes, served help-doc names), nothing else: `extra=\"forbid\"`\nrejects any other key — so an argument KEY (`source`, `name`,\n`description`) can never ride in — and the id pattern rejects any\nVALUE that is not an id, so an argument value under an id key is refused\ntoo. Written into `metadata_json.outcome`; it is what lets an audit row\nbe joined to `strategy.commits` / `strategy.backtest_runs` by id instead\nof by timestamp adjacency."},"OwnershipProjectionResponse":{"properties":{"session_id":{"type":"string","title":"Session Id"},"strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Id"},"current_stage":{"type":"string","title":"Current Stage"},"role_mode":{"type":"string","title":"Role Mode"},"entry_path":{"type":"string","title":"Entry Path"},"overall_status":{"type":"string","title":"Overall Status"},"ownership_decision":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ownership Decision"},"skip_guidance":{"additionalProperties":true,"type":"object","title":"Skip Guidance"},"ui_state":{"additionalProperties":true,"type":"object","title":"Ui State"},"proof_steps":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Proof Steps"},"next_recommended_action":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Next Recommended Action"},"missing_evidence":{"items":{"type":"string"},"type":"array","title":"Missing Evidence"},"live_readiness_blockers":{"items":{"type":"string"},"type":"array","title":"Live Readiness Blockers"},"latest_backtest":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Latest Backtest"},"current_source_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Source Hash"},"workflow_state_version":{"type":"integer","title":"Workflow State Version","default":1},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["session_id","current_stage","role_mode","entry_path","overall_status","skip_guidance","ui_state","proof_steps"],"title":"OwnershipProjectionResponse"},"PaginatedResponse":{"properties":{"data":{"items":{},"type":"array","title":"Data"},"pagination":{"$ref":"#/components/schemas/PaginationMeta"}},"type":"object","required":["data","pagination"],"title":"PaginatedResponse"},"PaginationMeta":{"properties":{"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","title":"PaginationMeta"},"PaperCreateRequest":{"properties":{"strategy_id":{"type":"string","minLength":1,"title":"Strategy Id"},"schedule":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Schedule","description":"Optional cron spelling; it must equal the selected commit's derived schedule."},"config_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Config Id","description":"Optional strategy config to bind the run to (an existing config of this strategy in this org). Absent, the create mints one from the selected commit."},"simulated_capital":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Simulated Capital","description":"Simulated capital in USD: one of 1000, 10000, 100000.","default":"10000"}},"additionalProperties":false,"type":"object","required":["strategy_id"],"title":"PaperCreateRequest","description":"``POST /v1/paper`` (S01 §3.9). Unknown keys are refused (422)."},"PaperDeploymentResponse":{"properties":{"deployment_id":{"type":"string","title":"Deployment Id"},"strategy_id":{"type":"string","title":"Strategy Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule"},"evaluation_grid":{"anyOf":[{"$ref":"#/components/schemas/EvaluationGrid"},{"type":"null"}]},"source_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Hash"},"s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Key"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"},"deployed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed At"},"stopped_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stopped At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"deployed_commit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed Commit Id"},"deployed_version_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed Version String"},"config_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Config Id"},"total_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Pnl"},"position_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Position Count"},"venue":{"anyOf":[{"$ref":"#/components/schemas/VenueBlock"},{"type":"null"}]},"remaining":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Remaining"},"universe_warnings":{"anyOf":[{"items":{"$ref":"#/components/schemas/UniverseWarning"},"type":"array"},{"type":"null"}],"title":"Universe Warnings"},"account_warnings":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccountWarning"},"type":"array"},{"type":"null"}],"title":"Account Warnings"},"execution_style":{"anyOf":[{"type":"string","enum":["market","maker"]},{"type":"null"}],"title":"Execution Style"},"paused_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paused Reason"},"paused_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paused At"},"tranching":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tranching"},"health":{"anyOf":[{"type":"string","enum":["running","degraded","stalled","stopped"]},{"type":"null"}],"title":"Health"},"health_detail":{"anyOf":[{"$ref":"#/components/schemas/HealthDetailResponse"},{"type":"null"}]},"parity":{"anyOf":[{"$ref":"#/components/schemas/ParityBlock"},{"type":"null"}]},"graduation":{"anyOf":[{"$ref":"#/components/schemas/GraduationBlock"},{"type":"null"}]},"money_freshness":{"anyOf":[{"$ref":"#/components/schemas/MoneyFreshness"},{"type":"null"}]},"serving_warnings":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Serving Warnings"},"known_issues":{"anyOf":[{"items":{"$ref":"#/components/schemas/KnownIssueRef"},"type":"array"},{"type":"null"}],"title":"Known Issues"},"live_window_warnings":{"anyOf":[{"items":{"$ref":"#/components/schemas/LiveWindowWarning"},"type":"array"},{"type":"null"}],"title":"Live Window Warnings"}},"type":"object","required":["deployment_id","strategy_id","name","status"],"title":"PaperDeploymentResponse","description":"The create response: the deployment read plus the paper quota line.\n\n``remaining`` (inherited) carries ``{\"paper_slots\": N}`` only while the\norg's free paper slots are strictly below 20% of its cap, the twin of the\nlive deploy's ``{\"live_slots\": N}``."},"PaperRestartResponse":{"properties":{"deployment_id":{"type":"string","title":"Deployment Id"},"strategy_id":{"type":"string","title":"Strategy Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule"},"evaluation_grid":{"anyOf":[{"$ref":"#/components/schemas/EvaluationGrid"},{"type":"null"}]},"source_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Hash"},"s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Key"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"},"deployed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed At"},"stopped_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stopped At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"deployed_commit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed Commit Id"},"deployed_version_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed Version String"},"config_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Config Id"},"total_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Pnl"},"position_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Position Count"},"venue":{"anyOf":[{"$ref":"#/components/schemas/VenueBlock"},{"type":"null"}]},"remaining":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Remaining"},"universe_warnings":{"anyOf":[{"items":{"$ref":"#/components/schemas/UniverseWarning"},"type":"array"},{"type":"null"}],"title":"Universe Warnings"},"account_warnings":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccountWarning"},"type":"array"},{"type":"null"}],"title":"Account Warnings"},"execution_style":{"anyOf":[{"type":"string","enum":["market","maker"]},{"type":"null"}],"title":"Execution Style"},"paused_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paused Reason"},"paused_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paused At"},"tranching":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tranching"},"health":{"anyOf":[{"type":"string","enum":["running","degraded","stalled","stopped"]},{"type":"null"}],"title":"Health"},"health_detail":{"anyOf":[{"$ref":"#/components/schemas/HealthDetailResponse"},{"type":"null"}]},"parity":{"anyOf":[{"$ref":"#/components/schemas/ParityBlock"},{"type":"null"}]},"graduation":{"anyOf":[{"$ref":"#/components/schemas/GraduationBlock"},{"type":"null"}]},"money_freshness":{"anyOf":[{"$ref":"#/components/schemas/MoneyFreshness"},{"type":"null"}]},"serving_warnings":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Serving Warnings"},"known_issues":{"anyOf":[{"items":{"$ref":"#/components/schemas/KnownIssueRef"},"type":"array"},{"type":"null"}],"title":"Known Issues"},"live_window_warnings":{"anyOf":[{"items":{"$ref":"#/components/schemas/LiveWindowWarning"},"type":"array"},{"type":"null"}],"title":"Live Window Warnings"},"restarted_from":{"type":"string","title":"Restarted From"}},"type":"object","required":["deployment_id","strategy_id","name","status","restarted_from"],"title":"PaperRestartResponse","description":"``POST /v1/paper/{id}/restart`` (S01 §3.13, PT2-9): the NEW run's create\nresponse plus ``restarted_from``, the run it replaced."},"PaperShareLinkResponse":{"properties":{"share_id":{"type":"string","title":"Share Id"},"share_type":{"type":"string","const":"paper","title":"Share Type","default":"paper"},"deployment_id":{"type":"string","title":"Deployment Id"},"strategy_id":{"type":"string","title":"Strategy Id"},"commit_id":{"type":"string","title":"Commit Id"},"deployed_version_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed Version String"},"deployment_status":{"type":"string","title":"Deployment Status"},"effective_title":{"type":"string","title":"Effective Title"},"title_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title Override"},"about_markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"About Markdown"},"show_dollar_values":{"type":"boolean","title":"Show Dollar Values"},"show_positions":{"type":"boolean","title":"Show Positions"},"include_strategy_source":{"type":"boolean","title":"Include Strategy Source"},"show_creator_profile":{"type":"boolean","title":"Show Creator Profile"},"discoverability":{"type":"string","enum":["unlisted","public"],"title":"Discoverability"},"policy_schema_version":{"type":"integer","title":"Policy Schema Version"},"policy_revision":{"type":"integer","title":"Policy Revision"},"permission":{"type":"string","enum":["view","fork"],"title":"Permission"},"created_by_principal_id":{"type":"string","title":"Created By Principal Id"},"updated_by_principal_id":{"type":"string","title":"Updated By Principal Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"view_count":{"type":"integer","title":"View Count"},"fork_count":{"type":"integer","title":"Fork Count"},"last_accessed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Accessed At"},"artifacts_status":{"type":"string","title":"Artifacts Status"},"url":{"type":"string","title":"Url"},"disclosure_summary":{"items":{"type":"string"},"type":"array","title":"Disclosure Summary"}},"type":"object","required":["share_id","deployment_id","strategy_id","commit_id","deployed_version_string","deployment_status","effective_title","title_override","about_markdown","show_dollar_values","show_positions","include_strategy_source","show_creator_profile","discoverability","policy_schema_version","policy_revision","permission","created_by_principal_id","updated_by_principal_id","created_at","updated_at","revoked_at","view_count","fork_count","last_accessed_at","artifacts_status","url","disclosure_summary"],"title":"PaperShareLinkResponse","description":"``POST /v1/paper/{deployment_id}/share-links`` (S05 §3.12.1, IC-05-5).\n\nThe live family's ``LiveShareLink`` shape with ``share_type: \"paper\"``:\nthe same policy fields, counters and URL, bound to a practice run."},"PaperSharePreviewResponse":{"properties":{"share_type":{"type":"string","const":"paper","title":"Share Type","default":"paper"},"deployment_id":{"type":"string","title":"Deployment Id"},"strategy_id":{"type":"string","title":"Strategy Id"},"commit_id":{"type":"string","title":"Commit Id"},"deployed_version_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed Version String"},"deployment_status":{"type":"string","title":"Deployment Status"},"effective_title":{"type":"string","title":"Effective Title"},"title_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title Override"},"about_markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"About Markdown"},"show_dollar_values":{"type":"boolean","title":"Show Dollar Values"},"show_positions":{"type":"boolean","title":"Show Positions"},"include_strategy_source":{"type":"boolean","title":"Include Strategy Source"},"show_creator_profile":{"type":"boolean","title":"Show Creator Profile"},"discoverability":{"type":"string","enum":["unlisted","public"],"title":"Discoverability"},"policy_schema_version":{"type":"integer","title":"Policy Schema Version"},"policy_revision":{"type":"integer","title":"Policy Revision"},"permission":{"type":"string","enum":["view","fork"],"title":"Permission"},"disclosure_summary":{"items":{"type":"string"},"type":"array","title":"Disclosure Summary"},"card":{"$ref":"#/components/schemas/PublicPaperSocialCardV1"}},"type":"object","required":["deployment_id","strategy_id","commit_id","deployed_version_string","deployment_status","effective_title","title_override","about_markdown","show_dollar_values","show_positions","include_strategy_source","show_creator_profile","discoverability","policy_schema_version","policy_revision","permission","disclosure_summary","card"],"title":"PaperSharePreviewResponse","description":"``POST /v1/paper/{deployment_id}/share-links/preview`` (S05 §3.12.1).\n\nThe link the create would write, before any capability exists: the\n``LiveShareLink`` fields that do not depend on an allocated share (no\n``share_id``, ``url``, counters or timestamps), with the normalized\nconfiguration and its disclosure summary. Side-effect free."},"PaperUpdateRequest":{"properties":{"schedule":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Schedule","description":"Optional cron spelling; it must equal the selected commit's derived schedule."}},"additionalProperties":false,"type":"object","title":"PaperUpdateRequest","description":"``POST /v1/paper/{id}/update`` (S01 §3.13). Unknown keys are refused (422).\n\nThe paper twin of ``UpdateLiveRequest`` without its operator blocks: a\npaper run carries no tranching and no maker style, so the one option is\nthe cron spelling, which must equal the selected commit's derived\nschedule."},"ParityBlock":{"properties":{"residual_bps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Residual Bps"},"status":{"type":"string","enum":["tracking","drifting","under_review"],"title":"Status"},"window_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Window Start"},"window_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Window End"},"as_of":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"As Of"},"eval_count":{"type":"integer","title":"Eval Count"},"meter_eligible":{"type":"boolean","title":"Meter Eligible"},"day0_backtest_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Day0 Backtest Run Id"},"is_day0":{"type":"boolean","title":"Is Day0"},"paper_return_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Paper Return Pct"},"backtest_return_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Backtest Return Pct"}},"additionalProperties":false,"type":"object","required":["residual_bps","status","window_start","window_end","as_of","eval_count","meter_eligible","day0_backtest_run_id","is_day0","paper_return_pct","backtest_return_pct"],"title":"ParityBlock","description":"IC-03-2: the record's latest non-day-0 snapshot, else its first day-0 row."},"ParityChart":{"properties":{"as_of":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"As Of"},"window_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Window Start"},"window_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Window End"},"points":{"items":{"$ref":"#/components/schemas/ParityChartPoint"},"type":"array","title":"Points"}},"additionalProperties":false,"type":"object","required":["as_of","window_start","window_end","points"],"title":"ParityChart","description":"``GET /v1/paper/{id}/comparison``: the newest same-period comparison, per bar.\n\n``points`` is empty until the first comparison is written; the first point\nis the starting capital at the start, then every paper bar."},"ParityChartPoint":{"properties":{"at":{"type":"string","format":"date-time","title":"At"},"paper":{"type":"number","title":"Paper"},"backtest":{"type":"number","title":"Backtest"}},"additionalProperties":false,"type":"object","required":["at","paper","backtest"],"title":"ParityChartPoint","description":"One point of the run page's paper-vs-backtest chart (PT2-93)."},"ParityCriterion":{"properties":{"met":{"type":"boolean","title":"Met"},"residual_bps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Residual Bps"},"band_bps":{"type":"number","title":"Band Bps"},"as_of":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"As Of"},"eval_count":{"type":"integer","title":"Eval Count"},"meter_eligible":{"type":"boolean","title":"Meter Eligible"},"stale":{"type":"boolean","title":"Stale"}},"additionalProperties":false,"type":"object","required":["met","residual_bps","band_bps","as_of","eval_count","meter_eligible","stale"],"title":"ParityCriterion"},"ParseStrategyRequest":{"properties":{"source":{"type":"string","maxLength":250000,"minLength":1,"title":"Source"}},"type":"object","required":["source"],"title":"ParseStrategyRequest"},"ParseStrategyResponse":{"properties":{"graph":{"additionalProperties":true,"type":"object","title":"Graph"},"valid":{"type":"boolean","title":"Valid"},"issues":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Issues","default":[]}},"type":"object","required":["graph","valid"],"title":"ParseStrategyResponse","description":"Graph-model parse result for the visual builder.\n\n`issues` is the 16-field validation envelope (dsl-type-system spec 05\n§3.4): each entry is a `ValidationIssue.to_dict()` shape carrying the\nlegacy `level`/`message` keys the builder already reads, plus the full\nenvelope (`code`/`severity`/`location`/`expected`/`actual`/`path`/...).\nWidened from `list[dict[str, str]]` — eight of the new fields are\nnon-string and would 500 the route under Pydantic v2."},"PendingFlow":{"properties":{"timestamp":{"type":"string","title":"Timestamp"},"amount":{"type":"number","title":"Amount"}},"type":"object","required":["timestamp","amount"],"title":"PendingFlow","description":"A counted external flow with no equity point to carry it yet (Q-0713).\n\nSnapshots are written on a cadence; a deposit landing between the last\nsnapshot and now is already inside the venue's live account value while\nno point exists to annotate it. A client that appends a live tip by\nextending the last served point with the raw equity delta therefore\nrenders that deposit as trading P&L — on the one surface whose purpose\nis separating trading skill from funding decisions.\n\nServing the flow itself (already D2-filtered by the ONE owner,\n``equity_curve.compute_equity_curve_with_flows``) lets the tip net a\nKNOWN external flow. It is deliberately not a heuristic: without this\nfield the client must not guess.\n\n``amount`` is signed — positive deposit, negative withdrawal."},"PerformancePoint":{"properties":{"observed_at":{"type":"string","format":"date-time","title":"Observed At"},"observation_ref":{"oneOf":[{"$ref":"#/components/schemas/AccountReference"},{"$ref":"#/components/schemas/PortfolioFrame"}],"title":"Observation Ref","discriminator":{"propertyName":"kind","mapping":{"account_observation":"#/components/schemas/AccountReference","portfolio_frame":"#/components/schemas/PortfolioFrame"}}},"value":{"type":"string","title":"Value"},"pnl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pnl"},"wealth":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wealth"},"return_pct":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Pct"},"return_quality":{"type":"string","enum":["valuation_linked","estimated","unavailable"],"title":"Return Quality"},"factor_kind":{"type":"string","enum":["no_flow","flow_boundary","modified_dietz","unavailable"],"title":"Factor Kind"},"exact_twr_pct":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exact Twr Pct"},"estimated_return_pct":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Estimated Return Pct"},"estimated_interval_count":{"type":"integer","minimum":0.0,"title":"Estimated Interval Count"},"flow":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flow"},"validity":{"type":"string","enum":["complete","pending","held","unavailable"],"title":"Validity"},"segment_id":{"type":"string","title":"Segment Id"},"perps_performance":{"$ref":"#/components/schemas/PerpsPerformanceView"}},"additionalProperties":false,"type":"object","required":["observed_at","observation_ref","value","pnl","wealth","return_pct","return_quality","factor_kind","exact_twr_pct","estimated_return_pct","estimated_interval_count","flow","validity","segment_id","perps_performance"],"title":"PerformancePoint"},"PerformanceTip":{"properties":{"observed_at":{"type":"string","format":"date-time","title":"Observed At"},"observation_ref":{"oneOf":[{"$ref":"#/components/schemas/AccountReference"},{"$ref":"#/components/schemas/PortfolioFrame"}],"title":"Observation Ref","discriminator":{"propertyName":"kind","mapping":{"account_observation":"#/components/schemas/AccountReference","portfolio_frame":"#/components/schemas/PortfolioFrame"}}},"value":{"type":"string","title":"Value"},"pnl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pnl"},"wealth":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wealth"},"return_pct":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Pct"},"return_quality":{"type":"string","enum":["valuation_linked","estimated","unavailable"],"title":"Return Quality"},"factor_kind":{"type":"string","enum":["no_flow","flow_boundary","modified_dietz","unavailable"],"title":"Factor Kind"},"exact_twr_pct":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exact Twr Pct"},"estimated_return_pct":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Estimated Return Pct"},"estimated_interval_count":{"type":"integer","minimum":0.0,"title":"Estimated Interval Count"},"flow":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flow"},"validity":{"type":"string","enum":["complete","pending","held","unavailable"],"title":"Validity"},"segment_id":{"type":"string","title":"Segment Id"},"perps_performance":{"$ref":"#/components/schemas/PerpsPerformanceView"},"revision_token":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Revision Token"},"interval_start":{"type":"string","format":"date-time","title":"Interval Start"},"covered_through":{"type":"string","format":"date-time","title":"Covered Through"},"complete":{"type":"boolean","const":true,"title":"Complete","default":true}},"additionalProperties":false,"type":"object","required":["observed_at","observation_ref","value","pnl","wealth","return_pct","return_quality","factor_kind","exact_twr_pct","estimated_return_pct","estimated_interval_count","flow","validity","segment_id","perps_performance","revision_token","interval_start","covered_through"],"title":"PerformanceTip"},"PerformanceView":{"properties":{"contract_version":{"type":"string","const":"account_performance.v1","title":"Contract Version","default":"account_performance.v1"},"scope":{"oneOf":[{"$ref":"#/components/schemas/AccountScope"},{"$ref":"#/components/schemas/PortfolioScope"}],"title":"Scope","discriminator":{"propertyName":"kind","mapping":{"account":"#/components/schemas/AccountScope","portfolio":"#/components/schemas/PortfolioScope"}}},"basis_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Basis Id"},"basis_binding_revision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Basis Binding Revision"},"basis_components":{"items":{"$ref":"#/components/schemas/BasisComponent"},"type":"array","title":"Basis Components"},"numeraire":{"type":"string","const":"USDC","title":"Numeraire","default":"USDC"},"method_id":{"type":"string","title":"Method Id"},"policy_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Policy Sha256"},"return_quality":{"type":"string","enum":["valuation_linked","estimated","unavailable"],"title":"Return Quality"},"exact_twr_pct":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exact Twr Pct"},"estimated_return_pct":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Estimated Return Pct"},"estimated_interval_count":{"type":"integer","minimum":0.0,"title":"Estimated Interval Count"},"first_estimated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Estimated At"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"revision_token":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Revision Token"},"value_quality":{"type":"string","enum":["current","stale","unavailable"],"title":"Value Quality"},"performance_quality":{"type":"string","enum":["complete","pending","partial","unavailable"],"title":"Performance Quality"},"reason_codes":{"items":{"type":"string"},"type":"array","title":"Reason Codes"},"baseline":{"anyOf":[{"$ref":"#/components/schemas/Baseline"},{"type":"null"}]},"semantic_revisions":{"items":{"$ref":"#/components/schemas/SemanticRevision"},"type":"array","title":"Semantic Revisions"},"coverage":{"$ref":"#/components/schemas/ClassifiedCoverage"},"points":{"items":{"$ref":"#/components/schemas/PerformancePoint"},"type":"array","title":"Points"},"performance_tip":{"anyOf":[{"$ref":"#/components/schemas/PerformanceTip"},{"type":"null"}]},"quote":{"anyOf":[{"$ref":"#/components/schemas/Quote"},{"type":"null"}]},"portfolio_context":{"anyOf":[{"$ref":"#/components/schemas/PortfolioContext"},{"type":"null"}]},"perps_performance":{"$ref":"#/components/schemas/PerpsPerformanceView"}},"additionalProperties":false,"type":"object","required":["scope","basis_id","basis_binding_revision","basis_components","method_id","policy_sha256","return_quality","exact_twr_pct","estimated_return_pct","estimated_interval_count","first_estimated_at","generated_at","revision_token","value_quality","performance_quality","reason_codes","baseline","semantic_revisions","coverage","points","performance_tip","quote","portfolio_context","perps_performance"],"title":"PerformanceView"},"PerpsPerformanceView":{"properties":{"performance_basis_id":{"type":"string","const":"perps_usdc_performance.v1","title":"Performance Basis Id","default":"perps_usdc_performance.v1"},"performance_scope_id":{"type":"string","const":"hyperliquid.main_perps.v1","title":"Performance Scope Id","default":"hyperliquid.main_perps.v1"},"scope_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Scope Hash"},"interval_start":{"type":"string","format":"date-time","title":"Interval Start"},"interval_end":{"type":"string","format":"date-time","title":"Interval End"},"pnl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pnl"},"quality":{"type":"string","enum":["complete","pending","held","unavailable"],"title":"Quality"},"reason_codes":{"items":{"type":"string"},"type":"array","title":"Reason Codes"},"input_revision_token":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Input Revision Token"},"evidence_manifest_ref":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}],"title":"Evidence Manifest Ref"},"return_pct":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Pct"},"return_quality":{"type":"string","enum":["exact","estimated","unavailable"],"title":"Return Quality"},"exact_twr_pct":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exact Twr Pct"},"estimated_return_pct":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Estimated Return Pct"},"return_method_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Method Id"},"return_equivalence_proof_ref":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}],"title":"Return Equivalence Proof Ref"}},"additionalProperties":false,"type":"object","required":["scope_hash","interval_start","interval_end","pnl","quality","reason_codes","input_revision_token","evidence_manifest_ref","return_pct","return_quality","exact_twr_pct","estimated_return_pct","return_method_id","return_equivalence_proof_ref"],"title":"PerpsPerformanceView"},"PlanStatusResponse":{"properties":{"plan":{"type":"string","title":"Plan"},"builder_fee_bps":{"anyOf":[{"type":"integer"},{"type":"number"}],"title":"Builder Fee Bps"},"limits":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"string"}]},"type":"object","title":"Limits"},"remaining":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"string"}]},"type":"object","title":"Remaining"},"quotas":{"items":{"$ref":"#/components/schemas/QuotaBlock"},"type":"array","title":"Quotas"},"upgrade_options":{"items":{"$ref":"#/components/schemas/PlanUpgradeOption"},"type":"array","title":"Upgrade Options"},"manage_url":{"type":"string","title":"Manage Url"}},"type":"object","required":["plan","builder_fee_bps","limits","remaining","upgrade_options","manage_url"],"title":"PlanStatusResponse","description":"spec 04 R2 plan_status block on GET /v1/me — built by\nplatform_auth.pricing.plan_status_summary from the same sources as\n/pricing.md (plans.yaml, PLAN_BUILDER_FEE_BPS, PLAN_PRICES_USD)."},"PlanUpgradeOption":{"properties":{"plan":{"type":"string","title":"Plan"},"price":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"null"}]},"type":"object","title":"Price"},"what_changes":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"What Changes"}},"type":"object","required":["plan","price","what_changes"],"title":"PlanUpgradeOption","description":"One later plan, as data (spec 04 R2) — numbers from plans.yaml +\nthe pricing map, no marketing copy."},"PmCapabilities":{"properties":{"runtime_registered":{"type":"boolean","title":"Runtime Registered"},"wallet_preflight_available":{"type":"boolean","title":"Wallet Preflight Available"},"qualified_connection_available":{"type":"boolean","title":"Qualified Connection Available"},"account_review_available":{"type":"boolean","title":"Account Review Available"},"rebind_available":{"type":"boolean","title":"Rebind Available","default":false},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons"}},"additionalProperties":false,"type":"object","required":["runtime_registered","wallet_preflight_available","qualified_connection_available","account_review_available","reasons"],"title":"PmCapabilities"},"PolicyDetailResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"org_id":{"type":"string","title":"Org Id"},"scopes":{"additionalProperties":true,"type":"object","title":"Scopes"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"bound_principals":{"items":{"$ref":"#/components/schemas/BoundPrincipal"},"type":"array","title":"Bound Principals"}},"type":"object","required":["id","name","org_id","scopes","created_at","bound_principals"],"title":"PolicyDetailResponse"},"PolicyResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"org_id":{"type":"string","title":"Org Id"},"scopes":{"additionalProperties":true,"type":"object","title":"Scopes"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","org_id","scopes","created_at"],"title":"PolicyResponse"},"PortalRequest":{"properties":{"return_url":{"type":"string","title":"Return Url"}},"type":"object","required":["return_url"],"title":"PortalRequest"},"PortalResponse":{"properties":{"portal_url":{"type":"string","title":"Portal Url"}},"type":"object","required":["portal_url"],"title":"PortalResponse"},"PortfolioContext":{"properties":{"scope_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Scope Hash"},"constituent_revision_refs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Constituent Revision Refs"},"oldest_observed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest Observed At"},"newest_observed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest Observed At"},"asof_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asof Value"},"asof_value_quality":{"type":"string","enum":["current","stale","unavailable"],"title":"Asof Value Quality"},"return_boundary_status":{"type":"string","enum":["aligned","unaligned","unavailable"],"title":"Return Boundary Status"}},"additionalProperties":false,"type":"object","required":["scope_hash","constituent_revision_refs","oldest_observed_at","newest_observed_at","asof_value","asof_value_quality","return_boundary_status"],"title":"PortfolioContext"},"PortfolioEquityResponse":{"properties":{"points":{"items":{"$ref":"#/components/schemas/EquityPoint"},"type":"array","title":"Points"},"baseline_value":{"type":"number","title":"Baseline Value"},"current_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Value"},"initial_deposit":{"type":"number","title":"Initial Deposit","default":0.0},"money_freshness":{"anyOf":[{"$ref":"#/components/schemas/MoneyFreshness"},{"type":"null"}]},"managed_segments":{"anyOf":[{"items":{"$ref":"#/components/schemas/ManagedSegmentResponse"},"type":"array"},{"type":"null"}],"title":"Managed Segments"},"today_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Today Pnl"},"today_flows":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Today Flows"},"pending_flows":{"anyOf":[{"items":{"$ref":"#/components/schemas/PendingFlow"},"type":"array"},{"type":"null"}],"title":"Pending Flows"},"gaps":{"anyOf":[{"items":{"$ref":"#/components/schemas/EquityGapResponse"},"type":"array"},{"type":"null"}],"title":"Gaps"},"capital_class":{"type":"string","title":"Capital Class"}},"type":"object","required":["points","baseline_value","capital_class"],"title":"PortfolioEquityResponse","description":"``GET /v1/deployments/portfolio/equity``: the aggregate curve plus the\nmoney class it summed (S01 §3.10, R-71). Exactly one class per request,\nan absent request parameter reading as ``real``. A subclass so the\nper-deployment ``/equity`` shape gains no key."},"PortfolioFrame":{"properties":{"kind":{"type":"string","const":"portfolio_frame","title":"Kind","default":"portfolio_frame"},"frame_id":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Frame Id"},"ordinal":{"type":"integer","minimum":0.0,"title":"Ordinal"},"constituents":{"items":{"$ref":"#/components/schemas/FrameConstituent"},"type":"array","title":"Constituents"},"oldest_observed_at":{"type":"string","format":"date-time","title":"Oldest Observed At"},"newest_observed_at":{"type":"string","format":"date-time","title":"Newest Observed At"}},"additionalProperties":false,"type":"object","required":["frame_id","ordinal","constituents","oldest_observed_at","newest_observed_at"],"title":"PortfolioFrame"},"PortfolioScope":{"properties":{"kind":{"type":"string","const":"portfolio","title":"Kind","default":"portfolio"},"scope_id":{"type":"string","title":"Scope Id"},"scope_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Scope Hash"},"accounts":{"items":{"$ref":"#/components/schemas/AccountScope"},"type":"array","title":"Accounts"},"basis_components":{"items":{"$ref":"#/components/schemas/BasisComponent"},"type":"array","title":"Basis Components"},"population":{"type":"string","const":"current_active_accounts","title":"Population","default":"current_active_accounts"}},"additionalProperties":false,"type":"object","required":["scope_id","scope_hash","accounts","basis_components"],"title":"PortfolioScope"},"PortfolioSummaryResponse":{"properties":{"capital_class":{"type":"string","title":"Capital Class","default":"real"},"total_realized_pnl":{"type":"number","title":"Total Realized Pnl"},"total_funding":{"type":"number","title":"Total Funding"},"total_fees":{"type":"number","title":"Total Fees"},"total_account_value":{"type":"number","title":"Total Account Value","default":0.0},"total_unrealized_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Unrealized Pnl"},"active_count":{"type":"integer","title":"Active Count"},"total_count":{"type":"integer","title":"Total Count"},"deployments":{"items":{"$ref":"#/components/schemas/DeploymentSummary"},"type":"array","title":"Deployments"}},"type":"object","required":["total_realized_pnl","total_funding","total_fees","active_count","total_count","deployments"],"title":"PortfolioSummaryResponse"},"PreviewLiveShareRequest":{"properties":{"show_dollar_values":{"type":"boolean","title":"Show Dollar Values","default":false},"show_positions":{"type":"boolean","title":"Show Positions","default":false},"include_strategy_source":{"type":"boolean","title":"Include Strategy Source","default":false},"show_creator_profile":{"type":"boolean","title":"Show Creator Profile","default":false},"discoverability":{"type":"string","enum":["unlisted","public"],"title":"Discoverability","default":"unlisted"},"title_override":{"anyOf":[{"type":"string","maxLength":140},{"type":"null"}],"title":"Title Override"},"about_markdown":{"anyOf":[{"type":"string","maxLength":6000},{"type":"null"}],"title":"About Markdown"}},"additionalProperties":false,"type":"object","title":"PreviewLiveShareRequest","description":"Side-effect-free preview request."},"PreviewUpgradeRequest":{"properties":{"plan":{"type":"string","title":"Plan"},"billing_cycle":{"type":"string","title":"Billing Cycle","default":"monthly"}},"type":"object","required":["plan"],"title":"PreviewUpgradeRequest"},"PreviewUpgradeResponse":{"properties":{"current_plan":{"type":"string","title":"Current Plan"},"new_plan":{"type":"string","title":"New Plan"},"billing_cycle":{"type":"string","title":"Billing Cycle"},"proration_amount":{"type":"integer","title":"Proration Amount"},"credit_amount":{"type":"integer","title":"Credit Amount"},"amount_due":{"type":"integer","title":"Amount Due"},"currency":{"type":"string","title":"Currency"},"period_end":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Period End"}},"type":"object","required":["current_plan","new_plan","billing_cycle","proration_amount","credit_amount","amount_due","currency"],"title":"PreviewUpgradeResponse"},"PrincipalResponse":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type"},"display_name":{"type":"string","title":"Display Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","type","display_name","created_at"],"title":"PrincipalResponse"},"PublicBacktestResponse":{"properties":{"strategy_name":{"type":"string","title":"Strategy Name"},"backtest_period_start":{"type":"string","format":"date","title":"Backtest Period Start"},"backtest_period_end":{"type":"string","format":"date","title":"Backtest Period End"},"backtest_period_last_bar":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Backtest Period Last Bar"},"sharpe_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sharpe Ratio"},"sharpe_ratio_active":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sharpe Ratio Active"},"total_return_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Return Pct"},"max_drawdown_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Drawdown Pct"},"win_rate_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Win Rate Pct"},"sortino_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sortino Ratio"},"calmar_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Calmar Ratio"},"total_trades":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Trades"},"profit_factor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Factor"},"trade_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trade Model"},"positions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Positions"},"position_win_rate_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Position Win Rate Pct"},"share_url":{"type":"string","title":"Share Url"},"card_image_url":{"type":"string","title":"Card Image Url"},"signup_url":{"type":"string","title":"Signup Url"}},"type":"object","required":["strategy_name","backtest_period_start","backtest_period_end","share_url","card_image_url","signup_url"],"title":"PublicBacktestResponse","description":"Public response for backtest-only shares.\n\nSECURITY BOUNDARY: No component_names, no fork_url, no pipeline spec."},"PublicCreatorSummary":{"properties":{"display_name":{"type":"string","maxLength":140,"minLength":1,"title":"Display Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"bio":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Bio"},"profile_url":{"type":"string","title":"Profile Url"}},"additionalProperties":false,"type":"object","required":["display_name","profile_url"],"title":"PublicCreatorSummary"},"PublicLiveAbout":{"properties":{"markdown":{"type":"string","maxLength":6000,"title":"Markdown"},"updated_at":{"type":"string","title":"Updated At"}},"additionalProperties":false,"type":"object","required":["markdown","updated_at"],"title":"PublicLiveAbout"},"PublicLiveCardRef":{"properties":{"url":{"type":"string","title":"Url"}},"additionalProperties":false,"type":"object","required":["url"],"title":"PublicLiveCardRef"},"PublicLiveDataState":{"properties":{"as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of"},"freshness":{"anyOf":[{"$ref":"#/components/schemas/PublicMoneyFreshness"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"PublicLiveDataState"},"PublicLiveDisclosure":{"properties":{"show_dollar_values":{"type":"boolean","title":"Show Dollar Values"},"show_positions":{"type":"boolean","title":"Show Positions"},"include_strategy_source":{"type":"boolean","title":"Include Strategy Source"},"show_creator_profile":{"type":"boolean","title":"Show Creator Profile"},"discoverability":{"type":"string","enum":["unlisted","public"],"title":"Discoverability"},"approximate_position_notionals_inferable":{"type":"boolean","title":"Approximate Position Notionals Inferable"},"summary":{"items":{"type":"string"},"type":"array","title":"Summary"}},"additionalProperties":false,"type":"object","required":["show_dollar_values","show_positions","include_strategy_source","show_creator_profile","discoverability","approximate_position_notionals_inferable","summary"],"title":"PublicLiveDisclosure"},"PublicLiveDollarSummary":{"properties":{"state":{"type":"string","enum":["available","unavailable"],"title":"State"},"current_account_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Account Value"},"cumulative_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cumulative Pnl"}},"additionalProperties":false,"type":"object","required":["state"],"title":"PublicLiveDollarSummary"},"PublicLiveLifecycle":{"properties":{"status":{"type":"string","enum":["LIVE","PAUSED","STOPPED"],"title":"Status"},"deployed_at":{"type":"string","title":"Deployed At"},"stopped_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stopped At"}},"additionalProperties":false,"type":"object","required":["status","deployed_at"],"title":"PublicLiveLifecycle"},"PublicLiveMeasuredPoint":{"properties":{"timestamp":{"type":"string","title":"Timestamp"},"segment_id":{"type":"string","title":"Segment Id"},"return_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Return Pct"},"return_quality":{"type":"string","enum":["valuation_linked","estimated","unavailable"],"title":"Return Quality"},"validity":{"type":"string","enum":["complete","pending","held","unavailable"],"title":"Validity"},"account_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Account Value"},"cumulative_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cumulative Pnl"}},"additionalProperties":false,"type":"object","required":["timestamp","segment_id","return_pct","return_quality","validity"],"title":"PublicLiveMeasuredPoint"},"PublicLivePerformanceStats":{"properties":{"total_return_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Return Pct"},"current_drawdown_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Drawdown Pct"},"max_drawdown_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Drawdown Pct"},"max_drawdown_duration_days":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Max Drawdown Duration Days"},"sharpe":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sharpe"},"sortino":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sortino"},"win_rate_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Win Rate Pct"},"profit_factor":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Profit Factor"},"total_trades":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Total Trades"},"winning_trades":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Winning Trades"},"losing_trades":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Losing Trades"}},"additionalProperties":false,"type":"object","title":"PublicLivePerformanceStats"},"PublicLivePositionItem":{"properties":{"symbol":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9._:/-]+$","title":"Symbol"},"side":{"type":"string","enum":["LONG","SHORT"],"title":"Side"},"weight_pct":{"type":"number","minimum":0.0,"title":"Weight Pct"}},"additionalProperties":false,"type":"object","required":["symbol","side","weight_pct"],"title":"PublicLivePositionItem"},"PublicLivePositions":{"properties":{"state":{"type":"string","enum":["current","stale","unavailable","final"],"title":"State"},"as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of"},"gross_exposure_pct":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Gross Exposure Pct"},"long_exposure_pct":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Long Exposure Pct"},"short_exposure_pct":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Short Exposure Pct"},"items":{"items":{"$ref":"#/components/schemas/PublicLivePositionItem"},"type":"array","maxItems":250,"title":"Items"}},"additionalProperties":false,"type":"object","required":["state"],"title":"PublicLivePositions"},"PublicLiveSeriesPoint":{"properties":{"timestamp":{"type":"string","title":"Timestamp"},"return_pct":{"type":"number","title":"Return Pct"},"account_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Account Value"},"cumulative_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cumulative Pnl"},"flow_direction":{"anyOf":[{"type":"string","enum":["in","out"]},{"type":"null"}],"title":"Flow Direction"}},"additionalProperties":false,"type":"object","required":["timestamp","return_pct"],"title":"PublicLiveSeriesPoint"},"PublicLiveSeriesRef":{"properties":{"url":{"type":"string","title":"Url"},"ranges":{"items":{"type":"string","enum":["1w","1m","3m","all"]},"type":"array","title":"Ranges"},"default_range":{"type":"string","const":"all","title":"Default Range","default":"all"}},"additionalProperties":false,"type":"object","required":["url"],"title":"PublicLiveSeriesRef"},"PublicLiveSeriesV1":{"properties":{"schema_version":{"type":"integer","const":1,"title":"Schema Version","default":1},"share_id":{"type":"string","title":"Share Id"},"policy_revision":{"type":"integer","exclusiveMinimum":0.0,"title":"Policy Revision"},"range":{"type":"string","enum":["1w","1m","3m","all"],"title":"Range"},"as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of"},"freshness":{"anyOf":[{"$ref":"#/components/schemas/PublicMoneyFreshness"},{"type":"null"}]},"segments":{"items":{"$ref":"#/components/schemas/PublicManagedSegment"},"type":"array","title":"Segments"},"points":{"items":{"$ref":"#/components/schemas/PublicLiveSeriesPoint"},"type":"array","maxItems":1500,"title":"Points"}},"additionalProperties":false,"type":"object","required":["share_id","policy_revision","range","segments","points"],"title":"PublicLiveSeriesV1"},"PublicLiveSeriesV2":{"properties":{"schema_version":{"type":"integer","const":2,"title":"Schema Version","default":2},"share_id":{"type":"string","title":"Share Id"},"policy_revision":{"type":"integer","exclusiveMinimum":0.0,"title":"Policy Revision"},"range":{"type":"string","enum":["1w","1m","3m","all"],"title":"Range"},"as_of":{"type":"string","title":"As Of"},"basis_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Basis Id"},"quality":{"type":"string","enum":["complete","pending","partial","unavailable"],"title":"Quality"},"points":{"items":{"$ref":"#/components/schemas/PublicLiveMeasuredPoint"},"type":"array","maxItems":1500,"title":"Points"}},"additionalProperties":false,"type":"object","required":["share_id","policy_revision","range","as_of","basis_id","quality","points"],"title":"PublicLiveSeriesV2"},"PublicLiveShareV1":{"properties":{"schema_version":{"type":"integer","const":1,"title":"Schema Version","default":1},"share_type":{"type":"string","const":"live","title":"Share Type","default":"live"},"share_id":{"type":"string","title":"Share Id"},"policy_revision":{"type":"integer","exclusiveMinimum":0.0,"title":"Policy Revision"},"is_preview":{"type":"boolean","title":"Is Preview","default":false},"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"about":{"anyOf":[{"$ref":"#/components/schemas/PublicLiveAbout"},{"type":"null"}]},"lifecycle":{"$ref":"#/components/schemas/PublicLiveLifecycle"},"data":{"$ref":"#/components/schemas/PublicLiveDataState"},"stats":{"$ref":"#/components/schemas/PublicLivePerformanceStats"},"disclosure":{"$ref":"#/components/schemas/PublicLiveDisclosure"},"series":{"$ref":"#/components/schemas/PublicLiveSeriesRef"},"dollar_values":{"anyOf":[{"$ref":"#/components/schemas/PublicLiveDollarSummary"},{"type":"null"}]},"positions":{"anyOf":[{"$ref":"#/components/schemas/PublicLivePositions"},{"type":"null"}]},"strategy":{"anyOf":[{"$ref":"#/components/schemas/PublicLiveStrategySummary"},{"type":"null"}]},"creator":{"anyOf":[{"$ref":"#/components/schemas/PublicCreatorSummary"},{"type":"null"}]},"card":{"$ref":"#/components/schemas/PublicLiveCardRef"}},"additionalProperties":false,"type":"object","required":["share_id","policy_revision","title","lifecycle","data","stats","disclosure","series","card"],"title":"PublicLiveShareV1"},"PublicLiveSocialCardV1":{"properties":{"schema_version":{"type":"integer","const":1,"title":"Schema Version","default":1},"share_type":{"type":"string","const":"live","title":"Share Type","default":"live"},"share_id":{"type":"string","title":"Share Id"},"policy_revision":{"type":"integer","exclusiveMinimum":0.0,"title":"Policy Revision"},"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"status":{"type":"string","enum":["LIVE","PAUSED","STOPPED"],"title":"Status"},"total_return_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Return Pct"},"max_drawdown_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Drawdown Pct"},"as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of"},"creator_name":{"anyOf":[{"type":"string","maxLength":140},{"type":"null"}],"title":"Creator Name"}},"additionalProperties":false,"type":"object","required":["share_id","policy_revision","title","status"],"title":"PublicLiveSocialCardV1","description":"Fixed percentage-only input accepted by card renderers."},"PublicLiveStrategySummary":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"version_label":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Version Label"},"component_names":{"items":{"type":"string"},"type":"array","maxItems":250,"title":"Component Names"},"graph_url":{"type":"string","title":"Graph Url"},"fork_url":{"type":"string","title":"Fork Url"}},"additionalProperties":false,"type":"object","required":["name","graph_url","fork_url"],"title":"PublicLiveStrategySummary"},"PublicLiveStrategyV1":{"properties":{"schema_version":{"type":"integer","const":1,"title":"Schema Version","default":1},"share_id":{"type":"string","title":"Share Id"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"version_label":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Version Label"},"graph":{"additionalProperties":true,"type":"object","title":"Graph"},"fork_url":{"type":"string","title":"Fork Url"}},"additionalProperties":false,"type":"object","required":["share_id","name","graph","fork_url"],"title":"PublicLiveStrategyV1"},"PublicLiveViewRequest":{"properties":{"event_id":{"type":"string","maxLength":128,"minLength":16,"pattern":"^[A-Za-z0-9._:-]+$","title":"Event Id"}},"additionalProperties":false,"type":"object","required":["event_id"],"title":"PublicLiveViewRequest","description":"One browser-session view event; no financial data is accepted."},"PublicLiveViewResponse":{"properties":{"recorded":{"type":"boolean","title":"Recorded"}},"additionalProperties":false,"type":"object","required":["recorded"],"title":"PublicLiveViewResponse"},"PublicManagedSegment":{"properties":{"start":{"type":"string","title":"Start"},"end":{"type":"string","title":"End"},"managed":{"type":"boolean","title":"Managed"}},"additionalProperties":false,"type":"object","required":["start","end","managed"],"title":"PublicManagedSegment"},"PublicMoneyFreshness":{"properties":{"state":{"type":"string","enum":["COVERED","SYNCING","LEGACY","UNMANAGED"],"title":"State"},"fresh_as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fresh As Of"},"synced_through":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Synced Through"}},"additionalProperties":false,"type":"object","required":["state"],"title":"PublicMoneyFreshness"},"PublicPaperBlock":{"properties":{"status":{"type":"string","enum":["LIVE","PAUSED","STOPPED"],"title":"Status"},"deployed_at":{"type":"string","title":"Deployed At"},"record_age_days":{"type":"integer","minimum":0.0,"title":"Record Age Days"},"simulated_capital":{"type":"number","title":"Simulated Capital"},"parity":{"anyOf":[{"$ref":"#/components/schemas/PublicParityBlock"},{"type":"null"}]},"equity":{"$ref":"#/components/schemas/PublicPaperEquityRef"},"gaps":{"items":{"$ref":"#/components/schemas/EquityGapResponse"},"type":"array","title":"Gaps"}},"additionalProperties":false,"type":"object","required":["status","deployed_at","record_age_days","simulated_capital","parity","equity","gaps"],"title":"PublicPaperBlock","description":"The ``paper`` block: S05 §3.12.1's fields and nothing else.\n\n``parity`` is IC-03-2 from ``parity_block`` (its one owner; no\n``components``); ``gaps`` is S04's derivation verbatim, IC-04-3's\n``{from, to (null while ongoing), kind}`` (PT2-57)."},"PublicPaperEquityRef":{"properties":{"url":{"type":"string","title":"Url"}},"additionalProperties":false,"type":"object","required":["url"],"title":"PublicPaperEquityRef","description":"The paper record's series: the share's public series route (PT2-57)."},"PublicPaperShareV1":{"properties":{"schema_version":{"type":"integer","const":1,"title":"Schema Version","default":1},"share_type":{"type":"string","const":"paper","title":"Share Type","default":"paper"},"share_id":{"type":"string","title":"Share Id"},"policy_revision":{"type":"integer","exclusiveMinimum":0.0,"title":"Policy Revision"},"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"about":{"anyOf":[{"$ref":"#/components/schemas/PublicLiveAbout"},{"type":"null"}]},"lifecycle":{"$ref":"#/components/schemas/PublicLiveLifecycle"},"data":{"$ref":"#/components/schemas/PublicLiveDataState"},"stats":{"$ref":"#/components/schemas/PublicLivePerformanceStats"},"disclosure":{"$ref":"#/components/schemas/PublicLiveDisclosure"},"series":{"$ref":"#/components/schemas/PublicLiveSeriesRef"},"positions":{"anyOf":[{"$ref":"#/components/schemas/PublicLivePositions"},{"type":"null"}]},"strategy":{"anyOf":[{"$ref":"#/components/schemas/PublicLiveStrategySummary"},{"type":"null"}]},"card":{"$ref":"#/components/schemas/PublicLiveCardRef"},"artifacts_status":{"type":"string","enum":["pending","ready","failed"],"title":"Artifacts Status"},"paper":{"$ref":"#/components/schemas/PublicPaperBlock"}},"additionalProperties":false,"type":"object","required":["share_id","policy_revision","title","lifecycle","data","stats","disclosure","series","card","artifacts_status","paper"],"title":"PublicPaperShareV1","description":"``GET /s/{share_id}`` for a ``share_type 'paper'`` link.\n\nThe live payload's shape (``PublicLiveShareV1``) with ``share_type:\n\"paper\"``, the share's ``artifacts_status`` and the ``paper`` block. It\nhas no money field by construction: no ``dollar_values`` and no\n``creator``; the closed model refuses either.\n\nTwo blocks are the link's choice (FDR-7, amending S05 §3.12's \"no\npositions, no strategy\"): ``positions`` (symbol, side and weight only,\ncomputed on read from the paper ledger) exactly when\n``disclosure.show_positions``, and ``strategy`` (name, version, graph and\nfork URLs, never a component list) exactly when\n``disclosure.include_strategy_source``. ``show_dollar_values`` and\n``show_creator_profile`` are always False."},"PublicPaperSocialCardV1":{"properties":{"schema_version":{"type":"integer","const":1,"title":"Schema Version","default":1},"share_type":{"type":"string","const":"paper","title":"Share Type","default":"paper"},"share_id":{"type":"string","title":"Share Id"},"policy_revision":{"type":"integer","exclusiveMinimum":0.0,"title":"Policy Revision"},"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"status":{"type":"string","enum":["LIVE","PAUSED","STOPPED"],"title":"Status"},"total_return_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Return Pct"},"max_drawdown_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Drawdown Pct"},"as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of"},"record_age_days":{"type":"integer","minimum":0.0,"title":"Record Age Days"},"sparkline":{"items":{"type":"number"},"type":"array","maxItems":60,"title":"Sparkline"}},"additionalProperties":false,"type":"object","required":["share_id","policy_revision","title","status","record_age_days"],"title":"PublicPaperSocialCardV1","description":"``GET /s/{share_id}/card-input/{policy_revision}`` for a paper link:\nthe inputs of LA2's paper card (S05 §3.12.3). Percentages only.\n\n``sparkline`` is the record's ``return_pct`` series (range ``all``),\nevenly downsampled to at most 60 points with the last point kept\n(FDR-7); empty while the record has fewer than two points."},"PublicParityBlock":{"properties":{"residual_bps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Residual Bps"},"status":{"type":"string","enum":["tracking","drifting","under_review"],"title":"Status"},"window_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Window Start"},"window_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Window End"},"as_of":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"As Of"},"eval_count":{"type":"integer","title":"Eval Count"},"meter_eligible":{"type":"boolean","title":"Meter Eligible"},"day0_backtest_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Day0 Backtest Run Id"}},"additionalProperties":false,"type":"object","required":["residual_bps","status","window_start","window_end","as_of","eval_count","meter_eligible","day0_backtest_run_id"],"title":"PublicParityBlock","description":"The public paper share's parity subset: IC-03-2 as it stood before PT2-93.\n\nThe public page parses this with a strict schema, so the share keeps its\nshape while a release rolls (an app pod on the old schema would refuse a\nnew key); the run page's detail read carries the PT2-93 additions."},"PublicShareResponse":{"properties":{"share_id":{"type":"string","title":"Share Id"},"permission":{"type":"string","title":"Permission"},"share_type":{"type":"string","title":"Share Type","default":"strategy"},"artifacts_status":{"type":"string","title":"Artifacts Status"},"commit_sequence_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Commit Sequence Number"},"include_source":{"type":"boolean","title":"Include Source","default":true},"strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Id"},"strategy":{"anyOf":[{"$ref":"#/components/schemas/PublicStrategyResponse"},{"type":"null"}]},"backtest":{"anyOf":[{"$ref":"#/components/schemas/PublicBacktestResponse"},{"type":"null"}]}},"type":"object","required":["share_id","permission","artifacts_status"],"title":"PublicShareResponse"},"PublicStrategyResponse":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"equity_curve_url":{"type":"string","title":"Equity Curve Url"},"sharpe_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sharpe Ratio"},"sharpe_ratio_active":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sharpe Ratio Active"},"total_return_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Return Pct"},"max_drawdown_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Drawdown Pct"},"win_rate_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Win Rate Pct"},"trade_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trade Model"},"backtest_period_start":{"type":"string","format":"date","title":"Backtest Period Start"},"backtest_period_end":{"type":"string","format":"date","title":"Backtest Period End"},"backtest_period_last_bar":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Backtest Period Last Bar"},"fork_count":{"type":"integer","title":"Fork Count"},"component_names":{"items":{"type":"string"},"type":"array","title":"Component Names"},"market_count":{"type":"integer","title":"Market Count"},"is_live":{"type":"boolean","title":"Is Live"},"live_since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Live Since"},"max_leverage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Leverage"},"max_daily_loss_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Daily Loss Pct"},"fork_url":{"type":"string","title":"Fork Url"},"share_url":{"type":"string","title":"Share Url"},"card_image_url":{"type":"string","title":"Card Image Url"}},"type":"object","required":["name","equity_curve_url","backtest_period_start","backtest_period_end","fork_count","component_names","market_count","is_live","fork_url","share_url","card_image_url"],"title":"PublicStrategyResponse"},"QuotaBlock":{"properties":{"unit":{"type":"string","title":"Unit"},"label":{"type":"string","title":"Label"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"used":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Used"},"remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining"},"unlimited":{"type":"boolean","title":"Unlimited","default":false},"period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"},"resets_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resets At"},"seconds_to_reset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seconds To Reset"},"first_week":{"anyOf":[{"$ref":"#/components/schemas/FirstWeekBlock"},{"type":"null"}]}},"type":"object","required":["unit","label"],"title":"QuotaBlock","description":"One unit's quota as every surface sees it (mcp-conversion §4.1).\n\nThe wire shape of :meth:`platform_auth.quota.QuotaView.to_dict` —\ndeclared here only so FastAPI can document and validate it; the NUMBERS\nand their invariants are the dataclass's, never re-derived here.\n``limit``/``used``/``remaining`` are null exactly when ``unlimited`` is\ntrue (the sentinel never escapes QuotaView), and\n``resets_at``/``seconds_to_reset`` are null exactly when ``period`` is —\na cap does not refill, so it carries no reset rather than a fabricated\none."},"Quote":{"properties":{"value":{"type":"string","title":"Value"},"basis_id":{"type":"string","title":"Basis Id"},"representation_id":{"type":"string","title":"Representation Id"},"observed_at":{"type":"string","format":"date-time","title":"Observed At"},"observed_interval_start":{"type":"string","format":"date-time","title":"Observed Interval Start"},"observed_interval_end":{"type":"string","format":"date-time","title":"Observed Interval End"},"quality":{"type":"string","enum":["current","stale","unavailable"],"title":"Quality"},"reason_codes":{"items":{"type":"string"},"type":"array","title":"Reason Codes"}},"additionalProperties":false,"type":"object","required":["value","basis_id","representation_id","observed_at","observed_interval_start","observed_interval_end","quality","reason_codes"],"title":"Quote"},"ReauthorizeResponse":{"properties":{"account_id":{"type":"string","title":"Account Id"},"new_agent_address":{"type":"string","title":"New Agent Address"},"eip712_approve_agent":{"additionalProperties":true,"type":"object","title":"Eip712 Approve Agent"},"displacement_warning":{"anyOf":[{"$ref":"#/components/schemas/DisplacementWarning"},{"type":"null"}]}},"type":"object","required":["account_id","new_agent_address","eip712_approve_agent"],"title":"ReauthorizeResponse"},"ReceiptBenchmarkReference":{"properties":{"benchmark_kind":{"type":"string","enum":["DECISION","ARRIVAL","END"],"title":"Benchmark Kind"},"state":{"type":"string","enum":["PENDING","CLAIMED","SELECTED","MISSING"],"title":"State"},"authority_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Authority At"},"selected_midpoint_sample_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Selected Midpoint Sample Id"},"missing_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Missing Reason"},"metric_version":{"type":"string","title":"Metric Version"},"selected_source_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selected Source Kind","description":"The construction behind this benchmark's mid, stamped per row. BBO_PREVAILING_QUOTE: the quote in force at the instant on the venue clock (V170). Legacy labels (V52_MIDPOINT_SAMPLE, BBO_MINUTE_CHUNK_PRIOR_WINDOW) are different measurements and must never be pooled with it. NULL unless SELECTED."},"selected_mid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selected Mid","description":"The SELECTED benchmark mid (the value the receipt read). NULL unless SELECTED."},"venue_age_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Venue Age Ms","description":"Age of the selected quote at the instant on the VENUE clock, in ms (>= 0). The mid is only as meaningful as this is small."},"receive_age_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Receive Age Ms","description":"Instant minus the observer's receive time of the selected quote, in ms; SIGNED — negative means the quote in force was still in flight at the instant."},"stale":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stale","description":"Legacy sample rows only: whether the V52 sample exceeded its staleness bound. NULL under BBO_PREVAILING_QUOTE, whose admissibility is the declared bound itself."}},"additionalProperties":false,"type":"object","required":["benchmark_kind","state","metric_version"],"title":"ReceiptBenchmarkReference"},"ReceiptChildMarkout":{"properties":{"horizon_ms":{"type":"integer","title":"Horizon Ms"},"fill_weighted_favorable_bps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fill Weighted Favorable Bps"},"complete_fill_count":{"type":"integer","title":"Complete Fill Count"},"fill_count":{"type":"integer","title":"Fill Count"},"realized_offset_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Realized Offset Ms","description":"Fill-weighted interval this markout actually measures, in ms — venue mark instant minus venue fill instant. NULL when no COMPLETE row carries a venue instant. Compare against the nominal horizon_ms."}},"additionalProperties":false,"type":"object","required":["horizon_ms","complete_fill_count","fill_count"],"title":"ReceiptChildMarkout","description":"One REQUIRED-horizon fill-weighted markout aggregate for a child.\n\n``fill_weighted_favorable_bps`` averages V78's per-fill\n``markout_favorable_bps`` over the child's fills, weighted by fill\nquantity, using COMPLETE latest-version rows only. It is NULL — never\nzero — when no COMPLETE row exists for the horizon.\n``complete_fill_count``/``fill_count`` label the coverage so a partial\naggregate is never mistaken for a full one.\n\n``horizon_ms`` is NOMINAL. Maturation runs on an observer cycle, so a mark\nlands at or after its due instant — measured drift is +286 ms mean at the\n1 s horizon and +794 ms (max 1793 ms) at 30 s, i.e. the \"+1 s\" markout\nreally measures ≈1.29 s. ``realized_offset_ms`` reports the interval the\nmark ACTUALLY measures (venue instant minus fill instant, one clock\ndomain), so a consumer can tell the two apart. At the 1 s and 5 s horizons\n— the ones maker adverse-selection judgement rests on — a ~29 % overshoot\nis material: compare like with like using the realized value (audit F-7)."},"ReceiptChildReference":{"properties":{"child_ref":{"type":"string","title":"Child Ref"},"intent_rev":{"type":"integer","title":"Intent Rev"},"terminal_state":{"type":"string","enum":["FILLED","PARTIAL","CANCELLED","REJECTED","FAILED"],"title":"Terminal State"},"terminal_at":{"type":"string","format":"date-time","title":"Terminal At"},"fill_refs":{"items":{"type":"string"},"type":"array","title":"Fill Refs"},"submit_count":{"type":"integer","title":"Submit Count"},"replace_count":{"type":"integer","title":"Replace Count"},"cancel_count":{"type":"integer","title":"Cancel Count"},"escalation_count":{"type":"integer","title":"Escalation Count"},"source_evidence_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Source Evidence Sha256"},"evidence_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Evidence Sha256"}},"additionalProperties":false,"type":"object","required":["child_ref","intent_rev","terminal_state","terminal_at","fill_refs","submit_count","replace_count","cancel_count","escalation_count","source_evidence_sha256","evidence_sha256"],"title":"ReceiptChildReference"},"ReceiptChildTimeline":{"properties":{"cloid":{"type":"string","title":"Cloid"},"kind":{"type":"string","enum":["slice","ladder","escalation","cleanup"],"title":"Kind"},"side":{"type":"string","enum":["BUY","SELL"],"title":"Side"},"size":{"type":"string","title":"Size"},"limit_px":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Limit Px"},"tif":{"type":"string","title":"Tif"},"reduce_only":{"type":"boolean","title":"Reduce Only"},"state":{"type":"string","title":"State"},"terminal_state":{"anyOf":[{"type":"string","enum":["FILLED","PARTIAL","CANCELLED","REJECTED","FAILED"]},{"type":"null"}],"title":"Terminal State"},"terminal_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terminal Reason"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"submitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Submitted At"},"ack_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ack At"},"first_fill_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Fill At"},"last_fill_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Fill At"},"cancel_requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancel Requested At"},"terminal_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Terminal At"},"submit_count":{"type":"integer","title":"Submit Count"},"replace_count":{"type":"integer","title":"Replace Count"},"cancel_count":{"type":"integer","title":"Cancel Count"},"escalation_count":{"type":"integer","title":"Escalation Count"},"fill_count":{"type":"integer","title":"Fill Count"},"filled_quantity":{"type":"string","title":"Filled Quantity"},"fill_vwap":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fill Vwap"},"markouts":{"items":{"$ref":"#/components/schemas/ReceiptChildMarkout"},"type":"array","title":"Markouts"},"level_reached":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Level Reached"},"reject_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reject Reason"}},"additionalProperties":false,"type":"object","required":["cloid","kind","side","size","tif","reduce_only","state","created_at","submit_count","replace_count","cancel_count","escalation_count","fill_count","filled_quantity","markouts"],"title":"ReceiptChildTimeline","description":"Per-child order timeline (spec 11 §7, F-M6).\n\nA projection of durable truth only: ``trading.execution_orders`` (the\nchild row), the V43 ``strategy.execution_events`` journal (instants and\ncounts), ``trading.execution_fills`` (venue fill truth), and V78's\n``trading.execution_fill_markouts``. Nothing here recomputes receipt\neconomics. Every nullable instant means \"not journaled\"/\"did not\nhappen\", never an inferred timestamp; ``terminal_reason`` is the raw\ndurable order state that produced the mapped ``terminal_state`` (e.g. a\nFAILED child's reason distinguishes ERROR from PRESUMED_DEAD)."},"ReceiptEpisodeAttribution":{"properties":{"style":{"type":"string","title":"Style"},"style_version":{"type":"string","title":"Style Version"},"urgency":{"type":"string","title":"Urgency"},"capture_profile":{"type":"string","title":"Capture Profile"},"carry_in_position":{"type":"string","title":"Carry In Position"}},"additionalProperties":false,"type":"object","required":["style","style_version","urgency","capture_profile","carry_in_position"],"title":"ReceiptEpisodeAttribution","description":"Episode identity the receipt was scored under (spec 05 fleet core).\n\nValues are copied verbatim from strategy.execution_intent_episodes.\n\nThe ``requested_notional``/``_price``/``_currency`` trio was removed\n2026-08-11: 0 of 560 prod episodes ever carried one (the only producer,\nexec-worker's ``DecisionEpisodeRuntime``, hardcoded None), and no surface\nrendered them. keel-app's Zod/TS mirrors went ``.optional()`` in\nrelease-v1.141, so dropping them here cannot break a deployed app build.\nThe episode columns themselves drop in a later release."},"ReceiptFillReference":{"properties":{"venue_id":{"type":"string","title":"Venue Id"},"account_id":{"type":"string","title":"Account Id"},"trade_time":{"type":"string","format":"date-time","title":"Trade Time"},"instrument_id":{"type":"string","title":"Instrument Id"},"venue_fill_id":{"type":"string","title":"Venue Fill Id"},"included_at_e":{"type":"boolean","title":"Included At E"},"capture_policy_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Capture Policy Sha256"},"metric_version":{"type":"string","title":"Metric Version"},"total_fee_native":{"type":"string","title":"Total Fee Native"},"total_fee_currency":{"type":"string","title":"Total Fee Currency"},"fee_asset_version_id":{"type":"string","title":"Fee Asset Version Id"},"builder_fee_native":{"type":"string","title":"Builder Fee Native"},"builder_fee_currency":{"type":"string","title":"Builder Fee Currency"},"venue_fee_native":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Venue Fee Native"},"venue_fee_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Venue Fee Currency"},"fee_component_missing_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fee Component Missing Reason"},"total_fee_reporting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Total Fee Reporting"},"builder_fee_reporting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Builder Fee Reporting"},"venue_fee_reporting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Venue Fee Reporting"},"reporting_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reporting Currency"},"reporting_asset_version_id":{"type":"string","title":"Reporting Asset Version Id"},"fx_rate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fx Rate"},"fx_valuation_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Fx Valuation At"},"fx_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fx Source"},"fx_source_as_of_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Fx Source As Of At"},"fx_source_observed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Fx Source Observed At"},"fx_source_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fx Source Version"},"fx_policy_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fx Policy Version"},"fx_evidence_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fx Evidence Ref"},"fx_evidence_sha256":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}],"title":"Fx Evidence Sha256"},"fx_missing_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fx Missing Reason"},"fx_completeness":{"type":"string","enum":["COMPLETE","MISSING","NOT_REQUIRED"],"title":"Fx Completeness"},"evidence_completeness":{"type":"string","enum":["COMPLETE","PARTIAL","MISSING"],"title":"Evidence Completeness"},"missing_reasons":{"items":{"type":"string"},"type":"array","title":"Missing Reasons"},"effective_spread_bps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effective Spread Bps","description":"EFFECTIVE spread in bps — the round-trip (2x) convention. The one-way cost paid against the midpoint is HALF this value. Positive = cost, negative = price improvement."},"prefill_venue_age_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Prefill Venue Age Ms","description":"Age of the reference midpoint at the fill, in ms. The spread is only as meaningful as this is small: a stale reference measures price drift rather than spread."},"prefill_receive_age_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Prefill Receive Age Ms"},"prefill_stale":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Prefill Stale","description":"True when prefill_venue_age_ms exceeds the declared staleness bound (trading.prefill_stale_threshold_ms). When true, treat effective_spread_bps as drift-contaminated."},"evidence_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Evidence Sha256"}},"additionalProperties":false,"type":"object","required":["venue_id","account_id","trade_time","instrument_id","venue_fill_id","included_at_e","capture_policy_sha256","metric_version","total_fee_native","total_fee_currency","fee_asset_version_id","builder_fee_native","builder_fee_currency","reporting_asset_version_id","fx_completeness","evidence_completeness","missing_reasons","evidence_sha256"],"title":"ReceiptFillReference"},"ReceiptSourceReferences":{"properties":{"decision_id":{"type":"string","title":"Decision Id"},"execution_run_id":{"type":"string","title":"Execution Run Id"},"session_id":{"type":"string","title":"Session Id"},"intent_rev":{"type":"integer","title":"Intent Rev"},"routing_command_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Routing Command Id"},"routing_revision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Routing Revision"},"record_origin":{"type":"string","const":"NATIVE","title":"Record Origin"},"fill_set_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Fill Set Sha256"},"evidence_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Evidence Sha256"},"children":{"items":{"$ref":"#/components/schemas/ReceiptChildReference"},"type":"array","title":"Children"},"fills":{"items":{"$ref":"#/components/schemas/ReceiptFillReference"},"type":"array","title":"Fills"},"benchmarks":{"items":{"$ref":"#/components/schemas/ReceiptBenchmarkReference"},"type":"array","title":"Benchmarks"}},"additionalProperties":false,"type":"object","required":["decision_id","execution_run_id","session_id","intent_rev","record_origin","fill_set_sha256","evidence_sha256","children","fills","benchmarks"],"title":"ReceiptSourceReferences"},"RecordLegalAcceptancesRequest":{"properties":{"documents":{"items":{"$ref":"#/components/schemas/LegalDocAcceptance"},"type":"array","maxItems":10,"minItems":1,"title":"Documents"},"surface":{"type":"string","enum":["signup","deploy_modal"],"title":"Surface"}},"type":"object","required":["documents","surface"],"title":"RecordLegalAcceptancesRequest","description":"Request body for POST /v1/me/legal-acceptances."},"RecordLegalAcceptancesResponse":{"properties":{"acceptances":{"items":{"$ref":"#/components/schemas/LegalAcceptanceResponse"},"type":"array","title":"Acceptances"}},"type":"object","required":["acceptances"],"title":"RecordLegalAcceptancesResponse"},"RecordMilestoneRequest":{"properties":{"milestone":{"type":"string","maxLength":64,"minLength":1,"title":"Milestone"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}],"title":"Value","default":true}},"type":"object","required":["milestone"],"title":"RecordMilestoneRequest","description":"Request body for POST /v1/me/milestones."},"RefreshModeResponse":{"properties":{"account_id":{"type":"string","title":"Account Id"},"account_mode":{"anyOf":[{"$ref":"#/components/schemas/StoredAccountMode"},{"type":"null"}]},"previous_mode":{"anyOf":[{"$ref":"#/components/schemas/StoredAccountMode"},{"type":"null"}]}},"type":"object","required":["account_id","account_mode"],"title":"RefreshModeResponse"},"ReleaseRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"version_string":{"type":"string","maxLength":50,"minLength":1,"title":"Version String"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["name","version_string"],"title":"ReleaseRequest"},"ResolveUniverseRequest":{"properties":{"mode":{"type":"string","title":"Mode","description":"Resolution mode: manual, category, top_volume"},"market":{"type":"string","title":"Market","description":"Market: 'perp' (Hyperliquid perpetuals) is the only supported value and the default; any other is refused with 422 UNSUPPORTED_MARKET.","default":"perp"},"symbols":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Symbols","description":"Explicit symbols (manual mode)"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories","description":"Tag categories (category mode)"},"top_n":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top N","description":"Number of assets (top_volume mode)"},"exclusions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Exclusions","description":"Symbols to exclude"},"inclusions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Inclusions","description":"Symbols to force include"},"lookback":{"anyOf":[{"type":"string","enum":["7d","30d","90d"]},{"type":"null"}],"title":"Lookback","description":"Volume ranking lookback: 7d, 30d, or 90d (default 7d)"},"volume_quartiles":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Volume Quartiles","description":"Volume quartile filter: q1=top 25%, q2=25-50%, q3=50-75%, q4=bottom 25%"},"min_trailing_dollar_volume":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Min Trailing Dollar Volume","description":"Dollar-liquidity floor (spec 04 §1): keep assets whose trailing-24h traded dollar volume (Σ trade price × size over 1m bars; there is none before 2025-03-23) as of `as_of` is >= this value (quote units). A threshold applied in every mode, not a top-N."},"min_trailing_notional_proxy":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Min Trailing Notional Proxy","description":"DEPRECATED alias of `min_trailing_dollar_volume` — the same floor (traded dollar volume; the name predates that). Send `min_trailing_dollar_volume`; sending both is a 422.","deprecated":true},"current_resolved":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Current Resolved","description":"Current resolved list for diff computation"},"as_of":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"As Of","description":"The snapshot instant (timezone-aware ISO-8601). Volume windows end here and listing state is evaluated as of it (Q-0983). Omit for now. Pass the backtest start to resolve the pool as of then."}},"type":"object","required":["mode"],"title":"ResolveUniverseRequest"},"ResolveUniverseResponse":{"properties":{"resolved":{"items":{"type":"string"},"type":"array","title":"Resolved"},"resolved_at":{"type":"string","title":"Resolved At","description":"The instant the resolution is as of — identical to `as_of` (the SQL window ended exactly here), not a stamp taken after the query."},"as_of":{"type":"string","title":"As Of","description":"The snapshot instant the resolver actually used (ISO-8601 UTC). Echoes the request's as_of, or the pinned now() when omitted."},"snapshot_note":{"type":"string","title":"Snapshot Note","description":"ONE SNAPSHOT label: the resolved list is the pool as of `as_of`, never a historical membership rule. Surface it to the user verbatim."},"count":{"type":"integer","title":"Count"},"max_leverages":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Max Leverages","description":"Per-symbol venue maxLeverage for the resolved list, from trading.instruments. Clients bake it into the Universe declaration (PortfolioMarginCap's input). None when no symbol has a recorded value; symbols without one are omitted (components apply their conservative default). Optional so older clients can ignore it."},"diff":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Diff"},"symbol_status":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Symbol Status","description":"Per-symbol listing class over the union of requested and resolved symbols: active | delisted | hip3 | unknown (hip3 = listed on a Hyperliquid HIP-3 dex; Keel does not support HIP-3 markets yet). Present whenever any symbol was classified."},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Warnings","description":"Human-readable advisories: unknown symbols (with did-you-mean), delisted symbols (allowed in backtests; live planners skip them), and top_n under-fill ('venue can supply X of Y'). None when clean."},"resolution_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Note","description":"What this resolution kept and dropped from the symbols the caller named, and why (Q-2283, spec 03 U4) — e.g. 'Resolved 2 of 3 symbols: BTC, ETH. Dropped xyz:AAPL — listed on Hyperliquid (HIP-3); Keel does not support HIP-3 markets yet — support is coming soon.' None when every named symbol is active."},"dropped":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Dropped","description":"Named symbols this resolution dropped (HIP-3 or unknown); their reasons are in resolution_note. None when nothing was dropped."},"requested_top_n":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requested Top N","description":"Echo of the requested top_n so clients can detect under-fill (count < requested_top_n) and write top_n down to the achievable pool instead of tripping the STALE_UNIVERSE gate forever."},"requested_min_trailing_notional_proxy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Requested Min Trailing Notional Proxy","description":"Echo of the requested dollar-liquidity floor (spec 04 §1), so a client can show that a declared floor was applied — it is a THRESHOLD on trailing-24h traded dollar volume, independent of the lookback the ranking uses. Carries the floor whichever request field named it (`min_trailing_dollar_volume`, or its deprecated alias); the response field keeps its original name. None when no floor was requested."},"pool_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pool Size","description":"Live names ranked before any band was cut — the pool 'Top 25%' is 25% OF. Null when no unlimited ranking ran (a plain top_n that filled its LIMIT never saw past it)."},"band_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Band Size","description":"Names in the SELECTED quartile bands before top_n caps them — the number that explains an under-filled top_n. Null when no quartile filter was applied."},"rankings":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SymbolRanking"},"type":"object"},{"type":"null"}],"title":"Rankings","description":"Per-RESOLVED-symbol rank and trailing notional from the ranking this resolve used, so a volume filter can be verified by eye. Force-included symbols the ranking never saw are absent. Null in manual mode (nothing is ranked)."},"supply_before_filters":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Supply Before Filters","description":"Ranked names the venue supplied BEFORE bands, floor, exclusions and inclusions — the only honest input to 'the venue cannot supply top_n'. Measuring under-supply after exclusions ratchets a declared top_n down by one on every resolve (audit 04 U-02)."}},"type":"object","required":["resolved","resolved_at","as_of","snapshot_note","count"],"title":"ResolveUniverseResponse"},"RestoreRequest":{"properties":{"ref":{"type":"string","title":"Ref"},"message":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Message"},"expected_head_commit_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Expected Head Commit Id"}},"type":"object","required":["ref"],"title":"RestoreRequest"},"RotateAgentResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"token":{"type":"string","title":"Token"},"credential_id":{"type":"string","title":"Credential Id"}},"type":"object","required":["id","name","token","credential_id"],"title":"RotateAgentResponse"},"SemanticRevision":{"properties":{"account_id":{"type":"string","title":"Account Id"},"basis_id":{"type":"string","title":"Basis Id"},"revision":{"type":"integer","minimum":0.0,"title":"Revision"}},"additionalProperties":false,"type":"object","required":["account_id","basis_id","revision"],"title":"SemanticRevision"},"ShareCurveResponse":{"properties":{"presigned_url":{"type":"string","title":"Presigned Url"},"expires_in":{"type":"integer","title":"Expires In","default":3600}},"type":"object","required":["presigned_url"],"title":"ShareCurveResponse","description":"Presigned URL for equity curve data on share pages."},"ShareGraphResponse":{"properties":{"graph":{"additionalProperties":true,"type":"object","title":"Graph"}},"type":"object","required":["graph"],"title":"ShareGraphResponse","description":"Public graph model for share pages. No auth required."},"ShareLinkResponse":{"properties":{"share_id":{"type":"string","title":"Share Id"},"strategy_id":{"type":"string","title":"Strategy Id"},"backtest_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backtest Run Id"},"commit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Id"},"include_source":{"type":"boolean","title":"Include Source","default":true},"created_by_principal_id":{"type":"string","title":"Created By Principal Id"},"permission":{"type":"string","title":"Permission"},"share_type":{"type":"string","title":"Share Type","default":"strategy"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"view_count":{"type":"integer","title":"View Count"},"fork_count":{"type":"integer","title":"Fork Count"},"last_accessed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Accessed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"card_s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card S3 Key"},"animated_gif_s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Animated Gif S3 Key"},"expand_page_s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expand Page S3 Key"},"artifacts_status":{"type":"string","title":"Artifacts Status"},"artifacts_enabled":{"type":"boolean","title":"Artifacts Enabled","default":true}},"type":"object","required":["share_id","strategy_id","created_by_principal_id","permission","view_count","fork_count","created_at","artifacts_status"],"title":"ShareLinkResponse"},"SharePreviewItem":{"properties":{"type":{"type":"string","title":"Type"},"url":{"type":"string","title":"Url"}},"type":"object","required":["type","url"],"title":"SharePreviewItem"},"SharePreviewsResponse":{"properties":{"previews":{"items":{"$ref":"#/components/schemas/SharePreviewItem"},"type":"array","title":"Previews"}},"type":"object","required":["previews"],"title":"SharePreviewsResponse"},"SharedCardComponent":{"properties":{"name":{"type":"string","maxLength":256,"title":"Name"},"category":{"type":"string","maxLength":64,"title":"Category"}},"additionalProperties":false,"type":"object","required":["name","category"],"title":"SharedCardComponent"},"SharedCardInput":{"properties":{"schema_version":{"type":"integer","const":1,"title":"Schema Version","default":1},"share_id":{"type":"string","title":"Share Id"},"share_type":{"type":"string","enum":["strategy","backtest"],"title":"Share Type"},"strategy_name":{"type":"string","maxLength":512,"title":"Strategy Name"},"metrics":{"$ref":"#/components/schemas/SharedCardMetrics"},"component_names":{"items":{"$ref":"#/components/schemas/SharedCardComponent"},"type":"array","maxItems":12,"title":"Component Names"},"equity_curve":{"items":{"type":"number"},"type":"array","maxItems":256,"title":"Equity Curve"},"fork_count":{"type":"integer","minimum":0.0,"title":"Fork Count"}},"additionalProperties":false,"type":"object","required":["share_id","share_type","strategy_name","metrics","component_names","equity_curve","fork_count"],"title":"SharedCardInput","description":"Closed public disclosure, never a storage location or queued authority."},"SharedCardMetrics":{"properties":{"sharpe_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sharpe Ratio"},"total_return_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Return Pct"},"max_drawdown_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Drawdown Pct"},"win_rate_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Win Rate Pct"},"trade_model":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Trade Model"}},"additionalProperties":false,"type":"object","title":"SharedCardMetrics"},"SimulateActionRequest":{"properties":{"principal_id":{"type":"string","title":"Principal Id"},"action":{"type":"string","title":"Action"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"}},"type":"object","required":["principal_id","action"],"title":"SimulateActionRequest","description":"Request body for POST /v1/actions/simulate."},"SimulateActionResponse":{"properties":{"decision":{"type":"string","title":"Decision"},"denial_reasons":{"items":{"type":"string"},"type":"array","title":"Denial Reasons"}},"type":"object","required":["decision","denial_reasons"],"title":"SimulateActionResponse"},"SourceAncestryRequest":{"properties":{"source":{"type":"string","maxLength":250000,"minLength":1,"title":"Source"}},"type":"object","required":["source"],"title":"SourceAncestryRequest","description":"Body for POST /{id}/source-ancestry — the raw client snapshot.\n\nThe SERVER hashes it (compute_source_hash of the exact bytes) so the\nclient never computes a hash — the same one-owner rule as\nexpected_source_hash (client hashes can never match stored/canonical\ntext; the documented 409-storm landmine)."},"SourceAncestryResponse":{"properties":{"verdict":{"type":"string","enum":["head","ancestor","unknown"],"title":"Verdict"},"head_source_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Head Source Hash"},"matched_sequence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Matched Sequence"}},"type":"object","required":["verdict"],"title":"SourceAncestryResponse","description":"verdict: how the snapshot relates to this strategy's commit line.\n\n- \"head\":     byte-identical to the current head commit\n- \"ancestor\": byte-identical to a superseded main-line commit — the\n              snapshot is provably historical, not novel text\n- \"unknown\":  matches no commit (novel text, or unhashable lineage)"},"SpotBalanceResponse":{"properties":{"coin":{"type":"string","title":"Coin"},"total":{"type":"number","title":"Total"},"hold":{"type":"number","title":"Hold","default":0.0},"entry_ntl":{"type":"number","title":"Entry Ntl","default":0.0}},"type":"object","required":["coin","total"],"title":"SpotBalanceResponse"},"StoredAccountMode":{"type":"string","enum":["standard","unified","portfolio_margin"],"title":"StoredAccountMode","description":"Recognized account modes parseable from historical Keel storage."},"StrategyExperimentLifecycleResponse":{"properties":{"active":{"anyOf":[{"$ref":"#/components/schemas/ExperimentWithTrial"},{"type":"null"}]},"backlog":{"items":{"$ref":"#/components/schemas/ExperimentWithTrial"},"type":"array","title":"Backlog","default":[]},"completed":{"items":{"$ref":"#/components/schemas/ExperimentWithTrial"},"type":"array","title":"Completed","default":[]}},"type":"object","title":"StrategyExperimentLifecycleResponse","description":"Experiments for one strategy, grouped by lifecycle position.\n\n- `active`: at most one — the currently-selected or running experiment.\n- `backlog`: queued and proposed experiments not yet selected.\n- `completed`: terminal states (accepted, rejected, inconclusive,\n  completed, archived, stale). Returned newest decision first.\n\nEach group entry includes the experiment row plus its latest trial\nso the UI can show outcome / metrics without a second round trip."},"StrategyMemoryItem":{"properties":{"memory_id":{"type":"string","title":"Memory Id"},"strategy_id":{"type":"string","title":"Strategy Id"},"memory_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Type"},"content":{"type":"string","title":"Content"},"written_by_role":{"type":"string","title":"Written By Role"},"source_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Conversation Id"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["memory_id","strategy_id","content","written_by_role","created_at"],"title":"StrategyMemoryItem","description":"A single strategy memory note row."},"StrategyMemoryListResponse":{"properties":{"strategy_id":{"type":"string","title":"Strategy Id"},"notes":{"items":{"$ref":"#/components/schemas/StrategyMemoryItem"},"type":"array","title":"Notes"},"last_updated":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Updated"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"}},"type":"object","required":["strategy_id","notes"],"title":"StrategyMemoryListResponse","description":"Response body for GET /v1/strategies/{id}/memory."},"StrategyMemoryWriteRequest":{"properties":{"note":{"type":"string","maxLength":8192,"minLength":1,"title":"Note"},"role":{"type":"string","enum":["user","agent"],"title":"Role","default":"agent"}},"type":"object","required":["note"],"title":"StrategyMemoryWriteRequest","description":"Body for POST /v1/strategies/{id}/memory."},"StrategyResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"visibility":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visibility"},"forked_from_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forked From Id"},"forked_from_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forked From Name"},"fork_count":{"type":"integer","title":"Fork Count","default":0},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Hash"},"created_via":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created Via"},"library_source_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Library Source Slug"},"library_entry_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Library Entry Version"},"library_entry_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Library Entry Name"},"library_variant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Library Variant Id"},"library_import_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Library Import Id"},"library_source_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Library Source Hash"},"backtested_page_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backtested Page Slug"},"backtested_cell_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backtested Cell Id"},"backtested_page_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backtested Page Subject"},"head_commit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Head Commit Id"},"head_source_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Head Source Hash"},"compilation_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compilation Error"},"validation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Validation"},"unchanged":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Unchanged"},"universe_resolution":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Universe Resolution"},"universe_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Universe State"},"graph":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Graph"},"s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Key"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"},"component_lock":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Component Lock"},"deprecations":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Deprecations"},"lock_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lock Hash"},"current_sequence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current Sequence"},"deployed_sequence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deployed Sequence"},"deployed_version_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed Version String"},"deployment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Id"},"deployment_schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Schedule"},"deployed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deployed At"},"latest_backtest_metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Latest Backtest Metrics"},"latest_backtest_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Backtest Id"},"latest_backtest_sequence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Backtest Sequence"},"latest_backtest_start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Backtest Start Date"},"latest_backtest_end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Backtest End Date"},"latest_backtest_sub_window":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Latest Backtest Sub Window"},"backtest_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backtest State"},"backtest_run_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Backtest Run Count"},"journey_projection":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Journey Projection"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","name","status","created_at"],"title":"StrategyResponse"},"StrategyWorkProjectionResponse":{"properties":{"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Id"},"current_stage":{"type":"string","title":"Current Stage"},"role_mode":{"type":"string","title":"Role Mode"},"entry_path":{"type":"string","title":"Entry Path"},"overall_status":{"type":"string","title":"Overall Status"},"ownership_decision":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ownership Decision"},"skip_guidance":{"additionalProperties":true,"type":"object","title":"Skip Guidance"},"ui_state":{"additionalProperties":true,"type":"object","title":"Ui State"},"proof_steps":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Proof Steps"},"next_recommended_action":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Next Recommended Action"},"missing_evidence":{"items":{"type":"string"},"type":"array","title":"Missing Evidence"},"live_readiness_blockers":{"items":{"type":"string"},"type":"array","title":"Live Readiness Blockers"},"latest_backtest":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Latest Backtest"},"current_source_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Source Hash"},"workflow_state_version":{"type":"integer","title":"Workflow State Version","default":1},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"items":{"items":{"$ref":"#/components/schemas/ArtifactResponse"},"type":"array","title":"Items"},"progress_steps":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Progress Steps"},"current_count":{"type":"integer","title":"Current Count","default":0},"progress_units":{"type":"number","title":"Progress Units","default":0},"has_running_artifacts":{"type":"boolean","title":"Has Running Artifacts","default":false},"journey_projection":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Journey Projection"}},"type":"object","required":["current_stage","role_mode","entry_path","overall_status","skip_guidance","ui_state","proof_steps"],"title":"StrategyWorkProjectionResponse"},"StrategyWorkSessionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StrategyWorkSessionResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"StrategyWorkSessionListResponse"},"StrategyWorkSessionResponse":{"properties":{"session_id":{"type":"string","title":"Session Id"},"org_id":{"type":"string","title":"Org Id"},"strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Id"},"status":{"type":"string","title":"Status"},"current_stage":{"type":"string","title":"Current Stage"},"role_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Mode"},"current_objective_module":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Objective Module"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"workflow_state":{"additionalProperties":true,"type":"object","title":"Workflow State"},"active_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Conversation Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["session_id","org_id","status","current_stage","workflow_state","created_at","updated_at"],"title":"StrategyWorkSessionResponse"},"SubmitBacktestRequest":{"properties":{"strategy_id":{"type":"string","minLength":1,"title":"Strategy Id"},"start_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"End Date"},"engine":{"type":"string","pattern":"^(native)$","title":"Engine","default":"native"},"backtest_config":{"anyOf":[{"$ref":"#/components/schemas/BacktestConfig"},{"type":"null"}]},"commit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Id"},"version":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Version"},"experiment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Experiment Id"},"trial_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trial Id"},"window_policy":{"type":"string","enum":["consumed_eras","price_depth"],"title":"Window Policy","default":"consumed_eras"}},"type":"object","required":["strategy_id"],"title":"SubmitBacktestRequest"},"SubscriptionResponse":{"properties":{"plan":{"type":"string","title":"Plan"},"status":{"type":"string","title":"Status"},"current_period_start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current Period End"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End","default":false},"pending_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pending Plan"},"pending_plan_date":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pending Plan Date"}},"type":"object","required":["plan","status"],"title":"SubscriptionResponse"},"SuggestionCreated":{"properties":{"id":{"type":"string","title":"Id"}},"type":"object","required":["id"],"title":"SuggestionCreated"},"SuggestionRequest":{"properties":{"message":{"type":"string","maxLength":5000,"minLength":1,"title":"Message"},"category":{"anyOf":[{"type":"string","enum":["idea","bug","other"]},{"type":"null"}],"title":"Category"},"page_path":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Page Path"},"app_version":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"App Version"}},"additionalProperties":false,"type":"object","required":["message"],"title":"SuggestionRequest","description":"keel-app's suggestion dialog body. Unknown keys are refused (422)."},"SymbolRanking":{"properties":{"rank":{"type":"integer","title":"Rank","description":"1-based position in the ranked pool the selection came from (the full live pool when a band was cut, the top_n ranking otherwise). Rank 1 is the highest trailing notional."},"trailing_notional":{"type":"number","title":"Trailing Notional","description":"Traded dollar volume (Σ trade price × size, SUM(pv_sum) over 1m bars; there is none before 2025-03-23) over the SAME window the ranking ordered by (the request's lookback, default 7d), in quote units — never base-asset units."}},"type":"object","required":["rank","trailing_notional"],"title":"SymbolRanking","description":"Where a resolved symbol sat in the ranking this resolve actually used."},"TagResponse":{"properties":{"tag_id":{"type":"string","title":"Tag Id"},"name":{"type":"string","title":"Name"},"tag_type":{"type":"string","title":"Tag Type"},"commit_id":{"type":"string","title":"Commit Id"},"version_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version String"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["tag_id","name","tag_type","commit_id","created_at"],"title":"TagResponse"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","const":"Bearer","title":"Token Type","default":"Bearer"},"expires_in":{"type":"integer","title":"Expires In","description":"Access-token lifetime in seconds."},"scope":{"type":"string","title":"Scope","description":"Space-separated granted scope: the advertised tier tokens the credential fully covers (`base`, `live`) first, then the resolved credential_scopes (Q-1786)."}},"type":"object","required":["access_token","refresh_token","expires_in","scope"],"title":"TokenResponse","description":"OAuth 2.0-style token response (RFC 6749 §5.1)."},"UniverseWarning":{"properties":{"symbol":{"type":"string","title":"Symbol"},"reason":{"type":"string","enum":["DELISTED","STALE"],"title":"Reason"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["symbol","reason","detail"],"title":"UniverseWarning","description":"One universe member the venue can no longer trade (spec 15 §3.3).\n\n``reason`` is a COHORT LABEL, never pooled: ``DELISTED`` is\n``market_data.markets.removed_at`` — stamped by ingestion from the venue's\n``isDelisted`` flag or after three consecutive sweeps without the asset in\n``meta`` (~3 h), then corrected in place to the verified venue death, whose\ndate ``detail`` names (Q-1339, Q-2397); ``STALE`` is the codified backstop\nfor what that stamp cannot see — an ingestion outage, a dead feed, or a\ncoin that stopped trading while still listed without the flag (TON was 51\ndays stale and still weighted). The two answer different questions and the\nrow says which one it answers.\n\n``detail`` is rendered server-side so every reader — the app banner, the\n``keel`` CLI, an agent over MCP — says the same thing about the same\nsymbol, including the staleness bound actually applied."},"UnreadCountResponse":{"properties":{"unread":{"type":"integer","title":"Unread"}},"type":"object","required":["unread"],"title":"UnreadCountResponse","description":"`GET /v1/notifications/unread-count` — the badge poll target (04-AC-3)."},"UnsubscribeAppliedResponse":{"properties":{"status":{"type":"string","title":"Status","default":"unsubscribed"},"scope":{"type":"string","title":"Scope"}},"type":"object","required":["scope"],"title":"UnsubscribeAppliedResponse","description":"`POST /v1/unsubscribe/one-click` success — the applied scope."},"UnsubscribeContextResponse":{"properties":{"scope":{"type":"string","title":"Scope"}},"type":"object","required":["scope"],"title":"UnsubscribeContextResponse","description":"`GET /v1/unsubscribe/context` — what a verified token would unsubscribe.\n\nRead-only companion to the one-click POST (spec 04 §5A latitude): the\npublic confirm page renders the scope from it and NOTHING is written."},"UpdateIntentResponse":{"properties":{"intent_id":{"type":"string","title":"Intent Id"},"intent_token":{"type":"string","title":"Intent Token"},"handoff_url":{"type":"string","title":"Handoff Url"},"expires_at":{"type":"string","title":"Expires At"},"status":{"type":"string","title":"Status"},"deployment_id":{"type":"string","title":"Deployment Id"},"strategy_id":{"type":"string","title":"Strategy Id"}},"type":"object","required":["intent_id","intent_token","handoff_url","expires_at","status","deployment_id","strategy_id"],"title":"UpdateIntentResponse"},"UpdateIntentStatusRequest":{"properties":{"intent_token":{"type":"string","maxLength":8192,"minLength":1,"title":"Intent Token"}},"additionalProperties":false,"type":"object","required":["intent_token"],"title":"UpdateIntentStatusRequest"},"UpdateIntentStatusResponse":{"properties":{"status":{"type":"string","title":"Status"},"intent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent Id"},"deployment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Id"},"strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Id"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"deployment_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Status"},"updated_version_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated Version String"},"remediation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remediation"}},"type":"object","required":["status"],"title":"UpdateIntentStatusResponse"},"UpdateLiveRequest":{"properties":{"schedule":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Schedule","description":"Optional cron spelling; it must equal the selected commit's derived schedule. Omit to reconcile automatically. On a deployment whose tranching block is being changed in this same request, the derived schedule is the one implied by the NEW block."},"intent_token":{"anyOf":[{"type":"string","maxLength":8192},{"type":"null"}],"title":"Intent Token","description":"Optional update-intent token when this update completes a handoff flow. Telemetry-only, mirroring DeployLiveRequest.intent_token: a valid token bound to this exact deployment makes the update emit handoff_completed (kind=update); it never gates or alters the update and carries no configuration."},"tranching":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tranching","description":"Three-way (see class docstring): omit to carry the current block, send a block ({\"mode\": \"equal_split\", \"count\": N, \"window\"?: M} or {\"mode\": \"custom\", \"times\": [\"HH:MM\", ...], \"window\"?: M}) to change it, or send null to remove it and return the deployment to a single fire per period. Setting a block requires the org's 'tranching' execution grant (403 without it); an invalid block is a 422 with the exact reason."},"execution_style":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Execution Style","description":"Three-way (see class docstring): omit to carry the current style, send the closed-world maker document to change it, or send null to disarm back to market. Setting a style requires the org's 'maker' execution grant (403 without it); an invalid document is a 422 with the exact parse reason."}},"type":"object","title":"UpdateLiveRequest","description":"Optional body for update-live endpoint.\n\n``tranching`` and ``execution_style`` are THREE-WAY (Q-0439). Pydantic's\n``model_fields_set`` distinguishes an omitted key from an explicit ``null``,\nand the three states mean different things:\n\n- **key absent** → CARRY the deployment's current block forward unchanged.\n  This is the historical behaviour and stays the default, so an update that\n  only advances the commit can never disturb an operator block.\n- **key present with a document** → CHANGE to that block (grant-gated and\n  parsed exactly as on deploy; the schedule is re-derived from it).\n- **key present and ``null``** → REMOVE the block. Disarming needs no\n  grant — an operator may always turn a capability off.\n\nBefore this, the only way to change either block was to stop the deployment\nand deploy again, which is precisely the path that silently drops tranching\n(the wizard does not carry it, see the DeployLiveRequest note)."},"UpdateLiveShareRequest":{"properties":{"show_dollar_values":{"type":"boolean","title":"Show Dollar Values","default":false},"show_positions":{"type":"boolean","title":"Show Positions","default":false},"include_strategy_source":{"type":"boolean","title":"Include Strategy Source","default":false},"show_creator_profile":{"type":"boolean","title":"Show Creator Profile","default":false},"discoverability":{"type":"string","enum":["unlisted","public"],"title":"Discoverability","default":"unlisted"},"title_override":{"anyOf":[{"type":"string","maxLength":140},{"type":"null"}],"title":"Title Override"},"about_markdown":{"anyOf":[{"type":"string","maxLength":6000},{"type":"null"}],"title":"About Markdown"},"expected_revision":{"type":"integer","minimum":1.0,"title":"Expected Revision"},"confirm_disclosure_widening":{"type":"boolean","title":"Confirm Disclosure Widening","default":false}},"additionalProperties":false,"type":"object","required":["expected_revision"],"title":"UpdateLiveShareRequest"},"UpdateLiveShareResponse":{"properties":{"share":{"$ref":"#/components/schemas/LiveShareLinkResponse"},"change_kind":{"type":"string","enum":["content","widen","narrow","mixed"],"title":"Change Kind"},"before_disclosure_summary":{"items":{"type":"string"},"type":"array","title":"Before Disclosure Summary"},"after_disclosure_summary":{"items":{"type":"string"},"type":"array","title":"After Disclosure Summary"}},"type":"object","required":["share","change_kind","before_disclosure_summary","after_disclosure_summary"],"title":"UpdateLiveShareResponse"},"UpdateNotificationPreferencesRequest":{"properties":{"operational":{"type":"boolean","title":"Operational"},"product_updates":{"type":"boolean","title":"Product Updates"},"announcements":{"type":"boolean","title":"Announcements"},"email_enabled":{"type":"boolean","title":"Email Enabled"},"in_app_enabled":{"type":"boolean","title":"In App Enabled"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"}},"additionalProperties":false,"type":"object","required":["operational","product_updates","announcements","email_enabled","in_app_enabled","timezone"],"title":"UpdateNotificationPreferencesRequest","description":"`PUT /v1/notification-preferences` body (04-AC-23).\n\nA FULL replace of exactly the spec 01 §3 fields — all six required, no\nothers accepted (no per-trigger toggles exist in v1, R-5). Two rules are\nenforced HERE, as validation errors and never silent ignores:\n\n- ``operational`` may not be disabled: operational (A/D) in-app delivery\n  is always-on (spec 01 §3, spec 04 §5's interpretation note), and\n  accepting-then-ignoring the flag is exactly the silent ignore 04-AC-23\n  bans. (``in_app_enabled``/``email_enabled`` remain lawful writes: the\n  channel booleans govern non-operational classes — spec 01 §3's\n  parenthetical exempts operational from them in the engine.)\n- ``timezone`` must be a real IANA zone name or null (spec 01 §3 —\n  explicit storage, never geoip)."},"UpdateOrgRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"UpdateOrgRequest","description":"Request body for PATCH /v1/orgs/{org_id}."},"UpdateSourceRequest":{"properties":{"source":{"type":"string","maxLength":250000,"title":"Source"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["source"],"title":"UpdateSourceRequest"},"UpdateSourceResponse":{"properties":{"valid":{"type":"boolean","title":"Valid"},"graph":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Graph"},"component_lock":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Component Lock"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","default":[]}},"type":"object","required":["valid"],"title":"UpdateSourceResponse"},"UpdateStrategyRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"source":{"anyOf":[{"type":"string","maxLength":250000},{"type":"null"}],"title":"Source"},"format":{"anyOf":[{"type":"string","enum":["dsl","graph"]},{"type":"null"}],"title":"Format"},"graph":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Graph"},"expected_source_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Source Hash"},"parent_version":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Parent Version"},"expected_head_commit_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Expected Head Commit Id"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"machine_emitted":{"type":"boolean","title":"Machine Emitted","default":false},"commit_provenance":{"anyOf":[{"$ref":"#/components/schemas/CommitProvenance"},{"type":"null"}]},"component_lock":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Component Lock"},"expected_lock_hash":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Expected Lock Hash"}},"type":"object","title":"UpdateStrategyRequest"},"UpdateVisibilityRequest":{"properties":{"visibility":{"type":"string","enum":["private","org","public","unlisted"],"title":"Visibility"}},"type":"object","required":["visibility"],"title":"UpdateVisibilityRequest"},"UpdateVisibilityResponse":{"properties":{"id":{"type":"string","title":"Id"},"visibility":{"type":"string","title":"Visibility"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","visibility","updated_at"],"title":"UpdateVisibilityResponse"},"UpgradeRequest":{"properties":{"plan":{"type":"string","title":"Plan"},"billing_cycle":{"type":"string","title":"Billing Cycle","default":"monthly"}},"type":"object","required":["plan"],"title":"UpgradeRequest"},"UpgradeResponse":{"properties":{"plan":{"type":"string","title":"Plan"},"status":{"type":"string","title":"Status"}},"type":"object","required":["plan","status"],"title":"UpgradeResponse"},"ValidateStrategyRequest":{"properties":{"source":{"type":"string","maxLength":250000,"minLength":1,"title":"Source"}},"type":"object","required":["source"],"title":"ValidateStrategyRequest"},"ValidateStrategyResponse":{"properties":{"valid":{"type":"boolean","title":"Valid"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","default":[]},"issues":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Issues","default":[]}},"type":"object","required":["valid"],"title":"ValidateStrategyResponse","description":"Full DSL validation verdict.\n\n`valid`/`errors` are the original (pre-B11-fix) shape and stay\nbackward-compatible: `errors` is the error-severity messages as plain\nstrings (keel-app's zod `validationResultSchema` requires string[]).\n`issues` is additive: the standard structured issue shape\n({severity, code, message, location, suggestion}) that the editor,\nchat-api, and backtest-submit gate all use."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VenueBlock":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"capital_class":{"type":"string","title":"Capital Class"}},"type":"object","required":["capital_class"],"title":"VenueBlock","description":"Which venue a deployment or account runs on, and its money class.\n\nPaper Trading v2, S01 §3.10 / IC-01-9. ``capital_class`` is\n``trading.accounts.capital_class`` (``real`` or ``practice``); ``code`` is\nthe venue's ``trading.venues.code`` (``HL``, ``PAPER``). On a deployment\nwhose ``account_id`` names no account row (no foreign key refuses one,\n``V6.0__deployments.sql:16``) the block reads ``{code: null,\ncapital_class: \"real\"}``: such a row predates paper and keeps its\npre-paper meaning. Clients key on this block, never on a probe."},"VersionResponse":{"properties":{"commit_id":{"type":"string","title":"Commit Id"},"sequence_number":{"type":"integer","title":"Sequence Number"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"source_hash":{"type":"string","title":"Source Hash"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"tags":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Tags","default":[]},"created_at":{"type":"string","title":"Created At"},"meta":{"additionalProperties":true,"type":"object","title":"Meta","default":{}},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"auth_surface":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Surface"}},"type":"object","required":["commit_id","sequence_number","source_hash","created_at"],"title":"VersionResponse"},"VersionSourceResponse":{"properties":{"source":{"type":"string","title":"Source"},"sequence_number":{"type":"integer","title":"Sequence Number"},"commit_id":{"type":"string","title":"Commit Id"},"source_hash":{"type":"string","title":"Source Hash"},"component_lock":{"additionalProperties":{"type":"integer"},"type":"object","title":"Component Lock","default":{}}},"type":"object","required":["source","sequence_number","commit_id","source_hash"],"title":"VersionSourceResponse"},"WeightHistoryPoint":{"properties":{"timestamp":{"type":"string","title":"Timestamp"},"weights":{"additionalProperties":{"type":"number"},"type":"object","title":"Weights"}},"type":"object","required":["timestamp","weights"],"title":"WeightHistoryPoint"},"WeightHistoryResponse":{"properties":{"points":{"items":{"$ref":"#/components/schemas/WeightHistoryPoint"},"type":"array","title":"Points"},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"}},"type":"object","required":["points"],"title":"WeightHistoryResponse"},"WeightResponse":{"properties":{"symbol":{"type":"string","title":"Symbol"},"weight":{"type":"number","title":"Weight"}},"type":"object","required":["symbol","weight"],"title":"WeightResponse"},"WeightsEnvelope":{"properties":{"signal_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signal Run Id"},"as_of_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of Time"},"weights":{"items":{"$ref":"#/components/schemas/WeightResponse"},"type":"array","title":"Weights"}},"type":"object","required":["weights"],"title":"WeightsEnvelope"},"_GenerateRequest":{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params"}},"additionalProperties":true,"type":"object","title":"_GenerateRequest","description":"Polymorphic generate request.\n\nEither `kind` + `params` are provided (canonical), or all fields are\nflat at the top level (legacy momentum-lab shape — auto-detected as\n`screen` kind). Extra fields are tolerated for legacy compatibility."},"_GenerateResponse":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"}},"type":"object","required":["code","name","description"],"title":"_GenerateResponse"},"src__schemas__sdk__CompileResponse":{"properties":{"compiled":{"type":"boolean","title":"Compiled"},"fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fingerprint"},"graph":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Graph"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","default":[]}},"type":"object","required":["compiled"],"title":"CompileResponse"},"src__schemas__sdk__LockUpgradeRequest":{"properties":{"source":{"type":"string","maxLength":250000,"title":"Source"},"component_lock":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Component Lock"},"components":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Components"}},"type":"object","required":["source"],"title":"LockUpgradeRequest"},"src__schemas__sdk__LockUpgradeResponse":{"properties":{"component_lock":{"additionalProperties":{"type":"integer"},"type":"object","title":"Component Lock"},"upgraded":{"items":{"type":"string"},"type":"array","title":"Upgraded","default":[]},"valid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Valid"},"issues":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Issues","default":[]},"changes":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Changes","default":[]}},"type":"object","required":["component_lock"],"title":"LockUpgradeResponse"},"src__schemas__strategies__CompileResponse":{"properties":{"spec":{"additionalProperties":true,"type":"object","title":"Spec"},"content_hash":{"type":"string","title":"Content Hash"}},"type":"object","required":["spec","content_hash"],"title":"CompileResponse"},"src__schemas__strategies__LockUpgradeRequest":{"properties":{"components":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Components"},"expected_head_commit_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Expected Head Commit Id"},"expected_source_hash":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Expected Source Hash"},"expected_lock_hash":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Expected Lock Hash"}},"type":"object","title":"LockUpgradeRequest","description":"Body for ``POST /{id}/lock/upgrade`` (spec 02, Contract): bump the\nnon-breaking pins among ``components`` (every drifting pin when omitted)\nand save them. The upgrade is computed from exactly the version the\ncaller read, so the caller must name it: ``expected_head_commit_id``\n(Q-2227 S1 — a lock move is a commit, so the version covers both the\nsource and the lock), or BOTH content hashes. Whatever is named and has\nmoved is a 409; naming neither is a 422."},"src__schemas__strategies__LockUpgradeResponse":{"properties":{"upgraded":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Upgraded"},"component_lock":{"additionalProperties":{"type":"integer"},"type":"object","title":"Component Lock"},"lock_hash":{"type":"string","title":"Lock Hash"},"valid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Valid"},"issues":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Issues","default":[]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"persisted":{"type":"boolean","title":"Persisted","default":false},"skipped_breaking":{"items":{"type":"string"},"type":"array","title":"Skipped Breaking","default":[]}},"type":"object","required":["upgraded","component_lock","lock_hash"],"title":"LockUpgradeResponse","description":"``POST /{id}/lock/upgrade``: the non-breaking pins it moved (saved\nthrough the PATCH path as one commit when the bumped lock validates and\ncompiles) and the breaking ones it left for a recomposition."}}}}