{"openapi":"3.1.0","info":{"title":"repowise hosted API","version":"0.16.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/memory":{"get":{"summary":"Health Memory","description":"Memory + artifact-cache gauge for early OOM warning.\n\nSeparate from the ``/health`` liveness probe so the Railway healthcheck\nstays a trivial 200. Read-only and fully defensive: any failure to read\na metric yields ``None`` for that field, never a non-200. ``status`` is\n``\"warn\"`` once the L1 cache crosses 80% of its byte budget, and a\nstructured warning is logged so an incident leaves a trail.","operationId":"health_memory_health_memory_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/memory/debug":{"get":{"summary":"Health Memory Debug","description":"Read-only memory-leak diagnostics. 404s unless ``memory_debug_token``\nis configured and matches ``token`` — inert in normal operation.\n\nAlways returns a gc object-type histogram (which TYPE is multiplying).\nDrive tracemalloc explicitly: ``trace=start`` captures a baseline,\n``trace=diff`` (later) returns the allocation SITES (file:line) that grew\nsince — i.e. where the leak is — and ``trace=stop`` ends tracing. Snapshots\nuse depth 1 and the whole collection runs in a worker thread so it never\nblocks the event loop; tracing is never auto-started or auto-snapshotted.","operationId":"health_memory_debug_health_memory_debug_get","parameters":[{"name":"token","in":"query","required":false,"schema":{"type":"string","default":"","title":"Token"}},{"name":"trace","in":"query","required":false,"schema":{"type":"string","description":"'start' | 'diff' | 'stop' | ''","default":"","title":"Trace"},"description":"'start' | 'diff' | 'stop' | ''"},{"name":"top","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":30,"title":"Top"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/me":{"get":{"tags":["auth"],"summary":"Get Me","operationId":"get_me_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/me/preferred-model":{"patch":{"tags":["auth"],"summary":"Update Preferred Model","description":"Persist the user's preferred LLM model id.\n\nThe catalogue lives in /billing/models; this endpoint stores an opaque\nstring. Pass `null` to clear the preference and fall back to the\ncatalogue default at request time.","operationId":"update_preferred_model_auth_me_preferred_model_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferredModelRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/me/theme":{"patch":{"tags":["auth"],"summary":"Update Theme Preference","description":"Persist the user's theme preference (system / light / dark / null).\n\n`null` clears the column so the client falls back to its default\n(system). Pydantic enforces the enum at request validation time so an\narbitrary string can't reach the column.","operationId":"update_theme_preference_auth_me_theme_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemePreferenceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/me/notification-preferences":{"patch":{"tags":["auth"],"summary":"Update Notification Preferences","description":"Replace the user's notification_preferences JSONB blob.\n\nPATCH semantics: callers send the full blob they want persisted (not\na partial diff). Defaults still apply at email-send time so missing\nkeys behave per `_DEFAULT_PREFS` in `email_service`.","operationId":"update_notification_preferences_auth_me_notification_preferences_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferencesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/link-anon":{"post":{"tags":["auth"],"summary":"Link Anon Id","description":"Associate a client-generated anonymous id with this account.\n\nThe CLI mints a random anon_id per machine before any sign-in and tags\ntelemetry with it; calling this at login stitches that pre-login history\nto the user. Idempotent; re-linking an id moves it to the caller (the\nid is machine-scoped and only ever presented by whoever holds it).","operationId":"link_anon_id_auth_link_anon_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkAnonRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Link Anon Id Auth Link Anon Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/sync":{"post":{"tags":["auth"],"summary":"Sync User","operationId":"sync_user_auth_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/models":{"get":{"tags":["billing"],"summary":"Get Supported Models","description":"Return supported LLM providers and models with pricing.","operationId":"get_supported_models_billing_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/checkout":{"post":{"tags":["billing"],"summary":"Create Checkout","description":"Create Pro subscription checkout → returns checkout_url.","operationId":"create_checkout_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/topup":{"post":{"tags":["billing"],"summary":"Create Topup","description":"Create a credit top-up checkout for a user-chosen whole-dollar amount.\n\nThe amount is validated by ``TopupRequest`` (1–500). The top-up product is\n$1/unit so we pass ``quantity = amount_dollars``; the ``payment.succeeded``\nwebhook credits ``topup_cents`` to the local balance.","operationId":"create_topup_billing_topup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/portal":{"get":{"tags":["billing"],"summary":"Get Portal","description":"Create Dodo customer portal session.","operationId":"get_portal_billing_portal_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"return_url","in":"query","required":true,"schema":{"type":"string","title":"Return Url"}}],"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"}}}}}}},"/billing/balance":{"get":{"tags":["billing"],"summary":"Get Balance","description":"Get current credit balance.\n\nWithout ``repo_id``: returns the user's personal balance.\nWith ``repo_id``: resolves which pool (personal or team) would be debited\nfor that repo and returns that pool's balance instead, so the UI always\nshows the balance that actually matters for the action the user is about\nto take.","operationId":"get_balance_billing_balance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When provided, returns the effective pool balance (team or personal) that would be debited for this repo.","title":"Repo Id"},"description":"When provided, returns the effective pool balance (team or personal) that would be debited for this repo."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingBalanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/transactions":{"get":{"tags":["billing"],"summary":"Get Transactions","description":"Transaction history for current user.","operationId":"get_transactions_billing_transactions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CreditTransactionResponse"},"title":"Response Get Transactions Billing Transactions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/estimate":{"post":{"tags":["billing"],"summary":"Estimate Cost","description":"Estimate LLM generation cost for a repo.","operationId":"estimate_cost_billing_estimate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostEstimateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostEstimateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/webhooks/dodo":{"post":{"tags":["billing"],"summary":"Handle Dodo Webhook","description":"Handle incoming Dodo Payments webhook events.","operationId":"handle_dodo_webhook_billing_webhooks_dodo_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/teams/{team_id}/checkout":{"post":{"tags":["billing"],"summary":"Create Team Checkout","description":"Start a per-seat Teams subscription checkout. Owner/admin only.","operationId":"create_team_checkout_billing_teams__team_id__checkout_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamSeatCheckoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/teams/{team_id}":{"get":{"tags":["billing"],"summary":"Get Team Billing","description":"Team billing snapshot: tier, seats, pool balance, reset date.","operationId":"get_team_billing_billing_teams__team_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamBillingStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/teams/{team_id}/topup":{"post":{"tags":["billing"],"summary":"Create Team Topup","description":"Top up the shared team pool (a $1/unit one-time payment). Owner/admin.","operationId":"create_team_topup_billing_teams__team_id__topup_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamTopupRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/teams/{team_id}/portal":{"get":{"tags":["billing"],"summary":"Get Team Portal","description":"Open the Dodo customer portal for the team's subscription. Owner/admin.","operationId":"get_team_portal_billing_teams__team_id__portal_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"return_url","in":"query","required":true,"schema":{"type":"string","title":"Return Url"}}],"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"}}}}}}},"/billing/teams/{team_id}/transactions":{"get":{"tags":["billing"],"summary":"Get Team Transactions","description":"Shared-pool ledger for the team. Any member may read.","operationId":"get_team_transactions_billing_teams__team_id__transactions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CreditTransactionResponse"},"title":"Response Get Team Transactions Billing Teams  Team Id  Transactions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/internal/finalize-indexing":{"post":{"tags":["billing"],"summary":"Finalize Indexing","description":"Called by Modal after successful doc generation to finalize credit debit.\n\nPricing is single-sourced here: when the indexer reports real token\ncounts we recompute the authoritative cost from ``llm_pricing``\n(model-aware, 2× markup) rather than trusting the indexer-side\nnumber. We also write the reconciled cost back onto the snapshot so\nthe displayed ``llm_cost_cents`` matches what was actually billed.","operationId":"finalize_indexing_billing_internal_finalize_indexing_post","parameters":[{"name":"x-service-token","in":"header","required":true,"schema":{"type":"string","title":"X-Service-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeIndexingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/internal/release-hold":{"post":{"tags":["billing"],"summary":"Release Hold","description":"Called by Modal on generation failure to release credit hold.\n\nRoutes the refund to the shared team pool when ``snapshot_id`` is supplied\nand the snapshot is team-owned; otherwise the personal balance. The\nsnapshot_id is optional for backward compatibility with indexer builds that\ndon't yet send it — those release to the user (the historical behaviour),\nso a lagging Modal deploy degrades safely for personal holds.","operationId":"release_hold_billing_internal_release_hold_post","parameters":[{"name":"x-service-token","in":"header","required":true,"schema":{"type":"string","title":"X-Service-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseHoldRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/internal/settle-prose":{"post":{"tags":["billing"],"summary":"Settle Prose","description":"Settle one scoped-prose job's billing (Phase 3), called by Modal.\n\nIdempotent via the ledger claim on ``prose_jobs``: exactly one of\n``settled_at`` / ``hold_released_at`` is claimed first-writer-wins, so a\nduplicate Modal dispatch, a replayed callback, or a timeout reconciliation\ncan neither double-charge nor double-refund. Billing account (personal vs\nteam pool) and the estimated hold come from the claimed row, never the\npayload. Pricing stays single-sourced: real token counts recompute the\nauthoritative cost via ``llm_pricing``.","operationId":"settle_prose_billing_internal_settle_prose_post","parameters":[{"name":"x-service-token","in":"header","required":true,"schema":{"type":"string","title":"X-Service-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProseSettleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/internal/prose-auto-refresh":{"post":{"tags":["billing"],"summary":"Prose Auto Refresh","description":"Decide whether a just-ready snapshot should get AI explanations written.\n\nLives beside the other Modal-facing internal routes because it is the same\ntrust boundary and, like them, it can move money: the decision it reaches\nmay place a credit hold. The indexer cannot make this call itself -- the\npolicy, the selection, the billing principal and the daily cap all live in\nthe backend, and the ``prose_jobs`` hold/settle ledger is only ever written\nfrom here.\n\n``mode=\"authorize\"`` returns the authorization for the caller to act on,\nwhich is what lets the indexer write explanations in the container that\nalready holds the parsed tree. ``mode=\"spawn\"`` (the default, and what a\npre-existing deploy sends) dispatches a dedicated container instead. Either\nway the money is committed here and settled through the same ledger claim.\n\nAlways 200 with a reason. The caller is a best-effort callback on an\nalready-published snapshot, so \"we decided not to\" and \"we could not decide\"\nmust be equally harmless; an exception here would be retried by nobody and\nread as a failure of an index run that in fact succeeded.","operationId":"prose_auto_refresh_billing_internal_prose_auto_refresh_post","parameters":[{"name":"x-service-token","in":"header","required":true,"schema":{"type":"string","title":"X-Service-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProseAutoRefreshRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/chat/conversations":{"get":{"tags":["chat"],"summary":"List Conversations","description":"List live conversations for a snapshot, pinned first.\n\nTitle comes from `chat_conversations.title` when set, otherwise the\nexcerpt of the first user message, matching pre-016 behaviour.\nSoft-deleted conversations are excluded. The `chat_messages` scan stays\nbounded by offset/limit so a runaway history cannot pull an unbounded\nresult set.","operationId":"list_conversations_snapshots__snapshot_id__chat_conversations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"default":2000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/chat/conversations/{conversation_id}":{"patch":{"tags":["chat"],"summary":"Update Conversation","description":"Rename and/or pin. Body: `{\"title\": \"...\"}` and/or `{\"pinned\": bool}`.\n\nAn empty or null title clears the override and reverts to the derived\nfirst-user-message excerpt. Owner-only via the `chat_messages` check;\nRLS would also block a cross-user write, but 404-ing explicitly keeps\nthis surface consistent with DELETE.","operationId":"update_conversation_snapshots__snapshot_id__chat_conversations__conversation_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["chat"],"summary":"Get Conversation","description":"Get all messages in a conversation, each with its artifacts.","operationId":"get_conversation_snapshots__snapshot_id__chat_conversations__conversation_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["chat"],"summary":"Delete Conversation","description":"Soft-delete a conversation. Messages are kept so restore is lossless.","operationId":"delete_conversation_snapshots__snapshot_id__chat_conversations__conversation_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/chat/conversations/{conversation_id}/restore":{"post":{"tags":["chat"],"summary":"Restore Conversation","description":"Undo a soft delete.","operationId":"restore_conversation_snapshots__snapshot_id__chat_conversations__conversation_id__restore_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/chat/conversations/{conversation_id}/fork":{"post":{"tags":["chat"],"summary":"Fork Conversation","description":"Branch a conversation into a new one.\n\nBody takes an optional `through_message_id` (keep that message) or\n`before_message_id` (stop just short of it); at most one. Omitting both\ncopies the whole conversation.","operationId":"fork_conversation_snapshots__snapshot_id__chat_conversations__conversation_id__fork_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/chat/conversations/{conversation_id}/artifacts/{artifact_id}":{"get":{"tags":["chat"],"summary":"Get Conversation Artifact","description":"One artifact by id, for deep-links into a past turn.","operationId":"get_conversation_artifact_snapshots__snapshot_id__chat_conversations__conversation_id__artifacts__artifact_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["chat"],"summary":"Update Conversation Artifact","description":"Pin or unpin an artifact. Body: `{\"pinned\": bool}`.","operationId":"update_conversation_artifact_snapshots__snapshot_id__chat_conversations__conversation_id__artifacts__artifact_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/chat":{"post":{"tags":["chat"],"summary":"Chat Message","description":"Send a chat message and stream the response via SSE.","operationId":"chat_message_snapshots__snapshot_id__chat_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/github-app/link-installation":{"post":{"tags":["github-app"],"summary":"Link Installation","description":"Link a GitHub App installation to the current user's account.\n\nCalled by the frontend after GitHub redirects back with ?installation_id=...\nThe webhook may or may not have already fired — this handles both cases.","operationId":"link_installation_github_app_link_installation_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/github-app/bot-overview":{"get":{"tags":["github-app"],"summary":"Bot Overview","description":"Aggregated payload for the /settings?tab=bot management page.\n\nReturns the user's claimed bot installs (with covered repos and\nlatest-snapshot metadata), unclaimed bot installs they could claim\n(username match OR an org they belong to, when ``X-GitHub-Token`` is\nsupplied), and ``github_username`` itself so the frontend doesn't\nneed a separate /auth/me round-trip.\n\nPassing ``X-GitHub-Token`` (the Supabase session's provider_token)\nenables org-install discovery. The backend cross-checks the token's\nGitHub identity against the user's ``github_username`` before\nenumerating orgs — submitting someone else's token is a no-op.","operationId":"bot_overview_github_app_bot_overview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"x-github-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Github-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/github-app/unclaimed-bot-installs":{"get":{"tags":["github-app"],"summary":"Get Unclaimed Bot Installs","description":"Return any bot installations whose ``account_login`` matches the\nsigned-in user's GitHub username and which haven't been claimed yet.\n\nUsed by the dashboard banner on /s/{short_id} and /repos/mine to\nprompt the user to claim their bot-indexed repos. Personal installs\nare also auto-claimed on /auth/sync — this endpoint primarily\nsurfaces Organization installs (which need an admin click-through).","operationId":"get_unclaimed_bot_installs_github_app_unclaimed_bot_installs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/github-app/claim-bot-installation/{installation_id}":{"post":{"tags":["github-app"],"summary":"Claim Bot Installation Endpoint","description":"Claim a single bot installation for the signed-in user.\n\n* ``account_type=User``: claimed if ``account_login`` matches the\n  user's ``github_username``. (Personal installs are also\n  auto-claimed on /auth/sync — this endpoint is the manual fallback.)\n* ``account_type=Organization``: requires the user to be an admin of\n  the org, verified via ``GET /orgs/{org}/memberships/{user}`` using\n  the user's GitHub OAuth provider token (passed in the request body\n  as ``provider_token`` or in the ``X-GitHub-Token`` header).","operationId":"claim_bot_installation_endpoint_github_app_claim_bot_installation__installation_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"installation_id","in":"path","required":true,"schema":{"type":"integer","title":"Installation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/github-app/bot-repos/{repo_id}/enabled":{"patch":{"tags":["github-app"],"summary":"Set Bot Repo Enabled","description":"Flip ``repos.bot_enabled`` for a repo covered by one of the\ncaller's claimed bot installations.\n\nThe DB toggle wins over ``.repowise/bot.yaml { enabled: ... }`` — the\nbot checks this column before fetching the YAML, so a reviewer can\nsilence a noisy repo without opening a PR.","operationId":"set_bot_repo_enabled_github_app_bot_repos__repo_id__enabled_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/github-app/bot-repos/{repo_id}/config":{"patch":{"tags":["github-app"],"summary":"Set Bot Repo Config","description":"Merge a per-repo PR-bot config patch into ``repos.bot_config``.\n\nThese presentation controls (comment mode, per-section visibility, the\nscore-drop threshold, ignored paths) are the dashboard counterpart to\n``.repowise/bot.yaml`` and win over it -- the bot overlays them on top of\nthe in-repo YAML at analysis time. The master on/off switch stays on the\ndedicated ``/enabled`` route. Only the keys present in the payload are\nchanged, so the UI can send partial updates.","operationId":"set_bot_repo_config_github_app_bot_repos__repo_id__config_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/github-app/bot-activity":{"get":{"tags":["github-app"],"summary":"Get Bot Activity","description":"Recent bot_pr_comments rows for one of the caller's claimed bot\ninstallations, joined to repos so the UI can render\n``{owner}/{name}#{pr_number}`` rows with PR + snapshot links.","operationId":"get_bot_activity_github_app_bot_activity_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"installation_id","in":"query","required":true,"schema":{"type":"integer","title":"Installation Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/github-app/installations":{"get":{"tags":["github-app"],"summary":"Get Installations","description":"Return all active GitHub App installations linked to the current user.","operationId":"get_installations_github_app_installations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/github-app/repos":{"get":{"tags":["github-app"],"summary":"Get Private Repos","description":"Return all private repos accessible via the current user's installations.","operationId":"get_private_repos_github_app_repos_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/github-app/installations/{installation_id}":{"delete":{"tags":["github-app"],"summary":"Unlink Installation","description":"Unlink a GitHub App installation from the current user's account.\n\nThis does NOT uninstall the app from GitHub — the user must do that\nvia github.com/settings/installations. This only removes the Repowise association.","operationId":"unlink_installation_github_app_installations__installation_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"installation_id","in":"path","required":true,"schema":{"type":"integer","title":"Installation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/notify":{"post":{"tags":["internal"],"summary":"Notify","operationId":"notify_internal_notify_post","parameters":[{"name":"x-service-token","in":"header","required":true,"schema":{"type":"string","title":"X-Service-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/indexing-check":{"post":{"tags":["internal"],"summary":"Indexing Check","description":"Complete the GitHub Check Run for a finished reindex.\n\nDistinct from ``/notify``: that callback only fires for user-initiated\nruns (``user_id`` is set). Auto-sync reindexes — the very ones that\ncreate a check — run with ``user_id=None``, so Modal calls this endpoint\nunconditionally when a snapshot flips to ``ready`` / ``failed``.\n\nLooks up the snapshot's persisted ``github_check_run_id`` and PATCHes the\nrun to success/failure. A no-op (no check created for this snapshot, no\ninstall covering the repo, checks disabled) returns ``ok`` silently.\nStrictly best-effort — a failure here must never break indexing.","operationId":"indexing_check_internal_indexing_check_post","parameters":[{"name":"x-service-token","in":"header","required":true,"schema":{"type":"string","title":"X-Service-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexingCheckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/notifications/email":{"post":{"tags":["internal"],"summary":"Notify Email","description":"Email-only dispatch for notifications Modal already inserted.\n\nThe modal-side producers (security crons, signals cron) insert their\nnotification rows directly with one-unread-per-repo dedupe and then\nhit this endpoint, so the insert never depends on API availability\nwhile email rendering and Resend config stay backend-side. Callers\nonly invoke it after a successful (non-deduped) insert, which is\nwhat keeps email volume bounded by the dedupe.","operationId":"notify_email_internal_notifications_email_post","parameters":[{"name":"x-service-token","in":"header","required":true,"schema":{"type":"string","title":"X-Service-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyEmailRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/notify-admins":{"post":{"tags":["internal"],"summary":"Notify Admins","description":"System email to the hardcoded admin recipient list.\n\nUsed by Modal at the end of `run_chain` (the content-engine pipeline)\nto ping the team that a new draft is ready for review. Bypasses the\nper-user notification flow on purpose — see\n``app.services.admin_notifications`` for the rationale.","operationId":"notify_admins_internal_notify_admins_post","parameters":[{"name":"x-service-token","in":"header","required":true,"schema":{"type":"string","title":"X-Service-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyAdminsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp/{owner}/{name}":{"post":{"tags":["mcp"],"summary":"Mcp Endpoint","description":"JSON-RPC entry point for an MCP client targeting a single repo.\n\nResolves the caller's snapshot once per request and dispatches the\nJSON-RPC method. We accept a single request object — batched\nrequests aren't part of MCP Streamable HTTP, so we don't.","operationId":"mcp_endpoint_mcp__owner___name__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","title":"Owner"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["mcp"],"summary":"Mcp Get","description":"GET on the MCP endpoint — 405, because we offer no SSE stream here.\n\nA Streamable HTTP client may GET the endpoint to open an SSE channel\nfor server-initiated messages. We never push any, and 405 with an\n``Allow`` header is the transport's answer for \"no stream at this\nendpoint\" — the one response a conforming client treats as final.\n\nThis used to return a friendly 200 with a JSON hint, which is what a\nclient sees as \"the stream died\": it reconnected forever. In July\n2026 that loop was 80% of all production requests (~600k/day from\nsix clients, zero successful tool calls). The hint survives in the\n405 body, so a curl probe still learns the right method.","operationId":"mcp_get_mcp__owner___name__get","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","title":"Owner"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp/tools":{"get":{"tags":["mcp"],"summary":"Get Mcp Tools","description":"This caller's MCP tool surface for a repo, with default + enabled flags.","operationId":"get_mcp_tools_mcp_tools_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"query","required":true,"schema":{"type":"string","title":"Repo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Mcp Tools Mcp Tools Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["mcp"],"summary":"Update Mcp Tools","description":"Persist this caller's MCP tool-surface override; echo the resolved surface.\n\n``write`` scope, because an API key minted for reading a repo has no\nbusiness reshaping what tools that repo's agents are offered. A dashboard\nsession (``auth_scopes is None``) carries every scope, which is where this\nis edited from. Same gate the write-tool dispatch uses.","operationId":"update_mcp_tools_mcp_tools_patch","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpToolsUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Mcp Tools Mcp Tools Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/oauth-protected-resource/{rest}":{"get":{"tags":["oauth"],"summary":"Protected Resource Metadata","operationId":"protected_resource_metadata__well_known_oauth_protected_resource__rest__get","parameters":[{"name":"rest","in":"path","required":true,"schema":{"type":"string","title":"Rest"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"tags":["oauth"],"summary":"Protected Resource Metadata","operationId":"protected_resource_metadata__well_known_oauth_protected_resource_get","parameters":[{"name":"rest","in":"query","required":false,"schema":{"type":"string","default":"","title":"Rest"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/oauth-authorization-server/{rest}":{"get":{"tags":["oauth"],"summary":"Authorization Server Metadata","operationId":"authorization_server_metadata__well_known_oauth_authorization_server__rest__get","parameters":[{"name":"rest","in":"path","required":true,"schema":{"type":"string","title":"Rest"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/oauth-authorization-server":{"get":{"tags":["oauth"],"summary":"Authorization Server Metadata","operationId":"authorization_server_metadata__well_known_oauth_authorization_server_get","parameters":[{"name":"rest","in":"query","required":false,"schema":{"type":"string","default":"","title":"Rest"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/register":{"post":{"tags":["oauth"],"summary":"Register Client","operationId":"register_client_oauth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientRegistrationRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/clients/{client_id}":{"get":{"tags":["oauth"],"summary":"Get Client Public","operationId":"get_client_public_oauth_clients__client_id__get","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Client Public Oauth Clients  Client Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/authorize":{"post":{"tags":["oauth"],"summary":"Authorize","description":"Mint an authorization code for the approving user. Returns the URL the\nbrowser should be redirected to (``redirect_uri`` + ``code`` + ``state``).\n\nThe frontend has already authenticated the user (Supabase session) and\nshown the consent UI; this endpoint enforces the protocol invariants.","operationId":"authorize_oauth_authorize_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Authorize Oauth Authorize Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/oauth/token":{"post":{"tags":["oauth"],"summary":"Token","operationId":"token_oauth_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_token_oauth_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/connections":{"get":{"tags":["oauth"],"summary":"List Connections","operationId":"list_connections_oauth_connections_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Connections Oauth Connections Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/oauth/connections/{client_id}":{"delete":{"tags":["oauth"],"summary":"Revoke Connection","description":"Revoke a connection. Without ``device_name``, every grant for the\nclient goes; with it, only that device's grant (the connected-apps list\nshows one row per device for CLI/editor sign-ins).","operationId":"revoke_connection_oauth_connections__client_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"device_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Revoke Connection Oauth Connections  Client Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/activity":{"get":{"tags":["me"],"summary":"Get Activity","description":"Recent activity for the calling user — UNION across snapshots,\nuser_repos, and credit_transactions, ordered newest first.\n\nPagination: pass `next_cursor` from the previous response as `before`\nto fetch the next page. Cursor is opaque base64 — do not parse.","operationId":"get_activity_me_activity_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor from a prior page","title":"Before"},"description":"Opaque cursor from a prior page"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityFeedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/notifications":{"get":{"tags":["me"],"summary":"List Notifications","description":"List notifications for the calling user (newest first) with the\nunread-count for the bell badge.","operationId":"list_notifications_me_notifications_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationsListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["me"],"summary":"Clear Read Notifications","description":"Delete the caller's already-read notifications.\n\nRead rows only. \"Clear all\" that also discards unread rows destroys\nsomething the user has not seen, and the one-click undo for that does not\nexist. Unread rows stay until they are read.","operationId":"clear_read_notifications_me_notifications_delete","security":[{"HTTPBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/me/api-keys":{"get":{"tags":["me"],"summary":"List Api Keys","operationId":"list_api_keys_me_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKeyResponse"},"type":"array","title":"Response List Api Keys Me Api Keys Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["me"],"summary":"Create Api Key","description":"Mint a new API key. The plaintext secret is in the response only\nhere; subsequent GET responses redact it. Show it to the user once\nin a copy-on-display dialog.","operationId":"create_api_key_me_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/me/api-keys/{key_id}":{"delete":{"tags":["me"],"summary":"Revoke Api Key","operationId":"revoke_api_key_me_api_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/export":{"post":{"tags":["me"],"summary":"Request Account Export","operationId":"request_account_export_me_export_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/me/notifications/{notification_id}/read":{"post":{"tags":["me"],"summary":"Mark Notification Read","description":"Mark a single notification as read. Idempotent: a second call is a\nno-op against an already-read row.\n\nRe-asserts owner via `eq(\"user_id\", user.id)` so a leaked id from\nanother user yields 404, not a successful update on someone else's\nrow (the RLS policy already enforces this — defence in depth).","operationId":"mark_notification_read_me_notifications__notification_id__read_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","title":"Notification Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/notifications/read-all":{"post":{"tags":["me"],"summary":"Mark All Notifications Read","description":"Mark every unread notification read in one statement.\n\nThe bell had no way to do this, so clearing a backlog meant clicking each\nrow. Filtered on unread rather than updating everything, so the read\ntimestamp on rows the user already dealt with is not rewritten.","operationId":"mark_all_notifications_read_me_notifications_read_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/me/deletion":{"post":{"tags":["me"],"summary":"Request Account Deletion","description":"Schedule this account for deletion.\n\nJWT-only, matching ``POST /me/export``: an API key is a machine credential\nthat tends to outlive the person who minted it and sits in CI config, and\nclosing the account is not something it should be able to do. The gate is\nthe same one the export uses for the same reason.","operationId":"request_account_deletion_me_deletion_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeletionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeletionResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeletionBlockedResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/me/deletion/cancel":{"post":{"tags":["me"],"summary":"Cancel Account Deletion","description":"Call off a scheduled deletion and return the restored account.\n\nDeliberately does NOT depend on ``get_current_user``. That dependency is\nwhat locks a pending-deletion account out (403 on every route), so a\ncancel endpoint behind it could only ever be called by someone who has\nnothing to cancel. app/dependencies.py anticipates exactly this: \"they\nonly see the cancel-deletion endpoint via a special path\".\n\nSo this resolves the caller the way ``POST /auth/sync`` does — decode the\nsession JWT, trust ``sub`` — which also scopes the escape hatch to a real\nbrowser session:\n\n* An API key is not a JWT, so ``_decode_token`` rejects it.\n* An OAuth access token IS an HS256 JWT signed with the same secret by\n  default (``oauth_signing_secret`` falls back to ``supabase_jwt_secret``),\n  but ``_decode_token`` verifies ``audience=\"authenticated\"`` and OAuth\n  tokens carry the resource audience instead, so it is rejected too.\n  That is load-bearing: dropping the audience check in some future\n  refactor would open this route to every MCP connector token.\n* ``sub`` is read only after the signature verifies, and is the sole\n  identity used, so a caller cannot act on anyone but themselves.\n\nNOTE: no route-level rate-limit dependency, and that is not an oversight.\nEvery limiter in app/rate_limit.py is built on ``tier_rate_limit``, whose\n``_enforce`` takes ``user: CurrentUser = Depends(get_current_user)``.\nFastAPI resolves route dependencies before the handler body, so attaching\none here reintroduces the 403 through the back door and makes this\nendpoint permanently unreachable for the only people who need it. The cap\nis applied inside the body instead, via ``enforce_shared_bucket``.","operationId":"cancel_account_deletion_me_deletion_cancel_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/repos/index":{"post":{"tags":["repos"],"summary":"Index Repo","operationId":"index_repo_repos_index_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexRepoRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexRepoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/repos/{repo_id}/reindex":{"post":{"tags":["repos"],"summary":"Reindex Repo","description":"Force a fresh re-index of a repo against its current HEAD.\n\nThe optional body lets the caller opt into regenerating AI docs on\nthis re-index — same `generate_docs` / `docs_file_percentage` knobs\nas ``POST /repos/index``. When ``generate_docs=True`` the credit-hold\ngate from the initial-index path runs unchanged: free → 403, Pro →\natomic credit hold, admin → no hold.","operationId":"reindex_repo_repos__repo_id__reindex_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReindexRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexRepoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/branches":{"get":{"tags":["repos"],"summary":"List Repo Branches","description":"List branches for a GitHub repo so the dashboard form can offer\na branch picker at index time.\n\nPublic repos use anon GitHub API. Private repos resolve through the\ncaller's GitHub App installation token — keeping the same ACL model\nas ``/repos/index`` so a private repo never leaks its branch list\nto a non-installed user.\n\nOne page of 100 is the whole budget. Paginating to completion would be\n15 sequential calls on a repo like ``langchain-ai/langchain`` against an\nanon hourly quota of 60, per settled keystroke. Two things make one page\nenough instead:\n\n* The default branch is **pinned**, never merely hoped for. GitHub pages\n  branches alphabetically, so ``master`` sits outside page one on that\n  repo and the picker could not offer it at all — the whole reason this\n  endpoint grew an envelope.\n* ``q`` searches server-side through ``git/matching-refs``, which\n  prefix-matches across every ref in one call, so a branch beyond page\n  one is reachable by typing rather than by paging.\n\n``truncated`` tells the caller its list is partial so it can say so; a\nsilent cap reads to the user as \"these are all the branches\".","operationId":"list_repo_branches_repos_branches_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","title":"Url"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":250},{"type":"null"}],"description":"Prefix-match branch names, e.g. 'release/' or 'mas'.","title":"Q"},"description":"Prefix-match branch names, e.g. 'release/' or 'mas'."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoBranchList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{owner}/{name}/latest":{"get":{"tags":["repos"],"summary":"Get Latest Snapshot","description":"Return the latest ready snapshot for a public repo (no auth required).\n\nAnonymous callers get the same payload minus the ownership answer:\n``can_write`` is false for them, which is true.\n\n\"Public repo\" is enforced, not assumed: private repos are readable only by\na caller with a relationship to them (owner, library link, or team share),\nand 404 rather than 403 for everyone else, matching the anti-enumeration\nconvention in ``snapshots.py``.","operationId":"get_latest_snapshot_repos__owner___name__latest_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","title":"Owner"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/explore":{"get":{"tags":["repos"],"summary":"Explore Repos","description":"List recently-indexed public repos.\n\n``q`` searches (case-insensitive substring) across owner/name/\ndescription over ALL public indexed repos, not just the loaded page.\n``language`` filters to one ``primary_language`` and ``sort`` orders the\nfull set (``recent`` | ``stars`` | ``files``) server-side, so both apply\nacross every public repo rather than just the loaded page.\n``managed=True`` returns only Repowise-curated repos (the featured\nrow on Explore + Landing); ``managed=False`` excludes them; omit to\ninclude everything. The viewer never re-fetches: each row carries\nenough metadata for the universal RepoCard to render a rich card.\n\nThe deduped total (over the full filtered set, ignoring limit/offset)\nis returned in the ``X-Total-Count`` header so the client can render\nbottom pagination. The body stays a bare list, so the SEO/sitemap\ncallers that only read the array are unaffected.","operationId":"explore_repos_repos_explore_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":60,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"managed","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Managed"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"recent","title":"Sort"}},{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExploreRepoResponse"},"title":"Response Explore Repos Repos Explore Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/explore/languages":{"get":{"tags":["repos"],"summary":"Explore Languages","description":"Distinct primary languages across the public feed, most-common first.\n\nBacks the Explore language filter so its options come from the whole\ncorpus (deduped per repo), not just the cards the client has loaded.","operationId":"explore_languages_repos_explore_languages_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ExploreLanguageResponse"},"type":"array","title":"Response Explore Languages Repos Explore Languages Get"}}}}}}},"/repos/leaderboard":{"get":{"tags":["repos"],"summary":"Health Leaderboard","description":"Curated public repos ranked by deterministic code-health score.\n\nCurated-only by design. Ranking every public repo does not survive contact\nwith the data: the score is size-biased below ~100 files, a file-count\nfloor does not fix it because documentation-only repos score near 10, and\nfiltering on commit/contributor activity surfaces mostly personal forks of\nwell-known projects, which `repos` has no `is_fork` column to exclude. The\nfull measurements are in migration 099.","operationId":"health_leaderboard_repos_leaderboard_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LeaderboardEntryResponse"},"title":"Response Health Leaderboard Repos Leaderboard Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{repo_id}/generate-docs":{"post":{"tags":["repos"],"summary":"Generate Docs For Repo","description":"Generate AI documentation for a repo's latest snapshot.\n\nThe \"adopt-docs\" entrypoint: a paying viewer can produce docs for a\npublic repo that someone else indexed without docs. Requires Pro or\nAdmin (free tier rejected upstream by ``_gate_docs_credit_hold``).\n\nBehaviour:\n  * Public repo + caller already in ``user_repos`` → re-uses the\n    existing link.\n  * Public repo + caller not yet linked → upserts a ``user_repos``\n    row pointing at the latest ready snapshot before charging the\n    hold; lets the new viewer see the repo on their dashboard.\n  * Private repo + caller not in ``user_repos`` → 404 (adopt does\n    not bypass GitHub-App access control).\n  * Latest ready snapshot already has ``docs_artifact_path`` →\n    short-circuit, no Modal job, no charge. Caller gets the existing\n    snapshot and a fresh ``user_repos`` link.\n  * Otherwise → runs the existing reindex pipeline with\n    ``generate_docs=True`` (parse is fast; the LLM is the cost the\n    caller is paying for).","operationId":"generate_docs_for_repo_repos__repo_id__generate_docs_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GenerateDocsRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexRepoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{repo_id}/prose/estimate":{"post":{"tags":["repos"],"summary":"Estimate Prose","description":"Resolve a selection and return one cost estimate. No hold, no charge.","operationId":"estimate_prose_repos__repo_id__prose_estimate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ProseSelectionBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProseEstimateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{repo_id}/prose/generate":{"post":{"tags":["repos"],"summary":"Generate Prose Endpoint","description":"Place one hold and spawn scoped prose for the resolved eligible pages.","operationId":"generate_prose_endpoint_repos__repo_id__prose_generate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ProseSelectionBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProseGenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{repo_id}/prose/status":{"get":{"tags":["repos"],"summary":"Prose Status","description":"Prose-job lifecycle for one snapshot -- never wiki availability.\n\n``snapshot`` pins the answer the same way the estimate and generate bodies\ndo. Without it this endpoint would keep reporting the latest snapshot's job\nwhile the client polls a job it just started on a different one, which would\nmake the targeting above pointless the moment progress is rendered.","operationId":"prose_status_repos__repo_id__prose_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}},{"name":"snapshot","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProseStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{repo_id}":{"delete":{"tags":["repos"],"summary":"Delete Repo","description":"Remove a repo from the user's dashboard. Deletes fully if no other users reference it.","operationId":"delete_repo_repos__repo_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{repo_id}/managed":{"patch":{"tags":["repos"],"summary":"Toggle Repowise Managed","description":"Admin-only: flip ``repos.repowise_managed`` for a repo.\n\nLets the Repowise team mark featured/curated repos (e.g. fastapi,\nnext.js, repowise) so the redesigned Explore page and Landing\nsurface them with a distinct treatment.\n\nKept here rather than folded into ``/admin/repos`` because the dashboard\nrepo card has always called this path and the admin fleet PATCH delegates\nto the same helper underneath.","operationId":"toggle_repowise_managed_repos__repo_id__managed_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoManagedToggleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{short_id}":{"patch":{"tags":["repos"],"summary":"Update Repo","description":"Update editable repo settings: name, default branch, exclude patterns,\npage-volume override, and the AI-explanation refresh policy.\n\n``short_id`` accepts either a snapshot short_id or the repo UUID, matching\nthe resolution rules used by ``PATCH /repos/{short_id}/auto-sync``.\n\nOwner-only: enforced via ``user_repos``. Does not trigger a re-index;\nthat is a separate explicit action via ``POST /repos/{repo_id}/reindex``.","operationId":"update_repo_repos__short_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"short_id","in":"path","required":true,"schema":{"type":"string","title":"Short Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{short_id}/auto-sync":{"patch":{"tags":["repos"],"summary":"Update Auto Sync","description":"Toggle auto-sync (push-webhook + polling fallback) for a repo.\n\n``short_id`` may be either a snapshot short_id (12 chars) or the\nrepo's UUID — the latter for parity with ``/repos/{repo_id}/reindex``.","operationId":"update_auto_sync_repos__short_id__auto_sync_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"short_id","in":"path","required":true,"schema":{"type":"string","title":"Short Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoSyncToggleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/mine":{"get":{"tags":["repos"],"summary":"Get My Repos","operationId":"get_my_repos_repos_mine_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserRepoResponse"},"type":"array","title":"Response Get My Repos Repos Mine Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/snapshots/{snapshot_id}":{"get":{"tags":["snapshots"],"summary":"Get Snapshot","operationId":"get_snapshot_snapshots__snapshot_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/progress":{"get":{"tags":["snapshots"],"summary":"Get Snapshot Progress","description":"Live progress for one snapshot, shaped for polling.\n\nThis exists so the browser stops reading the `snapshots` table directly.\nThat read gave the client a standing view of every column the table will\never grow, and pinned the poll's shape to a frontend deploy.\n\nRead-only and cheap by construction: one narrow projection, no row cache,\nno per-caller computation. Rate limiting is the global SlowAPI backstop --\n`tier_rate_limit` depends on `get_current_user` and would refuse the\nanonymous viewers who can legitimately watch a public repo index.","operationId":"get_snapshot_progress_snapshots__snapshot_id__progress_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotProgressResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/search":{"post":{"tags":["search"],"summary":"Search","description":"Search the snapshot. Semantic when embeddings are ready, keyword fallback otherwise.\n\nOpen to anonymous + all tiers: keyword/semantic search over public\nrepos is a core /explore discovery path. Private snapshots stay\nowner-only via ``_load_snapshot_or_404``. Cost is bounded by the\n60/minute slowapi cap and the embedding-store cache hit rate; the\nLLM-bearing surface (``/answer``) keeps its Pro gate.\n\nWire shape mirrors the previous keyword-only endpoint\n(`{results: [{title, page_type, target_path, snippet, score, search_type}]}`)\nso the existing frontend continues to render without changes. New\nsemantic results carry `search_type='semantic'` so the UI can label\nthem distinctly.","operationId":"search_snapshots__snapshot_id__search_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/answer":{"post":{"tags":["search"],"summary":"Get Answer","description":"RAG answer over wiki pages. Streams SSE events: citations → text deltas → done.","operationId":"get_answer_snapshots__snapshot_id__answer_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/overview":{"get":{"tags":["dashboard"],"summary":"Get Overview","operationId":"get_overview_snapshots__snapshot_id__overview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/overview-summary":{"get":{"tags":["dashboard"],"summary":"Get Overview Summary","description":"The full OSS repowise 0.22.0 ``OverviewSummaryResponse`` — one call that\ndrives the whole repo Overview page (repo meta, stat strip + deltas, health\nblock + the two co-equal pillars + history, languages, the typed attention\nlist, onboarding targets, top hotspots, recent decisions, savings, sync).\n\nMirrors ``repowise.server.routers.overview`` field-for-field but every value\nis computed from the JSON artifacts the Modal indexer uploads instead of SQL\n(see ``app/services/overview_summary_service.py``).\n\nServed from a two-tier cache (per-process LRU → durable Postgres row, see\n``overview_cache_service``), keyed by snapshot + content version, since the\naggregate is expensive to compute and deterministic per snapshot version. A\ncache miss computes it and fills both tiers. A fresh repo / a snapshot\nindexed before the health layer degrades to a valid zeroed shape so the page\nrenders its empty state rather than 404-ing (that shape is not cached).","operationId":"get_overview_summary_snapshots__snapshot_id__overview_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Overview Summary Snapshots  Snapshot Id  Overview Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/overview-page":{"get":{"tags":["dashboard"],"summary":"Get Overview Page","description":"Composite endpoint: fetches all artifacts once, derives all overview page data.","operationId":"get_overview_page_snapshots__snapshot_id__overview_page_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverviewPageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/graph":{"get":{"tags":["dashboard"],"summary":"Get Graph","operationId":"get_graph_snapshots__snapshot_id__graph_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":6000,"minimum":1,"description":"Maximum nodes returned, selected by PageRank","default":1500,"title":"Limit"},"description":"Maximum nodes returned, selected by PageRank"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/module-graph":{"get":{"tags":["dashboard"],"summary":"Get Module Graph","description":"Collapsed module-level graph — one node per top-level path segment.","operationId":"get_module_graph_snapshots__snapshot_id__module_graph_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModuleGraphResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/communities/{community_id}":{"get":{"tags":["dashboard"],"summary":"Get Community Detail","description":"Per-community detail — members, cohesion, neighboring communities.\n\nMembers are ordered by pagerank (descending) and capped at 200 to\nkeep response size bounded; `truncated` flags when the cap was hit.","operationId":"get_community_detail_snapshots__snapshot_id__communities__community_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"community_id","in":"path","required":true,"schema":{"type":"integer","title":"Community Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/heritage":{"get":{"tags":["dashboard"],"summary":"Get Heritage","description":"Resolved heritage relations for one symbol — both directions.\n\n`parents` are the relations where this symbol is the child (i.e.\nclasses/interfaces/traits it extends or implements). `children` are\nthe relations where this symbol is the parent (i.e. types that\nextend or implement it).\n\nResolved entries (with confidence) come from `graph.json` heritage\nedges. Raw entries (without `child_id`/`parent_id`) are lifted\nfrom `parsed_files.json::heritage` when no graph edge resolved\nthem — this keeps the response useful on partial indexes.","operationId":"get_heritage_snapshots__snapshot_id__heritage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"symbol_id","in":"query","required":true,"schema":{"type":"string","description":"Fully-qualified symbol ID, e.g. 'src/app.py::MyClass'","title":"Symbol Id"},"description":"Fully-qualified symbol ID, e.g. 'src/app.py::MyClass'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SymbolHeritageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/hotspots":{"get":{"tags":["dashboard"],"summary":"Get Hotspots","description":"Paginated hotspot list — envelope mirrors the OSS shape.\n\nSorted by churn percentile (descending) before slicing so the page\nis the \"worst N\" regardless of offset.","operationId":"get_hotspots_snapshots__snapshot_id__hotspots_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Paginated_HotspotEntry_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/bus-factor":{"get":{"tags":["dashboard"],"summary":"Get Bus Factor","operationId":"get_bus_factor_snapshots__snapshot_id__bus_factor_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusFactorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/co-changes":{"get":{"tags":["dashboard"],"summary":"Get Co Changes","description":"Co-change pairs from `git_metadata.co_change_partners_json`.\n\nWith `?file=...`, returns the partners that historically change with\nthat file (one row per partner). Without, returns the top global\npairs ranked by `co_change_count`, deduplicated as undirected pairs.\n\n``co_change_count`` is the number of shared commits, not the indexer's\ndecay-weighted score. The client renders it as \"x N\", so a count is the only\nreading that makes the label true; the weighted score is what the coupling\ngraph surfaces as ``strength``.","operationId":"get_co_changes_snapshots__snapshot_id__co_changes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"file","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional file path to scope to its co-change partners","title":"File"},"description":"Optional file path to scope to its co-change partners"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoChangesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/reviewer-suggestions":{"get":{"tags":["dashboard"],"summary":"Get Reviewer Suggestions","description":"Suggest reviewers for a set of changed files.\n\nBlends three signals from the git_metadata.json artifact: direct ownership,\nco-change history, and recent activity. Output is capped at `limit` (default\n10) — short lists are more useful than long ones for PR routing.","operationId":"get_reviewer_suggestions_snapshots__snapshot_id__reviewer_suggestions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"paths","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"},"description":"One or more file paths being changed in the PR (repeat the query key).","title":"Paths"},"description":"One or more file paths being changed in the PR (repeat the query key)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerSuggestionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/symbols":{"get":{"tags":["dashboard"],"summary":"Get Symbols","description":"Paginated symbol list with composite importance ranking.\n\nHosted backend is artifact-driven — we flatten `parsed_files.json`,\noptionally filter by file path, then rank with the same weights as the\nOSS `symbol_ranking` service so dashboards stay consistent across\nsurfaces. The envelope mirrors `Paginated[SymbolResponse]` from OSS so\nthe shared `@repowise-dev/ui` symbol consumers don't need an adapter.","operationId":"get_symbols_snapshots__snapshot_id__symbols_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"file_path","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact source file path — drives the hotspot drill-down inline expand.","title":"File Path"},"description":"Exact source file path — drives the hotspot drill-down inline expand."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search query (substring match on name)","title":"Q"},"description":"Search query (substring match on name)"},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by symbol kind","title":"Kind"},"description":"Filter by symbol kind"},{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by language","title":"Language"},"description":"Filter by language"},{"name":"visibility","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by visibility","title":"Visibility"},"description":"Filter by visibility"},{"name":"in_hot_files","in":"query","required":false,"schema":{"type":"boolean","description":"Only symbols whose file is a hotspot","default":false,"title":"In Hot Files"},"description":"Only symbols whose file is a hotspot"},{"name":"in_entry_points","in":"query","required":false,"schema":{"type":"boolean","description":"Only symbols in entry-point files","default":false,"title":"In Entry Points"},"description":"Only symbols in entry-point files"},{"name":"bug_fixed","in":"query","required":false,"schema":{"type":"boolean","description":"Only symbols with a counted bug fix","default":false,"title":"Bug Fixed"},"description":"Only symbols with a counted bug fix"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","description":"importance | name | complexity | kind","default":"importance","title":"Sort"},"description":"importance | name | complexity | kind"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Paginated_SymbolEntry_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/decisions/counts":{"get":{"tags":["dashboard"],"summary":"Get Decision Counts","description":"Counts by status over the whole artifact, zero-filled.\n\nDeclared above the parameterised routes on purpose. FastAPI matches in\ndeclaration order, so a literal sub-path below ``/{decision_index}`` would\nbe swallowed by it and \"counts\" looked up as a decision index. There is no\n``GET /{decision_index}`` on this router today, so nothing collides yet —\ndeclaring it here is what keeps that true when one is added.\n\nA missing decisions artifact 404s exactly as the list endpoint does, rather\nthan reporting zeros. Zero recorded decisions and no decisions layer are\ndifferent facts, and only one of them is worth printing as a number. The\npage is what degrades: it treats an unavailable count as unknown and says\nwhat it actually loaded instead, so a frontend running ahead of its backend\nrenders the table rather than \"Page not found\".","operationId":"get_decision_counts_snapshots__snapshot_id__decisions_counts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source","title":"Source"},"description":"Filter by source"},{"name":"include_proposed","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Proposed"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionCountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/decisions/settings":{"get":{"tags":["dashboard"],"summary":"Get Decision Settings","description":"The repository's resolved decision capture policy.\n\nStored sparsely on `repos.decisions_policy` and resolved through the\nengine's own pure resolver, so hosted cannot drift from what capture will\nactually do. The engine reads the same block out of `.repowise/config.yaml`\nin a checkout; hosted has no durable checkout, so the column is where a\nhosted repository's answer lives.\n\nDeclared above `/{decision_index}` for the same reason `/counts` is:\nFastAPI matches in declaration order.","operationId":"get_decision_settings_snapshots__snapshot_id__decisions_settings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["dashboard"],"summary":"Update Decision Settings","description":"Merge a patch into the repository's capture policy and return the result.\n\nOnly the snapshot owner may edit, matching the page-notes rule: a public\nownerless snapshot is readable but not configurable.\n\nThe patch is sparse. Keys nobody set stay unset and keep resolving from the\npreset, so a stored policy does not freeze today's defaults.\n\n`etag` is checked when the client sends one. The shared panel autosaves, so\ntwo people on the same settings page would otherwise overwrite each other\nwith nothing to show that anything was lost.","operationId":"update_decision_settings_snapshots__snapshot_id__decisions_settings_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/decisions/lane-counts":{"get":{"tags":["dashboard"],"summary":"Get Decision Lane Counts","description":"Counts per review lane, from the acceptance join.\n\nNot substitutable with ``/decisions/counts``. That endpoint groups the\n``status`` column, which is the extractor's projection kept in step for\nreaders that predate the acceptance split, so its ``active`` and this\nendpoint's ``active`` answer different questions: a record can be stored\nactive and have no acceptance at all. A tab row labelled from the other\none's answer would overcount every lane it names.\n\nDeclared above ``/{decision_index}`` for the same reason ``/counts`` is:\nFastAPI matches in declaration order, and ``lane-counts`` would otherwise be\nparsed as an integer index and 422.\n\nA missing decisions artifact 404s exactly as the list endpoint does.","operationId":"get_decision_lane_counts_snapshots__snapshot_id__decisions_lane_counts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionLaneCountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/decisions":{"get":{"tags":["dashboard"],"summary":"Get Decisions","description":"List decisions for a snapshot, sorted, filtered and optionally paged.\n\n``total_found`` is the count *after* filters and *before* paging, so it is\nthe denominator the table prints beside \"51–100 of …\". With no filters and\nno page it equals the artifact's own total, which is what it meant before.\n\n**Every default reproduces the pre-paging response exactly**, and that is\ndeliberate rather than timid. A decision's identity on this surface is its\n*position*: the PATCH route takes one, ``jira_links.decision_key`` falls\nback to ``decision-{position}``, and the extraction-only serializer writes\na null id for every record, so on those snapshots there is nothing else to\nkey on. Reordering or filtering by default would therefore not degrade an\nolder client — it would make its next Confirm click rewrite a different\ndecision and return 200. The backend deploys before the frontend, so that\nwindow would be real. Clients opt in with ``sort`` and\n``include_dismissed``, and read ``decision_index`` off each row instead of\ncounting rows. Follows the same rule ``fields=full`` did on ``/docs``:\nnothing that already calls the endpoint changes meaning.","operationId":"get_decisions_snapshots__snapshot_id__decisions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source","title":"Source"},"description":"Filter by source"},{"name":"include_proposed","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Proposed"}},{"name":"include_dismissed","in":"query","required":false,"schema":{"type":"boolean","description":"Include dismissed tombstones. The table passes false; the detail page needs them, and so does every pre-paging client.","default":true,"title":"Include Dismissed"},"description":"Include dismissed tombstones. The table passes false; the detail page needs them, and so does every pre-paging client."},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":500,"minimum":1},{"type":"null"}],"description":"Page size. Omitted returns every matching row, which is what the detail page and pre-paging clients rely on.","title":"Limit"},"description":"Page size. Omitted returns every matching row, which is what the detail page and pre-paging clients rely on."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(artifact|priority|recent)$","description":"artifact: the artifact's own order (default). priority: confirmed rules first, then the likeliest proposals. recent: newest first.","default":"artifact","title":"Sort"},"description":"artifact: the artifact's own order (default). priority: confirmed rules first, then the likeliest proposals. recent: newest first."},{"name":"lane","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(candidates|governing|active|needs_review|uncheckable|history)$"},{"type":"null"}],"description":"Filter by review lane, which is derived from the acceptance rather than from the status column. candidates are records nobody has accepted; governing is the roll-up of active and needs_review.","title":"Lane"},"description":"Filter by review lane, which is derived from the acceptance rather than from the status column. candidates are records nobody has accepted; governing is the roll-up of active and needs_review."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/decisions/{decision_index}":{"patch":{"tags":["dashboard"],"summary":"Update Decision Status","description":"Review a decision, and patch the linkage fields on its record.\n\nBody is `DecisionStatusUpdate` — `{status?, superseded_by?,\naffected_modules?, affected_files?}`, mirroring the OSS endpoint.\nStatus and metadata are independent: a request can update either, both,\nor neither. `None` preserves a field, `[]` clears it. `superseded_by`\nwithout `status` is rejected to mirror the OSS contract. A legacy body\nof `{\"new_status\": \"...\"}` is also accepted for back-compat with\npre-mirror clients (mapped to `status`).\n\nThe two halves are stored differently, and deliberately.\n\nA `status` change is a review action, so it appends a row to\n`decision_acceptances` keyed on `(repo_id, decision_id)`. It used to be\nwritten into the artifact, which lives at a `head_sha`-keyed path — so a\nconfirmation was orphaned by the next push and the decision came back\nunreviewed. Writing a row also removes a full artifact re-upload and a\nfour-tier cache flush from every confirm; durability and cost are the same\nchange here.\n\nThe linkage fields are properties of the record rather than of anyone's\njudgement, so they still rewrite the artifact. That write remains per-commit\nand is restored by the next reindex, which is pre-existing behaviour and not\nwhat this route is for.\n\nRefusing is a real outcome. The acceptance contract requires a reason, a\nscope, evidence and an identity, so confirming a decision that names nothing\nit governs returns 422 listing what is missing rather than recording a\nconfirmation that means nothing.","operationId":"update_decision_status_snapshots__snapshot_id__decisions__decision_index__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"decision_index","in":"path","required":true,"schema":{"type":"integer","title":"Decision Index"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionStatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/decisions/{decision_index}/evidence":{"get":{"tags":["dashboard"],"summary":"Get Decision Evidence","description":"Return the provenance evidence rows for a single decision (0.13.0).\n\nEach row mirrors the OSS ``DecisionEvidence`` shape (source, source_rank,\nevidence_file/line/commit, source_quote, confidence, verification). Legacy\nartifacts written before 0.13.0 carry no ``evidence`` array — those return\nan empty list rather than 404. 404 is reserved for an out-of-range index.","operationId":"get_decision_evidence_snapshots__snapshot_id__decisions__decision_index__evidence_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"decision_index","in":"path","required":true,"schema":{"type":"integer","title":"Decision Index"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionEvidenceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/dead-code":{"get":{"tags":["dashboard"],"summary":"Get Dead Code","operationId":"get_dead_code_snapshots__snapshot_id__dead_code_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":500,"title":"Limit"}},{"name":"min_confidence","in":"query","required":false,"schema":{"type":"number","maximum":1.0,"minimum":0.0,"default":0.4,"title":"Min Confidence"}},{"name":"status","in":"query","required":false,"schema":{"enum":["open","acknowledged","resolved","false_positive"],"type":"string","default":"open","title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeadCodeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/dead-code/findings/{finding_id}":{"patch":{"tags":["dashboard"],"summary":"Patch Dead Code Finding","description":"Persist a dead-code triage decision (sibling of the health\n``patch_finding`` route — same ownership and storage rules).","operationId":"patch_dead_code_finding_snapshots__snapshot_id__dead_code_findings__finding_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"finding_id","in":"path","required":true,"schema":{"type":"string","title":"Finding Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeadCodeFindingPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Patch Dead Code Finding Snapshots  Snapshot Id  Dead Code Findings  Finding Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/docs":{"get":{"tags":["dashboard"],"summary":"Get Docs","operationId":"get_docs_snapshots__snapshot_id__docs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"fields","in":"query","required":false,"schema":{"type":"string","description":"How much of each page to return. 'full' (the default) is every field. 'summary' drops 'content' and the heavy metadata link arrays — together ~91% of the payload, and read by nothing that renders a list of pages — and adds 'content_chars' in their place. A caller that needs page bodies asks for 'full'.","default":"full","title":"Fields"},"description":"How much of each page to return. 'full' (the default) is every field. 'summary' drops 'content' and the heavy metadata link arrays — together ~91% of the payload, and read by nothing that renders a list of pages — and adds 'content_chars' in their place. A caller that needs page bodies asks for 'full'."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/coverage":{"get":{"tags":["dashboard"],"summary":"Get Coverage","operationId":"get_coverage_snapshots__snapshot_id__coverage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"fields","in":"query","required":false,"schema":{"type":"string","description":"As on /docs. The coverage views read freshness and confidence only, so 'summary' costs them nothing.","default":"full","title":"Fields"},"description":"As on /docs. The coverage views read freshness and confidence only, so 'summary' costs them nothing."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoverageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/episodes":{"get":{"tags":["dashboard"],"summary":"List Episodes","operationId":"list_episodes_snapshots__snapshot_id__episodes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"tier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EpisodeListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/episodes/counts":{"get":{"tags":["dashboard"],"summary":"Episode Counts","operationId":"episode_counts_snapshots__snapshot_id__episodes_counts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EpisodeCountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/episodes/by-file":{"get":{"tags":["dashboard"],"summary":"Episodes By File","operationId":"episodes_by_file_snapshots__snapshot_id__episodes_by_file_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"path","in":"query","required":true,"schema":{"type":"string","title":"Path"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EpisodeListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/episodes/{episode_id}":{"get":{"tags":["dashboard"],"summary":"Get Episode","operationId":"get_episode_snapshots__snapshot_id__episodes__episode_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"episode_id","in":"path","required":true,"schema":{"type":"string","title":"Episode Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EpisodeDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/execution-flows":{"get":{"tags":["dashboard"],"summary":"Get Execution Flows","description":"Traced execution flows from the engine's `ExecutionFlowReport`.\n\nReturns the top-N flows by score (engine pre-sorts, so this just\ntruncates). Empty response when the artifact is missing — matches the\ncontract used elsewhere in the dashboard for read-on-demand artifacts.","operationId":"get_execution_flows_snapshots__snapshot_id__execution_flows_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionFlowsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/security-findings":{"get":{"tags":["dashboard"],"summary":"Get Security Findings","description":"Security findings from the indexer's regex scan.\n\nRead-on-demand from `security_findings.json` per the α decision (no\n`security_findings` table on the hosted side). Ordered high → med → low\nseverity, then by id ascending so the UI ordering is stable across calls.\nReturns an empty payload for snapshots indexed before 3C-bis.","operationId":"get_security_findings_snapshots__snapshot_id__security_findings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by severity: 'high' | 'med' | 'low'","title":"Severity"},"description":"Filter by severity: 'high' | 'med' | 'low'"},{"name":"file_path","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter to a single file path","title":"File Path"},"description":"Filter to a single file path"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityFindingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/git-summary":{"get":{"tags":["git"],"summary":"Get Git Summary","description":"Aggregate git health signals for the snapshot: hotspot/stable file\ncounts, average churn percentile, and the top contributors by primary\nownership. Computed from the per-file `git_metadata.json` artifact, mirroring\nthe OSS `/git-summary` route. Empty on snapshots without git metadata.","operationId":"get_git_summary_snapshots__snapshot_id__git_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"top_owners_limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":25,"title":"Top Owners Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/ownership":{"get":{"tags":["git"],"summary":"Get Ownership","description":"Ownership breakdown by module (top-level directory) or file, for the\nownership map. Mirrors the OSS `/ownership` route, computed from\n`git_metadata.json`. Empty on snapshots without git metadata.","operationId":"get_ownership_snapshots__snapshot_id__ownership_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"granularity","in":"query","required":false,"schema":{"type":"string","pattern":"^(module|file)$","default":"module","title":"Granularity"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OwnershipEntry"},"title":"Response Get Ownership Snapshots  Snapshot Id  Ownership Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/commits":{"get":{"tags":["git"],"summary":"Get Commits","description":"Per-commit change-risk feed — the review-priority queue.\n\n``sort=risk`` (default) orders by raw change-risk descending; ``sort=date``\nby commit time descending. Banding is repo-relative regardless of sort.\n``authorship`` narrows to agent-attributed (``agent``) or human-only\n(``human``) commits; the percentile normalizer is still anchored to the\nfull distribution so bands stay comparable across filters.\nEmpty for snapshots indexed before repowise 0.15.0.","operationId":"get_commits_snapshots__snapshot_id__commits_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(risk|date)$","default":"risk","title":"Sort"}},{"name":"authorship","in":"query","required":false,"schema":{"type":"string","pattern":"^(all|agent|human)$","default":"all","title":"Authorship"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Paginated_CommitEntry_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/commits/agent-trend":{"get":{"tags":["git"],"summary":"Get Agent Trend","description":"Monthly agent-vs-human commit volume across the indexed window.\n\nBuilt from the agent provenance fields the indexer serializes onto each\n`git_commits.json` row (repowise >= 0.18.0). Months with no commits are\nomitted; empty buckets for snapshots without agent provenance.\n\nDeclared before ``/commits/{sha}`` so the literal path wins over the\nSHA wildcard.","operationId":"get_agent_trend_snapshots__snapshot_id__commits_agent_trend_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTrendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/commits/evolution":{"get":{"tags":["git"],"summary":"Get Commit Evolution","description":"The repo's development \"story arc\" — commit-category mix over time.\n\nEach commit was classified into exactly one category (feature / fix /\nrefactor / docs / test / deps / chore / other) at index time and stamped\nonto its `git_commits.json` row. We bucket by month (or week on\nshort-history repos) and stack the categories so the UI can show how the\ndevelopment emphasis shifts as the repo matures.\n\nDeclared before ``/commits/{sha}`` so the literal path wins over the\nSHA wildcard.","operationId":"get_commit_evolution_snapshots__snapshot_id__commits_evolution_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"granularity","in":"query","required":false,"schema":{"type":"string","pattern":"^(auto|month|week)$","default":"auto","title":"Granularity"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommitEvolutionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/commits/stats":{"get":{"tags":["git"],"summary":"Get Commit Stats","description":"Repo-wide commit stat cards: total commits, high-priority (top\nrepo-relative risk tercile) count, fix commits, agent commits, and average\nchange entropy. Computed over the whole `git_commits.json` feed so the\nheadline cards don't under-count off a paged list.\n\nDeclared before ``/commits/{sha}`` so the literal path wins over the\nSHA wildcard.","operationId":"get_commit_stats_snapshots__snapshot_id__commits_stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommitStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/commits/{sha}":{"get":{"tags":["git"],"summary":"Get Commit","description":"Single commit with its repo-relative banding + per-feature risk-driver\nbreakdown (the drivers are serialized by the indexer).","operationId":"get_commit_snapshots__snapshot_id__commits__sha__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"sha","in":"path","required":true,"schema":{"type":"string","title":"Sha"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommitDetailEntry"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/function-blame":{"get":{"tags":["git"],"summary":"Get Function Blame","description":"Per-function blame rollup, hottest (most-modified) first. Optionally\nscoped to one file. Empty for snapshots indexed before repowise 0.15.0.","operationId":"get_function_blame_snapshots__snapshot_id__function_blame_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"file_path","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Path"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Paginated_FunctionBlameEntry_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/files":{"get":{"tags":["files"],"summary":"Files Index","description":"Slim per-file rows for the browsable Files index + treemap.\n\nOne row per indexed file node, joined in-memory from the artifacts the\nindexer already uploads (graph nodes, graph metrics, health metrics, git\nmetadata). Importance (pagerank) percentiles are computed once over the\nfull set — before any ``limit``/``offset`` slice, whose window is applied\nlast (``totals`` always reflects the full pre-slice set). Returns\n``state='not_available'`` when the snapshot has no graph artifact\n(pre-graph index) so the page renders an honest empty state.","operationId":"files_index_snapshots__snapshot_id__files_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Rows returned; omit for the full list (treemap default)","title":"Limit"},"description":"Rows returned; omit for the full list (treemap default)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Rows to skip (with limit)","default":0,"title":"Offset"},"description":"Rows to skip (with limit)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesIndexResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/files/detail":{"get":{"tags":["files"],"summary":"Get File Detail","description":"One-call canonical file page: wiki, health, git, coverage, graph,\nsymbols, function blame, governing decisions and dead code.\n\nEvery block degrades to None / [] when its layer is absent for the\nsnapshot, so the page renders on partial indexes.","operationId":"get_file_detail_snapshots__snapshot_id__files_detail_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"Source file path","title":"Path"},"description":"Source file path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/files/notes":{"patch":{"tags":["files"],"summary":"Patch File Notes","description":"Write the human note for a page. Keyed by (repo_id, path) so the note\nsurvives reindex. Only the snapshot owner may edit (public ownerless\nsnapshots are read-only, mirroring the findings-override rule).","operationId":"patch_file_notes_snapshots__snapshot_id__files_notes_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"Source file / page path","title":"Path"},"description":"Source file / page path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageNotesPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageNotesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/symbols/detail":{"get":{"tags":["files"],"summary":"Get Symbol Detail","description":"Canonical symbol page: signature, blame, callers/callees, governing\ndecisions and parent-file context. Assembled from parsed_files, graph,\nfunction-blame, git_metadata, health and decisions artifacts.","operationId":"get_symbol_detail_snapshots__snapshot_id__symbols_detail_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"symbol_id","in":"query","required":true,"schema":{"type":"string","description":"Qualified symbol id, e.g. path::Name","title":"Symbol Id"},"description":"Qualified symbol id, e.g. path::Name"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SymbolDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/external-systems/summary":{"get":{"tags":["external-systems"],"summary":"Summarize External Systems","description":"Canonical packages joined to the import evidence in the graph.","operationId":"summarize_external_systems_snapshots__snapshot_id__external_systems_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"scope","in":"query","required":false,"schema":{"enum":["primary","all"],"type":"string","default":"primary","title":"Scope"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":400,"minimum":1,"default":200,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalSystemsSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/external-systems/{package_key}/graph/files":{"get":{"tags":["external-systems"],"summary":"External System Importing Files","description":"One bounded page of the files behind an opened relationship aggregate.\n\nDeclared before the `/graph` route below it: both share the\n`{package_key:path}` prefix, and a path converter would otherwise swallow\nthe trailing `/graph/files` into the key.","operationId":"external_system_importing_files_snapshots__snapshot_id__external_systems__package_key__graph_files_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"package_key","in":"path","required":true,"schema":{"type":"string","title":"Package Key"}},{"name":"aggregate_key","in":"query","required":true,"schema":{"type":"string","title":"Aggregate Key"}},{"name":"scope","in":"query","required":false,"schema":{"enum":["primary","all"],"type":"string","default":"primary","title":"Scope"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalSystemImportingFilesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/external-systems/{package_key}/graph":{"get":{"tags":["external-systems"],"summary":"External System Relationship Graph","description":"The bounded first-party communities that import one declared package.","operationId":"external_system_relationship_graph_snapshots__snapshot_id__external_systems__package_key__graph_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"package_key","in":"path","required":true,"schema":{"type":"string","title":"Package Key"}},{"name":"scope","in":"query","required":false,"schema":{"enum":["primary","all"],"type":"string","default":"primary","title":"Scope"}},{"name":"node_limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":50,"title":"Node Limit"}},{"name":"edge_limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":200,"title":"Edge Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalSystemRelationshipGraphResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/external-systems":{"get":{"tags":["external-systems"],"summary":"List External Systems","description":"Every declared dependency, one row per (name, declared_in).","operationId":"list_external_systems_snapshots__snapshot_id__external_systems_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalSystemsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/owners":{"get":{"tags":["owners"],"summary":"List Owners","description":"Directory of contributors with rollup stats.","operationId":"list_owners_snapshots__snapshot_id__owners_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","description":"Substring filter on name or email","default":"","title":"Q"},"description":"Substring filter on name or email"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","description":"files_owned | hotspots_owned | commit_count_90d | dead_code_lines_owned | bus_factor_risk_files","default":"files_owned","title":"Sort"},"description":"files_owned | hotspots_owned | commit_count_90d | dead_code_lines_owned | bus_factor_risk_files"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Paginated_OwnerListEntry_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/owners/{owner_key}":{"get":{"tags":["owners"],"summary":"Get Owner","description":"Full profile for one contributor.\n\n``owner_key`` is either the contributor's lower-cased email or\n``name:<display>`` for anonymous-email entries. URL-encoded by the caller.","operationId":"get_owner_snapshots__snapshot_id__owners__owner_key__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"owner_key","in":"path","required":true,"schema":{"type":"string","title":"Owner Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/modules/health":{"get":{"tags":["modules"],"summary":"List Module Health","operationId":"list_module_health_snapshots__snapshot_id__modules_health_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","description":"health_score (worst first) | hotspot_count | dead_code_lines | file_count","default":"health_score","title":"Sort"},"description":"health_score (worst first) | hotspot_count | dead_code_lines | file_count"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Paginated_ModuleHealthSummary_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/modules/health/{module_path}":{"get":{"tags":["modules"],"summary":"Get Module Health","operationId":"get_module_health_snapshots__snapshot_id__modules_health__module_path__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"module_path","in":"path","required":true,"schema":{"type":"string","title":"Module Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModuleHealthDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/c4/l1":{"get":{"tags":["c4"],"summary":"Get C4 L1","operationId":"get_c4_l1_snapshots__snapshot_id__c4_l1_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get C4 L1 Snapshots  Snapshot Id  C4 L1 Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/c4/l2":{"get":{"tags":["c4"],"summary":"Get C4 L2","operationId":"get_c4_l2_snapshots__snapshot_id__c4_l2_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get C4 L2 Snapshots  Snapshot Id  C4 L2 Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/c4/l3":{"get":{"tags":["c4"],"summary":"Get C4 L3","operationId":"get_c4_l3_snapshots__snapshot_id__c4_l3_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"container_id","in":"query","required":true,"schema":{"type":"string","description":"Container id from L2 (e.g., pkg:packages/core)","title":"Container Id"},"description":"Container id from L2 (e.g., pkg:packages/core)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get C4 L3 Snapshots  Snapshot Id  C4 L3 Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/c4/mermaid":{"get":{"tags":["c4"],"summary":"Get C4 Mermaid","operationId":"get_c4_mermaid_snapshots__snapshot_id__c4_mermaid_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"level","in":"query","required":false,"schema":{"type":"integer","maximum":3,"minimum":1,"description":"C4 level: 1, 2, or 3","default":2,"title":"Level"},"description":"C4 level: 1, 2, or 3"},{"name":"container_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required when level=3","title":"Container Id"},"description":"Required when level=3"}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/c4/structurizr":{"get":{"tags":["c4"],"summary":"Get C4 Structurizr","description":"Structurizr DSL for this snapshot, ready to open in Structurizr Lite.\n\nBy default this is the contents of a ``model`` block, meant to be included\nfrom the caller's own ``workspace.dsl`` so their views and styles survive\nregeneration. ``standalone=true`` returns a workspace that renders on its\nown.\n\nUnlike OSS, which builds the model from a live session per request, hosted\nrebuilds it from the ``c4.json`` the indexer already produced. That is what\nmakes this work on every existing snapshot with no re-index, and it is also\nwhy the export carries no health/ownership tags and no reading order:\nneither survives into the artifact. See ``app.services.c4_model_adapter``.\n\n``components=true`` is best-effort here for the same reason: the artifact\nstores per-container L3 views, which cannot express a component edge that\ncrosses a container boundary.\n\nRate-limited harder than its siblings (30/min against 120) because it is a\ndownload rather than a view fetch, and emitting the DSL is real CPU over\nthe whole model rather than a dict lookup into it.","operationId":"get_c4_structurizr_snapshots__snapshot_id__c4_structurizr_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"standalone","in":"query","required":false,"schema":{"type":"boolean","description":"Emit a complete runnable workspace instead of a model fragment","default":false,"title":"Standalone"},"description":"Emit a complete runnable workspace instead of a model fragment"},{"name":"components","in":"query","required":false,"schema":{"type":"boolean","description":"Include the component (L3) level","default":false,"title":"Components"},"description":"Include the component (L3) level"},{"name":"externals","in":"query","required":false,"schema":{"type":"boolean","description":"Include third-party dependencies","default":true,"title":"Externals"},"description":"Include third-party dependencies"}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/architecture":{"get":{"tags":["graph-views"],"summary":"Get Architecture Graph","description":"Community super-graph for the constellation (one node per community).","operationId":"get_architecture_graph_snapshots__snapshot_id__architecture_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Architecture Graph Snapshots  Snapshot Id  Architecture Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/architecture-view":{"get":{"tags":["graph-views"],"summary":"Get Architecture View","description":"Curated layers/nodes/edges/tour/entry-points view.","operationId":"get_architecture_view_snapshots__snapshot_id__architecture_view_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Architecture View Snapshots  Snapshot Id  Architecture View Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/zoom-map":{"get":{"tags":["graph-views"],"summary":"Get Zoom Map","description":"The continuous-zoom containment tree (system -> layer -> ... -> file).\n\nThe one endpoint in this module that is not a pure artifact passthrough: the\nzoom map has no artifact of its own (OSS derives it per request too), so this\nreads the curated architecture view plus per-file health and runs the same\npure assembly OSS does. Both reads go through the byte-budgeted artifact\nservice and nothing derived is retained, so the route adds no cache of its own.\n\nThe assembly is CPU-bound (hundreds of milliseconds on a few thousand files),\nso it runs off the event loop on the service's own single-thread executor —\nnot the default pool, which artifact decoding shares (see\n``zoom_map_service.build_zoom_map_async``).","operationId":"get_zoom_map_snapshots__snapshot_id__zoom_map_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"max_depth","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Cap levels served below the (focus) root; omit for full","title":"Max Depth"},"description":"Cap levels served below the (focus) root; omit for full"},{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Node id to scope the served subtree to (lazy drill-down)","title":"Focus"},"description":"Node id to scope the served subtree to (lazy drill-down)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoomMapResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/communities/{community_id}/slice":{"get":{"tags":["graph-views"],"summary":"Get Community Slice","description":"Per-community slice: member nodes + intra edges + boundary stubs.","operationId":"get_community_slice_snapshots__snapshot_id__communities__community_id__slice_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"community_id","in":"path","required":true,"schema":{"type":"integer","title":"Community Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Community Slice Snapshots  Snapshot Id  Communities  Community Id  Slice Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/health/overview":{"get":{"tags":["code-health"],"summary":"Health Overview","operationId":"health_overview_snapshots__snapshot_id__health_overview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthOverviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/health/modules":{"get":{"tags":["code-health"],"summary":"Health Modules","operationId":"health_modules_snapshots__snapshot_id__health_modules_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HealthModuleRollup"},"title":"Response Health Modules Snapshots  Snapshot Id  Health Modules Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/health/distribution":{"get":{"tags":["code-health"],"summary":"Health Distribution","description":"NLOC-weighted band distribution (healthy/warning/alert) for the repo.","operationId":"health_distribution_snapshots__snapshot_id__health_distribution_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Health Distribution Snapshots  Snapshot Id  Health Distribution Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/health/files":{"get":{"tags":["code-health"],"summary":"Health Files","operationId":"health_files_snapshots__snapshot_id__health_files_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"hotspots | untested | failing","title":"Filter"},"description":"hotspots | untested | failing"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","description":"score | nloc | path","default":"score","title":"Sort"},"description":"score | nloc | path"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"path substring search","title":"Q"},"description":"path substring search"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthFilesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/health/files/breakdown":{"get":{"tags":["code-health"],"summary":"Health File Breakdown","operationId":"health_file_breakdown_snapshots__snapshot_id__health_files_breakdown_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"file path","title":"Path"},"description":"file path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthFileBreakdownResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/health/signals/{file_path}":{"get":{"tags":["code-health"],"summary":"Health File Signals","description":"Per-file process/people/topology signals for one file.\n\nReturns ``state='not_available'`` when the file carries no signal (no git\nhistory and not a graph node) or the snapshot pre-dates the layer, so the\nfile page renders an honest empty state instead of a wall of nulls.","operationId":"health_file_signals_snapshots__snapshot_id__health_signals__file_path__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"file_path","in":"path","required":true,"schema":{"type":"string","description":"repo-relative file path","title":"File Path"},"description":"repo-relative file path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Health File Signals Snapshots  Snapshot Id  Health Signals  File Path  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/health/findings":{"get":{"tags":["code-health"],"summary":"List Findings","operationId":"list_findings_snapshots__snapshot_id__health_findings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"biomarker","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Biomarker"}},{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"}},{"name":"file_path","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Path"}},{"name":"dimension","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by pillar: defect | maintainability | performance","title":"Dimension"},"description":"Filter by pillar: defect | maintainability | performance"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthFindingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/health/findings/{finding_id}":{"patch":{"tags":["code-health"],"summary":"Patch Finding","operationId":"patch_finding_snapshots__snapshot_id__health_findings__finding_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"finding_id","in":"path","required":true,"schema":{"type":"string","title":"Finding Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthFindingPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Patch Finding Snapshots  Snapshot Id  Health Findings  Finding Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/health/coverage":{"get":{"tags":["code-health"],"summary":"Health Coverage","operationId":"health_coverage_snapshots__snapshot_id__health_coverage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"default":500,"title":"Limit"}},{"name":"module_limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":0,"default":1000,"title":"Module Limit"}},{"name":"include_inferred","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Inferred"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCoverageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["code-health"],"summary":"Upload Coverage","description":"Ingest an uploaded coverage report (lcov / cobertura / clover /\nrepowise-json) into the repo's coverage artifact.\n\nOwner-only. The uploaded report's paths are reconciled against the\nsnapshot's file tree; any that can't be matched come back in\n``unmatched_paths`` so a partial upload is visible, never silent.\nStored repo-scoped (not under the snapshot's head prefix) so the report\nsurvives reindexes; reads re-join it onto the then-active snapshot.","operationId":"upload_coverage_snapshots__snapshot_id__health_coverage_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_coverage_snapshots__snapshot_id__health_coverage_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoverageUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/health/refactoring-targets":{"get":{"tags":["code-health"],"summary":"Refactoring Targets","operationId":"refactoring_targets_snapshots__snapshot_id__health_refactoring_targets_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"biomarkers","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Biomarkers"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefactoringTargetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/health/refactoring-plans":{"get":{"tags":["code-health"],"summary":"Refactoring Plans","description":"Deterministic, graph-aware refactoring plans (repowise >= 0.24.0).\n\nExtract Class / Extract Helper / Extract Method / Move Method / Break\nCycle / Split File / Performance Fix suggestions, unified-ranked at index\ntime. Distinct from `/refactoring-targets` (the\nimpact-per-effort file ranking). Returns `state='not_available'` for\nsnapshots indexed before the layer landed.","operationId":"refactoring_plans_snapshots__snapshot_id__health_refactoring_plans_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter to one refactoring_type (chip counts stay full).","title":"Type"},"description":"Filter to one refactoring_type (chip counts stay full)."},{"name":"min_confidence","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Surface gate: low | medium | high.","title":"Min Confidence"},"description":"Surface gate: low | medium | high."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefactoringPlansResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/refactoring/opportunities":{"get":{"tags":["code-health"],"summary":"Refactoring Opportunities","description":"One page of the ranked queue, with its facets and rollup.\n\n`facets` count the whole set at the requested status rather than the page,\nbecause they are the chips a person clicks to widen the filter. An\nunrecognized filter value is reported in `ignored_arguments` rather than\nrejected, so a stale bookmark degrades to the default view.","operationId":"refactoring_opportunities_snapshots__snapshot_id__refactoring_opportunities_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"refactoring_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Lead refactoring type, or several comma-separated.","title":"Refactoring Type"},"description":"Lead refactoring type, or several comma-separated."},{"name":"status","in":"query","required":false,"schema":{"type":"string","description":"open | acknowledged | resolved | false_positive","default":"open","title":"Status"},"description":"open | acknowledged | resolved | false_positive"},{"name":"confidence","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"low | medium | high","title":"Confidence"},"description":"low | medium | high"},{"name":"effort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S | M | L | XL","title":"Effort"},"description":"S | M | L | XL"},{"name":"file_path","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"One repo-relative path.","title":"File Path"},"description":"One repo-relative path."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Substring of a file path.","title":"Search"},"description":"Substring of a file path."},{"name":"mechanical","in":"query","required":false,"schema":{"type":"boolean","description":"Only sets with a mechanical step.","default":false,"title":"Mechanical"},"description":"Only sets with a mechanical step."},{"name":"view","in":"query","required":false,"schema":{"type":"string","description":"canonical | file_spread | diversified","default":"diversified","title":"View"},"description":"canonical | file_spread | diversified"},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"queue | rank | health | effort | file","title":"Order"},"description":"queue | rank | health | effort | file"},{"name":"step_preview","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":0,"description":"Steps inlined per row.","default":3,"title":"Step Preview"},"description":"Steps inlined per row."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Refactoring Opportunities Snapshots  Snapshot Id  Refactoring Opportunities Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/refactoring/summary":{"get":{"tags":["code-health"],"summary":"Refactoring Opportunity Summary","description":"The repository rollup and the one opportunity to open first.\n\nBoth read the stored summary alone, so a dashboard that shows only the\nheadline never pays for the queue behind it.","operationId":"refactoring_opportunity_summary_snapshots__snapshot_id__refactoring_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Refactoring Opportunity Summary Snapshots  Snapshot Id  Refactoring Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/refactoring/opportunities/{opportunity_id}":{"get":{"tags":["code-health"],"summary":"Refactoring Opportunity Detail","description":"One opportunity, with its steps and evidence paged.\n\nThree artifacts, and only this route needs all of them: the queue for the\nrow, the details for its steps and evidence, and the plans for the member\nplan payloads a step names. A drawer open is the one place worth paying for.","operationId":"refactoring_opportunity_detail_snapshots__snapshot_id__refactoring_opportunities__opportunity_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"opportunity_id","in":"path","required":true,"schema":{"type":"string","title":"Opportunity Id"}},{"name":"step_limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":0,"default":20,"title":"Step Limit"}},{"name":"step_offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Step Offset"}},{"name":"evidence_limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":0,"default":8,"title":"Evidence Limit"}},{"name":"evidence_offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Evidence Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Refactoring Opportunity Detail Snapshots  Snapshot Id  Refactoring Opportunities  Opportunity Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/refactoring/opportunities/{opportunity_id}/status":{"patch":{"tags":["code-health"],"summary":"Patch Refactoring Opportunity Status","description":"Triage one opportunity: acknowledge it, resolve it, or dismiss it.\n\nThe path carries the trailing ``/status`` OSS uses rather than the bare\nshape the health-findings PATCH has, because the shared board is written\nagainst the OSS route and the point of this is that the same board works on\nboth products.\n\nTwo gates. ``_get_ready_snapshot`` proves the reader may see the snapshot,\nwhich is not enough to write to it: triage lands in a durable row keyed on\nthe repository and survives every push, so anyone holding a shared link\nwould otherwise be able to clear somebody else's board.\n\nThe row is keyed on the repository, so it outlives this snapshot. See\nmigration 137 for why that is the right key and ``health_finding_overrides``\nis not.","operationId":"patch_refactoring_opportunity_status_snapshots__snapshot_id__refactoring_opportunities__opportunity_id__status_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"opportunity_id","in":"path","required":true,"schema":{"type":"string","title":"Opportunity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefactoringOpportunityStatusPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Patch Refactoring Opportunity Status Snapshots  Snapshot Id  Refactoring Opportunities  Opportunity Id  Status Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/health/trend":{"get":{"tags":["code-health"],"summary":"Health Trend","operationId":"health_trend_snapshots__snapshot_id__health_trend_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthTrendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/health/churn-complexity":{"get":{"tags":["code-health"],"summary":"Health Churn Complexity","description":"Churn x complexity scatter points (danger-first), capped at *limit*.","operationId":"health_churn_complexity_snapshots__snapshot_id__health_churn_complexity_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Health Churn Complexity Snapshots  Snapshot Id  Health Churn Complexity Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/health/files/{file_path}/trend":{"get":{"tags":["code-health"],"summary":"Health File Trend","description":"Per-file health score over time.\n\nAssembled from the ``per_file_scores`` map persisted on each snapshot's\n``health_snapshots.json``. With a single index the series carries one point;\nit fills in as more snapshots accrue.\n\nEach point also carries ``unclamped_score``: the score clamps at\n``SCORE_FLOOR``, so a file deep enough to sit on the floor draws a flat line\nno matter how much worse it gets, and the movement the chart exists to show\nis exactly the movement the clamp destroys. It equals ``score`` unless every\npoint in the window recorded a depth — see ``file_score_series``.","operationId":"health_file_trend_snapshots__snapshot_id__health_files__file_path__trend_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"file_path","in":"path","required":true,"schema":{"type":"string","description":"repo-relative file path","title":"File Path"},"description":"repo-relative file path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Health File Trend Snapshots  Snapshot Id  Health Files  File Path  Trend Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/health/performance-opportunities":{"get":{"tags":["code-health"],"summary":"List Performance Opportunities","description":"One bounded page over the causal read model, with its plan links.\n\n``summary`` describes the selected context rather than the page, so a\nheadline never contradicts the queue under it, and ``repository_total``\nkeeps the census beside it. ``facets`` narrows further, cross-filtering\neach dimension by the others but never by itself, so picking one value\nnever zeroes the alternatives to it.","operationId":"list_performance_opportunities_snapshots__snapshot_id__health_performance_opportunities_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"context","in":"query","required":false,"schema":{"enum":["production_tooling","production","tooling","test","unknown","all"],"type":"string","default":"production_tooling","title":"Context"}},{"name":"boundary","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boundary"}},{"name":"confidence","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confidence"}},{"name":"actionability","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actionability"}},{"name":"view","in":"query","required":false,"schema":{"type":"string","default":"detail","title":"View"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"rank","title":"Sort"}},{"name":"file_paths","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated, capped at 50.","title":"File Paths"},"description":"Comma-separated, capped at 50."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceOpportunityPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/health/performance-opportunities/{opportunity_id}/findings":{"get":{"tags":["code-health"],"summary":"List Performance Opportunity Findings","description":"Click-gated raw observations behind one stable opportunity id.\n\nReads the same eligible set the listing folded, so the row count here and\nthe card's ``observations_total`` are two views of one number rather than\ntwo independent counts that can drift.\n\nAn unknown id is an empty page rather than a 404: ids are derived from the\nsnapshot's own rows, so a link shared from a different snapshot names a\nreal opportunity that simply is not in this one.","operationId":"list_performance_opportunity_findings_snapshots__snapshot_id__health_performance_opportunities__opportunity_id__findings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"opportunity_id","in":"path","required":true,"schema":{"type":"string","title":"Opportunity Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceOpportunityFindingsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/coupling":{"get":{"tags":["coupling"],"summary":"Get Coupling","description":"Repo-wide change-coupling graph (nodes + strongest co-change edges).\n\nReturns an empty graph with ``state='not_available'`` for snapshots indexed\nbefore the coupling layer shipped.","operationId":"get_coupling_snapshots__snapshot_id__coupling_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":400,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Coupling Snapshots  Snapshot Id  Coupling Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/stats/highlights":{"get":{"tags":["stats"],"summary":"Stats Highlights","description":"Everything the Stats (\"By the Numbers\") page needs, in one call.\n\nReturns a plain nested dict (no Pydantic response_model — the OSS route is\ndict-based too) shaped to `StatsHighlights`.\n\nDeliberately no health-summary, findings, dead-code, dependency, decision or\ncost reads. Every one of those belongs to a page that already owns the\nsubject, and loading them here cost this endpoint five artifact fetches for\nnumbers shown better elsewhere.","operationId":"stats_highlights_snapshots__snapshot_id__stats_highlights_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Stats Highlights Snapshots  Snapshot Id  Stats Highlights Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/security/scan":{"get":{"tags":["security"],"summary":"Get Security Scan","operationId":"get_security_scan_snapshots__snapshot_id__security_scan_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityScanStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["security"],"summary":"Trigger Scan","description":"Manual (re)trigger — retry a failed scan, or scan a snapshot indexed\nbefore the security layer existed. One in-flight scan per snapshot.","operationId":"trigger_scan_snapshots__snapshot_id__security_scan_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityScanTriggerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/security/dependencies":{"get":{"tags":["security"],"summary":"List Security Dependencies","operationId":"list_security_dependencies_snapshots__snapshot_id__security_dependencies_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"ecosystem","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ecosystem"}},{"name":"vulnerable_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Vulnerable Only"}},{"name":"dev","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"true=dev-only, false=runtime-only","title":"Dev"},"description":"true=dev-only, false=runtime-only"},{"name":"copyleft_only","in":"query","required":false,"schema":{"type":"boolean","description":"only weak-/strong-copyleft license_risk","default":false,"title":"Copyleft Only"},"description":"only weak-/strong-copyleft license_risk"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityDependenciesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/security/vulnerabilities":{"get":{"tags":["security"],"summary":"List Security Vulnerabilities","operationId":"list_security_vulnerabilities_snapshots__snapshot_id__security_vulnerabilities_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"critical | high | medium | low | unknown","title":"Severity"},"description":"critical | high | medium | low | unknown"},{"name":"kev","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Kev"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"open | acknowledged | false_positive","title":"Status"},"description":"open | acknowledged | false_positive"},{"name":"dependency_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"only vulnerabilities of this dependency row","title":"Dependency Id"},"description":"only vulnerabilities of this dependency row"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityVulnerabilitiesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/security/secrets":{"get":{"tags":["security"],"summary":"List Security Secrets","description":"Secret findings for the snapshot's repo. Repo-scoped by design: a\nleaked credential lives in git history, not in one snapshot — every\nrow is redacted (fingerprint + 4-char preview, never the value).","operationId":"list_security_secrets_snapshots__snapshot_id__security_secrets_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"live","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"true=live at HEAD, false=historical","title":"Live"},"description":"true=live at HEAD, false=historical"},{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"critical | high | medium | low","title":"Severity"},"description":"critical | high | medium | low"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"open | acknowledged | resolved | false_positive","title":"Status"},"description":"open | acknowledged | resolved | false_positive"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecuritySecretsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/security/sbom":{"get":{"tags":["security"],"summary":"Download Sbom","description":"Download the snapshot's CycloneDX SBOM (`{repo}-{shortsha}.cdx.json`).\n\nRaw passthrough of the artifact syft produced at scan time — we never\nrebuild or mutate it, so the document stays signature-stable.","operationId":"download_sbom_snapshots__snapshot_id__security_sbom_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/security/vex":{"get":{"tags":["security"],"summary":"Download Vex","description":"Download a CycloneDX 1.6 VEX document\n(`{repo}-{shortsha}.vex.cdx.json`).\n\nUnlike the SBOM (raw syft passthrough), VEX is generated fresh from\nthe tables at download time — it carries our *analysis* (triage,\nreachability, user statuses mapped to CycloneDX impact-analysis\nstates), and the analysis changes as users triage.","operationId":"download_vex_snapshots__snapshot_id__security_vex_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/security/secrets/{secret_id}":{"patch":{"tags":["security"],"summary":"Patch Secret","description":"Acknowledge / resolve / false-positive a secret finding (owner-only,\nsame rule as vulnerability status).","operationId":"patch_secret_snapshots__snapshot_id__security_secrets__secret_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretFindingPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Patch Secret Snapshots  Snapshot Id  Security Secrets  Secret Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/security/vulnerabilities/{vuln_id}":{"patch":{"tags":["security"],"summary":"Patch Vulnerability","description":"Acknowledge / false-positive a finding (health-findings precedent:\nonly the snapshot owner may mutate).","operationId":"patch_vulnerability_snapshots__snapshot_id__security_vulnerabilities__vuln_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"vuln_id","in":"path","required":true,"schema":{"type":"string","title":"Vuln Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityVulnerabilityPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Patch Vulnerability Snapshots  Snapshot Id  Security Vulnerabilities  Vuln Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{repo_id}/security/sbom-diff":{"get":{"tags":["security"],"summary":"Get Sbom Diff","description":"Added / removed / version-changed dependencies between two snapshots\nof the same repo. Pure SQL over `snapshot_dependencies` — no SBOM\nparsing. Both snapshots go through the same read-access + tier gate as\nevery other security read.","operationId":"get_sbom_diff_repos__repo_id__security_sbom_diff_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}},{"name":"from","in":"query","required":true,"schema":{"type":"string","title":"From"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","title":"To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SbomDiffResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{repo_id}/security/audit-log":{"get":{"tags":["security"],"summary":"Get Audit Log","description":"The repo's security audit trail, newest first (Teams+; owner/admin\nfor team repos). Cursor-paged — pass ``next_cursor`` back as\n``cursor``; the cursor is opaque, do not parse.","operationId":"get_audit_log_repos__repo_id__security_audit_log_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}},{"name":"event","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"one audit event kind","title":"Event"},"description":"one audit event kind"},{"name":"actor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"filter to one user id","title":"Actor"},"description":"filter to one user id"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO lower bound on created_at","title":"Since"},"description":"ISO lower bound on created_at"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO upper bound on created_at","title":"Until"},"description":"ISO upper bound on created_at"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"opaque cursor from a prior page","title":"Cursor"},"description":"opaque cursor from a prior page"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityAuditLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{repo_id}/security/audit-log/export":{"get":{"tags":["security"],"summary":"Export Audit Log","description":"Streamed export of the (filtered) audit trail — the COMMERCIAL.md\n§5.1 commitment: in-product + JSON/CSV export. Pages through the\nPostgREST row cap; never holds more than one page in memory.","operationId":"export_audit_log_repos__repo_id__security_audit_log_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|csv)$","default":"json","title":"Format"}},{"name":"event","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event"}},{"name":"actor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Until"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{repo_id}/security/webhooks":{"get":{"tags":["security"],"summary":"List Security Webhooks","description":"Configured endpoints for this repo. Signing secrets are never\nreturned — they are shown once at creation only.","operationId":"list_security_webhooks_repos__repo_id__security_webhooks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityWebhookList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["security"],"summary":"Create Security Webhook","operationId":"create_security_webhook_repos__repo_id__security_webhooks_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityWebhookCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityWebhookCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{repo_id}/security/webhooks/{webhook_id}":{"patch":{"tags":["security"],"summary":"Patch Security Webhook","operationId":"patch_security_webhook_repos__repo_id__security_webhooks__webhook_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}},{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityWebhookPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["security"],"summary":"Delete Security Webhook","operationId":"delete_security_webhook_repos__repo_id__security_webhooks__webhook_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}},{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Security Webhook Repos  Repo Id  Security Webhooks  Webhook Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{repo_id}/security/webhooks/{webhook_id}/test":{"post":{"tags":["security"],"summary":"Test Security Webhook","description":"One signed test delivery, synchronous — the caller sees the result.","operationId":"test_security_webhook_repos__repo_id__security_webhooks__webhook_id__test_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}},{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Test Security Webhook Repos  Repo Id  Security Webhooks  Webhook Id  Test Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{repo_id}/security/compliance":{"get":{"tags":["security"],"summary":"Get Compliance Report","description":"Control-coverage report over the repo's current security findings.\nHonest framing is in-band: the response carries a disclaimer that this\nis not an audit or certification.","operationId":"get_compliance_report_repos__repo_id__security_compliance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}},{"name":"framework","in":"query","required":true,"schema":{"type":"string","description":"pci_dss | soc2","title":"Framework"},"description":"pci_dss | soc2"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{repo_id}/security/compliance/export":{"get":{"tags":["security"],"summary":"Export Compliance Report","description":"Download the report as JSON or a markdown document with timestamps\nand repo identity — the artifact teams hand to an assessor.","operationId":"export_compliance_report_repos__repo_id__security_compliance_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}},{"name":"framework","in":"query","required":true,"schema":{"type":"string","description":"pci_dss | soc2","title":"Framework"},"description":"pci_dss | soc2"},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|md)$","default":"json","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/security":{"get":{"tags":["security"],"summary":"Get Workspace Security","description":"Workspace-wide security posture (Teams+): per-repo scan freshness,\nworst open vulnerabilities by priority, live-secrets-anywhere, and\nlicense-risk counts. Pure aggregation over the per-repo scan tables —\neach repo contributes its latest ready snapshot.","operationId":"get_workspace_security_workspaces__workspace_id__security_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSecurityRollup"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{short_id}/blast-radius":{"post":{"tags":["analytics"],"summary":"Analyze Blast Radius","description":"Compute blast-radius for a proposed PR (or top-level aggregation).\n\nPOST body matches the OSS engine: {changed_files: [...], max_depth: int}.\nWhen changed_files is empty, returns the top hotspot files across the repo\nso a UI without specific changes selected can still surface a meaningful\noverview (\"top-level repo aggregation\").\n\nThe hosted backend has no SQL DB for indexed data, so this endpoint reads\ngraph_metrics.json + git_metadata.json + parsed_files.json from Supabase\nStorage and runs the same scoring formula as the OSS analyzer.","operationId":"analyze_blast_radius_repos__short_id__blast_radius_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"short_id","in":"path","required":true,"schema":{"type":"string","title":"Short Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlastRadiusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlastRadiusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{short_id}/costs":{"get":{"tags":["analytics"],"summary":"Get Repo Costs","description":"Per-repo cost breakdown.\n\nAggregates two data sources:\n  - credit_transactions (this user, scoped by repo_id) - billing-side spend\n    in cents, broken down by transaction type, with 7d / 30d / lifetime\n    windows.\n  - llm_costs.json artifact (engine-side per-operation telemetry) when\n    present. The OSS indexer doesn't currently emit this artifact for\n    every snapshot, so the response includes available=False rather than\n    500-ing when it's missing.\n\nAuth: anyone can fetch the totals for a public snapshot (transactions are\nfiltered by user_id, so anonymous callers see zeros for the spend half but\nthe engine telemetry is still useful as a public stat). Private snapshots\nfollow the standard owner-only rule.","operationId":"get_repo_costs_repos__short_id__costs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"short_id","in":"path","required":true,"schema":{"type":"string","title":"Short Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoCostsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{short_id}/attention":{"get":{"tags":["analytics"],"summary":"Get Attention","description":"Items needing developer attention for this repo.\n\nComposes hotspots, decisions, and dead-code findings into the canonical\n`AttentionItem[]` shape consumed directly by `@repowise-dev/ui`'s\n`AttentionPanel`. Empty list (200) for repos with no attention-worthy\nitems - never 404.","operationId":"get_attention_repos__short_id__attention_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"short_id","in":"path","required":true,"schema":{"type":"string","title":"Short Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AttentionItem"},"title":"Response Get Attention Repos  Short Id  Attention Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{short_id}/health-score":{"get":{"tags":["analytics"],"summary":"Get Health Score","description":"Composite 0-100 health score for this repo.\n\nWeighted blend of doc coverage, freshness, dead-code ratio, hotspot\ndensity, and silo ratio. Sparse repos (e.g. no docs generated, no git\nmetadata) still receive a deterministic baseline rather than 500-ing.","operationId":"get_health_score_repos__short_id__health_score_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"short_id","in":"path","required":true,"schema":{"type":"string","title":"Short Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthScoreResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces":{"get":{"tags":["workspaces"],"summary":"List Workspaces","operationId":"list_workspaces_workspaces_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WorkspaceResponse"},"type":"array","title":"Response List Workspaces Workspaces Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["workspaces"],"summary":"Create Workspace","operationId":"create_workspace_workspaces_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/workspaces/{workspace_id}":{"get":{"tags":["workspaces"],"summary":"Get Workspace","operationId":"get_workspace_workspaces__workspace_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["workspaces"],"summary":"Update Workspace","operationId":"update_workspace_workspaces__workspace_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workspaces"],"summary":"Delete Workspace","operationId":"delete_workspace_workspaces__workspace_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/repos":{"post":{"tags":["workspaces"],"summary":"Add Repo","operationId":"add_repo_workspaces__workspace_id__repos_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceMemberAddRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/repos/{repo_id}":{"delete":{"tags":["workspaces"],"summary":"Remove Repo","operationId":"remove_repo_workspaces__workspace_id__repos__repo_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/reindex":{"post":{"tags":["workspaces"],"summary":"Reindex Workspace","operationId":"reindex_workspace_workspaces__workspace_id__reindex_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceReindexResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/snapshots/{snapshot_id}/co-changes":{"get":{"tags":["workspaces"],"summary":"Get Co Changes","operationId":"get_co_changes_workspaces__workspace_id__snapshots__snapshot_id__co_changes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/snapshots/{snapshot_id}/contracts":{"get":{"tags":["workspaces"],"summary":"Get Contracts","operationId":"get_contracts_workspaces__workspace_id__snapshots__snapshot_id__contracts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/snapshots/{snapshot_id}/contracts/detail":{"get":{"tags":["workspaces"],"summary":"Get Contract Detail","description":"One contract and everything it links to.\n\nIdentified by the (repo, file, contract id) triple the contracts table\nalready carries. A file that calls the same endpoint twice produces two\nrows under one triple; the first is returned, so ``symbol_name`` and\n``line`` name one of the call sites rather than all of them.","operationId":"get_contract_detail_workspaces__workspace_id__snapshots__snapshot_id__contracts_detail_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"repo","in":"query","required":true,"schema":{"type":"string","description":"Repo alias the contract was extracted from","title":"Repo"},"description":"Repo alias the contract was extracted from"},{"name":"file","in":"query","required":true,"schema":{"type":"string","description":"File path, relative to that repo's root","title":"File"},"description":"File path, relative to that repo's root"},{"name":"id","in":"query","required":true,"schema":{"type":"string","description":"Contract id, e.g. 'http::GET::/api/users'","title":"Id"},"description":"Contract id, e.g. 'http::GET::/api/users'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/snapshots/{snapshot_id}/package-deps":{"get":{"tags":["workspaces"],"summary":"Get Package Deps","operationId":"get_package_deps_workspaces__workspace_id__snapshots__snapshot_id__package_deps_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/snapshots/{snapshot_id}/hotspots":{"get":{"tags":["workspaces"],"summary":"Get Workspace Hotspots","description":"Merged worst-N churn hotspots across every member repo.\n\nThe view used to fan out one uncached per-member ``getHotspots`` call from\nthe browser; this rolls the same per-member ``git_metadata.json`` derivation\nup server-side. Hotspots aren't a precomputed workspace artifact — each\nmember's are derived from its own git metadata (same filter + translation as\nthe single-repo ``/snapshots/{id}/hotspots`` route) and merged here.\n\nAuthz mirrors the sibling artifact endpoints (cross-user → 404). The merged\nrollup is cached per workspace snapshot id — the member set is pinned by the\nsnapshot id, so the merge is immutable and ``limit`` just slices it.","operationId":"get_workspace_hotspots_workspaces__workspace_id__snapshots__snapshot_id__hotspots_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/snapshots/{snapshot_id}/system-graph":{"get":{"tags":["workspaces"],"summary":"Get System Graph","operationId":"get_system_graph_workspaces__workspace_id__snapshots__snapshot_id__system_graph_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/snapshots/{snapshot_id}/diagnostics":{"get":{"tags":["workspaces"],"summary":"Get Diagnostics","description":"Extraction diagnostics, read from the block embedded in the system graph.","operationId":"get_diagnostics_workspaces__workspace_id__snapshots__snapshot_id__diagnostics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/snapshots/{snapshot_id}/breaking-changes":{"get":{"tags":["workspaces"],"summary":"Get Breaking Changes","operationId":"get_breaking_changes_workspaces__workspace_id__snapshots__snapshot_id__breaking_changes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/snapshots/{snapshot_id}/conformance":{"get":{"tags":["workspaces"],"summary":"Get Conformance","operationId":"get_conformance_workspaces__workspace_id__snapshots__snapshot_id__conformance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/snapshots/{snapshot_id}/architecture":{"get":{"tags":["workspaces"],"summary":"Get Architecture","operationId":"get_architecture_workspaces__workspace_id__snapshots__snapshot_id__architecture_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/snapshots/{snapshot_id}/blast-radius":{"get":{"tags":["workspaces"],"summary":"Get Blast Radius","description":"Cross-repo blast radius for one or more changed targets.\n\nQuery-dependent, so it is computed server-side: the system graph is\nreconstructed from its artifact and run through the pure OSS traversal.","operationId":"get_blast_radius_workspaces__workspace_id__snapshots__snapshot_id__blast_radius_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"target","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"},"description":"node id(s) or repo alias(es) to ripple from","title":"Target"},"description":"node id(s) or repo alias(es) to ripple from"},{"name":"max_depth","in":"query","required":false,"schema":{"type":"integer","maximum":8,"minimum":1,"default":3,"title":"Max Depth"}},{"name":"include_behavioral","in":"query","required":false,"schema":{"type":"boolean","description":"traverse co-change edges too","default":true,"title":"Include Behavioral"},"description":"traverse co-change edges too"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/internal/member-snapshot-complete":{"post":{"tags":["workspaces"],"summary":"Internal Member Complete","description":"Fired by the Modal indexer when a member repo's snapshot flips to\n``ready``. Triggers per-workspace auto-reindex with 60s debounce.\n\nMirrors the ``/billing/internal/finalize-indexing`` callback shape.","operationId":"internal_member_complete_workspaces_internal_member_snapshot_complete_post","parameters":[{"name":"x-service-token","in":"header","required":true,"schema":{"type":"string","title":"X-Service-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberSnapshotCompleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/snapshots/{snapshot_id}/chat/conversations":{"get":{"tags":["chat"],"summary":"List Conversations","description":"List live workspace conversations for this user + snapshot, pinned first.\n\nSince migration 126 these carry a `chat_conversations` row like their\nsnapshot-scoped counterparts, so a stored title, a pin and a soft delete\nall apply here too. Before 126 they existed only as the GROUP BY of\n`chat_messages`, which is why this surface had no rename.","operationId":"list_conversations_workspaces__workspace_id__snapshots__snapshot_id__chat_conversations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"default":2000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/snapshots/{snapshot_id}/chat/conversations/{conversation_id}":{"patch":{"tags":["chat"],"summary":"Update Conversation","description":"Rename and/or pin. Body: `{\"title\": \"...\"}` and/or `{\"pinned\": bool}`.","operationId":"update_conversation_workspaces__workspace_id__snapshots__snapshot_id__chat_conversations__conversation_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["chat"],"summary":"Get Conversation","operationId":"get_conversation_workspaces__workspace_id__snapshots__snapshot_id__chat_conversations__conversation_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["chat"],"summary":"Delete Conversation","description":"Soft-delete a conversation. Messages are kept so restore is lossless.","operationId":"delete_conversation_workspaces__workspace_id__snapshots__snapshot_id__chat_conversations__conversation_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/snapshots/{snapshot_id}/chat/conversations/{conversation_id}/restore":{"post":{"tags":["chat"],"summary":"Restore Conversation","description":"Undo a soft delete.","operationId":"restore_conversation_workspaces__workspace_id__snapshots__snapshot_id__chat_conversations__conversation_id__restore_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/snapshots/{snapshot_id}/chat/conversations/{conversation_id}/fork":{"post":{"tags":["chat"],"summary":"Fork Conversation","description":"Branch a conversation into a new one.","operationId":"fork_conversation_workspaces__workspace_id__snapshots__snapshot_id__chat_conversations__conversation_id__fork_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/snapshots/{snapshot_id}/chat/conversations/{conversation_id}/artifacts/{artifact_id}":{"get":{"tags":["chat"],"summary":"Get Conversation Artifact","description":"One artifact by id, for deep-links into a past turn.","operationId":"get_conversation_artifact_workspaces__workspace_id__snapshots__snapshot_id__chat_conversations__conversation_id__artifacts__artifact_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["chat"],"summary":"Update Conversation Artifact","description":"Pin or unpin an artifact. Body: `{\"pinned\": bool}`.","operationId":"update_conversation_artifact_workspaces__workspace_id__snapshots__snapshot_id__chat_conversations__conversation_id__artifacts__artifact_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/snapshots/{snapshot_id}/chat":{"post":{"tags":["chat"],"summary":"Workspace Chat Message","description":"Send a workspace-scoped chat message. SSE stream.","operationId":"workspace_chat_message_workspaces__workspace_id__snapshots__snapshot_id__chat_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/teams":{"get":{"tags":["teams"],"summary":"List Teams","operationId":"list_teams_teams_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TeamResponse"},"type":"array","title":"Response List Teams Teams Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["teams"],"summary":"Create Team","operationId":"create_team_teams_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/teams/{team_id}":{"get":{"tags":["teams"],"summary":"Get Team","operationId":"get_team_teams__team_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["teams"],"summary":"Update Team","operationId":"update_team_teams__team_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["teams"],"summary":"Delete Team","operationId":"delete_team_teams__team_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/teams/{team_id}/members":{"get":{"tags":["teams"],"summary":"List Members","operationId":"list_members_teams__team_id__members_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamMemberResponse"},"title":"Response List Members Teams  Team Id  Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/teams/{team_id}/members/{member_user_id}":{"patch":{"tags":["teams"],"summary":"Change Member Role","operationId":"change_member_role_teams__team_id__members__member_user_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"string","title":"Member User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberRoleUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMemberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["teams"],"summary":"Remove Member","operationId":"remove_member_teams__team_id__members__member_user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"string","title":"Member User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/teams/{team_id}/transfer-ownership":{"post":{"tags":["teams"],"summary":"Transfer Ownership","description":"Owner-only: promote another active member to owner and demote the\ncaller to admin. Returns the updated roster.","operationId":"transfer_ownership_teams__team_id__transfer_ownership_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnershipTransferRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamMemberResponse"},"title":"Response Transfer Ownership Teams  Team Id  Transfer Ownership Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/teams/{team_id}/invitations":{"post":{"tags":["teams"],"summary":"Create Invitation","operationId":"create_invitation_teams__team_id__invitations_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["teams"],"summary":"List Invitations","operationId":"list_invitations_teams__team_id__invitations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamInvitationResponse"},"title":"Response List Invitations Teams  Team Id  Invitations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/teams/{team_id}/invitations/{invitation_id}":{"delete":{"tags":["teams"],"summary":"Revoke Invitation","operationId":"revoke_invitation_teams__team_id__invitations__invitation_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","title":"Invitation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/teams/{team_id}/repos":{"get":{"tags":["teams"],"summary":"List Team Repos","operationId":"list_team_repos_teams__team_id__repos_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamRepoResponse"},"title":"Response List Team Repos Teams  Team Id  Repos Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["teams"],"summary":"Add Team Repo","operationId":"add_team_repo_teams__team_id__repos_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamRepoAddRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamRepoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/teams/{team_id}/repos/{repo_id}":{"delete":{"tags":["teams"],"summary":"Remove Team Repo","operationId":"remove_team_repo_teams__team_id__repos__repo_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/teams/{team_id}/installations":{"get":{"tags":["teams"],"summary":"List Team Installations","operationId":"list_team_installations_teams__team_id__installations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamInstallationResponse"},"title":"Response List Team Installations Teams  Team Id  Installations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["teams"],"summary":"Attach Team Installation","description":"Attach an org GitHub App install to the team so every member can use it.\n\nOwner/admin only, and the caller must be a verified admin of the GitHub org\nthe install belongs to — pass the Supabase session ``provider_token`` as\n``X-GitHub-Token`` so the backend can cross-check the token's identity\nbefore trusting the org-admin claim. Idempotent.","operationId":"attach_team_installation_teams__team_id__installations_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"x-github-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Github-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInstallationAttachRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInstallationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/teams/{team_id}/installations/{installation_id}":{"delete":{"tags":["teams"],"summary":"Detach Team Installation","operationId":"detach_team_installation_teams__team_id__installations__installation_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"installation_id","in":"path","required":true,"schema":{"type":"integer","title":"Installation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/teams/{team_id}/insights/health":{"get":{"tags":["teams-insights"],"summary":"Get Team Health","operationId":"get_team_health_teams__team_id__insights_health_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamHealthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/teams/{team_id}/insights/ownership":{"get":{"tags":["teams-insights"],"summary":"Get Team Ownership","operationId":"get_team_ownership_teams__team_id__insights_ownership_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamOwnershipResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/teams/{team_id}/insights/signals":{"get":{"tags":["teams-insights"],"summary":"Get Team Signals","operationId":"get_team_signals_teams__team_id__insights_signals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamSignalsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invitations/{token}/accept":{"post":{"tags":["teams"],"summary":"Accept Invitation","operationId":"accept_invitation_invitations__token__accept_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationAcceptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invitations/{token}/preview":{"get":{"tags":["teams"],"summary":"Preview Invitation","description":"Anonymous-safe invite context for the accept page (pre sign-in).\n\nNo auth on purpose: the frontend shows the team and inviter before the\nuser signs in. The service scrubs everything sensitive and collapses\nrevoked/unknown/redeemed tokens into one 404.","operationId":"preview_invitation_invitations__token__preview_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/teams/{team_id}/integrations/atlassian/connect":{"get":{"tags":["integrations"],"summary":"Start Connect","operationId":"start_connect_teams__team_id__integrations_atlassian_connect_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AtlassianConnectStart"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/teams/{team_id}/integrations/atlassian":{"get":{"tags":["integrations"],"summary":"Get Status","operationId":"get_status_teams__team_id__integrations_atlassian_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AtlassianConnectionStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["integrations"],"summary":"Disconnect","operationId":"disconnect_teams__team_id__integrations_atlassian_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/teams/{team_id}/integrations/atlassian/site":{"post":{"tags":["integrations"],"summary":"Select Site","operationId":"select_site_teams__team_id__integrations_atlassian_site_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AtlassianSiteSelectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AtlassianConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/atlassian/callback":{"get":{"tags":["integrations"],"summary":"Oauth Callback","description":"Browser redirect from Atlassian. The signed state is the auth.","operationId":"oauth_callback_integrations_atlassian_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/decisions/{decision_id}/issues":{"get":{"tags":["integrations"],"summary":"List Decision Issues","operationId":"list_decision_issues_snapshots__snapshot_id__decisions__decision_id__issues_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","title":"Decision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JiraIssueLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["integrations"],"summary":"Create Decision Issue","operationId":"create_decision_issue_snapshots__snapshot_id__decisions__decision_id__issues_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","title":"Decision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JiraLinkCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JiraIssueLink"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/decisions/{decision_id}/issues/{link_id}":{"delete":{"tags":["integrations"],"summary":"Delete Decision Issue","operationId":"delete_decision_issue_snapshots__snapshot_id__decisions__decision_id__issues__link_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","title":"Decision Id"}},{"name":"link_id","in":"path","required":true,"schema":{"type":"string","title":"Link Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/snapshots/{snapshot_id}/jira/extract-links":{"post":{"tags":["integrations"],"summary":"Extract Decision Issues","description":"Mine the snapshot's decision evidence commits for Jira issue keys.","operationId":"extract_decision_issues_snapshots__snapshot_id__jira_extract_links_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JiraExtractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{repo_id}/integrations/confluence":{"get":{"tags":["integrations"],"summary":"Get Confluence Config","operationId":"get_confluence_config_repos__repo_id__integrations_confluence_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfluencePublicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["integrations"],"summary":"Update Confluence Config","operationId":"update_confluence_config_repos__repo_id__integrations_confluence_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfluenceConfigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfluencePublicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["integrations"],"summary":"Delete Confluence Config","operationId":"delete_confluence_config_repos__repo_id__integrations_confluence_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{repo_id}/integrations/confluence/spaces":{"get":{"tags":["integrations"],"summary":"List Confluence Spaces","operationId":"list_confluence_spaces_repos__repo_id__integrations_confluence_spaces_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfluenceSpacesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos/{repo_id}/integrations/confluence/publish":{"post":{"tags":["integrations"],"summary":"Publish Confluence Now","operationId":"publish_confluence_now_repos__repo_id__integrations_confluence_publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfluencePublishResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/confluence/publish-due":{"post":{"tags":["integrations"],"summary":"Publish Due Publications","description":"Publish every enabled weekly publication that is due.\n\nCalled by the Modal cron. Due = enabled, cadence weekly, and last\npublished more than ~6.5 days ago (or never) — tolerant of cron\ndrift. Per-repo failures are recorded on the publication row and\nnever abort the sweep.","operationId":"publish_due_publications_internal_confluence_publish_due_post","parameters":[{"name":"x-service-token","in":"header","required":true,"schema":{"type":"string","title":"X-Service-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats":{"get":{"tags":["public"],"summary":"Get Public Stats","description":"Public adoption signal for the marketing site.\n\nReturns lifetime counts of completed snapshots, registered users, and\nchat messages. Cached in-memory for 24h so a viral landing-page hit\ndoesn't translate into row-count scans on the primary database.","operationId":"get_public_stats_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsResponse"}}}}}}},"/pr/{owner}/{name}/{pr_number}":{"get":{"tags":["public"],"summary":"Get Pr Analysis","description":"The newest analysis the bot persisted for this pull request.\n\nNewest rather than a named SHA: the URL carries no SHA, and the reader\narriving from a comment wants whatever the comment currently describes. A\nsuperseded head's analysis is still addressable by primary key for the\nre-push delta, it is just not what this serves.","operationId":"get_pr_analysis_pr__owner___name___pr_number__get","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","title":"Owner"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"pr_number","in":"path","required":true,"schema":{"type":"integer","title":"Pr Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrAnalysisResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/repos/{owner}/{name}/refresh":{"get":{"tags":["public"],"summary":"Refresh Status","description":"Render state for the refresh control. Two row reads, no artifact.","operationId":"refresh_status_public_repos__owner___name__refresh_get","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","title":"Owner"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["public"],"summary":"Request Refresh","operationId":"request_refresh_public_repos__owner___name__refresh_post","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","title":"Owner"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/unsubscribe":{"post":{"tags":["public"],"summary":"Unsubscribe","description":"Human-facing: the confirm button on the /unsubscribe page.","operationId":"unsubscribe_unsubscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsubscribeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsubscribeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/unsubscribe/one-click":{"post":{"tags":["public"],"summary":"Unsubscribe One Click","description":"RFC 8058 target for the List-Unsubscribe-Post header.\n\nMail clients POST here with no body and expect a 2xx. Separate from the\nroute above only because the token arrives in the query string rather than\na JSON body, which is what the header's URL encodes.","operationId":"unsubscribe_one_click_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":{"type":"object","additionalProperties":true,"title":"Response Unsubscribe One Click Unsubscribe One Click Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/badge/wiki/{owner}/{repo}.svg":{"get":{"tags":["badge"],"summary":"Distribution Badge","description":"The distribution badge. Pure function of the URL — no database access.\n\nIt renders for any well-formed owner/repo, indexed or not. That is\ndeliberate: a maintainer who adds the badge must never see a broken image\nwhile their first index is still running, and the badge reveals nothing\nabout whether a repo exists (it renders identically either way).","operationId":"distribution_badge_badge_wiki__owner___repo__svg_get","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","title":"Owner"}},{"name":"repo","in":"path","required":true,"schema":{"type":"string","title":"Repo"}},{"name":"style","in":"query","required":false,"schema":{"type":"string","default":"flat","title":"Style"}}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/badge/wiki/{owner}/{repo}.json":{"get":{"tags":["badge"],"summary":"Distribution Badge Json","description":"Shields endpoint-badge payload for the distribution badge.","operationId":"distribution_badge_json_badge_wiki__owner___repo__json_get","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","title":"Owner"}},{"name":"repo","in":"path","required":true,"schema":{"type":"string","title":"Repo"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/badge/health/{owner}/{repo}.svg":{"get":{"tags":["badge"],"summary":"Health Badge","description":"Average code health of the latest ready snapshot, or its direction.","operationId":"health_badge_badge_health__owner___repo__svg_get","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","title":"Owner"}},{"name":"repo","in":"path","required":true,"schema":{"type":"string","title":"Repo"}},{"name":"variant","in":"query","required":false,"schema":{"type":"string","default":"score","title":"Variant"}},{"name":"style","in":"query","required":false,"schema":{"type":"string","default":"flat","title":"Style"}}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/badge/health/{owner}/{repo}.json":{"get":{"tags":["badge"],"summary":"Health Badge Json","description":"Shields endpoint-badge JSON for the health badge.\n\nReturns the ``{schemaVersion, label, message, color}`` shape a\n``https://img.shields.io/endpoint?url=...`` badge consumes, so a README can\nrender through shields' own pipeline while reusing our brand color ramp.\nCached identically to the .svg route.","operationId":"health_badge_json_badge_health__owner___repo__json_get","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","title":"Owner"}},{"name":"repo","in":"path","required":true,"schema":{"type":"string","title":"Repo"}},{"name":"variant","in":"query","required":false,"schema":{"type":"string","default":"score","title":"Variant"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/feedback":{"post":{"tags":["feedback"],"summary":"Submit Feedback","operationId":"submit_feedback_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/telemetry/events":{"post":{"tags":["telemetry"],"summary":"Ingest Event","description":"Store one anonymous telemetry event.\n\nUnauthenticated and rate-limited per IP. The hot fields are denormalized\nfrom ``properties`` into columns for cheap aggregation. Persist failures are\nlogged and swallowed — the CLI sends fire-and-forget, so we always return\n200 rather than provoking a retry storm.","operationId":"ingest_event_telemetry_events_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryEventIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__telemetry__IngestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/telemetry/admin/summary":{"get":{"tags":["telemetry"],"summary":"Admin Summary","description":"Aggregated telemetry for the internal admin dashboard. Admins only.","operationId":"admin_summary_telemetry_admin_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetrySummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/product-events/batch":{"post":{"tags":["product-events"],"summary":"Ingest Batch","description":"Store a batch of product events.\n\nOptionally authenticated: anonymous visitors are the top of the funnel and\nmust be able to write, but when a bearer token is present we take the\nidentity from it. One INSERT per batch, never one per event.","operationId":"ingest_batch_product_events_batch_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__product_events__IngestResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/product-events/admin/funnel":{"get":{"tags":["product-events"],"summary":"Admin Funnel","description":"Funnel aggregates for the admin panel. Admins only, aggregated in SQL.","operationId":"admin_funnel_product_events_admin_funnel_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"segment","in":"query","required":false,"schema":{"type":"string","pattern":"^(all|signed_in|anonymous)$","default":"all","title":"Segment"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/product-events/admin/platform":{"get":{"tags":["product-events"],"summary":"Admin Platform","description":"Users / repos / snapshots / spend rollup for the admin home page.","operationId":"admin_platform_product_events_admin_platform_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/repos":{"get":{"tags":["admin"],"summary":"List Public Repos","description":"The fleet table: every public repo, stalest first by default.\n\nOne RPC call. It reads denormalized columns on ``repos`` / ``snapshots``\nand decodes no artifact, so paging it stays clear of the pattern in\n``docs/MEMORY_OOM_INVESTIGATION.md``.","operationId":"list_public_repos_admin_repos_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Search"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"stale","title":"Sort"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRepoListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/repos/{repo_id}/refresh":{"post":{"tags":["admin"],"summary":"Refresh Public Repo","description":"Force a re-index of any public repo, with no library link required.\n\nBypasses the weekly per-repo cooldown and the daily fleet ceiling that gate\nthe anonymous refresh arm: both exist to bound anonymous spend, and neither\ndescribes an operator acting deliberately on one repo. The in-flight\ndebounce still applies, and the failure backoff still applies unless\n``force`` is set.\n\nRuns as ``requested_by=\"admin\"``, which is what makes the resulting\nsnapshot fan out to *every* linked user rather than to the caller — who,\non a repo they do not own, has no link row to fan out to.","operationId":"refresh_public_repo_admin_repos__repo_id__refresh_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AdminRefreshRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRefreshResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/repos/{repo_id}":{"patch":{"tags":["admin"],"summary":"Update Public Repo Flags","description":"Set the curation / auto-sync flags on a public repo.\n\nShares ``repo_flags.apply_flags`` with ``PATCH /repos/{id}/managed`` so the\n\"curating a repo turns auto-sync on\" rule has one implementation.","operationId":"update_public_repo_flags_admin_repos__repo_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminFlagsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Public Repo","description":"Delete a public repo and everything derived from it, for everyone.\n\nThis is not the per-user unlink at ``DELETE /repos/{id}``. It removes the\nshared repo row, so Postgres cascades away every user's library entry, every\nworkspace membership, every team share, and every snapshot. People who did\nnot ask for this lose the repo from their dashboard.\n\nWhich is why ``confirm`` has to spell out ``owner/name``, why the affected\ncounts are read before the cascade destroys them, and why the audit row is\nwritten *before* the purge rather than after.\n\nRefuses while an index is in flight. Deleting mid-run cascades away the\n``snapshots`` row while the Modal container is still uploading to its\nprefix, and anything it writes to R2 after that point is unreachable\nforever, since nothing sweeps R2 orphans.","operationId":"delete_public_repo_admin_repos__repo_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}},{"name":"confirm","in":"query","required":true,"schema":{"type":"string","description":"Must equal the repo's owner/name. Guards against a mis-click.","title":"Confirm"},"description":"Must equal the repo's owner/name. Guards against a mis-click."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccountDeletionBlockedResponse":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"detail":{"additionalProperties":true,"type":"object","title":"Detail"}},"type":"object","required":["code","message"],"title":"AccountDeletionBlockedResponse","description":"422 body when something must be resolved before the account can go.\n\n``code`` is the machine-readable discriminator ('owns_team'); ``message``\nis rendered to the user as-is; ``detail`` carries whatever the specific\nblocker needs to offer a fix link (for 'owns_team', the teams)."},"AccountDeletionRequest":{"properties":{"reason":{"type":"string","title":"Reason"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"}},"type":"object","required":["reason"],"title":"AccountDeletionRequest","description":"Body for POST /me/deletion.\n\n``reason`` is required. Not to make leaving harder — the flow is one\ndialog either way — but because a deletion with no reason attached is a\nnumber on a chart nobody can act on, and this is the only moment the\nanswer is ever available.\n\nThe accepted values are Dodo's ``CancellationFeedback`` vocabulary\nverbatim, so the same string is forwarded to Dodo when the account carries\na subscription. Validated against ``account_deletion_service.REASONS``\nin the handler rather than by a ``Literal`` here, so the list lives in one\nplace next to the code that forwards it."},"AccountDeletionResponse":{"properties":{"deletion_requested_at":{"type":"string","format":"date-time","title":"Deletion Requested At"},"purge_scheduled_at":{"type":"string","format":"date-time","title":"Purge Scheduled At"},"grace_period_days":{"type":"integer","title":"Grace Period Days"}},"type":"object","required":["deletion_requested_at","purge_scheduled_at","grace_period_days"],"title":"AccountDeletionResponse","description":"Pending-deletion state, returned by POST /me/deletion.\n\nThere is no status-read endpoint to pair with this: once the deletion\nlands, every authenticated route 403s, so the client learns the state from\n``deleted_at`` on the ``POST /auth/sync`` response instead — the one route\nthat still answers for a locked-out account."},"ActivityFeedResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ActivityItem"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"ActivityFeedResponse"},"ActivityItem":{"properties":{"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"source":{"type":"string","enum":["snapshot","repo_added","credit_transaction"],"title":"Source"},"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"}},"type":"object","required":["occurred_at","source","id","title"],"title":"ActivityItem","description":"One row in the recent-activity feed.\n\n`source` discriminates the originating table; `payload` carries\nsource-specific context the UI uses to render an icon + deep-link.\n`id` is the originating row id (snapshot.id / user_repos.id /\ncredit_transactions.id) and forms part of the cursor."},"AdminDeleteResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"repo_slug":{"type":"string","title":"Repo Slug"},"snapshots_deleted":{"type":"integer","title":"Snapshots Deleted","default":0},"storage_objects_removed":{"type":"integer","title":"Storage Objects Removed","default":0},"r2_objects_removed":{"type":"integer","title":"R2 Objects Removed","default":0},"linked_users_removed":{"type":"integer","title":"Linked Users Removed","default":0},"workspaces_affected":{"type":"integer","title":"Workspaces Affected","default":0},"teams_affected":{"type":"integer","title":"Teams Affected","default":0}},"type":"object","required":["repo_slug"],"title":"AdminDeleteResponse"},"AdminFlagsRequest":{"properties":{"repowise_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Repowise Managed"},"auto_sync_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Sync Enabled"}},"type":"object","title":"AdminFlagsRequest","description":"Partial update. ``None`` leaves a flag alone rather than clearing it."},"AdminRefreshRequest":{"properties":{"force":{"type":"boolean","title":"Force","description":"Skip the three-consecutive-failures backoff. Does not skip the in-flight debounce, which prevents a double spawn.","default":false}},"type":"object","title":"AdminRefreshRequest"},"AdminRefreshResponse":{"properties":{"status":{"type":"string","title":"Status"},"short_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Id"},"snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot Id"},"debounced":{"type":"boolean","title":"Debounced","default":false}},"type":"object","required":["status"],"title":"AdminRefreshResponse"},"AdminRepoListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminRepoRow"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"AdminRepoListResponse"},"AdminRepoRow":{"properties":{"repo_id":{"type":"string","title":"Repo Id"},"owner":{"type":"string","title":"Owner"},"name":{"type":"string","title":"Name"},"canonical_url":{"type":"string","title":"Canonical Url"},"short_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Id"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"head_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Head Sha"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"file_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Count"},"primary_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Language"},"stars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stars"},"docs_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docs Status"},"average_health":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Health"},"repowise_managed":{"type":"boolean","title":"Repowise Managed","default":false},"auto_sync_enabled":{"type":"boolean","title":"Auto Sync Enabled","default":false},"last_manual_refresh_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Manual Refresh At"},"linked_user_count":{"type":"integer","title":"Linked User Count","default":0},"workspace_count":{"type":"integer","title":"Workspace Count","default":0},"team_count":{"type":"integer","title":"Team Count","default":0},"in_flight":{"type":"boolean","title":"In Flight","default":false}},"type":"object","required":["repo_id","owner","name","canonical_url"],"title":"AdminRepoRow","description":"One row of the admin fleet table. Mirrors the ``admin_public_repos`` RPC.\n\nEvery snapshot-derived field is optional because the listing deliberately\nincludes repos with no snapshot at all — a repo whose every index failed is\nthe main thing an operator is looking for."},"AgentNameCount":{"properties":{"name":{"type":"string","title":"Name"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["name","count"],"title":"AgentNameCount"},"AgentTrendBucket":{"properties":{"month":{"type":"string","title":"Month"},"total_commits":{"type":"integer","title":"Total Commits","default":0},"agent_commits":{"type":"integer","title":"Agent Commits","default":0},"agent_pct":{"type":"number","title":"Agent Pct","default":0.0},"tier_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Tier Counts"}},"type":"object","required":["month"],"title":"AgentTrendBucket"},"AgentTrendResponse":{"properties":{"buckets":{"items":{"$ref":"#/components/schemas/AgentTrendBucket"},"type":"array","title":"Buckets"},"total_commits":{"type":"integer","title":"Total Commits","default":0},"agent_commits":{"type":"integer","title":"Agent Commits","default":0},"agent_pct":{"type":"number","title":"Agent Pct","default":0.0},"agent_names":{"items":{"$ref":"#/components/schemas/AgentNameCount"},"type":"array","title":"Agent Names"}},"type":"object","title":"AgentTrendResponse"},"ApiKeyCreateRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"scopes":{"items":{"type":"string","enum":["read","write"]},"type":"array","title":"Scopes"}},"type":"object","required":["name"],"title":"ApiKeyCreateRequest","description":"Body for POST /me/api-keys.\n\n`scopes` is a list of {'read', 'write'}. Defaults to ['read'] —\nleast privilege; users opt into write at create time and we don't\nlet them edit scopes after the fact (revoke + re-create instead)."},"ApiKeyCreatedResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"key":{"type":"string","title":"Key"}},"type":"object","required":["id","name","prefix","scopes","created_at","key"],"title":"ApiKeyCreatedResponse","description":"Returned only on POST /me/api-keys. `key` is the FULL secret;\nshow it to the user once and never persist it client-side either."},"ApiKeyResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","prefix","scopes","created_at"],"title":"ApiKeyResponse","description":"Listing shape — never includes the secret. `prefix` is the\nindexed first 12 chars so users can tell their keys apart in the\nlist view."},"AtlassianConnectStart":{"properties":{"authorize_url":{"type":"string","title":"Authorize Url"}},"type":"object","required":["authorize_url"],"title":"AtlassianConnectStart","description":"The signed authorize URL the frontend navigates to."},"AtlassianConnectionResponse":{"properties":{"id":{"type":"string","title":"Id"},"team_id":{"type":"string","title":"Team Id"},"cloud_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cloud Id"},"site_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site Url"},"site_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site Name"},"available_sites":{"items":{"$ref":"#/components/schemas/AtlassianSite"},"type":"array","title":"Available Sites"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"status":{"type":"string","title":"Status"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","team_id","status"],"title":"AtlassianConnectionResponse"},"AtlassianConnectionStatus":{"properties":{"connected":{"type":"boolean","title":"Connected"},"connection":{"anyOf":[{"$ref":"#/components/schemas/AtlassianConnectionResponse"},{"type":"null"}]}},"type":"object","required":["connected"],"title":"AtlassianConnectionStatus","description":"Status-card payload: ``connection`` is null when nothing is connected."},"AtlassianSite":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name","default":""},"url":{"type":"string","title":"Url","default":""}},"type":"object","required":["id"],"title":"AtlassianSite"},"AtlassianSiteSelectRequest":{"properties":{"cloud_id":{"type":"string","title":"Cloud Id"}},"type":"object","required":["cloud_id"],"title":"AtlassianSiteSelectRequest"},"AttentionItem":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","enum":["stale_decision","knowledge_silo","ungoverned_hotspot","dead_code","proposed_decision"],"title":"Type"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"severity":{"type":"string","enum":["high","medium","low"],"title":"Severity"},"href":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Href"}},"type":"object","required":["id","type","title","description","severity"],"title":"AttentionItem"},"AuthorizeRequest":{"properties":{"client_id":{"type":"string","title":"Client Id"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"code_challenge":{"type":"string","title":"Code Challenge"},"code_challenge_method":{"type":"string","title":"Code Challenge Method","default":"S256"},"response_type":{"type":"string","title":"Response Type","default":"code"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"resource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource"},"device_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Name"}},"type":"object","required":["client_id","redirect_uri","code_challenge"],"title":"AuthorizeRequest"},"AutoSyncToggleRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"AutoSyncToggleRequest"},"BillingBalanceResponse":{"properties":{"balance_cents":{"type":"integer","title":"Balance Cents"},"balance_dollars":{"type":"number","title":"Balance Dollars"},"tier":{"$ref":"#/components/schemas/Tier"},"pool":{"type":"string","title":"Pool","default":"personal"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"}},"type":"object","required":["balance_cents","balance_dollars","tier"],"title":"BillingBalanceResponse"},"BillingCheckoutResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"}},"type":"object","required":["checkout_url"],"title":"BillingCheckoutResponse"},"BiomarkerFinding":{"properties":{"id":{"type":"string","title":"Id"},"biomarker_type":{"type":"string","title":"Biomarker Type"},"severity":{"type":"string","title":"Severity"},"file_path":{"type":"string","title":"File Path"},"function_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Function Name"},"line_start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line Start"},"line_end":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line End"},"details":{"additionalProperties":true,"type":"object","title":"Details"},"health_impact":{"type":"number","title":"Health Impact","default":0.0},"reason":{"type":"string","title":"Reason","default":""},"status":{"type":"string","title":"Status","default":"open"},"suggestion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggestion"},"dimension":{"type":"string","title":"Dimension","default":"defect"},"symbol_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol Id"},"is_test":{"type":"boolean","title":"Is Test","default":false}},"type":"object","required":["id","biomarker_type","severity","file_path"],"title":"BiomarkerFinding","description":"One biomarker hit. Mirrors HealthFindingData from repowise core."},"BlastRadiusRequest":{"properties":{"changed_files":{"items":{"type":"string"},"type":"array","title":"Changed Files"},"max_depth":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Max Depth","default":3}},"type":"object","title":"BlastRadiusRequest"},"BlastRadiusResponse":{"properties":{"direct_risks":{"items":{"$ref":"#/components/schemas/DirectRiskEntry"},"type":"array","title":"Direct Risks"},"transitive_affected":{"items":{"$ref":"#/components/schemas/TransitiveEntry"},"type":"array","title":"Transitive Affected"},"cochange_warnings":{"items":{"$ref":"#/components/schemas/CochangeWarning"},"type":"array","title":"Cochange Warnings"},"recommended_reviewers":{"items":{"$ref":"#/components/schemas/ReviewerEntry"},"type":"array","title":"Recommended Reviewers"},"test_gaps":{"items":{"type":"string"},"type":"array","title":"Test Gaps"},"test_impact":{"$ref":"#/components/schemas/TestImpactResponse"},"structural_impact_score":{"type":"number","title":"Structural Impact Score"},"structural_impact_band":{"type":"string","enum":["localized","moderate","broad"],"title":"Structural Impact Band"},"structural_impact_scale":{"$ref":"#/components/schemas/RiskScalarSemantics"},"overall_risk_score":{"type":"number","title":"Overall Risk Score"},"overall_risk_score_compatibility":{"$ref":"#/components/schemas/RiskCompatibilityField"}},"type":"object","required":["direct_risks","transitive_affected","cochange_warnings","recommended_reviewers","test_gaps","test_impact","structural_impact_score","structural_impact_band","structural_impact_scale","overall_risk_score","overall_risk_score_compatibility"],"title":"BlastRadiusResponse"},"Body_token_oauth_token_post":{"properties":{"grant_type":{"type":"string","title":"Grant Type"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"redirect_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"},"code_verifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"}},"type":"object","required":["grant_type"],"title":"Body_token_oauth_token_post"},"Body_upload_coverage_snapshots__snapshot_id__health_coverage_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_coverage_snapshots__snapshot_id__health_coverage_post"},"BusFactorEntry":{"properties":{"path":{"type":"string","title":"Path"},"bus_factor":{"type":"integer","title":"Bus Factor"},"top_author":{"type":"string","title":"Top Author"},"top_author_pct":{"type":"number","title":"Top Author Pct"},"contributor_count":{"type":"integer","title":"Contributor Count"}},"type":"object","required":["path","bus_factor","top_author","top_author_pct","contributor_count"],"title":"BusFactorEntry"},"BusFactorResponse":{"properties":{"files":{"items":{"$ref":"#/components/schemas/BusFactorEntry"},"type":"array","title":"Files"},"overall_bus_factor":{"type":"integer","title":"Overall Bus Factor"}},"type":"object","required":["files","overall_bus_factor"],"title":"BusFactorResponse"},"CheckoutRequest":{"properties":{"return_url":{"type":"string","title":"Return Url"},"billing_interval":{"type":"string","enum":["monthly","yearly"],"title":"Billing Interval","default":"monthly"},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Url"}},"type":"object","required":["return_url"],"title":"CheckoutRequest"},"ClientRegistrationRequest":{"properties":{"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"redirect_uris":{"items":{"type":"string"},"type":"array","title":"Redirect Uris"},"token_endpoint_auth_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Endpoint Auth Method"},"grant_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Grant Types"},"response_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Response Types"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"}},"type":"object","required":["redirect_uris"],"title":"ClientRegistrationRequest"},"CoChangePartner":{"properties":{"file_path":{"type":"string","title":"File Path"},"partner_path":{"type":"string","title":"Partner Path"},"co_change_count":{"type":"integer","title":"Co Change Count"},"confidence":{"type":"number","title":"Confidence","default":0.0}},"type":"object","required":["file_path","partner_path","co_change_count"],"title":"CoChangePartner","description":"A single (file, partner) pair from `git_metadata.co_change_partners_json`.\n\nMirrors `@repowise-dev/types::CoChangePartner`."},"CoChangesResponse":{"properties":{"total":{"type":"integer","title":"Total"},"pairs":{"items":{"$ref":"#/components/schemas/CoChangePartner"},"type":"array","title":"Pairs"}},"type":"object","required":["total","pairs"],"title":"CoChangesResponse"},"CochangeWarning":{"properties":{"changed":{"type":"string","title":"Changed"},"missing_partner":{"type":"string","title":"Missing Partner"},"score":{"type":"number","title":"Score"}},"type":"object","required":["changed","missing_partner","score"],"title":"CochangeWarning"},"CommandStat":{"properties":{"command":{"type":"string","title":"Command"},"count":{"type":"integer","title":"Count"},"distinct_installs":{"type":"integer","title":"Distinct Installs","default":0},"distinct_installs_with_error":{"type":"integer","title":"Distinct Installs With Error","default":0},"success_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Success Rate"},"p50_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P50 Ms"},"p95_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P95 Ms"},"error_count":{"type":"integer","title":"Error Count","default":0},"interrupted_count":{"type":"integer","title":"Interrupted Count","default":0},"usage_error_count":{"type":"integer","title":"Usage Error Count","default":0}},"type":"object","required":["command","count"],"title":"CommandStat"},"CommitDetailEntry":{"properties":{"sha":{"type":"string","title":"Sha"},"short_sha":{"type":"string","title":"Short Sha"},"author_name":{"type":"string","title":"Author Name","default":""},"author_email":{"type":"string","title":"Author Email","default":""},"committed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Committed At"},"subject":{"type":"string","title":"Subject","default":""},"lines_added":{"type":"integer","title":"Lines Added","default":0},"lines_deleted":{"type":"integer","title":"Lines Deleted","default":0},"files_changed":{"type":"integer","title":"Files Changed","default":0},"dirs_changed":{"type":"integer","title":"Dirs Changed","default":0},"subsystems_changed":{"type":"integer","title":"Subsystems Changed","default":0},"entropy":{"type":"number","title":"Entropy","default":0.0},"is_fix":{"type":"boolean","title":"Is Fix","default":false},"change_risk_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change Risk Score"},"change_risk_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Risk Level"},"risk_percentile":{"type":"number","title":"Risk Percentile","default":0.0},"review_priority":{"type":"string","enum":["low","moderate","high"],"title":"Review Priority","default":"low"},"top_driver":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Top Driver"},"author_experience":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Author Experience"},"author_commit_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Author Commit Count"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"agent_autonomy_tier":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Autonomy Tier"},"agent_confidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Confidence"},"drivers":{"items":{"$ref":"#/components/schemas/RiskDriverEntry"},"type":"array","title":"Drivers","default":[]},"agent_channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Channel"}},"type":"object","required":["sha","short_sha"],"title":"CommitDetailEntry"},"CommitEntry":{"properties":{"sha":{"type":"string","title":"Sha"},"short_sha":{"type":"string","title":"Short Sha"},"author_name":{"type":"string","title":"Author Name","default":""},"author_email":{"type":"string","title":"Author Email","default":""},"committed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Committed At"},"subject":{"type":"string","title":"Subject","default":""},"lines_added":{"type":"integer","title":"Lines Added","default":0},"lines_deleted":{"type":"integer","title":"Lines Deleted","default":0},"files_changed":{"type":"integer","title":"Files Changed","default":0},"dirs_changed":{"type":"integer","title":"Dirs Changed","default":0},"subsystems_changed":{"type":"integer","title":"Subsystems Changed","default":0},"entropy":{"type":"number","title":"Entropy","default":0.0},"is_fix":{"type":"boolean","title":"Is Fix","default":false},"change_risk_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change Risk Score"},"change_risk_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Risk Level"},"risk_percentile":{"type":"number","title":"Risk Percentile","default":0.0},"review_priority":{"type":"string","enum":["low","moderate","high"],"title":"Review Priority","default":"low"},"top_driver":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Top Driver"},"author_experience":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Author Experience"},"author_commit_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Author Commit Count"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"agent_autonomy_tier":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Autonomy Tier"},"agent_confidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Confidence"}},"type":"object","required":["sha","short_sha"],"title":"CommitEntry"},"CommitEvolutionBucket":{"properties":{"period":{"type":"string","title":"Period"},"start":{"type":"string","title":"Start"},"total":{"type":"integer","title":"Total","default":0},"counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Counts"}},"type":"object","required":["period","start"],"title":"CommitEvolutionBucket","description":"One time bucket of the Code Evolution timeline (repowise >= 0.22.0)."},"CommitEvolutionResponse":{"properties":{"buckets":{"items":{"$ref":"#/components/schemas/CommitEvolutionBucket"},"type":"array","title":"Buckets"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories"},"totals":{"additionalProperties":{"type":"integer"},"type":"object","title":"Totals"},"total_commits":{"type":"integer","title":"Total Commits","default":0},"granularity":{"type":"string","title":"Granularity","default":"month"},"first_commit_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Commit At"},"last_commit_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Commit At"}},"type":"object","title":"CommitEvolutionResponse","description":"Commit-category mix over time — the repo's development \"story arc\"."},"CommitStatsResponse":{"properties":{"total_commits":{"type":"integer","title":"Total Commits","default":0},"high_priority_count":{"type":"integer","title":"High Priority Count","default":0},"fix_commit_count":{"type":"integer","title":"Fix Commit Count","default":0},"agent_commit_count":{"type":"integer","title":"Agent Commit Count","default":0},"avg_entropy":{"type":"number","title":"Avg Entropy","default":0.0},"risk_histogram":{"items":{"$ref":"#/components/schemas/RiskHistogramBucket"},"type":"array","title":"Risk Histogram","default":[]},"moderate_cut":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Moderate Cut"},"high_cut":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"High Cut"}},"type":"object","title":"CommitStatsResponse","description":"Repo-wide commit stat cards (repowise >= 0.22.0). Server-side aggregates\nso the headline numbers don't under-count off a paged commit list."},"CommunityDetailResponse":{"properties":{"community_id":{"type":"integer","title":"Community Id"},"label":{"type":"string","title":"Label"},"cohesion":{"type":"number","title":"Cohesion"},"member_count":{"type":"integer","title":"Member Count"},"members":{"items":{"$ref":"#/components/schemas/CommunityMember"},"type":"array","title":"Members"},"truncated":{"type":"boolean","title":"Truncated","default":false},"neighboring_communities":{"items":{"$ref":"#/components/schemas/NeighboringCommunity"},"type":"array","title":"Neighboring Communities"}},"type":"object","required":["community_id","label","cohesion","member_count","members"],"title":"CommunityDetailResponse"},"CommunityMember":{"properties":{"path":{"type":"string","title":"Path"},"pagerank":{"type":"number","title":"Pagerank","default":0.0},"is_entry_point":{"type":"boolean","title":"Is Entry Point","default":false}},"type":"object","required":["path"],"title":"CommunityMember"},"CommunitySummaryItem":{"properties":{"community_id":{"type":"integer","title":"Community Id"},"label":{"type":"string","title":"Label"},"cohesion":{"type":"number","title":"Cohesion"},"member_count":{"type":"integer","title":"Member Count"},"top_file":{"type":"string","title":"Top File"}},"type":"object","required":["community_id","label","cohesion","member_count","top_file"],"title":"CommunitySummaryItem","description":"Per-community summary surfaced on /overview.\n\nMirrors `@repowise-dev/types::CommunitySummaryItem`. The label is a\nheuristic derived from the most common top-level path segment among\ncommunity members (or `cluster_<id>` if no clear winner exists)."},"ComplianceControl":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"requirement":{"type":"string","title":"Requirement"},"status":{"type":"string","enum":["satisfied","at_risk","gap","manual"],"title":"Status"},"summary":{"type":"string","title":"Summary"},"evidence":{"additionalProperties":true,"type":"object","title":"Evidence"},"guidance":{"type":"string","title":"Guidance"}},"type":"object","required":["id","title","requirement","status","summary","guidance"],"title":"ComplianceControl","description":"One framework control with its automated coverage verdict."},"ComplianceReport":{"properties":{"framework":{"type":"string","title":"Framework"},"framework_label":{"type":"string","title":"Framework Label"},"disclaimer":{"type":"string","title":"Disclaimer"},"generated_at":{"type":"string","title":"Generated At"},"repo_id":{"type":"string","title":"Repo Id"},"repo_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Name"},"snapshot_id":{"type":"string","title":"Snapshot Id"},"controls":{"items":{"$ref":"#/components/schemas/ComplianceControl"},"type":"array","title":"Controls"},"rollup":{"additionalProperties":{"type":"integer"},"type":"object","title":"Rollup"}},"type":"object","required":["framework","framework_label","disclaimer","generated_at","repo_id","snapshot_id"],"title":"ComplianceReport","description":"Control coverage signals from automated findings — explicitly NOT\nan audit or certification (the disclaimer ships in-band)."},"ConfluenceConfigUpdate":{"properties":{"space_id":{"type":"string","title":"Space Id"},"space_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Key"},"space_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Name"},"parent_page_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Page Id"},"enabled":{"type":"boolean","title":"Enabled","default":false},"cadence":{"type":"string","title":"Cadence","default":"manual"}},"type":"object","required":["space_id"],"title":"ConfluenceConfigUpdate"},"ConfluencePublicationResponse":{"properties":{"connected":{"type":"boolean","title":"Connected"},"configured":{"type":"boolean","title":"Configured"},"space_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Id"},"space_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Key"},"space_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Space Name"},"parent_page_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Page Id"},"enabled":{"type":"boolean","title":"Enabled","default":false},"cadence":{"type":"string","title":"Cadence","default":"manual"},"last_published_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Published At"},"last_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Status"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"last_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Last Summary"}},"type":"object","required":["connected","configured"],"title":"ConfluencePublicationResponse","description":"Per-repo publication config + last-run record. ``configured`` is\nfalse (and the rest defaulted) when no publication exists yet."},"ConfluencePublishResult":{"properties":{"status":{"type":"string","title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created":{"type":"integer","title":"Created","default":0},"updated":{"type":"integer","title":"Updated","default":0},"skipped":{"type":"integer","title":"Skipped","default":0},"deleted":{"type":"integer","title":"Deleted","default":0},"failed":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Failed"}},"type":"object","required":["status"],"title":"ConfluencePublishResult"},"ConfluenceSpace":{"properties":{"id":{"type":"string","title":"Id"},"key":{"type":"string","title":"Key","default":""},"name":{"type":"string","title":"Name","default":""}},"type":"object","required":["id"],"title":"ConfluenceSpace"},"ConfluenceSpacesResponse":{"properties":{"spaces":{"items":{"$ref":"#/components/schemas/ConfluenceSpace"},"type":"array","title":"Spaces"}},"type":"object","title":"ConfluenceSpacesResponse"},"CostEstimateRequest":{"properties":{"repo_url":{"type":"string","title":"Repo Url"},"docs_file_percentage":{"type":"number","maximum":100.0,"minimum":1.0,"title":"Docs File Percentage","default":10.0},"provider":{"type":"string","title":"Provider","default":"openai"},"model":{"type":"string","title":"Model","default":""},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"}},"type":"object","required":["repo_url"],"title":"CostEstimateRequest"},"CostEstimateResponse":{"properties":{"estimated_cost_cents":{"type":"integer","title":"Estimated Cost Cents"},"estimated_cost_dollars":{"type":"number","title":"Estimated Cost Dollars"},"estimated_pages":{"type":"integer","title":"Estimated Pages"},"has_sufficient_credits":{"type":"boolean","title":"Has Sufficient Credits"},"user_balance_cents":{"type":"integer","title":"User Balance Cents"},"effective_balance_cents":{"type":"integer","title":"Effective Balance Cents","default":0},"pool":{"type":"string","title":"Pool","default":"personal"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"provider":{"type":"string","title":"Provider","default":"openai"},"model":{"type":"string","title":"Model","default":""}},"type":"object","required":["estimated_cost_cents","estimated_cost_dollars","estimated_pages","has_sufficient_credits","user_balance_cents"],"title":"CostEstimateResponse"},"CostsByType":{"properties":{"indexing_cents":{"type":"integer","title":"Indexing Cents","default":0},"chat_cents":{"type":"integer","title":"Chat Cents","default":0},"reindex_cents":{"type":"integer","title":"Reindex Cents","default":0},"other_cents":{"type":"integer","title":"Other Cents","default":0}},"type":"object","title":"CostsByType"},"CoverageFileRow":{"properties":{"file_path":{"type":"string","title":"File Path"},"source_format":{"type":"string","title":"Source Format"},"line_coverage_pct":{"type":"number","title":"Line Coverage Pct"},"branch_coverage_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Branch Coverage Pct"},"total_coverable_lines":{"type":"integer","title":"Total Coverable Lines","default":0},"ingested_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingested At"},"ingested_commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingested Commit Sha"},"health_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Health Score"},"nloc":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nloc"}},"type":"object","required":["file_path","source_format","line_coverage_pct"],"title":"CoverageFileRow"},"CoverageModuleRow":{"properties":{"module":{"type":"string","title":"Module"},"files":{"type":"integer","title":"Files"},"covered_lines":{"type":"integer","title":"Covered Lines"},"total_lines":{"type":"integer","title":"Total Lines"},"line_coverage_pct":{"type":"number","title":"Line Coverage Pct"}},"type":"object","required":["module","files","covered_lines","total_lines","line_coverage_pct"],"title":"CoverageModuleRow","description":"Per-directory coverage rollup, computed at ingest so the shared module\ntree lights up without the read path re-deriving it."},"CoverageResponse":{"properties":{"available":{"type":"boolean","title":"Available"},"wiki_format":{"type":"string","title":"Wiki Format","default":"legacy_flat"},"reindex_recommended":{"type":"boolean","title":"Reindex Recommended","default":false},"reindex_recommended_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reindex Recommended Reason"},"total_pages":{"type":"integer","title":"Total Pages","default":0},"fresh":{"type":"integer","title":"Fresh","default":0},"stale":{"type":"integer","title":"Stale","default":0},"outdated":{"type":"integer","title":"Outdated","default":0},"pages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Pages"}},"type":"object","required":["available"],"title":"CoverageResponse"},"CoverageUploadResponse":{"properties":{"source_format":{"type":"string","title":"Source Format"},"overall_line_coverage_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overall Line Coverage Pct"},"file_count_with_coverage":{"type":"integer","title":"File Count With Coverage","default":0},"report_file_count":{"type":"integer","title":"Report File Count","default":0},"matched_file_count":{"type":"integer","title":"Matched File Count","default":0},"unmatched_paths":{"items":{"type":"string"},"type":"array","title":"Unmatched Paths"},"ingested_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingested At"},"has_contexts":{"type":"boolean","title":"Has Contexts","default":false},"test_map_rows":{"type":"integer","title":"Test Map Rows","default":0}},"type":"object","required":["source_format"],"title":"CoverageUploadResponse","description":"Result of ingesting an uploaded coverage report — the matched summary\nplus the paths that could not be reconciled to the snapshot's file tree,\nso the uploader sees exactly what did and didn't land."},"CreditTransactionResponse":{"properties":{"id":{"type":"string","title":"Id"},"amount_cents":{"type":"integer","title":"Amount Cents"},"type":{"type":"string","title":"Type"},"description":{"type":"string","title":"Description"},"snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot Id"},"repo_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Id"},"balance_after_cents":{"type":"integer","title":"Balance After Cents"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","amount_cents","type","description","balance_after_cents","created_at"],"title":"CreditTransactionResponse"},"DailyPoint":{"properties":{"day":{"type":"string","title":"Day"},"count":{"type":"integer","title":"Count"},"count_human":{"type":"integer","title":"Count Human","default":0}},"type":"object","required":["day","count"],"title":"DailyPoint"},"DeadCodeFindingPatch":{"properties":{"status":{"type":"string","enum":["open","acknowledged","resolved","false_positive"],"title":"Status"}},"type":"object","required":["status"],"title":"DeadCodeFindingPatch","description":"Triage mutation for one dead-code finding (sibling of\nHealthFindingPatch, but validated here instead of only by the DB CHECK)."},"DeadCodeResponse":{"properties":{"total_findings":{"type":"integer","title":"Total Findings"},"deletable_lines":{"type":"integer","title":"Deletable Lines"},"findings":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Findings"}},"type":"object","required":["total_findings","deletable_lines","findings"],"title":"DeadCodeResponse"},"DecisionCountsResponse":{"properties":{"total":{"type":"integer","title":"Total","default":0},"active":{"type":"integer","title":"Active","default":0},"proposed":{"type":"integer","title":"Proposed","default":0},"superseded":{"type":"integer","title":"Superseded","default":0},"deprecated":{"type":"integer","title":"Deprecated","default":0}},"type":"object","title":"DecisionCountsResponse","description":"Grouped counts by status, zero-filled so the shape is stable.\n\nA count over the whole artifact rather than over a page of rows. Counting\nwhat a page had fetched reported \"97 of 100\" on a repository holding\nseveral hundred records — a denominator nobody measured, on the surface\nwhose whole job is to be trusted."},"DecisionEvidence":{"properties":{"source":{"type":"string","title":"Source","default":""},"source_rank":{"type":"integer","title":"Source Rank","default":1},"evidence_file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence File"},"evidence_line":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Evidence Line"},"evidence_commit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence Commit"},"source_quote":{"type":"string","title":"Source Quote","default":""},"confidence":{"type":"number","title":"Confidence","default":0.0},"verification":{"type":"string","title":"Verification","default":"unverified"}},"type":"object","title":"DecisionEvidence","description":"One verbatim provenance row supporting a decision (repowise 0.13.0).\n\nMirrors the OSS ``DecisionEvidence`` ORM columns. All fields are optional\nwith sane defaults so legacy artifacts (which carry no ``evidence`` array)\nstill validate, and so the hosted extraction-only synthesis (one row per\ndecision) round-trips cleanly."},"DecisionEvidenceResponse":{"properties":{"decision_index":{"type":"integer","title":"Decision Index"},"title":{"type":"string","title":"Title","default":""},"verification":{"type":"string","title":"Verification","default":"unverified"},"evidence":{"items":{"$ref":"#/components/schemas/DecisionEvidence"},"type":"array","title":"Evidence"}},"type":"object","required":["decision_index"],"title":"DecisionEvidenceResponse","description":"Response for the per-decision evidence endpoint (repowise 0.13.0)."},"DecisionLaneCountsResponse":{"properties":{"candidates":{"type":"integer","title":"Candidates","default":0},"active":{"type":"integer","title":"Active","default":0},"needs_review":{"type":"integer","title":"Needs Review","default":0},"uncheckable":{"type":"integer","title":"Uncheckable","default":0},"history":{"type":"integer","title":"History","default":0},"governing":{"type":"integer","title":"Governing","default":0},"total":{"type":"integer","title":"Total","default":0}},"type":"object","title":"DecisionLaneCountsResponse","description":"Records per review lane, from the acceptance join.\n\nSeparate from ``DecisionCountsResponse``, which groups the ``status``\ncolumn. That column is the extractor's projection, kept in step for readers\nthat predate the acceptance split, so its ``active`` and this model's\n``active`` are different questions: a record can be stored active and have\nno acceptance at all. A tab row must not be labelled from the other one's\nanswer.\n\n``candidates`` and the four currency lanes partition the repository and sum\nto ``total``. ``governing`` is the roll-up of the two that still bind, so a\ncaller can say \"N rules\" without adding two tabs together -- it deliberately\noverlaps and is not a partition member."},"DecisionSettingsResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"llm":{"type":"boolean","title":"Llm"},"preset":{"type":"string","title":"Preset"},"discovery":{"additionalProperties":{"type":"integer"},"type":"object","title":"Discovery"},"sources":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Sources"},"provider_available":{"type":"boolean","title":"Provider Available","default":false},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"legacy_keys":{"items":{"type":"string"},"type":"array","title":"Legacy Keys"},"etag":{"type":"string","title":"Etag","default":""}},"type":"object","required":["enabled","llm","preset","discovery","sources"],"title":"DecisionSettingsResponse","description":"The resolved capture policy, as the shared settings panel expects it.\n\nResolved rather than stored: the column holds only the keys somebody set,\nand the engine's resolver fills the rest from the preset on every read. So a\nrepository never silently acquires a capture source because a default moved,\nand never silently keeps one either.\n\n``provider_available`` is false on hosted. LLM-backed decision capture is\noff here, so each source reports its deterministic stage running and its\nmodel stage skipped, with the reason. That is the honest rendering; a model\ntoggle that looked active would be the dishonest one.\n\n``etag`` is the concurrency token. The panel sends it back on write and a\nstale one is refused, so two people editing the same policy cannot silently\noverwrite each other."},"DecisionSettingsUpdate":{"properties":{"preset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preset"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Llm"},"sources":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sources"},"discovery":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Discovery"},"etag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Etag"}},"type":"object","title":"DecisionSettingsUpdate","description":"A sparse patch onto the stored policy. Absent keys stay unset."},"DecisionStatusUpdate":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"superseded_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Superseded By"},"affected_modules":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Affected Modules"},"affected_files":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Affected Files"},"new_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Status"}},"type":"object","title":"DecisionStatusUpdate","description":"Decision PATCH body.\n\n`new_status` is accepted as an alias for `status` so legacy hosted\nfrontend callers (which still post `{\"new_status\": \"...\"}`) don't break\non deploy — drop the alias once `frontend/` is migrated."},"DecisionsResponse":{"properties":{"total_found":{"type":"integer","title":"Total Found"},"decisions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Decisions"},"by_source":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Source"},"conflicts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Conflicts"},"governed_files":{"items":{"$ref":"#/components/schemas/GovernedFile"},"type":"array","title":"Governed Files"},"governed_file_total":{"type":"integer","title":"Governed File Total","default":0}},"type":"object","required":["total_found","decisions","by_source"],"title":"DecisionsResponse"},"DefectAccuracy":{"properties":{"k":{"type":"integer","title":"K"},"hits":{"type":"integer","title":"Hits"},"precision":{"type":"number","title":"Precision"},"base_rate":{"type":"number","title":"Base Rate"},"lift":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lift"},"window_days":{"type":"integer","title":"Window Days","default":180},"scored_files":{"type":"integer","title":"Scored Files"},"defect_files":{"type":"integer","title":"Defect Files"},"concentration_file_fraction":{"type":"number","title":"Concentration File Fraction"},"concentration_defect_share":{"type":"number","title":"Concentration Defect Share"},"precision_table":{"items":{"$ref":"#/components/schemas/DefectAccuracyPoint"},"type":"array","title":"Precision Table"},"flagged_files":{"items":{"$ref":"#/components/schemas/DefectAccuracyFile"},"type":"array","title":"Flagged Files"}},"type":"object","required":["k","hits","precision","base_rate","scored_files","defect_files","concentration_file_fraction","concentration_defect_share"],"title":"DefectAccuracy","description":"How well the lowest-health files line up with files that were\nactually bug-fixed recently. Computed from the health.json artifact;\nnull when the repo lacks enough files / defect history to be honest."},"DefectAccuracyFile":{"properties":{"file_path":{"type":"string","title":"File Path"},"score":{"type":"number","title":"Score"},"recent_fixes":{"type":"integer","title":"Recent Fixes"}},"type":"object","required":["file_path","score","recent_fixes"],"title":"DefectAccuracyFile"},"DefectAccuracyPoint":{"properties":{"k":{"type":"integer","title":"K"},"hits":{"type":"integer","title":"Hits"}},"type":"object","required":["k","hits"],"title":"DefectAccuracyPoint"},"DirectRiskEntry":{"properties":{"path":{"type":"string","title":"Path"},"structural_score":{"type":"number","title":"Structural Score"},"risk_score":{"type":"number","title":"Risk Score"},"temporal_hotspot":{"type":"number","title":"Temporal Hotspot"},"centrality":{"type":"number","title":"Centrality"}},"type":"object","required":["path","structural_score","risk_score","temporal_hotspot","centrality"],"title":"DirectRiskEntry"},"DocsModeStat":{"properties":{"total":{"type":"integer","title":"Total","default":0},"with_docs":{"type":"integer","title":"With Docs","default":0},"deterministic":{"type":"integer","title":"Deterministic","default":0},"index_only":{"type":"integer","title":"Index Only","default":0}},"type":"object","title":"DocsModeStat","description":"AI-docs adoption: init/update runs carrying the ``docs_mode`` flag.\n\nThree outcomes, not two. The flag used to be a boolean, but an\n``init --index-only`` run renders a full wiki from templates, so \"has docs\"\nand \"model wrote the docs\" stopped being the same question. See\n``repowise.core.docs_mode`` in the OSS engine and migration 093."},"DocsResponse":{"properties":{"available":{"type":"boolean","title":"Available"},"pages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Pages"},"wiki_format":{"type":"string","title":"Wiki Format","default":"legacy_flat"},"reindex_recommended":{"type":"boolean","title":"Reindex Recommended","default":false},"reindex_recommended_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reindex Recommended Reason"},"docs_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docs Status"},"pages_ready":{"type":"integer","title":"Pages Ready","default":0},"pages_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pages Total"},"pages_reused":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pages Reused"},"authoritative_page_types":{"items":{"type":"string"},"type":"array","title":"Authoritative Page Types"},"page_redirects":{"$ref":"#/components/schemas/PageRedirects"}},"type":"object","required":["available"],"title":"DocsResponse"},"EpisodeCountsResponse":{"properties":{"available":{"type":"boolean","title":"Available","default":true},"total":{"type":"integer","title":"Total","default":0},"by_tier":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Tier"},"by_kind":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Kind"}},"type":"object","title":"EpisodeCountsResponse"},"EpisodeDetail":{"properties":{"id":{"type":"string","title":"Id"},"tier":{"type":"string","title":"Tier"},"kind":{"type":"string","title":"Kind"},"subject":{"type":"string","title":"Subject"},"body":{"type":"string","title":"Body"},"evidence":{"type":"string","title":"Evidence"},"nodes":{"items":{"type":"string"},"type":"array","title":"Nodes"},"node_count":{"type":"integer","title":"Node Count"},"birth_commit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Birth Commit"},"birth_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Birth At"},"last_seen_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Seen At"},"still_true":{"type":"string","title":"Still True"},"current":{"type":"boolean","title":"Current"}},"type":"object","required":["id","tier","kind","subject","body","evidence","nodes","node_count","birth_commit","birth_at","last_seen_at","still_true","current"],"title":"EpisodeDetail","description":"One episode in full, including its body and the currency verdict."},"EpisodeListResponse":{"properties":{"available":{"type":"boolean","title":"Available","default":true},"total":{"type":"integer","title":"Total","default":0},"episodes":{"items":{"$ref":"#/components/schemas/EpisodeSummary"},"type":"array","title":"Episodes"}},"type":"object","title":"EpisodeListResponse"},"EpisodeSummary":{"properties":{"id":{"type":"string","title":"Id"},"tier":{"type":"string","title":"Tier"},"kind":{"type":"string","title":"Kind"},"subject":{"type":"string","title":"Subject"},"evidence":{"type":"string","title":"Evidence"},"nodes":{"items":{"type":"string"},"type":"array","title":"Nodes"},"node_count":{"type":"integer","title":"Node Count"},"birth_commit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Birth Commit"},"birth_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Birth At"},"last_seen_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Seen At"},"still_true":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Still True"}},"type":"object","required":["id","tier","kind","subject","evidence","nodes","node_count","birth_commit","birth_at","last_seen_at"],"title":"EpisodeSummary","description":"One episode without its body, as served in a list."},"ErrorStat":{"properties":{"error_type":{"type":"string","title":"Error Type"},"count":{"type":"integer","title":"Count"},"distinct_installs":{"type":"integer","title":"Distinct Installs","default":0}},"type":"object","required":["error_type","count"],"title":"ErrorStat"},"ExecutionFlowEntry":{"properties":{"entry_point":{"type":"string","title":"Entry Point"},"entry_point_name":{"type":"string","title":"Entry Point Name"},"entry_point_score":{"type":"number","title":"Entry Point Score"},"trace":{"items":{"type":"string"},"type":"array","title":"Trace"},"depth":{"type":"integer","title":"Depth","default":0},"crosses_community":{"type":"boolean","title":"Crosses Community","default":false},"communities_visited":{"items":{"type":"integer"},"type":"array","title":"Communities Visited"},"termination":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Termination"},"termination_detail":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Termination Detail"},"trace_via":{"anyOf":[{"items":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"array"},{"type":"null"}],"title":"Trace Via"}},"type":"object","required":["entry_point","entry_point_name","entry_point_score"],"title":"ExecutionFlowEntry"},"ExecutionFlowsResponse":{"properties":{"total_entry_points":{"type":"integer","title":"Total Entry Points","default":0},"flows":{"items":{"$ref":"#/components/schemas/ExecutionFlowEntry"},"type":"array","title":"Flows"}},"type":"object","title":"ExecutionFlowsResponse"},"ExploreLanguageResponse":{"properties":{"language":{"type":"string","title":"Language"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["language","count"],"title":"ExploreLanguageResponse","description":"One entry in the Explore language filter: a primary language and how\nmany public repos carry it (deduped per repo)."},"ExploreRepoResponse":{"properties":{"owner":{"type":"string","title":"Owner"},"name":{"type":"string","title":"Name"},"short_id":{"type":"string","title":"Short Id"},"repo_id":{"type":"string","title":"Repo Id"},"file_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Count"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"head_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Head Sha"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"primary_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Language"},"stars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stars"},"repowise_managed":{"type":"boolean","title":"Repowise Managed","default":false},"docs_available":{"type":"boolean","title":"Docs Available","default":false},"docs_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docs Status"},"latest_known_head_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Known Head Sha"}},"type":"object","required":["owner","name","short_id","repo_id"],"title":"ExploreRepoResponse","description":"One card on the public Explore page.\n\nSurface enough metadata for the universal RepoCard to render a rich\ntreatment without a second fetch: language pill, description, star\ncount, curated badge, docs-availability state."},"ExternalSystemGraphTarget":{"properties":{"node_id":{"type":"string","title":"Node Id"},"match_basis":{"type":"string","enum":["exact","subpath","mapped"],"title":"Match Basis"}},"type":"object","required":["node_id","match_basis"],"title":"ExternalSystemGraphTarget","description":"One external graph node the selected package resolved to."},"ExternalSystemImportingFile":{"properties":{"path":{"type":"string","title":"Path"},"language":{"type":"string","title":"Language"},"import_edge_count":{"type":"integer","title":"Import Edge Count"},"matched_external_node_count":{"type":"integer","title":"Matched External Node Count"}},"type":"object","required":["path","language","import_edge_count","matched_external_node_count"],"title":"ExternalSystemImportingFile"},"ExternalSystemImportingFilesResponse":{"properties":{"package_key":{"type":"string","title":"Package Key","default":""},"aggregate_key":{"type":"string","title":"Aggregate Key","default":""},"items":{"items":{"$ref":"#/components/schemas/ExternalSystemImportingFile"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total","default":0},"returned":{"type":"integer","title":"Returned","default":0},"limit":{"type":"integer","title":"Limit","default":0},"offset":{"type":"integer","title":"Offset","default":0},"truncated":{"type":"boolean","title":"Truncated","default":false},"scope":{"type":"string","enum":["primary","all"],"title":"Scope","default":"primary"},"state":{"type":"string","title":"State","default":"ready"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"ExternalSystemImportingFilesResponse","description":"One independently bounded page of files behind an aggregate node."},"ExternalSystemItem":{"properties":{"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name","default":""},"ecosystem":{"type":"string","title":"Ecosystem"},"category":{"type":"string","title":"Category","default":"library"},"io_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Io Kind"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"declared_in":{"type":"string","title":"Declared In"},"is_dev_dep":{"type":"boolean","title":"Is Dev Dep","default":false}},"type":"object","required":["name","ecosystem","declared_in"],"title":"ExternalSystemItem","description":"One declared third-party dependency, as the flat registry serves it."},"ExternalSystemRelationshipEdge":{"properties":{"source":{"type":"string","title":"Source"},"target":{"type":"string","title":"Target"},"import_edge_count":{"type":"integer","title":"Import Edge Count"}},"type":"object","required":["source","target","import_edge_count"],"title":"ExternalSystemRelationshipEdge"},"ExternalSystemRelationshipGraphResponse":{"properties":{"package_key":{"type":"string","title":"Package Key","default":""},"package_name":{"type":"string","title":"Package Name","default":""},"package_node_id":{"type":"string","title":"Package Node Id","default":""},"match_basis":{"type":"string","enum":["exact","subpath","mapped","mixed","unresolved"],"title":"Match Basis","default":"unresolved"},"matched_external_nodes":{"items":{"$ref":"#/components/schemas/ExternalSystemGraphTarget"},"type":"array","title":"Matched External Nodes"},"matched_external_nodes_total":{"type":"integer","title":"Matched External Nodes Total","default":0},"matched_external_nodes_truncated":{"type":"boolean","title":"Matched External Nodes Truncated","default":false},"evidence_target_limit":{"type":"integer","title":"Evidence Target Limit","default":0},"evidence_truncated":{"type":"boolean","title":"Evidence Truncated","default":false},"nodes":{"items":{"$ref":"#/components/schemas/ExternalSystemRelationshipNode"},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/ExternalSystemRelationshipEdge"},"type":"array","title":"Edges"},"aggregate_total":{"type":"integer","title":"Aggregate Total","default":0},"aggregate_returned":{"type":"integer","title":"Aggregate Returned","default":0},"edge_total":{"type":"integer","title":"Edge Total","default":0},"edge_returned":{"type":"integer","title":"Edge Returned","default":0},"importing_file_total":{"type":"integer","title":"Importing File Total","default":0},"import_edge_total":{"type":"integer","title":"Import Edge Total","default":0},"node_limit":{"type":"integer","title":"Node Limit","default":0},"edge_limit":{"type":"integer","title":"Edge Limit","default":0},"truncated":{"type":"boolean","title":"Truncated","default":false},"scope":{"type":"string","enum":["primary","all"],"title":"Scope","default":"primary"},"state":{"type":"string","title":"State","default":"ready"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"ExternalSystemRelationshipGraphResponse","description":"Bounded aggregate-first relationship graph for one declared package."},"ExternalSystemRelationshipNode":{"properties":{"aggregate_key":{"type":"string","title":"Aggregate Key"},"label":{"type":"string","title":"Label"},"community_id":{"type":"integer","title":"Community Id"},"importing_file_count":{"type":"integer","title":"Importing File Count"},"import_edge_count":{"type":"integer","title":"Import Edge Count"},"top_file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Top File"}},"type":"object","required":["aggregate_key","label","community_id","importing_file_count","import_edge_count"],"title":"ExternalSystemRelationshipNode","description":"A first-party graph community that imports the selected package."},"ExternalSystemSummaryEntry":{"properties":{"package_key":{"type":"string","title":"Package Key"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"ecosystem":{"type":"string","title":"Ecosystem"},"category":{"type":"string","title":"Category"},"io_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Io Kind"},"runtime_declared":{"type":"boolean","title":"Runtime Declared"},"dev_declared":{"type":"boolean","title":"Dev Declared"},"declaration_count":{"type":"integer","title":"Declaration Count"},"manifest_count":{"type":"integer","title":"Manifest Count"},"versions":{"items":{"type":"string"},"type":"array","title":"Versions"},"versions_total":{"type":"integer","title":"Versions Total"},"versions_truncated":{"type":"boolean","title":"Versions Truncated"},"multiple_versions":{"type":"boolean","title":"Multiple Versions"},"external_node_count":{"type":"integer","title":"External Node Count"},"import_edge_count":{"type":"integer","title":"Import Edge Count"},"importing_file_count":{"type":"integer","title":"Importing File Count"},"link_state":{"type":"string","enum":["linked","unlinked"],"title":"Link State"}},"type":"object","required":["package_key","name","display_name","ecosystem","category","runtime_declared","dev_declared","declaration_count","manifest_count","versions_total","versions_truncated","multiple_versions","external_node_count","import_edge_count","importing_file_count","link_state"],"title":"ExternalSystemSummaryEntry","description":"One canonical package with its declaration and graph-usage aggregates."},"ExternalSystemsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ExternalSystemItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total","default":0},"prod_count":{"type":"integer","title":"Prod Count","default":0},"dev_count":{"type":"integer","title":"Dev Count","default":0},"ecosystems":{"items":{"type":"string"},"type":"array","title":"Ecosystems"},"manifests":{"items":{"type":"string"},"type":"array","title":"Manifests"},"state":{"type":"string","title":"State","default":"ready"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"ExternalSystemsResponse"},"ExternalSystemsSummaryResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ExternalSystemSummaryEntry"},"type":"array","title":"Items"},"returned":{"type":"integer","title":"Returned","default":0},"total_packages":{"type":"integer","title":"Total Packages","default":0},"limit":{"type":"integer","title":"Limit","default":0},"offset":{"type":"integer","title":"Offset","default":0},"truncated":{"type":"boolean","title":"Truncated","default":false},"scope":{"type":"string","enum":["primary","all"],"title":"Scope","default":"primary"},"excluded_declarations":{"type":"integer","title":"Excluded Declarations","default":0},"total_declarations":{"type":"integer","title":"Total Declarations","default":0},"runtime_packages":{"type":"integer","title":"Runtime Packages","default":0},"dev_only_packages":{"type":"integer","title":"Dev Only Packages","default":0},"observed_packages":{"type":"integer","title":"Observed Packages","default":0},"linked_packages":{"type":"integer","title":"Linked Packages","default":0},"unlinked_packages":{"type":"integer","title":"Unlinked Packages","default":0},"linked_without_imports":{"type":"integer","title":"Linked Without Imports","default":0},"ecosystems":{"items":{"type":"string"},"type":"array","title":"Ecosystems"},"manifest_count":{"type":"integer","title":"Manifest Count","default":0},"state":{"type":"string","title":"State","default":"ready"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"ExternalSystemsSummaryResponse","description":"Bounded package summaries for the external-dependency scan surface."},"FeedbackRequest":{"properties":{"category":{"type":"string","title":"Category","description":"One of ui_ux, bug, feature_request, other"},"message":{"type":"string","maxLength":4000,"minLength":1,"title":"Message"},"email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Email"},"page_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Page Url"},"source":{"type":"string","title":"Source","default":"web"},"client_version":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Client Version"}},"type":"object","required":["category","message"],"title":"FeedbackRequest"},"FeedbackResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"}},"type":"object","required":["ok"],"title":"FeedbackResponse"},"FileCoverageBlock":{"properties":{"line_coverage_pct":{"type":"number","title":"Line Coverage Pct","default":0.0},"branch_coverage_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Branch Coverage Pct"},"total_coverable_lines":{"type":"integer","title":"Total Coverable Lines","default":0},"covered_lines":{"items":{"type":"integer"},"type":"array","title":"Covered Lines"},"source_format":{"type":"string","title":"Source Format","default":""}},"type":"object","title":"FileCoverageBlock"},"FileDeadCode":{"properties":{"id":{"type":"string","title":"Id","default":""},"kind":{"type":"string","title":"Kind","default":""},"symbol_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol Name"},"confidence":{"type":"number","title":"Confidence","default":0.0},"reason":{"type":"string","title":"Reason","default":""},"lines":{"type":"integer","title":"Lines","default":0},"safe_to_delete":{"type":"boolean","title":"Safe To Delete","default":false}},"type":"object","title":"FileDeadCode"},"FileDetailResponse":{"properties":{"file_path":{"type":"string","title":"File Path"},"wiki_page":{"anyOf":[{"$ref":"#/components/schemas/FileWikiPage"},{"type":"null"}]},"health":{"anyOf":[{"$ref":"#/components/schemas/FileHealthBlock"},{"type":"null"}]},"git":{"anyOf":[{"$ref":"#/components/schemas/FileGitBlock"},{"type":"null"}]},"coverage":{"anyOf":[{"$ref":"#/components/schemas/FileCoverageBlock"},{"type":"null"}]},"graph":{"anyOf":[{"$ref":"#/components/schemas/FileGraphBlock"},{"type":"null"}]},"symbols":{"items":{"$ref":"#/components/schemas/FileSymbol"},"type":"array","title":"Symbols"},"function_blame":{"items":{"$ref":"#/components/schemas/FunctionBlameEntry"},"type":"array","title":"Function Blame"},"governing_decisions":{"items":{"$ref":"#/components/schemas/GoverningDecisionRef"},"type":"array","title":"Governing Decisions"},"dead_code":{"items":{"$ref":"#/components/schemas/FileDeadCode"},"type":"array","title":"Dead Code"}},"type":"object","required":["file_path"],"title":"FileDetailResponse"},"FileGitAgent":{"properties":{"agent_commit_count":{"type":"integer","title":"Agent Commit Count","default":0},"agent_authored_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Agent Authored Pct"},"tier_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Tier Counts"}},"type":"object","title":"FileGitAgent"},"FileGitBlock":{"properties":{"path":{"type":"string","title":"Path","default":""},"commit_count":{"type":"integer","title":"Commit Count","default":0},"commit_count_90d":{"type":"integer","title":"Commit Count 90D","default":0},"commit_count_30d":{"type":"integer","title":"Commit Count 30D","default":0},"churn_percentile":{"type":"number","title":"Churn Percentile","default":0.0},"is_hotspot":{"type":"boolean","title":"Is Hotspot","default":false},"is_stable":{"type":"boolean","title":"Is Stable","default":false},"bus_factor":{"type":"integer","title":"Bus Factor","default":1},"contributor_count":{"type":"integer","title":"Contributor Count","default":0},"primary_owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Owner"},"primary_owner_commit_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Primary Owner Commit Pct"},"last_commit_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Commit At"},"first_commit_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Commit At"},"significant_commits":{"items":{"$ref":"#/components/schemas/FileSignificantCommit"},"type":"array","title":"Significant Commits"},"top_authors":{"items":{"$ref":"#/components/schemas/FileTopAuthor"},"type":"array","title":"Top Authors"},"co_change_partners":{"items":{"$ref":"#/components/schemas/CoChangePartner"},"type":"array","title":"Co Change Partners"},"agent":{"anyOf":[{"$ref":"#/components/schemas/FileGitAgent"},{"type":"null"}]},"age_days":{"type":"integer","title":"Age Days","default":0},"commit_categories":{"additionalProperties":{"type":"integer"},"type":"object","title":"Commit Categories"},"change_entropy_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change Entropy Pct"},"prior_defect_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Prior Defect Count"},"bug_magnet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Bug Magnet"},"last_fix_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Fix At"},"original_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Path"},"commit_count_capped":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Commit Count Capped"},"fix_symbol_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Fix Symbol Counts"}},"type":"object","title":"FileGitBlock"},"FileGraphBlock":{"properties":{"language":{"type":"string","title":"Language","default":"unknown"},"is_entry_point":{"type":"boolean","title":"Is Entry Point","default":false},"is_test":{"type":"boolean","title":"Is Test","default":false},"symbol_count":{"type":"integer","title":"Symbol Count","default":0},"pagerank":{"type":"number","title":"Pagerank","default":0.0},"pagerank_percentile":{"type":"number","title":"Pagerank Percentile","default":0.0},"in_degree":{"type":"integer","title":"In Degree","default":0},"out_degree":{"type":"integer","title":"Out Degree","default":0},"community_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Community Id"},"community_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Community Label"},"dependents":{"items":{"$ref":"#/components/schemas/FileGraphNeighbor"},"type":"array","title":"Dependents"},"dependencies":{"items":{"$ref":"#/components/schemas/FileGraphNeighbor"},"type":"array","title":"Dependencies"}},"type":"object","title":"FileGraphBlock"},"FileGraphNeighbor":{"properties":{"node_id":{"type":"string","title":"Node Id"},"node_type":{"type":"string","title":"Node Type","default":"file"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"edge_type":{"type":"string","title":"Edge Type","default":""},"imported_names":{"items":{"type":"string"},"type":"array","title":"Imported Names"}},"type":"object","required":["node_id"],"title":"FileGraphNeighbor"},"FileHealthBlock":{"properties":{"metric":{"anyOf":[{"$ref":"#/components/schemas/HealthFileMetric"},{"type":"null"}]},"breakdown":{"anyOf":[{"$ref":"#/components/schemas/HealthFileBreakdownResponse"},{"type":"null"}]},"findings":{"items":{"$ref":"#/components/schemas/BiomarkerFinding"},"type":"array","title":"Findings"}},"type":"object","title":"FileHealthBlock"},"FileRow":{"properties":{"file_path":{"type":"string","title":"File Path"},"language":{"type":"string","title":"Language","default":""},"loc":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Loc"},"symbol_count":{"type":"integer","title":"Symbol Count","default":0},"pagerank_pct":{"type":"number","title":"Pagerank Pct","default":0.0},"in_degree":{"type":"integer","title":"In Degree","default":0},"out_degree":{"type":"integer","title":"Out Degree","default":0},"defect_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Defect Score"},"maintainability_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maintainability Score"},"performance_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Performance Score"},"churn_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Churn Pct"},"commit_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Commit Count"},"last_commit_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Commit At"},"coverage_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Coverage Pct"},"is_test":{"type":"boolean","title":"Is Test","default":false},"is_entry_point":{"type":"boolean","title":"Is Entry Point","default":false},"community_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Community Id"}},"type":"object","required":["file_path"],"title":"FileRow"},"FileSignificantCommit":{"properties":{"sha":{"type":"string","title":"Sha"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"message":{"type":"string","title":"Message","default":""},"author":{"type":"string","title":"Author","default":""}},"type":"object","required":["sha"],"title":"FileSignificantCommit"},"FileSymbol":{"properties":{"symbol_id":{"type":"string","title":"Symbol Id"},"name":{"type":"string","title":"Name"},"kind":{"type":"string","title":"Kind","default":""},"signature":{"type":"string","title":"Signature","default":""},"start_line":{"type":"integer","title":"Start Line","default":0},"end_line":{"type":"integer","title":"End Line","default":0},"visibility":{"type":"string","title":"Visibility","default":"public"},"complexity_estimate":{"type":"number","title":"Complexity Estimate","default":0.0},"is_async":{"type":"boolean","title":"Is Async","default":false}},"type":"object","required":["symbol_id","name"],"title":"FileSymbol"},"FileTopAuthor":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email","default":""},"commit_count":{"type":"integer","title":"Commit Count","default":0},"pct":{"type":"number","title":"Pct","default":0.0}},"type":"object","required":["name"],"title":"FileTopAuthor"},"FileWikiPage":{"properties":{"id":{"type":"string","title":"Id","default":""},"page_id":{"type":"string","title":"Page Id","default":""},"page_type":{"type":"string","title":"Page Type","default":""},"target_path":{"type":"string","title":"Target Path","default":""},"title":{"type":"string","title":"Title","default":""},"summary":{"type":"string","title":"Summary","default":""},"content":{"type":"string","title":"Content","default":""},"freshness_status":{"type":"string","title":"Freshness Status","default":""},"confidence":{"type":"number","title":"Confidence","default":0.0},"human_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Human Notes"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"provider_name":{"type":"string","title":"Provider Name","default":""},"model_name":{"type":"string","title":"Model Name","default":""},"parent_page_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Page Id"},"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order"},"section_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Number"},"structural_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Structural Key"},"has_prose":{"type":"boolean","title":"Has Prose","default":false}},"type":"object","title":"FileWikiPage"},"FilesIndexResponse":{"properties":{"files":{"items":{"$ref":"#/components/schemas/FileRow"},"type":"array","title":"Files"},"language_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Language Counts"},"totals":{"additionalProperties":{"type":"integer"},"type":"object","title":"Totals"},"state":{"type":"string","title":"State","default":"ready"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"FilesIndexResponse"},"FinalizeIndexingRequest":{"properties":{"snapshot_id":{"type":"string","title":"Snapshot Id"},"actual_cost_cents":{"type":"integer","title":"Actual Cost Cents"},"estimated_cost_cents":{"type":"integer","title":"Estimated Cost Cents"},"dodo_customer_id":{"type":"string","title":"Dodo Customer Id"},"user_id":{"type":"string","title":"User Id"},"provider":{"type":"string","title":"Provider","default":"openai"},"model":{"type":"string","title":"Model","default":""},"actual_input_tokens":{"type":"integer","title":"Actual Input Tokens","default":0},"actual_output_tokens":{"type":"integer","title":"Actual Output Tokens","default":0}},"type":"object","required":["snapshot_id","actual_cost_cents","estimated_cost_cents","dodo_customer_id","user_id"],"title":"FinalizeIndexingRequest"},"FunctionBlameEntry":{"properties":{"symbol_id":{"type":"string","title":"Symbol Id"},"file_path":{"type":"string","title":"File Path","default":""},"function_name":{"type":"string","title":"Function Name","default":""},"start_line":{"type":"integer","title":"Start Line","default":0},"end_line":{"type":"integer","title":"End Line","default":0},"line_count":{"type":"integer","title":"Line Count","default":0},"mod_count":{"type":"integer","title":"Mod Count","default":0},"recent_mod_count":{"type":"integer","title":"Recent Mod Count","default":0},"median_author_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Median Author Time"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"},"owner_line_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Owner Line Pct"}},"type":"object","required":["symbol_id"],"title":"FunctionBlameEntry","description":"Per-function blame rollup (repowise >= 0.15.0)."},"FunnelDailyPoint":{"properties":{"day":{"type":"string","title":"Day"},"repo_page_view":{"type":"integer","title":"Repo Page View","default":0},"page_view":{"type":"integer","title":"Page View","default":0},"gate_shown":{"type":"integer","title":"Gate Shown","default":0},"gate_clicked":{"type":"integer","title":"Gate Clicked","default":0},"signup":{"type":"integer","title":"Signup","default":0},"checkout_started":{"type":"integer","title":"Checkout Started","default":0},"checkout_completed":{"type":"integer","title":"Checkout Completed","default":0},"visitors":{"type":"integer","title":"Visitors","default":0}},"type":"object","required":["day"],"title":"FunnelDailyPoint"},"FunnelSummaryResponse":{"properties":{"days":{"type":"integer","title":"Days"},"segment":{"type":"string","title":"Segment","default":"all"},"total_events":{"type":"integer","title":"Total Events","default":0},"total_visitors":{"type":"integer","title":"Total Visitors","default":0},"stages":{"additionalProperties":{"$ref":"#/components/schemas/StageStat"},"type":"object","title":"Stages","default":{}},"gates":{"items":{"$ref":"#/components/schemas/GateStat"},"type":"array","title":"Gates","default":[]},"daily":{"items":{"$ref":"#/components/schemas/FunnelDailyPoint"},"type":"array","title":"Daily","default":[]},"by_tier":{"items":{"$ref":"#/components/schemas/TierStat"},"type":"array","title":"By Tier","default":[]},"segments":{"$ref":"#/components/schemas/SegmentSplit","default":{"signed_in_visitors":0,"anonymous_visitors":0,"signed_in_events":0,"anonymous_events":0}}},"type":"object","required":["days"],"title":"FunnelSummaryResponse"},"GateStat":{"properties":{"gate":{"type":"string","title":"Gate"},"feature":{"type":"string","title":"Feature"},"shown":{"type":"integer","title":"Shown","default":0},"clicked":{"type":"integer","title":"Clicked","default":0},"shown_visitors":{"type":"integer","title":"Shown Visitors","default":0},"clicked_visitors":{"type":"integer","title":"Clicked Visitors","default":0}},"type":"object","required":["gate","feature"],"title":"GateStat"},"GenerateDocsRequest":{"properties":{"docs_file_percentage":{"type":"number","maximum":100.0,"minimum":1.0,"title":"Docs File Percentage","default":10.0},"wiki_style":{"anyOf":[{"type":"string","enum":["comprehensive","caveman","reference","tutorial"]},{"type":"null"}],"title":"Wiki Style"},"docs_language":{"anyOf":[{"type":"string","enum":["en","ru","es","fr","de","zh","ja","ko","it","pt","nl","pl","tr","ar","hi"]},{"type":"null"}],"title":"Docs Language"}},"type":"object","title":"GenerateDocsRequest","description":"Body for POST /repos/{repo_id}/generate-docs.\n\nGenerates AI documentation against a public repo's existing snapshot.\nLets a paying viewer \"adopt\" docs for a repo someone else already\nindexed publicly without needing a fresh full reindex from scratch.\n\n``wiki_style`` / ``docs_language`` = ``None`` inherits from the target\nsnapshot (same contract as ``ReindexRequest``)."},"GitOwnerSummary":{"properties":{"name":{"type":"string","title":"Name"},"file_count":{"type":"integer","title":"File Count"},"pct":{"type":"number","title":"Pct"}},"type":"object","required":["name","file_count","pct"],"title":"GitOwnerSummary"},"GitSummaryResponse":{"properties":{"total_files":{"type":"integer","title":"Total Files","default":0},"hotspot_count":{"type":"integer","title":"Hotspot Count","default":0},"stable_count":{"type":"integer","title":"Stable Count","default":0},"average_churn_percentile":{"type":"number","title":"Average Churn Percentile","default":0.0},"top_owners":{"items":{"$ref":"#/components/schemas/GitOwnerSummary"},"type":"array","title":"Top Owners"}},"type":"object","title":"GitSummaryResponse","description":"Aggregate git health signals for a snapshot, mirroring the OSS\n`/git-summary` route. Computed from the per-file `git_metadata.json`\nartifact."},"GovernedFile":{"properties":{"path":{"type":"string","title":"Path"},"decision_count":{"type":"integer","title":"Decision Count"}},"type":"object","required":["path","decision_count"],"title":"GovernedFile","description":"One file and how many decisions govern it.\n\nAggregated server-side over every decision's ``affected_files``. The\nbrowser never sees the full linkage: on a live index it runs to thousands\nof file→decision pairs and a dozen rows of it survive to the page."},"GoverningDecisionRef":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title","default":""},"status":{"type":"string","title":"Status","default":"proposed"}},"type":"object","required":["id"],"title":"GoverningDecisionRef"},"GraphResponse":{"properties":{"graph":{"additionalProperties":true,"type":"object","title":"Graph"},"pagerank":{"additionalProperties":{"type":"number"},"type":"object","title":"Pagerank"},"betweenness":{"additionalProperties":{"type":"number"},"type":"object","title":"Betweenness"},"communities":{"additionalProperties":{"type":"integer"},"type":"object","title":"Communities"},"truncated":{"type":"boolean","title":"Truncated","default":false},"total_node_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Node Count"},"dead_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dead Total"},"dead_in_view":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dead In View"},"hot_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hot Total"},"hot_in_view":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hot In View"}},"type":"object","required":["graph","pagerank","betweenness","communities"],"title":"GraphResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthBreakdownCategory":{"properties":{"category":{"type":"string","title":"Category"},"cap":{"type":"number","title":"Cap"},"raw_deduction":{"type":"number","title":"Raw Deduction"},"applied_deduction":{"type":"number","title":"Applied Deduction"},"capped":{"type":"boolean","title":"Capped","default":false},"finding_count":{"type":"integer","title":"Finding Count","default":0}},"type":"object","required":["category","cap","raw_deduction","applied_deduction"],"title":"HealthBreakdownCategory","description":"One canonical scoring category's contribution to a file's deduction.\n\n``cap`` is the most the category may subtract from 10; ``applied_deduction``\nis always <= cap. ``capped`` is true iff the applied total was held at the\ncap (the category shed weight)."},"HealthCoverageResponse":{"properties":{"overall_line_coverage_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overall Line Coverage Pct"},"overall_branch_coverage_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overall Branch Coverage Pct"},"file_count_with_coverage":{"type":"integer","title":"File Count With Coverage","default":0},"source_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Format"},"ingested_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingested At"},"ingested_commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingested Commit Sha"},"files":{"items":{"$ref":"#/components/schemas/CoverageFileRow"},"type":"array","title":"Files"},"modules":{"items":{"$ref":"#/components/schemas/CoverageModuleRow"},"type":"array","title":"Modules"},"modules_total":{"type":"integer","title":"Modules Total","default":0},"total":{"type":"integer","title":"Total","default":0},"basis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Basis"},"inferred":{"anyOf":[{"$ref":"#/components/schemas/InferredTestMap"},{"type":"null"}]},"state":{"type":"string","title":"State","default":"ready"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"HealthCoverageResponse"},"HealthFileBreakdownResponse":{"properties":{"file_path":{"type":"string","title":"File Path"},"score":{"type":"number","title":"Score"},"band":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Band"},"max_ccn":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Ccn"},"max_nesting":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Nesting"},"nloc":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nloc"},"duplication_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duplication Pct"},"has_test_file":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Test File"},"line_coverage_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Line Coverage Pct"},"branch_coverage_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Branch Coverage Pct"},"module":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module"},"defect_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Defect Score"},"maintainability_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maintainability Score"},"performance_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Performance Score"},"total_deduction":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Deduction"},"categories":{"items":{"$ref":"#/components/schemas/HealthBreakdownCategory"},"type":"array","title":"Categories"},"deductions_by_category":{"additionalProperties":{"type":"number"},"type":"object","title":"Deductions By Category"},"findings":{"items":{"$ref":"#/components/schemas/BiomarkerFinding"},"type":"array","title":"Findings"},"suggestion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggestion"},"state":{"type":"string","title":"State","default":"ready"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["file_path","score"],"title":"HealthFileBreakdownResponse"},"HealthFileMetric":{"properties":{"file_path":{"type":"string","title":"File Path"},"score":{"type":"number","maximum":10.0,"minimum":0.0,"title":"Score"},"band":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Band"},"max_ccn":{"type":"integer","title":"Max Ccn","default":0},"max_nesting":{"type":"integer","title":"Max Nesting","default":0},"nloc":{"type":"integer","title":"Nloc","default":0},"duplication_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duplication Pct"},"has_test_file":{"type":"boolean","title":"Has Test File","default":false},"line_coverage_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Line Coverage Pct"},"branch_coverage_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Branch Coverage Pct"},"module":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module"},"defect_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Defect Score"},"maintainability_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maintainability Score"},"performance_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Performance Score"},"performance_findings":{"type":"integer","title":"Performance Findings","default":0},"performance_analyzed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Performance Analyzed"},"primary_biomarker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Biomarker"},"primary_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Reason"},"total_deduction":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Deduction"},"top_biomarkers":{"items":{"$ref":"#/components/schemas/BiomarkerFinding"},"type":"array","title":"Top Biomarkers"},"is_test":{"type":"boolean","title":"Is Test","default":false}},"type":"object","required":["file_path","score"],"title":"HealthFileMetric","description":"Per-file aggregate health metric."},"HealthFilesResponse":{"properties":{"total":{"type":"integer","title":"Total","default":0},"offset":{"type":"integer","title":"Offset","default":0},"limit":{"type":"integer","title":"Limit","default":0},"files":{"items":{"$ref":"#/components/schemas/HealthFileMetric"},"type":"array","title":"Files"}},"type":"object","title":"HealthFilesResponse","description":"A page of per-file metrics plus the true pre-slice count.\n\nMirrors the OSS ``/health/files`` envelope so the shared code-health UI can\nlabel the map with the repository's real file count instead of the size of\nthe page it happened to receive."},"HealthFindingPatch":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"HealthFindingPatch"},"HealthFindingsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BiomarkerFinding"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total","default":0},"has_more":{"type":"boolean","title":"Has More","default":false},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"},"state":{"type":"string","title":"State","default":"ready"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"HealthFindingsResponse"},"HealthKpis":{"properties":{"hotspot_health":{"type":"number","title":"Hotspot Health"},"hotspot_health_measured":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hotspot Health Measured"},"average_health":{"type":"number","title":"Average Health"},"worst_performer_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worst Performer Path"},"worst_performer_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Worst Performer Score"},"file_count":{"type":"integer","title":"File Count","default":0},"maintainability_average":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maintainability Average"},"performance_average":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Performance Average"},"maintainability_findings":{"type":"integer","title":"Maintainability Findings","default":0},"performance_findings":{"type":"integer","title":"Performance Findings","default":0}},"type":"object","required":["hotspot_health","average_health"],"title":"HealthKpis"},"HealthMeta":{"properties":{"last_indexed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Indexed At"},"head_commit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Head Commit"},"snapshot_count":{"type":"integer","title":"Snapshot Count","default":0}},"type":"object","title":"HealthMeta"},"HealthModuleRollup":{"properties":{"module":{"type":"string","title":"Module"},"file_count":{"type":"integer","title":"File Count"},"average_health":{"type":"number","title":"Average Health"},"worst_file_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worst File Path"},"worst_file_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Worst File Score"},"nloc_weighted_health":{"type":"number","title":"Nloc Weighted Health"},"critical_finding_count":{"type":"integer","title":"Critical Finding Count","default":0},"warning_finding_count":{"type":"integer","title":"Warning Finding Count","default":0}},"type":"object","required":["module","file_count","average_health","nloc_weighted_health"],"title":"HealthModuleRollup"},"HealthOverviewResponse":{"properties":{"kpis":{"$ref":"#/components/schemas/HealthKpis"},"files":{"items":{"$ref":"#/components/schemas/HealthFileMetric"},"type":"array","title":"Files"},"biomarkers":{"items":{"$ref":"#/components/schemas/BiomarkerFinding"},"type":"array","title":"Biomarkers"},"test_biomarkers":{"items":{"$ref":"#/components/schemas/BiomarkerFinding"},"type":"array","title":"Test Biomarkers"},"biomarkers_total":{"type":"integer","title":"Biomarkers Total","default":0},"test_biomarkers_total":{"type":"integer","title":"Test Biomarkers Total","default":0},"modules":{"items":{"$ref":"#/components/schemas/HealthModuleRollup"},"type":"array","title":"Modules"},"defect_accuracy":{"anyOf":[{"$ref":"#/components/schemas/DefectAccuracy"},{"type":"null"}]},"meta":{"anyOf":[{"$ref":"#/components/schemas/HealthMeta"},{"type":"null"}]},"state":{"type":"string","title":"State","default":"ready"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["kpis"],"title":"HealthOverviewResponse"},"HealthScoreComponent":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"weight":{"type":"number","title":"Weight"},"score":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Score"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["key","label","weight","score","detail"],"title":"HealthScoreComponent","description":"One sub-score that contributes to the composite health score.\n\n`score` is the 0-100 sub-score; `weight` is its share of the\ncomposite (sums to 1.0 across the components list). `detail` is a\nhuman-readable hint the UI shows on hover (\"12% of files have a\nwiki page\", \"14 hotspot files of 230 indexed\", etc.)."},"HealthScoreResponse":{"properties":{"score":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Score"},"components":{"items":{"$ref":"#/components/schemas/HealthScoreComponent"},"type":"array","title":"Components"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["score"],"title":"HealthScoreResponse"},"HealthTrendPoint":{"properties":{"taken_at":{"type":"string","title":"Taken At"},"hotspot_health":{"type":"number","title":"Hotspot Health"},"average_health":{"type":"number","title":"Average Health"},"worst_performer_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worst Performer Path"},"worst_performer_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Worst Performer Score"}},"type":"object","required":["taken_at","hotspot_health","average_health"],"title":"HealthTrendPoint"},"HealthTrendResponse":{"properties":{"points":{"items":{"$ref":"#/components/schemas/HealthTrendPoint"},"type":"array","title":"Points"},"declining":{"type":"boolean","title":"Declining","default":false},"predicted_decline":{"type":"boolean","title":"Predicted Decline","default":false},"state":{"type":"string","title":"State","default":"ready"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"HealthTrendResponse"},"HeritageRelation":{"properties":{"child_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Child Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"child_name":{"type":"string","title":"Child Name"},"parent_name":{"type":"string","title":"Parent Name"},"kind":{"type":"string","title":"Kind"},"line":{"type":"integer","title":"Line","default":0},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"}},"type":"object","required":["child_name","parent_name","kind"],"title":"HeritageRelation"},"HotspotEntry":{"properties":{"path":{"type":"string","title":"Path"},"commit_count":{"type":"integer","title":"Commit Count"},"commit_count_90d":{"type":"integer","title":"Commit Count 90D","default":0},"commit_count_30d":{"type":"integer","title":"Commit Count 30D","default":0},"churn_percentile":{"type":"number","title":"Churn Percentile"},"primary_owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Owner"},"last_commit_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Commit At"},"is_hotspot":{"type":"boolean","title":"Is Hotspot","default":false},"is_stable":{"type":"boolean","title":"Is Stable","default":false},"bus_factor":{"type":"integer","title":"Bus Factor","default":1},"contributor_count":{"type":"integer","title":"Contributor Count","default":0},"lines_added_90d":{"type":"integer","title":"Lines Added 90D","default":0},"lines_deleted_90d":{"type":"integer","title":"Lines Deleted 90D","default":0},"avg_commit_size":{"type":"number","title":"Avg Commit Size","default":0.0},"commit_categories":{"additionalProperties":{"type":"integer"},"type":"object","title":"Commit Categories","default":{}},"commit_count_capped":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Commit Count Capped"},"merge_commit_count_90d":{"type":"integer","title":"Merge Commit Count 90D","default":0},"recent_owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recent Owner Name"},"recent_owner_commit_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recent Owner Commit Pct"},"temporal_hotspot_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temporal Hotspot Score"},"change_entropy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change Entropy"},"change_entropy_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change Entropy Pct"},"prior_defect_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Prior Defect Count"},"bug_magnet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Bug Magnet"},"last_fix_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Fix At"},"original_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Path"}},"type":"object","required":["path","commit_count","churn_percentile"],"title":"HotspotEntry"},"IndexRepoRequest":{"properties":{"url":{"type":"string","title":"Url","description":"GitHub repo URL or owner/name shorthand"},"ref":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Ref","description":"Branch ref to index (defaults to repo's default branch)"},"commit_depth":{"type":"string","enum":["2000","full"],"title":"Commit Depth","default":"2000"},"commit_limit":{"anyOf":[{"type":"integer","maximum":50000.0,"minimum":1.0},{"type":"null"}],"title":"Commit Limit","description":"Numeric commit limit (overrides commit_depth)"},"skip_tests":{"type":"boolean","title":"Skip Tests","default":false},"skip_infra":{"type":"boolean","title":"Skip Infra","default":false},"follow_renames":{"type":"boolean","title":"Follow Renames","default":false},"include_submodules":{"type":"boolean","title":"Include Submodules","default":false},"exclude_patterns":{"items":{"type":"string"},"type":"array","title":"Exclude Patterns"},"generate_docs":{"type":"boolean","title":"Generate Docs","default":false},"docs_file_percentage":{"type":"number","maximum":100.0,"minimum":1.0,"title":"Docs File Percentage","default":10.0},"wiki_style":{"type":"string","enum":["comprehensive","caveman","reference","tutorial"],"title":"Wiki Style","default":"comprehensive"},"docs_language":{"type":"string","enum":["en","ru","es","fr","de","zh","ja","ko","it","pt","nl","pl","tr","ar","hi"],"title":"Docs Language","default":"en"},"prose_cap_cents":{"anyOf":[{"type":"integer","enum":[100,200,500,1000]},{"type":"null"}],"title":"Prose Cap Cents","description":"Cents pre-authorized for AI explanations (omit to opt out)"}},"type":"object","required":["url"],"title":"IndexRepoRequest"},"IndexRepoResponse":{"properties":{"snapshot_id":{"type":"string","title":"Snapshot Id"},"short_id":{"type":"string","title":"Short Id"},"status":{"$ref":"#/components/schemas/SnapshotStatus"},"cached":{"type":"boolean","title":"Cached"},"repo":{"$ref":"#/components/schemas/RepoResponse"}},"type":"object","required":["snapshot_id","short_id","status","cached","repo"],"title":"IndexRepoResponse"},"IndexingCheckRequest":{"properties":{"snapshot_id":{"type":"string","title":"Snapshot Id"},"success":{"type":"boolean","title":"Success"},"file_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Count"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["snapshot_id","success"],"title":"IndexingCheckRequest"},"InferredTestMap":{"properties":{"files":{"items":{"$ref":"#/components/schemas/ReachedFileRow"},"type":"array","title":"Files"},"files_total":{"type":"integer","title":"Files Total","default":0},"files_reached":{"type":"integer","title":"Files Reached","default":0},"files_not_reached":{"type":"integer","title":"Files Not Reached","default":0},"test_file_count":{"type":"integer","title":"Test File Count","default":0}},"type":"object","title":"InferredTestMap","description":"The graph-inferred test map: counts, never a ratio.\n\n``files_reached`` and ``files_not_reached`` are deliberately two counts\nrather than one fraction - a fraction invites a progress bar, and a progress\nbar is the coverage percentage this basis is not allowed to claim.\n\n``files_total`` is the full count whatever ``files`` carries, so a paged\nlist is never read as the whole repo."},"InvitationAcceptResponse":{"properties":{"team_id":{"type":"string","title":"Team Id"},"role":{"type":"string","enum":["owner","admin","member"],"title":"Role"},"team_name":{"type":"string","title":"Team Name"}},"type":"object","required":["team_id","role","team_name"],"title":"InvitationAcceptResponse"},"InvitationPreviewResponse":{"properties":{"team_name":{"type":"string","title":"Team Name"},"member_count":{"type":"integer","title":"Member Count"},"role":{"type":"string","enum":["owner","admin","member"],"title":"Role"},"inviter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inviter"},"status":{"type":"string","enum":["pending","expired"],"title":"Status"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["team_name","member_count","role","status","expires_at"],"title":"InvitationPreviewResponse","description":"GET /invitations/{token}/preview: anonymous-safe invite context.\n\nServed before sign-in, so it must never carry the invited email, the\ninviter's email, or the token itself. Revoked and unknown tokens are\nboth a plain 404 (the \"revoked_or_unknown\" case never reaches this\nshape), so possession of a stale link reveals nothing about its history."},"JiraExtractResponse":{"properties":{"decisions_scanned":{"type":"integer","title":"Decisions Scanned"},"links_created":{"type":"integer","title":"Links Created"},"keys_rejected":{"type":"integer","title":"Keys Rejected"}},"type":"object","required":["decisions_scanned","links_created","keys_rejected"],"title":"JiraExtractResponse"},"JiraIssueLink":{"properties":{"id":{"type":"string","title":"Id"},"repo_id":{"type":"string","title":"Repo Id"},"decision_id":{"type":"string","title":"Decision Id"},"issue_key":{"type":"string","title":"Issue Key"},"source":{"type":"string","title":"Source","default":"manual"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"issue_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issue Url"},"refreshed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refreshed At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","repo_id","decision_id","issue_key"],"title":"JiraIssueLink"},"JiraIssueLinksResponse":{"properties":{"connected":{"type":"boolean","title":"Connected"},"links":{"items":{"$ref":"#/components/schemas/JiraIssueLink"},"type":"array","title":"Links"}},"type":"object","required":["connected"],"title":"JiraIssueLinksResponse","description":"Links for one decision. ``connected`` is false when the repo's team\nhas no active Atlassian connection (links may still exist as cache)."},"JiraLinkCreateRequest":{"properties":{"issue_key":{"type":"string","title":"Issue Key"}},"type":"object","required":["issue_key"],"title":"JiraLinkCreateRequest"},"LeaderboardEntryResponse":{"properties":{"rank":{"type":"integer","title":"Rank"},"owner":{"type":"string","title":"Owner"},"name":{"type":"string","title":"Name"},"short_id":{"type":"string","title":"Short Id"},"average_health":{"type":"number","title":"Average Health"},"hotspot_health":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hotspot Health"},"previous_health":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Health"},"file_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Count"},"stars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stars"},"primary_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Language"},"measured_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Measured At"}},"type":"object","required":["rank","owner","name","short_id","average_health"],"title":"LeaderboardEntryResponse","description":"One row on the public code-health leaderboard.\n\nRanked by ``average_health``, which is deterministic: the same commit\nalways scores the same, with no model in the path. That is what makes\nranking across repos meaningful at all.\n\n``previous_health`` is the score of the repo's prior ready snapshot, so the\nrow can render a trend rather than only an absolute number. It is ``None``\non a repo's first measured snapshot, which is currently most of them: the\nscores were only denormalized onto the snapshot row in migration 095, so\nthe trend fills in as repos are re-indexed.\n\nScope note: the board covers curated (``repowise_managed``) repos only.\nSee migration 099 for the measurements behind that decision."},"LinkAnonRequest":{"properties":{"anon_id":{"type":"string","title":"Anon Id"}},"type":"object","required":["anon_id"],"title":"LinkAnonRequest"},"LlmCostsTelemetry":{"properties":{"available":{"type":"boolean","title":"Available","default":false},"total_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Input Tokens"},"total_output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Output Tokens"},"total_cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Cost Usd"},"by_model":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"By Model"},"by_operation":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"By Operation"}},"type":"object","title":"LlmCostsTelemetry","description":"Engine-side per-operation token telemetry (from llm_costs.json artifact).\n\nAvailable only when the OSS pipeline writes the artifact. Hosted gracefully\nreturns None for every field if the file is absent."},"McpToolsUpdateRequest":{"properties":{"repo_id":{"type":"string","title":"Repo Id"},"tools":{"anyOf":[{},{"type":"null"}],"title":"Tools"}},"type":"object","required":["repo_id"],"title":"McpToolsUpdateRequest"},"MemberRoleUpdateRequest":{"properties":{"role":{"type":"string","enum":["admin","member"],"title":"Role"}},"type":"object","required":["role"],"title":"MemberRoleUpdateRequest"},"MemberSnapshotCompleteRequest":{"properties":{"repo_id":{"type":"string","title":"Repo Id"}},"type":"object","required":["repo_id"],"title":"MemberSnapshotCompleteRequest","description":"Internal callback fired by the Modal indexer when a member repo's\nsnapshot flips to ``ready``. Triggers per-workspace auto-reindex."},"ModuleEdge":{"properties":{"source":{"type":"string","title":"Source"},"target":{"type":"string","title":"Target"},"edge_count":{"type":"integer","title":"Edge Count"}},"type":"object","required":["source","target","edge_count"],"title":"ModuleEdge"},"ModuleGraphResponse":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/ModuleNode"},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/ModuleEdge"},"type":"array","title":"Edges"}},"type":"object","required":["nodes","edges"],"title":"ModuleGraphResponse"},"ModuleHealthDetail":{"properties":{"module_path":{"type":"string","title":"Module Path"},"file_count":{"type":"integer","title":"File Count"},"symbol_count":{"type":"integer","title":"Symbol Count"},"hotspot_count":{"type":"integer","title":"Hotspot Count"},"dead_code_count":{"type":"integer","title":"Dead Code Count"},"dead_code_lines":{"type":"integer","title":"Dead Code Lines"},"avg_churn_percentile":{"type":"number","title":"Avg Churn Percentile"},"median_bus_factor":{"type":"number","title":"Median Bus Factor"},"min_bus_factor":{"type":"integer","title":"Min Bus Factor"},"primary_owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Owner"},"primary_owner_pct":{"type":"number","title":"Primary Owner Pct","default":0.0},"is_silo":{"type":"boolean","title":"Is Silo","default":false},"decision_count":{"type":"integer","title":"Decision Count","default":0},"doc_coverage_pct":{"type":"number","title":"Doc Coverage Pct","default":0.0},"health_score":{"type":"number","title":"Health Score"},"owners":{"items":{"$ref":"#/components/schemas/ModuleHealthOwner"},"type":"array","title":"Owners"},"top_hotspots":{"items":{"type":"string"},"type":"array","title":"Top Hotspots"},"governing_decisions":{"items":{"$ref":"#/components/schemas/GoverningDecisionRef"},"type":"array","title":"Governing Decisions"},"contributor_count":{"type":"integer","title":"Contributor Count","default":0}},"type":"object","required":["module_path","file_count","symbol_count","hotspot_count","dead_code_count","dead_code_lines","avg_churn_percentile","median_bus_factor","min_bus_factor","health_score"],"title":"ModuleHealthDetail"},"ModuleHealthOwner":{"properties":{"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"file_count":{"type":"integer","title":"File Count"},"pct":{"type":"number","title":"Pct"}},"type":"object","required":["name","file_count","pct"],"title":"ModuleHealthOwner"},"ModuleHealthSummary":{"properties":{"module_path":{"type":"string","title":"Module Path"},"file_count":{"type":"integer","title":"File Count"},"symbol_count":{"type":"integer","title":"Symbol Count"},"hotspot_count":{"type":"integer","title":"Hotspot Count"},"dead_code_count":{"type":"integer","title":"Dead Code Count"},"dead_code_lines":{"type":"integer","title":"Dead Code Lines"},"avg_churn_percentile":{"type":"number","title":"Avg Churn Percentile"},"median_bus_factor":{"type":"number","title":"Median Bus Factor"},"min_bus_factor":{"type":"integer","title":"Min Bus Factor"},"primary_owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Owner"},"primary_owner_pct":{"type":"number","title":"Primary Owner Pct","default":0.0},"is_silo":{"type":"boolean","title":"Is Silo","default":false},"decision_count":{"type":"integer","title":"Decision Count","default":0},"doc_coverage_pct":{"type":"number","title":"Doc Coverage Pct","default":0.0},"health_score":{"type":"number","title":"Health Score"}},"type":"object","required":["module_path","file_count","symbol_count","hotspot_count","dead_code_count","dead_code_lines","avg_churn_percentile","median_bus_factor","min_bus_factor","health_score"],"title":"ModuleHealthSummary"},"ModuleNode":{"properties":{"module_id":{"type":"string","title":"Module Id"},"file_count":{"type":"integer","title":"File Count"},"symbol_count":{"type":"integer","title":"Symbol Count"},"avg_pagerank":{"type":"number","title":"Avg Pagerank"},"doc_coverage_pct":{"type":"number","title":"Doc Coverage Pct"}},"type":"object","required":["module_id","file_count","symbol_count","avg_pagerank","doc_coverage_pct"],"title":"ModuleNode"},"NeighboringCommunity":{"properties":{"community_id":{"type":"integer","title":"Community Id"},"label":{"type":"string","title":"Label"},"cross_edge_count":{"type":"integer","title":"Cross Edge Count"}},"type":"object","required":["community_id","label","cross_edge_count"],"title":"NeighboringCommunity"},"NotificationPreferencesRequest":{"properties":{"notification_preferences":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Notification Preferences"}},"type":"object","required":["notification_preferences"],"title":"NotificationPreferencesRequest","description":"Body for PATCH /auth/me/notification-preferences.\n\nReplaces the entire preferences blob — clients send the full set they\nwant persisted. Keys are channel names ('reindex_complete',\n'low_credit', ...); unknown keys are accepted (forward-compat) and\nstored as-is. Defaults applied at email-send time, not here."},"NotificationResponse":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","enum":["index_complete","index_failed","reindex_complete","reindex_failed","prose_complete","low_credit","stale_decision","security_findings","security_new_cves","security_secret_rotation","engineering_hotspot_drift","engineering_bus_factor","engineering_health_decline","payment_failed","subscription_on_hold"],"title":"Kind"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Read At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","kind","created_at"],"title":"NotificationResponse"},"NotificationsListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/NotificationResponse"},"type":"array","title":"Items"},"unread_count":{"type":"integer","title":"Unread Count"}},"type":"object","required":["items","unread_count"],"title":"NotificationsListResponse"},"NotifyAdminsRequest":{"properties":{"kind":{"type":"string","maxLength":64,"minLength":1,"title":"Kind"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"}},"type":"object","required":["kind"],"title":"NotifyAdminsRequest"},"NotifyEmailRequest":{"properties":{"user_id":{"type":"string","title":"User Id"},"kind":{"type":"string","maxLength":64,"minLength":1,"title":"Kind"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"}},"type":"object","required":["user_id","kind"],"title":"NotifyEmailRequest"},"NotifyRequest":{"properties":{"user_id":{"type":"string","title":"User Id"},"kind":{"type":"string","maxLength":64,"minLength":1,"title":"Kind"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"}},"type":"object","required":["user_id","kind"],"title":"NotifyRequest"},"OsStat":{"properties":{"os":{"type":"string","title":"Os"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["os","count"],"title":"OsStat"},"OverviewPageResponse":{"properties":{"overview":{"$ref":"#/components/schemas/OverviewResponse"},"hotspots":{"items":{"$ref":"#/components/schemas/HotspotEntry"},"type":"array","title":"Hotspots"},"decisions":{"$ref":"#/components/schemas/DecisionsResponse"},"module_graph":{"anyOf":[{"$ref":"#/components/schemas/ModuleGraphResponse"},{"type":"null"}]},"execution_flows":{"$ref":"#/components/schemas/ExecutionFlowsResponse"},"attention":{"items":{"$ref":"#/components/schemas/AttentionItem"},"type":"array","title":"Attention"},"health_score":{"$ref":"#/components/schemas/HealthScoreResponse"},"defect_accuracy":{"anyOf":[{"$ref":"#/components/schemas/DefectAccuracy"},{"type":"null"}]},"wiki_format":{"type":"string","title":"Wiki Format","default":"legacy_flat"},"reindex_recommended":{"type":"boolean","title":"Reindex Recommended","default":false},"reindex_recommended_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reindex Recommended Reason"}},"type":"object","required":["overview","hotspots","decisions","execution_flows","attention","health_score"],"title":"OverviewPageResponse"},"OverviewResponse":{"properties":{"file_count":{"type":"integer","title":"File Count"},"symbol_count":{"type":"integer","title":"Symbol Count"},"languages":{"additionalProperties":{"type":"integer"},"type":"object","title":"Languages"},"repo_structure":{"additionalProperties":true,"type":"object","title":"Repo Structure"},"git_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Git Summary"},"community_summary":{"items":{"$ref":"#/components/schemas/CommunitySummaryItem"},"type":"array","title":"Community Summary"}},"type":"object","required":["file_count","symbol_count","languages","repo_structure"],"title":"OverviewResponse"},"OwnerAgentCollab":{"properties":{"files_with_agent_commits":{"type":"integer","title":"Files With Agent Commits","default":0},"agent_commit_count":{"type":"integer","title":"Agent Commit Count","default":0},"agent_share_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Agent Share Pct"},"tier_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Tier Counts"}},"type":"object","title":"OwnerAgentCollab","description":"Agent-collaboration rollup over an owner's files (repowise >= 0.18.0).\n\n`agent_share_pct` is the share of agent-attributed commits across the\nfiles this person owns; None when there are no attributed commits."},"OwnerCoAuthor":{"properties":{"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"shared_files":{"type":"integer","title":"Shared Files"},"co_change_strength":{"type":"number","title":"Co Change Strength"}},"type":"object","required":["name","shared_files","co_change_strength"],"title":"OwnerCoAuthor"},"OwnerFileEntry":{"properties":{"file_path":{"type":"string","title":"File Path"},"commit_count_90d":{"type":"integer","title":"Commit Count 90D"},"churn_percentile":{"type":"number","title":"Churn Percentile"},"bus_factor":{"type":"integer","title":"Bus Factor"},"is_hotspot":{"type":"boolean","title":"Is Hotspot"},"last_commit_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Commit At"},"primary_owner_commit_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Primary Owner Commit Pct"}},"type":"object","required":["file_path","commit_count_90d","churn_percentile","bus_factor","is_hotspot"],"title":"OwnerFileEntry"},"OwnerListEntry":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"files_owned":{"type":"integer","title":"Files Owned","default":0},"hotspots_owned":{"type":"integer","title":"Hotspots Owned","default":0},"silo_modules":{"type":"integer","title":"Silo Modules","default":0},"dead_code_files_owned":{"type":"integer","title":"Dead Code Files Owned","default":0},"dead_code_lines_owned":{"type":"integer","title":"Dead Code Lines Owned","default":0},"commit_count_90d":{"type":"integer","title":"Commit Count 90D","default":0},"last_commit_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Commit At"},"bus_factor_risk_files":{"type":"integer","title":"Bus Factor Risk Files","default":0}},"type":"object","required":["key","name"],"title":"OwnerListEntry"},"OwnerModuleRollup":{"properties":{"module_path":{"type":"string","title":"Module Path"},"file_count":{"type":"integer","title":"File Count"},"hotspot_count":{"type":"integer","title":"Hotspot Count"},"dominant_pct":{"type":"number","title":"Dominant Pct"}},"type":"object","required":["module_path","file_count","hotspot_count","dominant_pct"],"title":"OwnerModuleRollup"},"OwnerProfileResponse":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"files_owned":{"type":"integer","title":"Files Owned","default":0},"hotspots_owned":{"type":"integer","title":"Hotspots Owned","default":0},"silo_modules":{"type":"integer","title":"Silo Modules","default":0},"dead_code_files_owned":{"type":"integer","title":"Dead Code Files Owned","default":0},"dead_code_lines_owned":{"type":"integer","title":"Dead Code Lines Owned","default":0},"commit_count_90d":{"type":"integer","title":"Commit Count 90D","default":0},"last_commit_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Commit At"},"first_commit_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Commit At"},"bus_factor_risk_files":{"type":"integer","title":"Bus Factor Risk Files","default":0},"lines_added_90d_est":{"type":"integer","title":"Lines Added 90D Est","default":0},"lines_deleted_90d_est":{"type":"integer","title":"Lines Deleted 90D Est","default":0},"modules":{"items":{"$ref":"#/components/schemas/OwnerModuleRollup"},"type":"array","title":"Modules"},"top_files":{"items":{"$ref":"#/components/schemas/OwnerFileEntry"},"type":"array","title":"Top Files"},"co_authors":{"items":{"$ref":"#/components/schemas/OwnerCoAuthor"},"type":"array","title":"Co Authors"},"commit_categories":{"additionalProperties":{"type":"integer"},"type":"object","title":"Commit Categories"},"files_touched_total":{"type":"integer","title":"Files Touched Total","default":0},"co_authors_total":{"type":"integer","title":"Co Authors Total","default":0},"agent_collab":{"anyOf":[{"$ref":"#/components/schemas/OwnerAgentCollab"},{"type":"null"}]}},"type":"object","required":["key","name"],"title":"OwnerProfileResponse"},"OwnershipEntry":{"properties":{"path":{"type":"string","title":"Path"},"primary_owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Owner"},"owner_pct":{"type":"number","title":"Owner Pct","default":0.0},"is_silo":{"type":"boolean","title":"Is Silo","default":false},"contributor_count":{"type":"integer","title":"Contributor Count","default":0},"lines":{"type":"integer","title":"Lines","default":0}},"type":"object","required":["path"],"title":"OwnershipEntry","description":"One ownership row (file or module granularity) for the ownership map.\nMirrors the OSS `/ownership` entry, adapted to the hosted field names."},"OwnershipTransferRequest":{"properties":{"new_owner_user_id":{"type":"string","title":"New Owner User Id"}},"type":"object","required":["new_owner_user_id"],"title":"OwnershipTransferRequest"},"PageNotesPatch":{"properties":{"human_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Human Notes"}},"type":"object","title":"PageNotesPatch"},"PageNotesResponse":{"properties":{"page_path":{"type":"string","title":"Page Path"},"human_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Human Notes"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["page_path"],"title":"PageNotesResponse"},"PageRedirects":{"properties":{"ids":{"additionalProperties":{"type":"string"},"type":"object","title":"Ids"},"types":{"additionalProperties":{"type":"string"},"type":"object","title":"Types"},"type_rewrites":{"additionalProperties":{"type":"string"},"type":"object","title":"Type Rewrites"}},"type":"object","title":"PageRedirects","description":"Where a retired wiki page id sends the reader on *this* snapshot.\n\nWiki page ids are public URLs, so an id that stops being generated cannot\ndead-end. Baked into the ``/docs`` payload rather than served by a\nresolution endpoint because the client already holds the page array it\nwould resolve against, so a redirect costs no extra round trip.\n\nBoth maps are consulted only *after* an exact id match against ``pages``\nfails. A snapshot indexed before the retirement still holds the retired\npages, and there the reader must get the real page rather than be bounced\nto its successor.\n\nThree maps because upstream retirements come in three shapes and flattening\nthem loses information:\n\n* ``ids`` — exact retired id → successor id. The retired onboarding slots,\n  whose ids are the same in every repository.\n* ``types`` — retired page type → successor id. For a type that folds into\n  one repo-wide page: a ``layer_page`` id carries an unbounded layer slug\n  (``layer_page:layer:core``) so it cannot be enumerated, and the slug says\n  nothing about the successor, so the successor is named outright.\n* ``type_rewrites`` — retired page type → successor page *type*, with the\n  target path carried across unchanged. ``architecture_diagram:acme``\n  becomes ``repo_overview:acme``. Kept separate rather than resolved to an\n  id because that is what the rule means: collapsing it into ``types``\n  works only where the retired page and its successor happen to share a\n  target path, and silently misroutes every id of the type where they do\n  not.\n\nResolution order is ``ids``, then ``type_rewrites``, then ``types``, which\nis the order the upstream resolver applies the same rules in. Values in\n``ids`` and ``types`` are ids present in this snapshot's ``pages``; a\n``type_rewrites`` result has to be checked against ``pages`` by the client,\nsince only it knows the path."},"Paginated_CommitEntry_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CommitEntry"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["items","total","has_more"],"title":"Paginated[CommitEntry]"},"Paginated_FunctionBlameEntry_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FunctionBlameEntry"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["items","total","has_more"],"title":"Paginated[FunctionBlameEntry]"},"Paginated_HotspotEntry_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/HotspotEntry"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["items","total","has_more"],"title":"Paginated[HotspotEntry]"},"Paginated_ModuleHealthSummary_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ModuleHealthSummary"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["items","total","has_more"],"title":"Paginated[ModuleHealthSummary]"},"Paginated_OwnerListEntry_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OwnerListEntry"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["items","total","has_more"],"title":"Paginated[OwnerListEntry]"},"Paginated_SymbolEntry_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SymbolEntry"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["items","total","has_more"],"title":"Paginated[SymbolEntry]"},"PerformanceFacetCount":{"properties":{"value":{"type":"string","title":"Value"},"total":{"type":"integer","title":"Total","default":0}},"type":"object","required":["value"],"title":"PerformanceFacetCount","description":"One value of a narrowable dimension, and how many rows carry it.\n\nA value with no rows is absent rather than present at zero, matching OSS:\nthe control renders one chip per entry, and a chip that can only ever\nreturn nothing is worse than no chip."},"PerformanceFix":{"properties":{"strategy":{"type":"string","title":"Strategy"},"safety":{"type":"string","enum":["proven","advisory"],"title":"Safety"},"rationale":{"type":"string","title":"Rationale"}},"type":"object","required":["strategy","safety","rationale"],"title":"PerformanceFix","description":"The supported intervention, when one is provable."},"PerformanceOpportunity":{"properties":{"opportunity_id":{"type":"string","title":"Opportunity Id"},"performance_model_version":{"type":"integer","title":"Performance Model Version","default":0},"biomarker_type":{"type":"string","title":"Biomarker Type"},"biomarker_types":{"items":{"type":"string"},"type":"array","title":"Biomarker Types"},"boundary_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boundary Kind"},"execution_context":{"type":"string","enum":["production","tooling","test","unknown"],"title":"Execution Context"},"terminal_sink":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terminal Sink"},"shared_path_suffix":{"items":{"type":"string"},"type":"array","title":"Shared Path Suffix"},"intervention_symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intervention Symbol"},"file_path":{"type":"string","title":"File Path","default":""},"affected_call_sites_total":{"type":"integer","title":"Affected Call Sites Total","default":0},"affected_files_total":{"type":"integer","title":"Affected Files Total","default":0},"observations_total":{"type":"integer","title":"Observations Total","default":0},"evidence":{"items":{"$ref":"#/components/schemas/PerformanceOpportunityEvidence"},"type":"array","title":"Evidence"},"evidence_truncated":{"type":"boolean","title":"Evidence Truncated","default":false},"evidence_total":{"type":"integer","title":"Evidence Total","default":0},"evidence_emitted":{"type":"integer","title":"Evidence Emitted","default":0},"reliable_entry_reachability":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reliable Entry Reachability"},"provenance":{"type":"string","title":"Provenance","default":"direct"},"confidence":{"type":"string","enum":["high","medium","low"],"title":"Confidence","default":"low"},"resource_fingerprints":{"items":{"type":"string"},"type":"array","title":"Resource Fingerprints"},"facets":{"additionalProperties":true,"type":"object","title":"Facets"},"actionability_state":{"type":"string","enum":["plan_ready","advisory","investigate"],"title":"Actionability State","default":"investigate"},"actionability_reason":{"type":"string","title":"Actionability Reason","default":""},"prerequisites":{"items":{"type":"string"},"type":"array","title":"Prerequisites"},"rank_score":{"type":"integer","title":"Rank Score","default":0},"rank_position":{"type":"integer","title":"Rank Position","default":0},"rank_factors":{"additionalProperties":true,"type":"object","title":"Rank Factors"},"why_ranked":{"items":{"$ref":"#/components/schemas/PerformanceWhyRanked"},"type":"array","title":"Why Ranked"},"fix":{"anyOf":[{"$ref":"#/components/schemas/PerformanceFix"},{"type":"null"}]},"plan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Id"},"plan_status":{"type":"string","enum":["available","no_safe_plan","not_persisted"],"title":"Plan Status","default":"not_persisted"},"plan_reason":{"type":"string","title":"Plan Reason","default":""}},"type":"object","required":["opportunity_id","biomarker_type","execution_context"],"title":"PerformanceOpportunity","description":"One causal group of performance findings, with its plan link.\n\nEvery key the engine's ``as_dict`` emits has to be named here. A pydantic\nmodel drops what it does not declare, silently and with no error anywhere,\nso an undeclared field is not a missing nicety: the shared view\ndereferences several of these without a guard, and the tab renders as a\ncrash rather than as a degraded panel.\n``tests/unit/test_performance_wire_contract.py`` holds the two shapes\ntogether so the next engine field fails a test instead of a page."},"PerformanceOpportunityEvidence":{"properties":{"finding_id":{"type":"string","title":"Finding Id","default":""},"file_path":{"type":"string","title":"File Path","default":""},"biomarker_type":{"type":"string","title":"Biomarker Type","default":""},"function_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Function Name"},"line_start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line Start"},"line_end":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line End"},"reason":{"type":"string","title":"Reason","default":""},"path":{"items":{"type":"string"},"type":"array","title":"Path"},"provenance":{"type":"string","title":"Provenance","default":"direct"}},"type":"object","title":"PerformanceOpportunityEvidence","description":"One raw observation behind an opportunity. Bounded server-side."},"PerformanceOpportunityFindingsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BiomarkerFinding"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total","default":0},"has_more":{"type":"boolean","title":"Has More","default":false},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"},"state":{"type":"string","title":"State","default":"ready"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"PerformanceOpportunityFindingsPage","description":"Click-gated raw observations for one opportunity id."},"PerformanceOpportunityPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PerformanceOpportunity"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total","default":0},"has_more":{"type":"boolean","title":"Has More","default":false},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"},"summary":{"$ref":"#/components/schemas/PerformanceOpportunitySummary"},"facets":{"additionalProperties":{"items":{"$ref":"#/components/schemas/PerformanceFacetCount"},"type":"array"},"type":"object","title":"Facets"},"ignored_arguments":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Ignored Arguments"},"state":{"type":"string","title":"State","default":"ready"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"PerformanceOpportunityPage"},"PerformanceOpportunitySummary":{"properties":{"total":{"type":"integer","title":"Total","default":0},"production_total":{"type":"integer","title":"Production Total","default":0},"tooling_total":{"type":"integer","title":"Tooling Total","default":0},"test_total":{"type":"integer","title":"Test Total","default":0},"context":{"additionalProperties":{"type":"integer"},"type":"object","title":"Context"},"with_plan_total":{"type":"integer","title":"With Plan Total","default":0},"without_plan_total":{"type":"integer","title":"Without Plan Total","default":0},"status":{"type":"string","enum":["current","stale_model","unavailable"],"title":"Status","default":"current"},"repository_total":{"type":"integer","title":"Repository Total","default":0},"performance_model_version":{"type":"integer","title":"Performance Model Version","default":0},"materialized_model_version":{"type":"integer","title":"Materialized Model Version","default":0},"analyzed_commit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analyzed Commit"},"actionability":{"additionalProperties":{"type":"integer"},"type":"object","title":"Actionability"},"boundary":{"additionalProperties":{"type":"integer"},"type":"object","title":"Boundary"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","title":"PerformanceOpportunitySummary","description":"Counts over the selected context, not over the requested page.\n\nTwo scopes live here and the split is deliberate. ``total`` and the\nactionability, boundary and plan counts describe the selected context, so\na headline never states a number the queue beneath it contradicts. The\ncensus - ``repository_total``, the per-context map, and the three flat\ntotals - stays whole, because that is what names how many causes exist at\nall and what a client without facet counts labels its context tabs with."},"PerformanceWhyRanked":{"properties":{"factor":{"type":"string","title":"Factor"},"points":{"type":"integer","title":"Points","default":0},"value":{"title":"Value"}},"type":"object","required":["factor"],"title":"PerformanceWhyRanked","description":"One ranking factor, in the order the ranker weighed it."},"PlatformDailyPoint":{"properties":{"day":{"type":"string","title":"Day"},"users":{"type":"integer","title":"Users","default":0},"repos":{"type":"integer","title":"Repos","default":0},"snapshots":{"type":"integer","title":"Snapshots","default":0}},"type":"object","required":["day"],"title":"PlatformDailyPoint"},"PlatformSummaryResponse":{"properties":{"days":{"type":"integer","title":"Days"},"total_users":{"type":"integer","title":"Total Users","default":0},"new_users":{"type":"integer","title":"New Users","default":0},"users_by_tier":{"additionalProperties":{"type":"integer"},"type":"object","title":"Users By Tier","default":{}},"paid_users":{"type":"integer","title":"Paid Users","default":0},"active_indexers":{"type":"integer","title":"Active Indexers","default":0},"total_repos":{"type":"integer","title":"Total Repos","default":0},"new_repos":{"type":"integer","title":"New Repos","default":0},"public_repos":{"type":"integer","title":"Public Repos","default":0},"private_repos":{"type":"integer","title":"Private Repos","default":0},"total_snapshots":{"type":"integer","title":"Total Snapshots","default":0},"new_snapshots":{"type":"integer","title":"New Snapshots","default":0},"snapshots_by_status":{"additionalProperties":{"type":"integer"},"type":"object","title":"Snapshots By Status","default":{}},"index_success_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Index Success Rate"},"llm_cost_cents":{"type":"integer","title":"Llm Cost Cents","default":0},"median_index_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Index Seconds"},"daily":{"items":{"$ref":"#/components/schemas/PlatformDailyPoint"},"type":"array","title":"Daily","default":[]}},"type":"object","required":["days"],"title":"PlatformSummaryResponse"},"PortalResponse":{"properties":{"portal_url":{"type":"string","title":"Portal Url"}},"type":"object","required":["portal_url"],"title":"PortalResponse"},"PrAnalysisResponse":{"properties":{"owner":{"type":"string","title":"Owner"},"repo":{"type":"string","title":"Repo"},"pr_number":{"type":"integer","title":"Pr Number"},"pr_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pr Title"},"pr_author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pr Author"},"pr_state":{"type":"string","title":"Pr State"},"head_sha":{"type":"string","title":"Head Sha"},"analyzed_at":{"type":"string","title":"Analyzed At"},"health_before":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Health Before"},"health_after":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Health After"},"change_risk_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change Risk Score"},"change_risk_percentile":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change Risk Percentile"},"change_risk_priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Risk Priority"},"changed_file_count":{"type":"integer","title":"Changed File Count"},"breaking_symbol_count":{"type":"integer","title":"Breaking Symbol Count"},"findings_introduced":{"type":"integer","title":"Findings Introduced"},"findings_resolved":{"type":"integer","title":"Findings Resolved"},"outside_caller_count":{"type":"integer","title":"Outside Caller Count"},"changed_paths":{"items":{"type":"string"},"type":"array","title":"Changed Paths"},"analysis":{"additionalProperties":true,"type":"object","title":"Analysis"}},"type":"object","required":["owner","repo","pr_number","pr_state","head_sha","analyzed_at","changed_file_count","breaking_symbol_count","findings_introduced","findings_resolved","outside_caller_count","changed_paths","analysis"],"title":"PrAnalysisResponse","description":"What the per-PR page renders from.\n\nThe scalars are the promoted columns; ``analysis`` is the projection the\nbot wrote. Splitting them is not cosmetic: everything outside ``analysis``\nis queryable by other surfaces, and everything inside it is pruned once the\nPR is superseded or long closed, at which point this endpoint stops serving\nthe PR at all."},"PreferredModelRequest":{"properties":{"preferred_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Model"}},"type":"object","title":"PreferredModelRequest","description":"Body for PATCH /auth/me/preferred-model.\n\nOpaque text — validated client-side against /billing/models so the column\ndoesn't need a migration when a provider adds a model. `None` clears the\npreference and falls back to the catalogue default."},"ProgressFinding":{"properties":{"text":{"type":"string","title":"Text"},"at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"At"}},"type":"object","required":["text"],"title":"ProgressFinding","description":"One arrow-prefixed summary line the pipeline emitted about this repo.\n\nA fact about the user's own repository -- \"Graph: 3,224 nodes - 8,161\nedges\", \"750 files parsed - 1,696 symbols extracted\" -- not a warning and\nnot a per-file trace. Written by ``modal_app/progress_callback.py`` into\n``snapshots.progress_findings``. Advisory display data: every field is\noptional-shaped because it is read back out of a jsonb column that older\nrows predate.\n\nThere is no ``phase``. The writer used to stamp one and it was wrong on\nnearly every finding -- see ``_note_finding`` for the mechanism. Rows\nwritten before that removal still carry the key; pydantic's default\n``extra=\"ignore\"`` drops it on the way out, which is the intended\nmigration: none."},"ProseAutoRefreshRequest":{"properties":{"snapshot_id":{"type":"string","title":"Snapshot Id"},"stale_count":{"type":"integer","title":"Stale Count","default":0},"mode":{"type":"string","enum":["authorize","spawn"],"title":"Mode","default":"spawn"},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"}},"type":"object","required":["snapshot_id"],"title":"ProseAutoRefreshRequest","description":"Ask the backend whether a ready snapshot should get AI explanations.\n\nSent by the indexer once a snapshot is ready, for either of two reasons:\ncarry-forward flagged pages stale, or the index request carried an opt-in.\nNothing in this payload is trusted for a decision: the snapshot id is a\npointer, and the policy, the selection, the billing principal and the day's\ncap are all re-derived server-side. ``stale_count`` is carried for the log\nline only, so a disagreement between what Modal saw and what the backend\nresolves is visible rather than silent."},"ProseEstimateResponse":{"properties":{"snapshot_id":{"type":"string","title":"Snapshot Id"},"short_id":{"type":"string","title":"Short Id"},"wiki_available":{"type":"boolean","title":"Wiki Available"},"selected_count":{"type":"integer","title":"Selected Count"},"eligible_total":{"type":"integer","title":"Eligible Total"},"eligible_missing_prose":{"type":"integer","title":"Eligible Missing Prose"},"already_written":{"type":"integer","title":"Already Written"},"rejected":{"items":{"$ref":"#/components/schemas/ProseRejectedTarget"},"type":"array","title":"Rejected"},"estimated_cost_cents":{"type":"integer","title":"Estimated Cost Cents"},"provider":{"type":"string","title":"Provider"},"model":{"type":"string","title":"Model"},"active_prose_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Prose Job Id"},"comped":{"type":"boolean","title":"Comped","default":false}},"type":"object","required":["snapshot_id","short_id","wiki_available","selected_count","eligible_total","eligible_missing_prose","already_written","rejected","estimated_cost_cents","provider","model"],"title":"ProseEstimateResponse"},"ProseGenerateResponse":{"properties":{"prose_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prose Job Id"},"status":{"type":"string","title":"Status"},"selected_count":{"type":"integer","title":"Selected Count"},"estimated_cost_cents":{"type":"integer","title":"Estimated Cost Cents"},"snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot Id"},"short_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Id"},"comped":{"type":"boolean","title":"Comped","default":false}},"type":"object","required":["prose_job_id","status","selected_count","estimated_cost_cents"],"title":"ProseGenerateResponse"},"ProseRejectedTarget":{"properties":{"page_id":{"type":"string","title":"Page Id"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["page_id","reason"],"title":"ProseRejectedTarget"},"ProseSelectionBody":{"properties":{"page_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Page Ids"},"scope":{"type":"string","title":"Scope","default":"selected"},"snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot"},"max_cost_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Cost Cents"}},"type":"object","title":"ProseSelectionBody"},"ProseSettleRequest":{"properties":{"prose_job_id":{"type":"string","title":"Prose Job Id"},"outcome":{"type":"string","title":"Outcome","default":"completed"},"dodo_customer_id":{"type":"string","title":"Dodo Customer Id","default":""},"actual_cost_cents":{"type":"integer","title":"Actual Cost Cents","default":0},"actual_input_tokens":{"type":"integer","title":"Actual Input Tokens","default":0},"actual_output_tokens":{"type":"integer","title":"Actual Output Tokens","default":0},"completed_count":{"type":"integer","title":"Completed Count","default":0},"failed_count":{"type":"integer","title":"Failed Count","default":0},"provider":{"type":"string","title":"Provider","default":"openai"},"model":{"type":"string","title":"Model","default":""},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["prose_job_id"],"title":"ProseSettleRequest","description":"Scoped-prose job settlement callback (Phase 3).\n\n``outcome`` is ``completed`` (debit actual cost) or ``failed`` (release the\nhold). Billing routing (personal vs team pool) comes from the claimed\n``prose_jobs`` row, not this payload — only the token counts, provider/model,\nand the Dodo customer id are trusted from Modal. Idempotency is enforced by\nthe ledger claim, so a replayed callback is a no-op."},"ProseStatusResponse":{"properties":{"prose_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prose Job Id"},"prose_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prose Status"},"phase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phase"},"trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger"},"wiki_available":{"type":"boolean","title":"Wiki Available"},"wiki_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wiki Format"},"eligible_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eligible Total"},"eligible_missing_prose":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eligible Missing Prose"},"selected_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Selected Count"},"selected_page_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Selected Page Ids"},"completed_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Completed Count"},"failed_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Failed Count"},"estimated_cost_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Cost Cents"},"actual_cost_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Actual Cost Cents"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["prose_job_id","prose_status","wiki_available","wiki_format"],"title":"ProseStatusResponse"},"ReachedFileRow":{"properties":{"file_path":{"type":"string","title":"File Path"},"reached":{"type":"boolean","title":"Reached"},"health_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Health Score"},"nloc":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nloc"}},"type":"object","required":["file_path","reached"],"title":"ReachedFileRow","description":"One file on the inferred basis.\n\n``reached`` is the whole of what this basis knows about the file. There is\nno percentage here and there never can be: reaching is a file-level fact\nwith no line attribution behind it."},"RefactoringOpportunityStatusPatch":{"properties":{"status":{"type":"string","enum":["open","acknowledged","resolved","false_positive"],"title":"Status"}},"type":"object","required":["status"],"title":"RefactoringOpportunityStatusPatch","description":"Triage a refactoring opportunity.\n\nA ``Literal`` rather than the bare ``str`` its finding-shaped sibling\nabove uses: the accepted set is small and closed, and stating it here\nturns a typo into a 422 naming the four values instead of a 500 out of the\nCHECK constraint in migration 137."},"RefactoringPlan":{"properties":{"id":{"type":"string","title":"Id"},"refactoring_type":{"type":"string","title":"Refactoring Type"},"file_path":{"type":"string","title":"File Path"},"target_symbol":{"type":"string","title":"Target Symbol"},"line_start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line Start"},"line_end":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line End"},"plan":{"additionalProperties":true,"type":"object","title":"Plan"},"evidence":{"additionalProperties":true,"type":"object","title":"Evidence"},"impact_delta":{"type":"number","title":"Impact Delta","default":0.0},"effort_bucket":{"type":"string","title":"Effort Bucket","default":""},"blast_radius":{"additionalProperties":true,"type":"object","title":"Blast Radius"},"confidence":{"type":"string","title":"Confidence","default":"medium"},"source_biomarker":{"type":"string","title":"Source Biomarker","default":""},"rank_score":{"type":"number","title":"Rank Score","default":0.0},"dependents":{"type":"integer","title":"Dependents","default":0},"file_nloc":{"type":"integer","title":"File Nloc","default":0},"benefit":{"type":"number","title":"Benefit","default":0.0},"leverage":{"type":"number","title":"Leverage","default":0.0},"cost":{"type":"number","title":"Cost","default":0.0},"risk":{"type":"number","title":"Risk","default":0.0},"file_weighted_deficit":{"type":"integer","title":"File Weighted Deficit","default":0},"validation":{"additionalProperties":true,"type":"object","title":"Validation"}},"type":"object","required":["id","refactoring_type","file_path","target_symbol"],"title":"RefactoringPlan","description":"One ranked refactoring plan, re-hydrated from ``refactoring.json``."},"RefactoringPlansResponse":{"properties":{"summary":{"$ref":"#/components/schemas/RefactoringSummary"},"plans":{"items":{"$ref":"#/components/schemas/RefactoringPlan"},"type":"array","title":"Plans"},"state":{"type":"string","title":"State","default":"ready"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"RefactoringPlansResponse"},"RefactoringSummary":{"properties":{"total":{"type":"integer","title":"Total"},"by_type":{"items":{"$ref":"#/components/schemas/RefactoringTypeCount"},"type":"array","title":"By Type"},"files_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Files Total"},"structural_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Structural Total"},"performance_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Performance Total"},"small_effort_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Small Effort Total"},"health_recovery_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Health Recovery Total"},"negligible_health_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Negligible Health Total"},"best_health_gain":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Best Health Gain"}},"type":"object","required":["total"],"title":"RefactoringSummary"},"RefactoringTarget":{"properties":{"file_path":{"type":"string","title":"File Path"},"score":{"type":"number","title":"Score"},"impact":{"type":"number","title":"Impact"},"effort":{"type":"number","title":"Effort"},"biomarkers":{"items":{"$ref":"#/components/schemas/BiomarkerFinding"},"type":"array","title":"Biomarkers"}},"type":"object","required":["file_path","score","impact","effort"],"title":"RefactoringTarget"},"RefactoringTargetsResponse":{"properties":{"targets":{"items":{"$ref":"#/components/schemas/RefactoringTarget"},"type":"array","title":"Targets"},"state":{"type":"string","title":"State","default":"ready"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"RefactoringTargetsResponse"},"RefactoringTypeCount":{"properties":{"type":{"type":"string","title":"Type"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["type","count"],"title":"RefactoringTypeCount"},"RefreshRequest":{"properties":{"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"}},"type":"object","required":["email"],"title":"RefreshRequest"},"RefreshResponse":{"properties":{"status":{"type":"string","title":"Status"},"short_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Id"},"available_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Available At"}},"type":"object","required":["status"],"title":"RefreshResponse"},"RefreshStatusResponse":{"properties":{"can_refresh":{"type":"boolean","title":"Can Refresh"},"cadence":{"type":"string","title":"Cadence"},"last_refreshed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Refreshed At"},"available_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Available At"},"in_flight":{"type":"boolean","title":"In Flight","default":false},"badge_detected":{"type":"boolean","title":"Badge Detected","default":false}},"type":"object","required":["can_refresh","cadence"],"title":"RefreshStatusResponse","description":"Everything the refresh control needs to render, in one call."},"ReindexRequest":{"properties":{"generate_docs":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Generate Docs"},"docs_file_percentage":{"anyOf":[{"type":"number","maximum":100.0,"minimum":1.0},{"type":"null"}],"title":"Docs File Percentage"},"wiki_style":{"anyOf":[{"type":"string","enum":["comprehensive","caveman","reference","tutorial"]},{"type":"null"}],"title":"Wiki Style"},"docs_language":{"anyOf":[{"type":"string","enum":["en","ru","es","fr","de","zh","ja","ko","it","pt","nl","pl","tr","ar","hi"]},{"type":"null"}],"title":"Docs Language"}},"type":"object","title":"ReindexRequest","description":"Body for POST /repos/{repo_id}/reindex.\n\nMirrors the LLM-generation fields of ``IndexRepoRequest`` so users\ncan choose to regenerate AI docs on a re-index without having to\ndelete the repo and re-submit the URL through the dashboard form.\n\nEvery field defaults to ``None`` = inherit from the repo's most recent\nsnapshot, so a bare reindex (empty body — e.g. the overview Sync button)\nbehaves like ``repowise update``: it keeps regenerating docs at the\ncoverage / voice / language the user originally chose instead of silently\nreverting to static-only or the comprehensive/English/10% defaults. An\nexplicit value is always honored, so the dashboard dialog can still force\ndocs on/off and pick a coverage. The router resolves ``None`` against the\nprior snapshot before the credit-hold gate runs, so the estimate is billed\nagainst the effective settings."},"ReleaseHoldRequest":{"properties":{"user_id":{"type":"string","title":"User Id"},"estimated_cost_cents":{"type":"integer","title":"Estimated Cost Cents"},"snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot Id"}},"type":"object","required":["user_id","estimated_cost_cents"],"title":"ReleaseHoldRequest"},"RepoBranchList":{"properties":{"branches":{"items":{"$ref":"#/components/schemas/RepoBranchListItem"},"type":"array","title":"Branches"},"default_branch":{"type":"string","title":"Default Branch"},"truncated":{"type":"boolean","title":"Truncated","default":false}},"type":"object","required":["branches","default_branch"],"title":"RepoBranchList","description":"Envelope for GET /repos/branches.\n\nWraps the branch rows so the response can carry its own bounds. A bare\nlist could not: GitHub pages branches 100 at a time in alphabetical\norder, so on a repo like ``langchain-ai/langchain`` (1.5k branches) the\nfirst page stops at ``c`` and the caller has no way to know it is\nholding a twentieth of the refs. ``truncated`` says so; ``default_branch``\nis named separately because the default may sort well outside page one\nand is pinned into ``branches`` rather than being found there."},"RepoBranchListItem":{"properties":{"name":{"type":"string","title":"Name"},"head_sha":{"type":"string","title":"Head Sha"},"is_default":{"type":"boolean","title":"Is Default","default":false}},"type":"object","required":["name","head_sha"],"title":"RepoBranchListItem","description":"One branch entry returned by GET /repos/branches.\n\nLightweight projection of GitHub's `/repos/{o}/{n}/branches` so the\nfrontend dropdown doesn't need to talk to the GitHub API directly\n(and so private repos work via the GitHub-App installation token)."},"RepoBranchSummary":{"properties":{"ref":{"type":"string","title":"Ref"},"snapshot_id":{"type":"string","title":"Snapshot Id"},"short_id":{"type":"string","title":"Short Id"},"head_sha":{"type":"string","title":"Head Sha"},"status":{"$ref":"#/components/schemas/SnapshotStatus"},"last_indexed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Indexed At"}},"type":"object","required":["ref","snapshot_id","short_id","head_sha","status"],"title":"RepoBranchSummary","description":"One indexed branch for a repo, surfaced by GET /repos/mine to\ndrive the in-sidebar branch switcher."},"RepoCostTransaction":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"amount_cents":{"type":"integer","title":"Amount Cents"},"type":{"type":"string","title":"Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["amount_cents","type"],"title":"RepoCostTransaction","description":"Compact per-row shape for the recent-transactions table on the costs view.\n\nMirrors the fields the OSS `CostsTransactionsTable` consumes; capped at the\nmost-recent N rows by the analytics endpoint to keep the response bounded.\n\nNOTE: kept distinct from ``CreditTransactionResponse`` (the billing\n/transactions shape, which carries ``balance_after_cents``). They previously\nshared the name, so this compact class shadowed the full one module-wide and\nsilently dropped ``balance_after_cents`` from /billing/transactions — the\nbilling Usage Log rendered \"$NaN\" as a result."},"RepoCostsResponse":{"properties":{"repo_id":{"type":"string","title":"Repo Id"},"short_id":{"type":"string","title":"Short Id"},"total_cents":{"type":"integer","title":"Total Cents"},"total_cents_30d":{"type":"integer","title":"Total Cents 30D"},"total_cents_7d":{"type":"integer","title":"Total Cents 7D"},"by_type":{"$ref":"#/components/schemas/CostsByType"},"transaction_count":{"type":"integer","title":"Transaction Count"},"transactions":{"items":{"$ref":"#/components/schemas/RepoCostTransaction"},"type":"array","title":"Transactions"},"llm_costs":{"$ref":"#/components/schemas/LlmCostsTelemetry"}},"type":"object","required":["repo_id","short_id","total_cents","total_cents_30d","total_cents_7d","by_type","transaction_count","llm_costs"],"title":"RepoCostsResponse"},"RepoManagedToggleRequest":{"properties":{"repowise_managed":{"type":"boolean","title":"Repowise Managed"}},"type":"object","required":["repowise_managed"],"title":"RepoManagedToggleRequest","description":"Body for PATCH /repos/{repo_id}/managed (admin-only)."},"RepoResponse":{"properties":{"id":{"type":"string","title":"Id"},"canonical_url":{"type":"string","title":"Canonical Url"},"owner":{"type":"string","title":"Owner"},"name":{"type":"string","title":"Name"},"default_branch":{"type":"string","title":"Default Branch"},"latest_known_head_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Known Head Sha"},"is_public":{"type":"boolean","title":"Is Public"},"file_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Count"},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked At"},"auto_sync_enabled":{"type":"boolean","title":"Auto Sync Enabled","default":true},"github_checks_enabled":{"type":"boolean","title":"Github Checks Enabled","default":true},"last_webhook_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Webhook At"},"last_polled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Polled At"},"exclude_patterns":{"items":{"type":"string"},"type":"array","title":"Exclude Patterns"},"max_file_pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max File Pages"},"prose_refresh":{"type":"string","title":"Prose Refresh","default":"auto"},"prose_daily_cap_cents":{"type":"integer","title":"Prose Daily Cap Cents","default":100},"repowise_managed":{"type":"boolean","title":"Repowise Managed","default":false},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"primary_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Language"},"stars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stars"},"badge_detected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Badge Detected At"}},"type":"object","required":["id","canonical_url","owner","name","default_branch","is_public"],"title":"RepoResponse"},"RepoUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"default_branch":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Default Branch"},"exclude_patterns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Exclude Patterns"},"github_checks_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Github Checks Enabled"},"max_file_pages":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max File Pages"},"prose_refresh":{"anyOf":[{"type":"string","enum":["off","manual","auto"]},{"type":"null"}],"title":"Prose Refresh"},"prose_daily_cap_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Prose Daily Cap Cents"}},"type":"object","title":"RepoUpdateRequest","description":"Body for PATCH /repos/{short_id}. All fields optional — only the\nkeys present in the request are written."},"ReviewerEntry":{"properties":{"email":{"type":"string","title":"Email"},"files":{"type":"integer","title":"Files"},"ownership_pct":{"type":"number","title":"Ownership Pct"}},"type":"object","required":["email","files","ownership_pct"],"title":"ReviewerEntry"},"ReviewerSuggestion":{"properties":{"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"score":{"type":"number","title":"Score"},"recent_commits":{"type":"integer","title":"Recent Commits","default":0},"owned_paths":{"items":{"type":"string"},"type":"array","title":"Owned Paths"},"co_change_paths":{"items":{"type":"string"},"type":"array","title":"Co Change Paths"},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons"}},"type":"object","required":["name","score"],"title":"ReviewerSuggestion"},"ReviewerSuggestionsResponse":{"properties":{"paths":{"items":{"type":"string"},"type":"array","title":"Paths"},"suggestions":{"items":{"$ref":"#/components/schemas/ReviewerSuggestion"},"type":"array","title":"Suggestions"}},"type":"object","required":["paths"],"title":"ReviewerSuggestionsResponse"},"RiskCalibration":{"properties":{"status":{"type":"string","title":"Status"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"calibrated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calibrated At"},"population":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Population"},"granularity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Granularity"}},"type":"object","required":["status"],"title":"RiskCalibration"},"RiskCompatibilityField":{"properties":{"deprecated":{"type":"boolean","title":"Deprecated"},"replacement":{"type":"string","title":"Replacement"},"equivalent_value":{"type":"boolean","title":"Equivalent Value"},"historical_meaning":{"type":"string","title":"Historical Meaning"}},"type":"object","required":["deprecated","replacement","equivalent_value","historical_meaning"],"title":"RiskCompatibilityField","description":"A field kept only so older clients keep reading a value they understand.\n\n``equivalent_value`` is the load-bearing part: the deprecated field is an\nexact alias, never repurposed to a new unit, so a client that never updates\nreads the same number rather than silently reading a different measure."},"RiskDriverEntry":{"properties":{"feature":{"type":"string","title":"Feature"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"contribution":{"type":"number","title":"Contribution"},"label":{"type":"string","title":"Label"}},"type":"object","required":["feature","contribution","label"],"title":"RiskDriverEntry","description":"One change-risk feature's signed contribution to the commit's risk."},"RiskHistogramBucket":{"properties":{"start":{"type":"number","title":"Start"},"end":{"type":"number","title":"End"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["start","end","count"],"title":"RiskHistogramBucket","description":"One bin of the repo's raw change-risk score distribution."},"RiskScalarSemantics":{"properties":{"field":{"type":"string","title":"Field"},"kind":{"type":"string","title":"Kind"},"unit":{"type":"string","title":"Unit"},"range":{"anyOf":[{"$ref":"#/components/schemas/RiskScaleRange"},{"type":"null"}]},"measures":{"type":"string","title":"Measures"},"deterministic":{"type":"boolean","title":"Deterministic","default":true},"calibration":{"anyOf":[{"$ref":"#/components/schemas/RiskCalibration"},{"type":"null"}]},"authoritative":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Authoritative"},"authoritative_for_change_review":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Authoritative For Change Review"},"runtime_breakage_probability":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Runtime Breakage Probability"},"formula":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Formula"},"thresholds":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Thresholds"},"band_thresholds":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Band Thresholds"},"component_fields":{"anyOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"type":"null"}],"title":"Component Fields"}},"type":"object","required":["field","kind","unit","range","measures"],"title":"RiskScalarSemantics"},"RiskScaleRange":{"properties":{"minimum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minimum"},"maximum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maximum"}},"type":"object","required":["minimum","maximum"],"title":"RiskScaleRange"},"RollupVulnerability":{"properties":{"repo_id":{"type":"string","title":"Repo Id"},"repo_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Name"},"short_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Id"},"osv_id":{"type":"string","title":"Osv Id"},"aliases":{"items":{"type":"string"},"type":"array","title":"Aliases"},"package":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Package"},"severity_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity Label"},"kev":{"type":"boolean","title":"Kev","default":false},"epss":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Epss"},"triage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triage"},"fixed_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fixed Version"},"priority_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Priority Score"}},"type":"object","required":["repo_id","osv_id"],"title":"RollupVulnerability","description":"One row of the workspace-wide \"fix first\" list — a vulnerability\nplus which repo it lives in (``short_id`` deep-links to that repo's\nSecurity hub)."},"SbomDiffChange":{"properties":{"ecosystem":{"type":"string","title":"Ecosystem"},"name":{"type":"string","title":"Name"},"from_version":{"type":"string","title":"From Version"},"to_version":{"type":"string","title":"To Version"}},"type":"object","required":["ecosystem","name","from_version","to_version"],"title":"SbomDiffChange"},"SbomDiffEntry":{"properties":{"ecosystem":{"type":"string","title":"Ecosystem"},"name":{"type":"string","title":"Name"},"version":{"type":"string","title":"Version"}},"type":"object","required":["ecosystem","name","version"],"title":"SbomDiffEntry","description":"A component present on only one side of the diff. ``version`` is a\ncomma-joined list when a lockfile carries multiple versions."},"SbomDiffResponse":{"properties":{"from_snapshot_id":{"type":"string","title":"From Snapshot Id"},"to_snapshot_id":{"type":"string","title":"To Snapshot Id"},"added":{"items":{"$ref":"#/components/schemas/SbomDiffEntry"},"type":"array","title":"Added"},"removed":{"items":{"$ref":"#/components/schemas/SbomDiffEntry"},"type":"array","title":"Removed"},"changed":{"items":{"$ref":"#/components/schemas/SbomDiffChange"},"type":"array","title":"Changed"},"counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Counts"}},"type":"object","required":["from_snapshot_id","to_snapshot_id"],"title":"SbomDiffResponse"},"SecretFileContext":{"properties":{"hotspot":{"type":"boolean","title":"Hotspot","default":false},"centrality_band":{"type":"string","enum":["high","medium","low","unknown"],"title":"Centrality Band","default":"unknown"}},"type":"object","title":"SecretFileContext","description":"Where a live secret sits in the codebase — annotated at query time\nfrom the snapshot's graph/hotspot artifacts (file_context.py)."},"SecretFinding":{"properties":{"id":{"type":"string","title":"Id"},"fingerprint":{"type":"string","title":"Fingerprint"},"rule_id":{"type":"string","title":"Rule Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"severity":{"type":"string","title":"Severity","default":"high"},"file_path":{"type":"string","title":"File Path"},"line":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line"},"first_seen_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Seen Sha"},"last_seen_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Seen Sha"},"first_seen_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Seen At"},"is_live":{"type":"boolean","title":"Is Live","default":false},"redacted_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redacted Preview"},"status":{"type":"string","title":"Status","default":"open"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"file_context":{"anyOf":[{"$ref":"#/components/schemas/SecretFileContext"},{"type":"null"}]},"revocation":{"anyOf":[{"$ref":"#/components/schemas/SecretRevocation"},{"type":"null"}]}},"type":"object","required":["id","fingerprint","rule_id","file_path"],"title":"SecretFinding","description":"A redacted secret detection — never contains the value (the scanner's\nredaction layer strips it before anything persists)."},"SecretFindingPatch":{"properties":{"status":{"type":"string","enum":["open","acknowledged","resolved","false_positive"],"title":"Status"}},"type":"object","required":["status"],"title":"SecretFindingPatch"},"SecretRevocation":{"properties":{"provider":{"type":"string","title":"Provider"},"url":{"type":"string","title":"Url"},"label":{"type":"string","title":"Label"}},"type":"object","required":["provider","url","label"],"title":"SecretRevocation","description":"Where to go to revoke this kind of credential (revocation.py data\nmodule, keyed by gitleaks rule id)."},"SecurityAuditEvent":{"properties":{"id":{"type":"string","title":"Id"},"event":{"type":"string","title":"Event"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"user_login":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Login"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"},"repo_id":{"type":"string","title":"Repo Id"},"snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot Id"},"details":{"additionalProperties":true,"type":"object","title":"Details"},"ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","event","repo_id","created_at"],"title":"SecurityAuditEvent"},"SecurityAuditLogResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SecurityAuditEvent"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More","default":false},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","title":"SecurityAuditLogResponse"},"SecurityDependenciesResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SecurityDependency"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total","default":0},"license_rollup":{"additionalProperties":{"type":"integer"},"type":"object","title":"License Rollup"},"has_more":{"type":"boolean","title":"Has More","default":false},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","title":"SecurityDependenciesResponse"},"SecurityDependency":{"properties":{"id":{"type":"string","title":"Id"},"ecosystem":{"type":"string","title":"Ecosystem"},"name":{"type":"string","title":"Name"},"version":{"type":"string","title":"Version"},"purl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purl"},"is_dev":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Dev"},"is_transitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Transitive"},"declared_in":{"items":{"type":"string"},"type":"array","title":"Declared In"},"license":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License"},"license_risk":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Risk"},"vuln_count":{"type":"integer","title":"Vuln Count","default":0}},"type":"object","required":["id","ecosystem","name","version"],"title":"SecurityDependency"},"SecurityFinding":{"properties":{"id":{"type":"integer","title":"Id"},"file_path":{"type":"string","title":"File Path"},"kind":{"type":"string","title":"Kind"},"severity":{"type":"string","title":"Severity"},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snippet"},"detected_at":{"type":"string","format":"date-time","title":"Detected At"},"line_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line Number"},"line_verified":{"type":"boolean","title":"Line Verified","default":false},"commit_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Commit At"}},"type":"object","required":["id","file_path","kind","severity","detected_at"],"title":"SecurityFinding"},"SecurityFindingsResponse":{"properties":{"total":{"type":"integer","title":"Total","default":0},"findings":{"items":{"$ref":"#/components/schemas/SecurityFinding"},"type":"array","title":"Findings"}},"type":"object","title":"SecurityFindingsResponse"},"SecurityScanStatus":{"properties":{"state":{"type":"string","enum":["not_available","queued","scanning","ready","failed"],"title":"State"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"component_status":{"additionalProperties":{"type":"string"},"type":"object","title":"Component Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"scanned_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scanned At"},"scanner_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scanner Version"},"tool_versions":{"additionalProperties":{"type":"string"},"type":"object","title":"Tool Versions"},"dep_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dep Count"},"vuln_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Vuln Count"},"secret_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Secret Count"},"severity_rollup":{"additionalProperties":{"type":"integer"},"type":"object","title":"Severity Rollup"},"kev_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kev Count"}},"type":"object","required":["state"],"title":"SecurityScanStatus","description":"Status + summary counts for a snapshot's security scan."},"SecurityScanTriggerResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"state":{"type":"string","title":"State"}},"type":"object","required":["ok","state"],"title":"SecurityScanTriggerResponse"},"SecuritySecretsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SecretFinding"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total","default":0},"live_count":{"type":"integer","title":"Live Count","default":0},"has_more":{"type":"boolean","title":"Has More","default":false},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","title":"SecuritySecretsResponse"},"SecurityVulnerabilitiesResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SecurityVulnerability"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total","default":0},"has_more":{"type":"boolean","title":"Has More","default":false},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","title":"SecurityVulnerabilitiesResponse"},"SecurityVulnerability":{"properties":{"id":{"type":"string","title":"Id"},"dependency_id":{"type":"string","title":"Dependency Id"},"package":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Package"},"ecosystem":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ecosystem"},"osv_id":{"type":"string","title":"Osv Id"},"aliases":{"items":{"type":"string"},"type":"array","title":"Aliases"},"severity_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Severity Score"},"severity_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity Label"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"fixed_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fixed Version"},"refs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Refs"},"published_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published At"},"kev":{"type":"boolean","title":"Kev","default":false},"epss":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Epss"},"triage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triage"},"triage_evidence":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Triage Evidence"},"reachability":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reachability"},"reachability_evidence":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Reachability Evidence"},"priority_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Priority Score"},"status":{"type":"string","title":"Status","default":"open"}},"type":"object","required":["id","dependency_id","osv_id"],"title":"SecurityVulnerability"},"SecurityVulnerabilityPatch":{"properties":{"status":{"type":"string","enum":["open","acknowledged","false_positive"],"title":"Status"}},"type":"object","required":["status"],"title":"SecurityVulnerabilityPatch"},"SecurityWebhook":{"properties":{"id":{"type":"string","title":"Id"},"repo_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Id"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"format":{"type":"string","enum":["json","slack"],"title":"Format","default":"json"},"active":{"type":"boolean","title":"Active","default":true},"failure_count":{"type":"integer","title":"Failure Count","default":0},"last_delivery_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Delivery At"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","url"],"title":"SecurityWebhook","description":"An outbound endpoint row WITHOUT its signing secret — the secret is\nreturned exactly once at creation and never again."},"SecurityWebhookCreate":{"properties":{"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string","enum":["security_new_cves","security_live_secret","security_scan_failed","security_secret_rotation","security_audit_event"]},"type":"array","title":"Events"},"format":{"type":"string","enum":["json","slack"],"title":"Format","default":"json"}},"type":"object","required":["url","events"],"title":"SecurityWebhookCreate"},"SecurityWebhookCreated":{"properties":{"webhook":{"$ref":"#/components/schemas/SecurityWebhook"},"secret":{"type":"string","title":"Secret"}},"type":"object","required":["webhook","secret"],"title":"SecurityWebhookCreated"},"SecurityWebhookList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SecurityWebhook"},"type":"array","title":"Items"}},"type":"object","title":"SecurityWebhookList"},"SecurityWebhookPatch":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"events":{"anyOf":[{"items":{"type":"string","enum":["security_new_cves","security_live_secret","security_scan_failed","security_secret_rotation","security_audit_event"]},"type":"array"},{"type":"null"}],"title":"Events"},"format":{"anyOf":[{"type":"string","enum":["json","slack"]},{"type":"null"}],"title":"Format"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"SecurityWebhookPatch"},"SegmentSplit":{"properties":{"signed_in_visitors":{"type":"integer","title":"Signed In Visitors","default":0},"anonymous_visitors":{"type":"integer","title":"Anonymous Visitors","default":0},"signed_in_events":{"type":"integer","title":"Signed In Events","default":0},"anonymous_events":{"type":"integer","title":"Anonymous Events","default":0}},"type":"object","title":"SegmentSplit"},"SnapshotProgressResponse":{"properties":{"snapshot_id":{"type":"string","title":"Snapshot Id"},"short_id":{"type":"string","title":"Short Id"},"status":{"$ref":"#/components/schemas/SnapshotStatus"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"server_time":{"type":"string","format":"date-time","title":"Server Time"},"elapsed_seconds":{"type":"integer","title":"Elapsed Seconds"},"stale_after_seconds":{"type":"integer","title":"Stale After Seconds"},"is_stale":{"type":"boolean","title":"Is Stale"},"stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage"},"current":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"},"cost_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cost Cents"},"docs_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docs Status"},"docs_pages_ready":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Docs Pages Ready"},"docs_pages_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Docs Pages Total"},"docs_pages_reused":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Docs Pages Reused"},"embeddings_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embeddings Status"},"file_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Count"},"findings":{"items":{"$ref":"#/components/schemas/ProgressFinding"},"type":"array","title":"Findings"},"expected_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Seconds"}},"type":"object","required":["snapshot_id","short_id","status","created_at","server_time","elapsed_seconds","stale_after_seconds","is_stale"],"title":"SnapshotProgressResponse","description":"Everything the indexing UI polls for, and nothing else.\n\nDeliberately NOT part of :class:`SnapshotResponse`. That model is cached,\nembedded in several list endpoints, and carries a per-caller ``can_write``;\na five-second poll should not drag the whole snapshot row through all of\nthat. This is a separate, flat, uncached shape served by\n``GET /snapshots/{id}/progress``.\n\nReplaces a direct browser-to-Supabase read of the ``snapshots`` table. That\nread made every future column on the table implicitly public to the browser\nand pinned the poll's shape to a frontend deploy."},"SnapshotResponse":{"properties":{"id":{"type":"string","title":"Id"},"short_id":{"type":"string","title":"Short Id"},"repo_id":{"type":"string","title":"Repo Id"},"head_sha":{"type":"string","title":"Head Sha"},"commit_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Commit Depth"},"status":{"$ref":"#/components/schemas/SnapshotStatus"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"file_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Count"},"line_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line Count"},"indexing_duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Indexing Duration Seconds"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref"},"generate_docs":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Generate Docs"},"docs_file_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Docs File Percentage"},"wiki_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wiki Style"},"docs_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docs Language"},"reaped_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reaped At"},"superseded_by_short_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Superseded By Short Id"},"triggered_by_kind":{"anyOf":[{"type":"string","enum":["user","bot","webhook","poll","admin"]},{"type":"null"}],"title":"Triggered By Kind"},"triggered_by_installation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Triggered By Installation Id"},"docs_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docs Status"},"docs_pages_ready":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Docs Pages Ready"},"docs_pages_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Docs Pages Total"},"docs_pages_reused":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Docs Pages Reused"},"wiki_format":{"anyOf":[{"type":"string","enum":["legacy_flat","tree_v1"]},{"type":"null"}],"title":"Wiki Format"},"reindex_recommended_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reindex Recommended Reason"},"can_write":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Can Write"},"prose_comped":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Prose Comped"}},"type":"object","required":["id","short_id","repo_id","head_sha","status","created_at"],"title":"SnapshotResponse"},"SnapshotStatus":{"type":"string","enum":["queued","indexing","ready","failed"],"title":"SnapshotStatus"},"StageStat":{"properties":{"visitors":{"type":"integer","title":"Visitors","default":0},"events":{"type":"integer","title":"Events","default":0}},"type":"object","title":"StageStat"},"StatsResponse":{"properties":{"repos_indexed":{"type":"integer","title":"Repos Indexed"},"users_active":{"type":"integer","title":"Users Active"},"chats_completed":{"type":"integer","title":"Chats Completed"}},"type":"object","required":["repos_indexed","users_active","chats_completed"],"title":"StatsResponse"},"SymbolDetailNode":{"properties":{"symbol_id":{"type":"string","title":"Symbol Id"},"name":{"type":"string","title":"Name","default":""},"kind":{"type":"string","title":"Kind","default":""},"file":{"type":"string","title":"File","default":""},"start_line":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Line"},"edge_type":{"type":"string","title":"Edge Type","default":""},"confidence":{"type":"number","title":"Confidence","default":0.0},"resolution_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Origin"}},"type":"object","required":["symbol_id"],"title":"SymbolDetailNode"},"SymbolDetailResponse":{"properties":{"symbol":{"$ref":"#/components/schemas/SymbolEntry"},"blame":{"anyOf":[{"$ref":"#/components/schemas/FunctionBlameEntry"},{"type":"null"}]},"graph":{"anyOf":[{"$ref":"#/components/schemas/SymbolGraphBlock"},{"type":"null"}]},"governing_decisions":{"items":{"$ref":"#/components/schemas/GoverningDecisionRef"},"type":"array","title":"Governing Decisions"},"file_context":{"anyOf":[{"$ref":"#/components/schemas/SymbolFileContext"},{"type":"null"}]},"fix_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fix Count"},"fix_last_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fix Last At"}},"type":"object","required":["symbol"],"title":"SymbolDetailResponse"},"SymbolEntry":{"properties":{"id":{"type":"string","title":"Id"},"file_path":{"type":"string","title":"File Path"},"name":{"type":"string","title":"Name"},"qualified_name":{"type":"string","title":"Qualified Name"},"kind":{"type":"string","title":"Kind"},"signature":{"type":"string","title":"Signature","default":""},"start_line":{"type":"integer","title":"Start Line","default":0},"end_line":{"type":"integer","title":"End Line","default":0},"docstring":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docstring"},"visibility":{"type":"string","title":"Visibility","default":"public"},"is_async":{"type":"boolean","title":"Is Async","default":false},"complexity_estimate":{"type":"number","title":"Complexity Estimate","default":0.0},"language":{"type":"string","title":"Language","default":"unknown"},"parent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Name"},"importance_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Importance Score"},"importance_components":{"anyOf":[{"$ref":"#/components/schemas/SymbolImportanceComponents"},{"type":"null"}]},"file_pagerank":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"File Pagerank"},"is_entry_point":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Entry Point"},"file_churn_percentile":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"File Churn Percentile"},"file_is_hotspot":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"File Is Hotspot"},"fix_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fix Count"}},"type":"object","required":["id","file_path","name","qualified_name","kind"],"title":"SymbolEntry"},"SymbolFileContext":{"properties":{"file_path":{"type":"string","title":"File Path"},"health_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Health Score"},"is_hotspot":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hotspot"},"primary_owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Owner"},"language":{"type":"string","title":"Language","default":"unknown"}},"type":"object","required":["file_path"],"title":"SymbolFileContext"},"SymbolGraphBlock":{"properties":{"pagerank":{"type":"number","title":"Pagerank","default":0.0},"in_degree":{"type":"integer","title":"In Degree","default":0},"out_degree":{"type":"integer","title":"Out Degree","default":0},"callers":{"items":{"$ref":"#/components/schemas/SymbolDetailNode"},"type":"array","title":"Callers"},"callees":{"items":{"$ref":"#/components/schemas/SymbolDetailNode"},"type":"array","title":"Callees"},"caller_total":{"type":"integer","title":"Caller Total","default":0},"callee_total":{"type":"integer","title":"Callee Total","default":0},"relations":{"items":{"$ref":"#/components/schemas/SymbolRelationGroup"},"type":"array","title":"Relations"}},"type":"object","title":"SymbolGraphBlock"},"SymbolHeritageResponse":{"properties":{"symbol_id":{"type":"string","title":"Symbol Id"},"parents":{"items":{"$ref":"#/components/schemas/HeritageRelation"},"type":"array","title":"Parents"},"children":{"items":{"$ref":"#/components/schemas/HeritageRelation"},"type":"array","title":"Children"}},"type":"object","required":["symbol_id"],"title":"SymbolHeritageResponse"},"SymbolImportanceComponents":{"properties":{"file_pagerank":{"type":"number","title":"File Pagerank","default":0.0},"visibility_factor":{"type":"number","title":"Visibility Factor","default":0.5},"complexity_norm":{"type":"number","title":"Complexity Norm","default":0.0},"kind_boost":{"type":"number","title":"Kind Boost","default":1.0},"is_entry_point":{"type":"boolean","title":"Is Entry Point","default":false}},"type":"object","title":"SymbolImportanceComponents","description":"Breakdown of the composite importance score for transparency.\n\nMirrors `repowise.server.schemas.SymbolImportanceComponents` byte-for-byte\nso the shared `@repowise-dev/ui` symbol cards render identically. All\nfields except `is_entry_point` are normalised to [0, 1]."},"SymbolRelationGroup":{"properties":{"direction":{"type":"string","enum":["in","out"],"title":"Direction"},"edge_type":{"type":"string","title":"Edge Type"},"group":{"type":"string","title":"Group"},"total":{"type":"integer","title":"Total"},"rows":{"items":{"$ref":"#/components/schemas/SymbolDetailNode"},"type":"array","title":"Rows"}},"type":"object","required":["direction","edge_type","group","total"],"title":"SymbolRelationGroup","description":"One relation kind, on one side of a symbol, with its true total.\n\nMirrors `repowise.server.schemas.intelligence.SymbolRelationGroup` and\n`@repowise-dev/types::SymbolRelationGroup`. `total` is counted unbounded\nwhile `rows` is capped, so the page can say \"10 of 1,516\" instead of\nrendering the cap as if it were the count."},"TeamBillingStatusResponse":{"properties":{"team_id":{"type":"string","title":"Team Id"},"tier":{"$ref":"#/components/schemas/Tier"},"billing_interval":{"type":"string","title":"Billing Interval"},"seat_limit":{"type":"integer","title":"Seat Limit"},"seats_used":{"type":"integer","title":"Seats Used"},"pool_balance_cents":{"type":"integer","title":"Pool Balance Cents"},"pool_balance_dollars":{"type":"number","title":"Pool Balance Dollars"},"monthly_credit_reset_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Monthly Credit Reset At"},"has_subscription":{"type":"boolean","title":"Has Subscription","default":false},"has_billing_account":{"type":"boolean","title":"Has Billing Account","default":false}},"type":"object","required":["team_id","tier","billing_interval","seat_limit","seats_used","pool_balance_cents","pool_balance_dollars"],"title":"TeamBillingStatusResponse","description":"GET /billing/teams/{id} — the team's billing snapshot for the UI."},"TeamBusFactorFile":{"properties":{"repo_name":{"type":"string","title":"Repo Name"},"file_path":{"type":"string","title":"File Path"},"primary_owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Owner Name"},"bus_factor":{"type":"integer","title":"Bus Factor","default":0},"is_hotspot":{"type":"boolean","title":"Is Hotspot","default":false},"churn_percentile":{"type":"number","title":"Churn Percentile","default":0.0}},"type":"object","required":["repo_name","file_path"],"title":"TeamBusFactorFile","description":"A file at bus-factor risk (one-or-zero recent authors)."},"TeamCreateRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"slug":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Slug"}},"type":"object","required":["name"],"title":"TeamCreateRequest"},"TeamHealthBiomarker":{"properties":{"file_path":{"type":"string","title":"File Path"},"biomarker_type":{"type":"string","title":"Biomarker Type"},"severity":{"type":"string","title":"Severity"},"health_impact":{"type":"number","title":"Health Impact","default":0.0}},"type":"object","required":["file_path","biomarker_type","severity"],"title":"TeamHealthBiomarker"},"TeamHealthResponse":{"properties":{"rollup":{"$ref":"#/components/schemas/TeamHealthRollup"},"repos":{"items":{"$ref":"#/components/schemas/TeamRepoHealthCard"},"type":"array","title":"Repos"}},"type":"object","required":["rollup","repos"],"title":"TeamHealthResponse"},"TeamHealthRollup":{"properties":{"team_id":{"type":"string","title":"Team Id"},"repo_count":{"type":"integer","title":"Repo Count","default":0},"repos_with_health":{"type":"integer","title":"Repos With Health","default":0},"average_health":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Health"},"worst_repo_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worst Repo Name"},"worst_repo_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Worst Repo Score"},"total_critical_findings":{"type":"integer","title":"Total Critical Findings","default":0},"total_warning_findings":{"type":"integer","title":"Total Warning Findings","default":0}},"type":"object","required":["team_id"],"title":"TeamHealthRollup","description":"Team-wide health aggregate across all repos with a ready snapshot."},"TeamHealthTrendPoint":{"properties":{"taken_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Taken At"},"average_health":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Health"},"hotspot_health":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hotspot Health"}},"type":"object","title":"TeamHealthTrendPoint"},"TeamInstallationAttachRequest":{"properties":{"installation_id":{"type":"integer","title":"Installation Id"}},"type":"object","required":["installation_id"],"title":"TeamInstallationAttachRequest"},"TeamInstallationRepoResponse":{"properties":{"owner":{"type":"string","title":"Owner"},"name":{"type":"string","title":"Name"},"full_name":{"type":"string","title":"Full Name"},"is_private":{"type":"boolean","title":"Is Private","default":true},"default_branch":{"type":"string","title":"Default Branch","default":"main"}},"type":"object","required":["owner","name","full_name"],"title":"TeamInstallationRepoResponse"},"TeamInstallationResponse":{"properties":{"team_id":{"type":"string","title":"Team Id"},"installation_id":{"type":"integer","title":"Installation Id"},"linked_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linked By"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"account_login":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Login"},"account_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Type"},"app_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Id"},"suspended":{"type":"boolean","title":"Suspended","default":false},"repos":{"items":{"$ref":"#/components/schemas/TeamInstallationRepoResponse"},"type":"array","title":"Repos"}},"type":"object","required":["team_id","installation_id"],"title":"TeamInstallationResponse"},"TeamInvitationCreateRequest":{"properties":{"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"role":{"type":"string","enum":["admin","member"],"title":"Role","default":"member"}},"type":"object","required":["email"],"title":"TeamInvitationCreateRequest"},"TeamInvitationResponse":{"properties":{"id":{"type":"string","title":"Id"},"team_id":{"type":"string","title":"Team Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","enum":["owner","admin","member"],"title":"Role"},"invited_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invited By"},"accepted_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accepted By"},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Accepted At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}},"type":"object","required":["id","team_id","email","role","expires_at","created_at"],"title":"TeamInvitationResponse"},"TeamMemberResponse":{"properties":{"team_id":{"type":"string","title":"Team Id"},"user_id":{"type":"string","title":"User Id"},"role":{"type":"string","enum":["owner","admin","member"],"title":"Role"},"added_at":{"type":"string","format":"date-time","title":"Added At"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"github_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Username"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","required":["team_id","user_id","role","added_at"],"title":"TeamMemberResponse"},"TeamOwnerEntry":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"files_owned":{"type":"integer","title":"Files Owned","default":0},"hotspots_owned":{"type":"integer","title":"Hotspots Owned","default":0},"bus_factor_risk_files":{"type":"integer","title":"Bus Factor Risk Files","default":0},"commit_count_90d":{"type":"integer","title":"Commit Count 90D","default":0},"silo_modules":{"type":"integer","title":"Silo Modules","default":0},"repos_touched":{"type":"integer","title":"Repos Touched","default":0},"last_commit_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Commit At"}},"type":"object","required":["key","name"],"title":"TeamOwnerEntry"},"TeamOwnershipResponse":{"properties":{"rollup":{"$ref":"#/components/schemas/TeamOwnershipRollup"},"top_owners":{"items":{"$ref":"#/components/schemas/TeamOwnerEntry"},"type":"array","title":"Top Owners"},"bus_factor_files":{"items":{"$ref":"#/components/schemas/TeamBusFactorFile"},"type":"array","title":"Bus Factor Files"}},"type":"object","required":["rollup","top_owners","bus_factor_files"],"title":"TeamOwnershipResponse"},"TeamOwnershipRollup":{"properties":{"team_id":{"type":"string","title":"Team Id"},"repo_count":{"type":"integer","title":"Repo Count","default":0},"repos_analyzed":{"type":"integer","title":"Repos Analyzed","default":0},"total_owners":{"type":"integer","title":"Total Owners","default":0},"bus_factor_risk_file_count":{"type":"integer","title":"Bus Factor Risk File Count","default":0},"bus_factor_heuristic":{"type":"string","title":"Bus Factor Heuristic","default":"A file is bus-factor risk when it has ≤1 distinct recent author — losing that person orphans it. A module is a knowledge silo when one owner holds >80% of its files."}},"type":"object","required":["team_id"],"title":"TeamOwnershipRollup"},"TeamRepoAddRequest":{"properties":{"repo_id":{"type":"string","title":"Repo Id"}},"type":"object","required":["repo_id"],"title":"TeamRepoAddRequest"},"TeamRepoHealthCard":{"properties":{"repo_id":{"type":"string","title":"Repo Id"},"repo_name":{"type":"string","title":"Repo Name"},"snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot Id"},"state":{"type":"string","title":"State","default":"ready"},"average_health":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Health"},"hotspot_health":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hotspot Health"},"worst_performer_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worst Performer Path"},"worst_performer_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Worst Performer Score"},"file_count":{"type":"integer","title":"File Count","default":0},"critical_finding_count":{"type":"integer","title":"Critical Finding Count","default":0},"warning_finding_count":{"type":"integer","title":"Warning Finding Count","default":0},"worst_biomarkers":{"items":{"$ref":"#/components/schemas/TeamHealthBiomarker"},"type":"array","title":"Worst Biomarkers","default":[]}},"type":"object","required":["repo_id","repo_name"],"title":"TeamRepoHealthCard","description":"One repo's health summary in the portfolio view."},"TeamRepoResponse":{"properties":{"team_id":{"type":"string","title":"Team Id"},"repo_id":{"type":"string","title":"Repo Id"},"added_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Added By"},"added_at":{"type":"string","format":"date-time","title":"Added At"}},"type":"object","required":["team_id","repo_id","added_at"],"title":"TeamRepoResponse"},"TeamRepoSignals":{"properties":{"repo_id":{"type":"string","title":"Repo Id"},"repo_name":{"type":"string","title":"Repo Name"},"snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot Id"},"last_observed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Observed At"},"hotspot_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hotspot Count"},"bus_factor_risk_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bus Factor Risk Count"},"stale_decision_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stale Decision Count"},"average_health":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Health"},"hotspot_health":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hotspot Health"},"health_trend":{"items":{"$ref":"#/components/schemas/TeamHealthTrendPoint"},"type":"array","title":"Health Trend","default":[]}},"type":"object","required":["repo_id","repo_name"],"title":"TeamRepoSignals","description":"One repo's latest signal state in the leader view."},"TeamResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"owner_user_id":{"type":"string","title":"Owner User Id"},"tier":{"$ref":"#/components/schemas/Tier"},"seat_limit":{"type":"integer","title":"Seat Limit"},"member_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Member Count"},"repo_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repo Count"},"my_role":{"anyOf":[{"type":"string","enum":["owner","admin","member"]},{"type":"null"}],"title":"My Role"},"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","owner_user_id","tier","seat_limit","created_at"],"title":"TeamResponse"},"TeamSeatCheckoutRequest":{"properties":{"seats":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Seats"},"interval":{"type":"string","enum":["monthly","yearly"],"title":"Interval","default":"monthly"},"return_url":{"type":"string","title":"Return Url"},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Url"}},"type":"object","required":["seats","return_url"],"title":"TeamSeatCheckoutRequest","description":"Body for POST /billing/teams/{id}/checkout.\n\n``seats`` is the per-seat subscription quantity; the 3-seat minimum is\nenforced server-side (teams_seat_minimum) so the UI's client-side guard is\nnever the only gate."},"TeamSignalAlert":{"properties":{"repo_id":{"type":"string","title":"Repo Id"},"repo_name":{"type":"string","title":"Repo Name"},"signal":{"type":"string","title":"Signal"},"event":{"type":"string","title":"Event"},"snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot Id"},"taken_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Taken At"},"data":{"additionalProperties":true,"type":"object","title":"Data","default":{}}},"type":"object","required":["repo_id","repo_name","signal","event"],"title":"TeamSignalAlert","description":"One threshold crossing raised by the signals cron."},"TeamSignalsResponse":{"properties":{"rollup":{"$ref":"#/components/schemas/TeamSignalsRollup"},"repos":{"items":{"$ref":"#/components/schemas/TeamRepoSignals"},"type":"array","title":"Repos"},"recent_alerts":{"items":{"$ref":"#/components/schemas/TeamSignalAlert"},"type":"array","title":"Recent Alerts"}},"type":"object","required":["rollup","repos","recent_alerts"],"title":"TeamSignalsResponse"},"TeamSignalsRollup":{"properties":{"team_id":{"type":"string","title":"Team Id"},"repo_count":{"type":"integer","title":"Repo Count","default":0},"repos_observed":{"type":"integer","title":"Repos Observed","default":0},"alert_count_30d":{"type":"integer","title":"Alert Count 30D","default":0}},"type":"object","required":["team_id"],"title":"TeamSignalsRollup"},"TeamTopupRequest":{"properties":{"amount_dollars":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Amount Dollars","default":10},"return_url":{"type":"string","title":"Return Url"},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Url"}},"type":"object","required":["return_url"],"title":"TeamTopupRequest","description":"Body for POST /billing/teams/{id}/topup — top up the shared pool."},"TeamUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"slug":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Slug"}},"type":"object","title":"TeamUpdateRequest"},"TelemetryEventIn":{"properties":{"event":{"type":"string","maxLength":64,"title":"Event"},"anon_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Anon Id"},"session_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Session Id"},"cli_version":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Cli Version"},"os":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Os"},"arch":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Arch"},"python_version":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Python Version"},"is_ci":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Ci"},"properties":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Properties"}},"type":"object","required":["event"],"title":"TelemetryEventIn","description":"The anonymous wire envelope sent by the CLI. All fields optional except\nthe event name; unknown extras are ignored."},"TelemetrySummaryResponse":{"properties":{"days":{"type":"integer","title":"Days"},"total_events":{"type":"integer","title":"Total Events"},"distinct_installs":{"type":"integer","title":"Distinct Installs"},"distinct_installs_human":{"type":"integer","title":"Distinct Installs Human","default":0},"total_events_pytest":{"type":"integer","title":"Total Events Pytest","default":0},"pytest_installs_excluded":{"type":"integer","title":"Pytest Installs Excluded","default":0},"returning_installs":{"type":"integer","title":"Returning Installs","default":0},"returning_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Returning Rate"},"success_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Success Rate"},"failure_rate_install_weighted":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Failure Rate Install Weighted"},"installs_with_command_outcome":{"type":"integer","title":"Installs With Command Outcome","default":0},"installs_with_error":{"type":"integer","title":"Installs With Error","default":0},"interrupted_count":{"type":"integer","title":"Interrupted Count","default":0},"usage_error_count":{"type":"integer","title":"Usage Error Count","default":0},"by_command":{"items":{"$ref":"#/components/schemas/CommandStat"},"type":"array","title":"By Command"},"by_version":{"items":{"$ref":"#/components/schemas/VersionStat"},"type":"array","title":"By Version"},"by_os":{"items":{"$ref":"#/components/schemas/OsStat"},"type":"array","title":"By Os"},"by_error":{"items":{"$ref":"#/components/schemas/ErrorStat"},"type":"array","title":"By Error"},"by_tool":{"items":{"$ref":"#/components/schemas/ToolStat"},"type":"array","title":"By Tool","default":[]},"docs_mode":{"$ref":"#/components/schemas/DocsModeStat","default":{"total":0,"with_docs":0,"deterministic":0,"index_only":0}},"daily":{"items":{"$ref":"#/components/schemas/DailyPoint"},"type":"array","title":"Daily"}},"type":"object","required":["days","total_events","distinct_installs","by_command","by_version","by_os","by_error","daily"],"title":"TelemetrySummaryResponse"},"TestImpactAnalysis":{"properties":{"status":{"type":"string","enum":["available","partial","degraded"],"title":"Status"},"stale":{"type":"boolean","title":"Stale"},"partial":{"type":"boolean","title":"Partial"},"degraded":{"type":"boolean","title":"Degraded"},"basis_categories":{"items":{"type":"string","enum":["measured","inferred"]},"type":"array","title":"Basis Categories"}},"type":"object","required":["status","stale","partial","degraded","basis_categories"],"title":"TestImpactAnalysis"},"TestImpactCoverage":{"properties":{"status":{"type":"string","enum":["available","partial","unavailable","degraded"],"title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"map_present":{"type":"boolean","title":"Map Present"},"pair_count":{"type":"integer","title":"Pair Count"},"test_count":{"type":"integer","title":"Test Count"},"source_file_count":{"type":"integer","title":"Source File Count"},"changed_files_total":{"type":"integer","title":"Changed Files Total"},"changed_files_with_measured_tests":{"type":"integer","title":"Changed Files With Measured Tests"},"changed_files_without_measured_tests":{"type":"integer","title":"Changed Files Without Measured Tests"},"ingested_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingested At"},"source_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Format"},"freshness":{"$ref":"#/components/schemas/TestImpactFreshness"}},"type":"object","required":["status","map_present","pair_count","test_count","source_file_count","changed_files_total","changed_files_with_measured_tests","changed_files_without_measured_tests","freshness"],"title":"TestImpactCoverage"},"TestImpactEvidence":{"properties":{"basis":{"type":"string","enum":["measured","inferred"],"title":"Basis"},"source_file":{"type":"string","title":"Source File"},"via":{"type":"string","enum":["coverage-map","call-graph","import-graph"],"title":"Via"},"source_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Format"}},"type":"object","required":["basis","source_file","via"],"title":"TestImpactEvidence"},"TestImpactFile":{"properties":{"source_file":{"type":"string","title":"Source File"},"status":{"type":"string","enum":["measured","inferred","unknown"],"title":"Status"},"measured_tests":{"items":{"type":"string"},"type":"array","title":"Measured Tests"},"measured_tests_total":{"type":"integer","title":"Measured Tests Total"},"inferred_tests":{"items":{"type":"string"},"type":"array","title":"Inferred Tests"},"inferred_tests_total":{"type":"integer","title":"Inferred Tests Total"}},"type":"object","required":["source_file","status","measured_tests","measured_tests_total","inferred_tests","inferred_tests_total"],"title":"TestImpactFile"},"TestImpactFreshness":{"properties":{"status":{"type":"string","enum":["current","stale","unknown"],"title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"ingested_commit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingested Commit"},"indexed_commit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Indexed Commit"}},"type":"object","required":["status"],"title":"TestImpactFreshness"},"TestImpactInference":{"properties":{"status":{"type":"string","enum":["available","degraded"],"title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"changed_files_total":{"type":"integer","title":"Changed Files Total"},"changed_files_with_candidates":{"type":"integer","title":"Changed Files With Candidates"},"candidates_before_dedup":{"type":"integer","title":"Candidates Before Dedup"}},"type":"object","required":["status","changed_files_total","changed_files_with_candidates","candidates_before_dedup"],"title":"TestImpactInference"},"TestImpactResponse":{"properties":{"recommendations":{"items":{"$ref":"#/components/schemas/TestRecommendation"},"type":"array","title":"Recommendations"},"recommendations_total":{"type":"integer","title":"Recommendations Total"},"recommendations_emitted":{"type":"integer","title":"Recommendations Emitted"},"recommendations_truncated":{"type":"boolean","title":"Recommendations Truncated"},"recommendations_omitted":{"type":"integer","title":"Recommendations Omitted"},"recommendations_by_primary_basis":{"additionalProperties":{"type":"integer"},"propertyNames":{"enum":["measured","inferred"]},"type":"object","title":"Recommendations By Primary Basis"},"files":{"items":{"$ref":"#/components/schemas/TestImpactFile"},"type":"array","title":"Files"},"files_total":{"type":"integer","title":"Files Total"},"files_without_measured_tests":{"items":{"type":"string"},"type":"array","title":"Files Without Measured Tests"},"unknown_files":{"items":{"type":"string"},"type":"array","title":"Unknown Files"},"coverage":{"$ref":"#/components/schemas/TestImpactCoverage"},"inference":{"$ref":"#/components/schemas/TestImpactInference"},"analysis":{"$ref":"#/components/schemas/TestImpactAnalysis"}},"type":"object","required":["recommendations","recommendations_total","recommendations_emitted","recommendations_truncated","recommendations_omitted","recommendations_by_primary_basis","files","files_total","files_without_measured_tests","unknown_files","coverage","inference","analysis"],"title":"TestImpactResponse"},"TestRecommendation":{"properties":{"test_id":{"type":"string","title":"Test Id"},"test_file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test File"},"repository_id":{"type":"string","title":"Repository Id"},"repository":{"type":"string","title":"Repository"},"basis":{"type":"string","enum":["measured","inferred"],"title":"Basis"},"bases":{"items":{"type":"string","enum":["measured","inferred"]},"type":"array","title":"Bases"},"source_files":{"items":{"type":"string"},"type":"array","title":"Source Files"},"evidence":{"items":{"$ref":"#/components/schemas/TestImpactEvidence"},"type":"array","title":"Evidence"}},"type":"object","required":["test_id","repository_id","repository","basis","bases","source_files","evidence"],"title":"TestRecommendation"},"ThemePreferenceRequest":{"properties":{"theme_preference":{"anyOf":[{"type":"string","enum":["system","light","dark"]},{"type":"null"}],"title":"Theme Preference"}},"type":"object","title":"ThemePreferenceRequest","description":"Body for PATCH /auth/me/theme. `None` clears the stored preference\nand lets the client default (system) take over."},"Tier":{"type":"string","enum":["free","pro","teams","admin"],"title":"Tier"},"TierStat":{"properties":{"tier":{"type":"string","title":"Tier"},"visitors":{"type":"integer","title":"Visitors","default":0},"gate_shown":{"type":"integer","title":"Gate Shown","default":0},"gate_clicked":{"type":"integer","title":"Gate Clicked","default":0},"checkout_started":{"type":"integer","title":"Checkout Started","default":0},"checkout_completed":{"type":"integer","title":"Checkout Completed","default":0}},"type":"object","required":["tier"],"title":"TierStat"},"ToolStat":{"properties":{"tool":{"type":"string","title":"Tool"},"count":{"type":"integer","title":"Count"},"distinct_installs":{"type":"integer","title":"Distinct Installs","default":0},"error_count":{"type":"integer","title":"Error Count","default":0},"distinct_installs_with_error":{"type":"integer","title":"Distinct Installs With Error","default":0},"p50_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P50 Ms"},"stale_share":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stale Share"},"degraded_share":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Degraded Share"},"stale_sample":{"type":"integer","title":"Stale Sample","default":0},"degraded_sample":{"type":"integer","title":"Degraded Sample","default":0}},"type":"object","required":["tool","count"],"title":"ToolStat","description":"Per-tool MCP usage, from anonymous ``mcp_tool_call`` events."},"TopupRequest":{"properties":{"return_url":{"type":"string","title":"Return Url"},"amount_dollars":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Amount Dollars","default":5},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Url"}},"type":"object","required":["return_url"],"title":"TopupRequest","description":"Body for POST /billing/topup.\n\n``amount_dollars`` is the whole-dollar credit amount the user chose. Dodo\ncharges by product×quantity (there is no arbitrary-price field on a\ncheckout session), so the top-up product is priced at $1 and we pass\n``quantity = amount_dollars``. Bounded 1–500 to keep a single payment\nsane; the UI offers presets ($5/$10/$25/$50) plus a custom field.\n\nDefaults to 5 so a body that omits the field preserves the historical\n\"$5 top-up\" behaviour for any un-migrated caller."},"TransitiveEntry":{"properties":{"path":{"type":"string","title":"Path"},"depth":{"type":"integer","title":"Depth"}},"type":"object","required":["path","depth"],"title":"TransitiveEntry"},"UnsubscribeRequest":{"properties":{"token":{"type":"string","maxLength":512,"minLength":8,"title":"Token"}},"type":"object","required":["token"],"title":"UnsubscribeRequest"},"UnsubscribeResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"kind":{"type":"string","title":"Kind"}},"type":"object","required":["ok","kind"],"title":"UnsubscribeResponse"},"UserRepoResponse":{"properties":{"repo":{"$ref":"#/components/schemas/RepoResponse"},"active_snapshot":{"anyOf":[{"$ref":"#/components/schemas/SnapshotResponse"},{"type":"null"}]},"added_at":{"type":"string","format":"date-time","title":"Added At"},"branches":{"items":{"$ref":"#/components/schemas/RepoBranchSummary"},"type":"array","title":"Branches"},"bot_indexed":{"type":"boolean","title":"Bot Indexed","default":false},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"}},"type":"object","required":["repo","added_at"],"title":"UserRepoResponse"},"UserResponse":{"properties":{"id":{"type":"string","title":"Id"},"github_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Username"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"tier":{"$ref":"#/components/schemas/Tier"},"llm_credit_balance_cents":{"type":"integer","title":"Llm Credit Balance Cents"},"monthly_credit_reset_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Monthly Credit Reset At"},"billing_interval":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Interval"},"preferred_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Model"},"theme_preference":{"anyOf":[{"type":"string","enum":["system","light","dark"]},{"type":"null"}],"title":"Theme Preference"},"notification_preferences":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Notification Preferences"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"has_subscription":{"type":"boolean","title":"Has Subscription","default":false},"has_billing_account":{"type":"boolean","title":"Has Billing Account","default":false},"free_answers_used":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Free Answers Used"},"free_answers_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Free Answers Limit"},"free_answers_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Free Answers Remaining"}},"type":"object","required":["id","tier","llm_credit_balance_cents"],"title":"UserResponse"},"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"},"VersionStat":{"properties":{"cli_version":{"type":"string","title":"Cli Version"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["cli_version","count"],"title":"VersionStat"},"WorkspaceCreateRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"}},"type":"object","required":["name"],"title":"WorkspaceCreateRequest"},"WorkspaceMemberAddRequest":{"properties":{"repo_id":{"type":"string","title":"Repo Id"},"alias":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Alias"}},"type":"object","required":["repo_id"],"title":"WorkspaceMemberAddRequest"},"WorkspaceMemberResponse":{"properties":{"repo_id":{"type":"string","title":"Repo Id"},"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alias"},"added_at":{"type":"string","format":"date-time","title":"Added At"}},"type":"object","required":["repo_id","added_at"],"title":"WorkspaceMemberResponse"},"WorkspaceReindexResponse":{"properties":{"workspace_snapshot_id":{"type":"string","title":"Workspace Snapshot Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"status":{"type":"string","title":"Status"},"is_new":{"type":"boolean","title":"Is New"},"debounced":{"type":"boolean","title":"Debounced","default":false},"member_snapshot_ids":{"items":{"type":"string"},"type":"array","title":"Member Snapshot Ids"}},"type":"object","required":["workspace_snapshot_id","workspace_id","status","is_new","member_snapshot_ids"],"title":"WorkspaceReindexResponse"},"WorkspaceRepoSecurity":{"properties":{"repo_id":{"type":"string","title":"Repo Id"},"repo_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Name"},"short_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Id"},"scan_state":{"type":"string","enum":["no_snapshot","not_available","queued","scanning","ready","failed"],"title":"Scan State"},"scanned_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scanned At"},"dep_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dep Count"},"open_vuln_count":{"type":"integer","title":"Open Vuln Count","default":0},"critical_open":{"type":"integer","title":"Critical Open","default":0},"high_open":{"type":"integer","title":"High Open","default":0},"kev_open":{"type":"integer","title":"Kev Open","default":0},"live_secret_count":{"type":"integer","title":"Live Secret Count","default":0}},"type":"object","required":["repo_id","scan_state"],"title":"WorkspaceRepoSecurity","description":"Per-repo security posture line (latest ready snapshot)."},"WorkspaceResponse":{"properties":{"id":{"type":"string","title":"Id"},"owner_user_id":{"type":"string","title":"Owner User Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"},"repos":{"anyOf":[{"items":{"$ref":"#/components/schemas/WorkspaceMemberResponse"},"type":"array"},{"type":"null"}],"title":"Repos"}},"type":"object","required":["id","owner_user_id","name","created_at"],"title":"WorkspaceResponse"},"WorkspaceSecurityRollup":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"repos":{"items":{"$ref":"#/components/schemas/WorkspaceRepoSecurity"},"type":"array","title":"Repos"},"top_vulnerabilities":{"items":{"$ref":"#/components/schemas/RollupVulnerability"},"type":"array","title":"Top Vulnerabilities"},"severity_rollup":{"additionalProperties":{"type":"integer"},"type":"object","title":"Severity Rollup"},"license_rollup":{"additionalProperties":{"type":"integer"},"type":"object","title":"License Rollup"},"live_secret_count":{"type":"integer","title":"Live Secret Count","default":0},"any_live_secrets":{"type":"boolean","title":"Any Live Secrets","default":false}},"type":"object","required":["workspace_id"],"title":"WorkspaceSecurityRollup"},"WorkspaceUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"}},"type":"object","title":"WorkspaceUpdateRequest"},"ZoomMapResponse":{"properties":{"root_id":{"type":"string","title":"Root Id"},"project_name":{"type":"string","title":"Project Name"},"total_files":{"type":"integer","title":"Total Files"},"unclaimed_files":{"type":"integer","title":"Unclaimed Files","default":0},"max_depth":{"type":"integer","title":"Max Depth"},"truncated":{"type":"boolean","title":"Truncated","default":false},"nodes":{"items":{"$ref":"#/components/schemas/ZoomNodeResponse"},"type":"array","title":"Nodes"},"relations":{"items":{"$ref":"#/components/schemas/ZoomRelationResponse"},"type":"array","title":"Relations"}},"type":"object","required":["root_id","project_name","total_files","max_depth","nodes","relations"],"title":"ZoomMapResponse"},"ZoomMetricsResponse":{"properties":{"file_count":{"type":"integer","title":"File Count","default":0},"descendant_count":{"type":"integer","title":"Descendant Count","default":0},"hotspot_count":{"type":"integer","title":"Hotspot Count","default":0},"dead_count":{"type":"integer","title":"Dead Count","default":0},"entry_point_count":{"type":"integer","title":"Entry Point Count","default":0},"on_flow_count":{"type":"integer","title":"On Flow Count","default":0}},"type":"object","title":"ZoomMetricsResponse"},"ZoomNodeResponse":{"properties":{"id":{"type":"string","title":"Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"level":{"type":"integer","title":"Level"},"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"},"path":{"type":"string","title":"Path","default":""},"children":{"items":{"type":"string"},"type":"array","title":"Children"},"importance":{"type":"number","title":"Importance","default":0.0},"sibling_rank":{"type":"integer","title":"Sibling Rank","default":0},"metrics":{"$ref":"#/components/schemas/ZoomMetricsResponse"},"summary":{"type":"string","title":"Summary","default":""},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"health_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Health Score"},"is_entry_point":{"type":"boolean","title":"Is Entry Point","default":false},"is_hotspot":{"type":"boolean","title":"Is Hotspot","default":false},"is_dead":{"type":"boolean","title":"Is Dead","default":false},"is_test":{"type":"boolean","title":"Is Test","default":false},"on_flow":{"type":"boolean","title":"On Flow","default":false}},"type":"object","required":["id","level","kind","name"],"title":"ZoomNodeResponse"},"ZoomRelationResponse":{"properties":{"parent_id":{"type":"string","title":"Parent Id"},"source_id":{"type":"string","title":"Source Id"},"target_id":{"type":"string","title":"Target Id"},"label":{"type":"string","title":"Label","default":""},"edge_count":{"type":"integer","title":"Edge Count","default":1},"coupling":{"type":"string","title":"Coupling","default":""}},"type":"object","required":["parent_id","source_id","target_id"],"title":"ZoomRelationResponse"},"app__routers__product_events__IngestResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"accepted":{"type":"integer","title":"Accepted","default":0}},"type":"object","required":["ok"],"title":"IngestResponse"},"app__routers__telemetry__IngestResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"}},"type":"object","required":["ok"],"title":"IngestResponse"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}