{"openapi":"3.1.0","info":{"title":"Argo Platform API","description":"Multi-persona AI assistant platform (OpsMate, SREMate, DevMate, Argo, ...) on the LangGraph agent layer","version":"0.41.0"},"paths":{"/auth/register":{"post":{"tags":["auth"],"summary":"Register","description":"Public endpoint for user self-registration.\n\nFlow:\n1. Validate email domain against ALLOWED_REGISTRATION_DOMAINS\n2. Validate password strength (min 12 characters)\n3. Create user with account_status='pending' and no roles\n4. Return success response (no auth token - user must login)\n\nSecurity:\n- Rate limited (5 requests per IP per hour)\n- Email domain whitelist validation\n- Password hashing with bcrypt\n- Pending users have no permissions until admin approval\n\nArgs:\n    request: Registration request with email, password, confirm_password, name\n    db: Database session\n\nReturns:\n    RegisterResponse with success status and user_id\n\nRaises:\n    HTTPException 400: Invalid input (password mismatch, too short, etc.)\n    HTTPException 403: Email domain not allowed\n    HTTPException 404: Self-registration disabled (e.g. SSO is the auth path)\n    HTTPException 409: Email already registered\n    HTTPException 429: Rate limit exceeded","operationId":"register_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/redirect-hold":{"put":{"tags":["auth"],"summary":"Seed Redirect Hold","description":"Public — seed the signed redirect-hold cookie for an internal task path.","operationId":"seed_redirect_hold_auth_redirect_hold_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedirectHoldSeedRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Response Seed Redirect Hold Auth Redirect Hold Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/redirect-hold/peek":{"get":{"tags":["auth"],"summary":"Peek Redirect Hold","description":"Authenticated — read hold without clearing.","operationId":"peek_redirect_hold_auth_redirect_hold_peek_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedirectHoldPeekResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/redirect-hold/consume":{"get":{"tags":["auth"],"summary":"Consume Redirect Hold","description":"Authenticated — read hold and clear cookie on successful consume.","operationId":"consume_redirect_hold_auth_redirect_hold_consume_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedirectHoldConsumeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/config":{"get":{"tags":["auth-oidc"],"summary":"Auth Config","description":"Public — advertises which auth affordances the login screen renders.","operationId":"auth_config_auth_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Auth Config Auth Config Get"}}}}}}},"/auth/oidc/login":{"get":{"tags":["auth-oidc"],"summary":"Oidc Login","description":"Kick off the OIDC flow — redirect the browser to Entra.","operationId":"oidc_login_auth_oidc_login_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/oidc/callback":{"get":{"tags":["auth-oidc"],"summary":"Oidc Callback","description":"Complete the OIDC flow — code → tokens → user → internal JWT cookie.","operationId":"oidc_callback_auth_oidc_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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/health":{"get":{"tags":["webhooks"],"summary":"Webhook Health","description":"Static liveness for the webhook surface.\n\nUnauthenticated under the ``/webhooks/`` prefix, so it publishes a status\nand nothing else: no Mate instantiation, no list of supported events, no\nenumeration of registered slugs (GAIT-407 U5). The per-integration picture\nlives behind the authenticated integration console.","operationId":"webhook_health_webhooks_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/{slug}":{"post":{"tags":["integration-ingress"],"summary":"Integration Webhook","description":"Receive one inbound delivery for the integration declaring *slug*.\n\n``bypass_idempotency`` is not accepted here in any form — not as a header,\na body field or a query parameter. It is a keyword argument of the ingress\nthat only U12's replay reaches.","operationId":"integration_webhook_webhooks__slug__post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/messages":{"post":{"tags":["teams-bot"],"summary":"Teams Bot Messages","description":"Receive activities from Azure Bot Service.","operationId":"teams_bot_messages_api_messages_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/integrations/events/stream":{"get":{"tags":["integrations"],"summary":"Stream Integration Events","description":"Stream integration events via Server-Sent Events (SSE).\n\nEmits:\n    - connected: Initial connection confirmation\n    - event_created: New webhook event arrives\n    - status_changed: Event status updates (pending → running → completed)\n\nNotes:\n    - Uses Redis pub/sub for broadcasting across multiple backend instances\n    - Gracefully handles Redis failures (circuit breaker pattern)\n    - Closes connection cleanly on client disconnect or errors","operationId":"stream_integration_events_api_integrations_events_stream_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/events":{"get":{"tags":["integrations"],"summary":"List Integration Events","description":"List recent integration events.\n\nRequires permission: integration:events:view\n\nArgs:\n    limit: Maximum number of events to return (default: 50)\n\nReturns:\n    List of integration events (most recent first)","operationId":"list_integration_events_api_integrations_events_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/events/{event_id}":{"patch":{"tags":["integrations"],"summary":"Rename Integration Event","description":"Rename an integration event by updating its external_id.\n\nArgs:\n    event_id: UUID of the event to rename\n    request: Request body containing {\"title\": \"new title\"}\n\nReturns:\n    Updated event details","operationId":"rename_integration_event_api_integrations_events__event_id__patch","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Event Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["integrations"],"summary":"Delete Integration Event","description":"Delete an integration event and optionally its conversation.\n\nArgs:\n    event_id: UUID of the event to delete\n    delete_conversation: If True, also delete the associated conversation and messages\n\nRequires permission: integration:events:view (the System tab's permission;\nthere is no separate delete permission).\n\nReturns:\n    204 No Content on success","operationId":"delete_integration_event_api_integrations_events__event_id__delete","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Event Id"}},{"name":"delete_conversation","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Delete Conversation"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["integrations"],"summary":"Get Integration Event","description":"Get integration event with full conversation details.\n\nReturns:\n    Event details with nested conversation and messages\n    If conversation doesn't exist, conversation field is null","operationId":"get_integration_event_api_integrations_events__event_id__get","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Event Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/events/{event_id}/timeline":{"get":{"tags":["integrations"],"summary":"Get Event Timeline","description":"Get chronological timeline for an integration event.\n\nReturns flattened list of timeline items:\n- webhook: The initial webhook event\n- message: User or assistant messages\n- tool_call: Individual tool executions\n\nAll items have 'type' and 'timestamp' fields for sorting.","operationId":"get_event_timeline_api_integrations_events__event_id__timeline_get","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Event Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/events/{event_id}/stream":{"get":{"tags":["integrations"],"summary":"Stream Conversation Timeline","description":"Stream conversation timeline updates via Server-Sent Events (SSE) - Phase 3.\n\nThis endpoint allows clients to watch tool calls appear in real-time as the agent\nexecutes them during webhook processing.\n\nEmits:\n    - connected: Initial connection confirmation with current timeline state\n    - tool_call_started: Tool execution began\n    - tool_call_completed: Tool execution finished (success or error)\n    - message_added: New message added to conversation\n    - processing_completed: Webhook processing finished\n\nArgs:\n    event_id: UUID of the integration event to stream\n\nNotes:\n    - Uses Redis pub/sub with event-specific channel: f\"conversation:{event_id}\"\n    - Gracefully handles Redis failures (circuit breaker pattern)\n    - Closes connection cleanly on client disconnect\n    - If event already completed, sends full timeline and closes","operationId":"stream_conversation_timeline_api_integrations_events__event_id__stream_get","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Event Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/events/stream/health":{"get":{"tags":["integrations"],"summary":"Get Stream Health","description":"Get health and metrics for SSE event streaming.\n\nReturns:\n    - Redis connection status\n    - Circuit breaker state\n    - Active SSE connections\n    - Broadcast success/failure rates\n\nUse this endpoint to monitor real-time event streaming health.","operationId":"get_stream_health_api_integrations_events_stream_health_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/me":{"get":{"tags":["users"],"summary":"Get Current User Info","description":"Get current authenticated user information.\n\nReturns user details including roles and permissions for frontend use.\nThe frontend can use permissions to show/hide UI elements.\n\nThis is the standard REST endpoint for \"self\" - follows best practices\nused by GitHub (/user), Stratus (/users/me), and OAuth UserInfo endpoints.\n\nThe server-side ``default_dashboard`` preference (GAIT-198) is re-queried\nhere rather than carried on ``UserContext`` — lower blast radius, and it\nkeeps the preference read on the request DB session.","operationId":"get_current_user_info_api_users_me_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/models":{"get":{"tags":["Models"],"summary":"List Models","description":"List models. ``kind`` filters by chat/embedding/image/audio.\n\nDefaults to active_only=False so the admin UI can show inactive rows by\ndefault (and toggle a \"hide inactive\" filter if it wants).","operationId":"list_models_api_admin_models_get","parameters":[{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Active Only"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Models Api Admin Models Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Models"],"summary":"Create Model","operationId":"create_model_api_admin_models_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelUpsertRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Model Api Admin Models Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/models/overview":{"get":{"tags":["Models"],"summary":"Get Models Overview","description":"Every model with its registry status and usage, the invalid model pointers,\nthe last registry sync and whether the gateway settings are complete.\n\nDeclared before ``/admin/models/{name}`` so \"overview\" is not read as a name.","operationId":"get_models_overview_api_admin_models_overview_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Models Overview Api Admin Models Overview Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/models/{name}":{"get":{"tags":["Models"],"summary":"Get Model","operationId":"get_model_api_admin_models__name__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Model Api Admin Models  Name  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Models"],"summary":"Update Model","operationId":"update_model_api_admin_models__name__put","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Model Api Admin Models  Name  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/models/{name}/usage":{"get":{"tags":["Models"],"summary":"Get Model Usage","operationId":"get_model_usage_api_admin_models__name__usage_get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Model Usage Api Admin Models  Name  Usage Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/models/{name}/references":{"get":{"tags":["Models"],"summary":"Get Model References","description":"Every owner that points at the model, each with its label and link.","operationId":"get_model_references_api_admin_models__name__references_get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Model References Api Admin Models  Name  References Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/models/{name}/active":{"patch":{"tags":["Models"],"summary":"Set Active","operationId":"set_active_api_admin_models__name__active_patch","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetActiveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Active Api Admin Models  Name  Active Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/models/{name}/default-embedding":{"patch":{"tags":["Models"],"summary":"Set Default Embedding","operationId":"set_default_embedding_api_admin_models__name__default_embedding_patch","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Default Embedding Api Admin Models  Name  Default Embedding Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/models/{name}/platform-default-chat":{"patch":{"tags":["Models"],"summary":"Set Platform Default Chat","operationId":"set_platform_default_chat_api_admin_models__name__platform_default_chat_patch","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Platform Default Chat Api Admin Models  Name  Platform Default Chat Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/models/sync/registry":{"post":{"tags":["Models"],"summary":"Sync Registry Discover","description":"Compare the LMOps registry with the models table. Read-only.\n\nThe admin reviews the differences and posts the chosen ones, with the commit\nthis returned, to ``/sync/registry/import``.","operationId":"sync_registry_discover_api_admin_models_sync_registry_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Sync Registry Discover Api Admin Models Sync Registry Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/models/sync/registry/import":{"post":{"tags":["Models"],"summary":"Sync Registry Import","description":"Apply the admin's selection from the registry commit they reviewed.\n\nAll or nothing. A refusal (a model still in use, a kind change, a collision,\nthe defaults rule) is 422; a stale selection or a concurrent sync is 409.","operationId":"sync_registry_import_api_admin_models_sync_registry_import_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistryImportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Sync Registry Import Api Admin Models Sync Registry Import Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/models/{name}/rename":{"patch":{"tags":["Models"],"summary":"Rename Model","operationId":"rename_model_api_admin_models__name__rename_patch","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Rename Model Api Admin Models  Name  Rename Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system/config":{"get":{"tags":["system"],"summary":"List System Config","description":"List all system configuration entries.\n\nRequires: system:config:view permission","operationId":"list_system_config_api_system_config_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system/email-domains":{"get":{"tags":["system"],"summary":"Get Outbound Email Domains","description":"Allowed outbound email domains, so the config UI can validate\n``email_list`` fields against the same allow-list the send pipeline\nenforces (GAIT-186).\n\nReturns ``restricted: false`` with an empty list when the allow-list is\nunset (any domain permitted).\n\nRequires: system:config:view permission","operationId":"get_outbound_email_domains_api_system_email_domains_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system/config/{key}":{"get":{"tags":["system"],"summary":"Get System Config","description":"Get a specific configuration value by key.\n\nRequires: system:config:view permission","operationId":"get_system_config_api_system_config__key__get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["system"],"summary":"Update System Config","description":"Update a configuration value.\n\nRequires: system:config:edit permission (admin *:*:* for protected keys).","operationId":"update_system_config_api_system_config__key__put","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system/feature-flags":{"get":{"tags":["system"],"summary":"List Feature Flags","description":"List all feature flags.\n\nRequires: system:config:view permission","operationId":"list_feature_flags_api_system_feature_flags_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system/feature-flags/{flag_name}":{"put":{"tags":["system"],"summary":"Toggle Feature Flag","description":"Toggle a feature flag on or off.\n\nRequires: system:config:edit permission","operationId":"toggle_feature_flag_api_system_feature_flags__flag_name__put","parameters":[{"name":"flag_name","in":"path","required":true,"schema":{"type":"string","title":"Flag Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureFlagToggleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/secrets-manager":{"get":{"tags":["Secrets Manager"],"summary":"List Entries","description":"Every entry, Needs attention, R34's warnings and the last check. No tails.","operationId":"list_entries_api_secrets_manager_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Entries Api Secrets Manager Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/secrets-manager/entries/{key}":{"get":{"tags":["Secrets Manager"],"summary":"Get Entry","description":"One entry with its versions, \"Used by\" and audit history. No tail.","operationId":"get_entry_api_secrets_manager_entries__key__get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Entry Api Secrets Manager Entries  Key  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Secrets Manager"],"summary":"Edit Entry","description":"Change an active entry's metadata; 409 when it changed since it was read.","operationId":"edit_entry_api_secrets_manager_entries__key__patch","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Edit Entry Api Secrets Manager Entries  Key  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/secrets-manager/entries/{key}/preview":{"get":{"tags":["Secrets Manager"],"summary":"Preview Entry","description":"One entry's preview: 8 bullets and the last 4 characters (KD3, KTD14).\n\nThe only route that returns a tail. Reads Key Vault (blocking), so a plain\n``def``. Audited; never cached. Only an active Key Vault entry has a\npreview: a tracking-only entry has no value to read, and an untracked,\nignored or retired one, or a key in ``PREVIEW_EXCLUDED_KEYS``, is never\npreviewed (404, before Key Vault is read).","operationId":"preview_entry_api_secrets_manager_entries__key__preview_get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Preview Entry Api Secrets Manager Entries  Key  Preview Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/secrets-manager/entries":{"post":{"tags":["Secrets Manager"],"summary":"Add Tracking Only","description":"File a credential Argo does not hold in Key Vault (R28).","operationId":"add_tracking_only_api_secrets_manager_entries_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackingOnlyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Tracking Only Api Secrets Manager Entries Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/secrets-manager/entries/adopt":{"post":{"tags":["Secrets Manager"],"summary":"Adopt Entries","description":"Adopt untracked or ignored entries, one or several (R13).","operationId":"adopt_entries_api_secrets_manager_entries_adopt_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeysRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"title":"Response Adopt Entries Api Secrets Manager Entries Adopt Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/secrets-manager/entries/ignore":{"post":{"tags":["Secrets Manager"],"summary":"Ignore Entries","description":"Ignore untracked entries, one or several (R13).","operationId":"ignore_entries_api_secrets_manager_entries_ignore_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeysRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"title":"Response Ignore Entries Api Secrets Manager Entries Ignore Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/secrets-manager/entries/{key}/unignore":{"post":{"tags":["Secrets Manager"],"summary":"Unignore Entry","operationId":"unignore_entry_api_secrets_manager_entries__key__unignore_post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowVersionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Unignore Entry Api Secrets Manager Entries  Key  Unignore Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/secrets-manager/entries/{key}/retire":{"post":{"tags":["Secrets Manager"],"summary":"Retire Entry","description":"Retire an unused active entry; 409 naming what still uses it (R5).","operationId":"retire_entry_api_secrets_manager_entries__key__retire_post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowVersionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Retire Entry Api Secrets Manager Entries  Key  Retire Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/secrets-manager/entries/{key}/restore":{"post":{"tags":["Secrets Manager"],"summary":"Restore Entry","operationId":"restore_entry_api_secrets_manager_entries__key__restore_post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowVersionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Restore Entry Api Secrets Manager Entries  Key  Restore Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/secrets-manager/entries/{key}/keep-rename":{"post":{"tags":["Secrets Manager"],"summary":"Keep Rename","description":"Accept the name the system gave an entry moved aside for a Key Vault\nsecret of the same name; clears its Needs Attention flag.","operationId":"keep_rename_api_secrets_manager_entries__key__keep_rename_post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowVersionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Keep Rename Api Secrets Manager Entries  Key  Keep Rename Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/secrets-manager/entries/{key}/confirm-version":{"post":{"tags":["Secrets Manager"],"summary":"Confirm Version","description":"Confirm a recorded version and the expiry it carries (R8).","operationId":"confirm_version_api_secrets_manager_entries__key__confirm_version_post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmVersionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Confirm Version Api Secrets Manager Entries  Key  Confirm Version Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/secrets-manager/check":{"post":{"tags":["Secrets Manager"],"summary":"Run Check Now","description":"Run the daily check now (R37). Blocking, so a plain ``def`` (KTD9).\n\nThe check writes its own audit row and returns its finished run, failed or\nnot; 409 while another run holds the lock.","operationId":"run_check_now_api_secrets_manager_check_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Response Run Check Now Api Secrets Manager Check Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/secrets-manager/tracked-keys":{"get":{"tags":["Secrets Manager"],"summary":"Tracked Keys","description":"Active keys, for ``argo deploy keyvault prune`` (R16, KTD15).\n\nThe one route an API key may call: it needs only the narrow tracked-keys\npermission and returns key names, the environment and the vault name.\nRetired, ignored and untracked entries do not block prune.","operationId":"tracked_keys_api_secrets_manager_tracked_keys_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Tracked Keys Api Secrets Manager Tracked Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/connections":{"get":{"tags":["integrations-management"],"summary":"List Integrations","description":"List all integrations with masked credential values.\n\nRequires: integration:connection:view permission","operationId":"list_integrations_api_integrations_connections_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/connections/{slug}":{"get":{"tags":["integrations-management"],"summary":"Get Integration","description":"Get a specific integration by slug with masked credentials.\n\nRequires: integration:connection:view permission","operationId":"get_integration_api_integrations_connections__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/connections/{slug}/connect":{"post":{"tags":["integrations-management"],"summary":"Connect Integration","description":"Connect an integration by testing the values it already has stored.\n\nA failed test answers 409 with ``needs_confirmation``; sending\n``save_anyway`` records the failed result instead and answers 400.\n\nRequires: integration:connection:edit permission","operationId":"connect_integration_api_integrations_connections__slug__connect_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ConnectRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/connections/{slug}/disconnect":{"post":{"tags":["integrations-management"],"summary":"Disconnect Integration","description":"Disconnect an integration without deleting stored credentials.\n\nRequires: integration:connection:edit permission","operationId":"disconnect_integration_api_integrations_connections__slug__disconnect_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/connections/{slug}/test":{"post":{"tags":["integrations-management"],"summary":"Test Health","description":"Test integration health by checking connectivity.\n\nRequires: integration:connection:test permission","operationId":"test_health_api_integrations_connections__slug__test_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/connections/{slug}/send-test-email":{"post":{"tags":["integrations-management"],"summary":"Send Test Email","description":"Send a test email through a connected SMTP-family integration.\n\nRequires: integration:connection:test permission","operationId":"send_test_email_api_integrations_connections__slug__send_test_email_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/credentials/reload":{"post":{"tags":["integrations-management"],"summary":"Reload Credentials","description":"Reload all cached credentials.\n\nRe-reads ``argo-backend/.env`` into the process environment (local dev),\nclears SecretsLoader cache, and resets tool singletons so new requests\nuse fresh credential values.\nAlso creates audit log entries for each integration.\n\nRequires: integration:credentials:reload permission","operationId":"reload_credentials_api_integrations_credentials_reload_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/audit-log":{"get":{"tags":["integrations-management"],"summary":"Get Audit Log","description":"Get integration audit log entries with cursor-based pagination.\n\nQuery parameters:\n- integration_slug: Filter by integration (optional)\n- action: Filter by action type: 'update', 'test', 'reload' (optional)\n- limit: Page size, max 200 (default 50)\n- before: ISO timestamp cursor for pagination (optional)\n\nRequires: integration:audit:view permission","operationId":"get_audit_log_api_integrations_audit_log_get","parameters":[{"name":"integration_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Slug"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["integrations-management"],"summary":"Clear Audit Log","description":"Clear all audit log entries, optionally for a specific integration.\n\nQuery parameters:\n- integration_slug: Only clear entries for this integration (optional)\n\nRequires: integration:audit:delete permission (admin only)","operationId":"clear_audit_log_api_integrations_audit_log_delete","parameters":[{"name":"integration_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Slug"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/audit-log/{entry_id}":{"delete":{"tags":["integrations-management"],"summary":"Delete Audit Entry","description":"Delete a single audit log entry.\n\nRequires: integration:audit:delete permission (admin only)","operationId":"delete_audit_entry_api_integrations_audit_log__entry_id__delete","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/environment":{"get":{"tags":["integrations-management"],"summary":"Get Environment Info","description":"Get environment information (local vs production, secrets source).\n\nRequires: integration:connection:view permission","operationId":"get_environment_info_api_integrations_environment_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/console":{"get":{"tags":["integration-console"],"summary":"List Console Integrations","description":"The console's registry table: one row per integration, in one query.\n\nGated on the console's OWN permission. Composing this view from\n``GET /api/integrations/connections`` would have put it behind\n``integration:connection:view``, so the permission U5 shipped for this\nscreen would not have granted access to the screen — and it would have cost\none ``/liveness/{slug}`` round trip per row on top.\n\nThe join is an OUTER join: the reconciler creates a liveness row eagerly for\nevery registry row, but a row inserted before that shipped must still render\nrather than vanish from the registry table.","operationId":"list_console_integrations_api_integrations_console_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConsoleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/deliveries":{"get":{"tags":["integration-console"],"summary":"List Deliveries","description":"One page of the delivery feed, newest first unless a sort says otherwise.\n\nEvery filter value is checked against the real vocabulary before it reaches\nthe query. An unknown value is a 400 and never an empty page: \"no deliveries\nmatched\" and \"you spelled the verdict wrong\" are the same picture on screen,\nand the second one would have an operator concluding an integration is\nsilent when it is only mis-queried. The same reasoning makes ONE bad value\ninside a repeated parameter a 400 rather than a dropped element.\n\n🛑 **``total`` is affordable only because the window bounds it.** The count\nand the page are built from ONE list of conditions, the first two of which\nare the ``received_at`` bounds — so the COUNT reads the slice\n``idx_integration_deliveries_received_at`` covers rather than 400 days of\nreceipts. Whoever makes the window optional must delete the count with it,\nor this endpoint scans the table once per page.\n\nA page past the end is an empty ``entries`` with the true ``total``, not a\n404: \"you have paged off the end of 812 rows\" is a state the table renders,\nwhere a 404 reads as \"this feed does not exist\".","operationId":"list_deliveries_api_integrations_deliveries_get","parameters":[{"name":"integration","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Restrict to these integrations, by slug. Repeat the parameter for several; omitted or empty means no constraint.","title":"Integration"},"description":"Restrict to these integrations, by slug. Repeat the parameter for several; omitted or empty means no constraint."},{"name":"terminal_status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Any of success, partial, failed, rejected, unrouted, or in_progress for a delivery that has not resolved. Repeat the parameter for several; they union, and in_progress combines with the real statuses.","title":"Terminal Status"},"description":"Any of success, partial, failed, rejected, unrouted, or in_progress for a delivery that has not resolved. Repeat the parameter for several; they union, and in_progress combines with the real statuses."},{"name":"auth_verdict","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Any of verified, rejected, unconfigured, not_applicable. Repeat the parameter for several.","title":"Auth Verdict"},"description":"Any of verified, rejected, unconfigured, not_applicable. Repeat the parameter for several."},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"One of received_at, integration, terminal_status, auth_verdict, dispatch_outcome. Omitted means received_at.","title":"Sort"},"description":"One of received_at, integration, terminal_status, auth_verdict, dispatch_outcome. Omitted means received_at."},{"name":"dir","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"asc or desc. Omitted means desc.","title":"Dir"},"description":"asc or desc. Omitted means desc."},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window start (ISO 8601, minute precision, timezone-aware). Filters received_at, INCLUSIVE. Defaults to 7 days before the end.","title":"From Date"},"description":"Window start (ISO 8601, minute precision, timezone-aware). Filters received_at, INCLUSIVE. Defaults to 7 days before the end."},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window end (ISO 8601, minute precision, timezone-aware). Filters received_at, EXCLUSIVE. Defaults to now.","title":"To Date"},"description":"Window end (ISO 8601, minute precision, timezone-aware). Filters received_at, EXCLUSIVE. Defaults to now."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"1-based page number.","default":1,"title":"Page"},"description":"1-based page number."},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Rows per page. Clamped to 100 rather than refused; the response reports the size actually used.","default":50,"title":"Page Size"},"description":"Rows per page. Clamped to 100 rather than refused; the response reports the size actually used."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/deliveries/bulk":{"delete":{"tags":["integration-console"],"summary":"Bulk Delete Deliveries","description":"Permanently delete the named delivery receipts.\n\n🛑 Registered BEFORE ``/deliveries/{delivery_id}``. FastAPI matches routes in\ndeclaration order, so the literal ``bulk`` would otherwise bind as a\n``delivery_id`` and answer 404 for a well-formed request.\n\nEach id is resolved and deleted on its own. An id naming no row lands in\n``failed_ids`` rather than failing the batch: a receipt the prune window\nalready took, or one another operator deleted a second earlier, is a race\nthe console must survive rather than a reason to abandon 49 other rows.\n\nThe captured body goes with it — ``integration_delivery_payloads`` is\n``ON DELETE CASCADE``. A replay of a deleted delivery is NOT deleted; its\n``replay_of_id`` is ``ON DELETE SET NULL``, so the replay survives having\nlost its back-link.","operationId":"bulk_delete_deliveries_api_integrations_deliveries_bulk_delete","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/deliveries/{delivery_id}":{"delete":{"tags":["integration-console"],"summary":"Delete Delivery","description":"Permanently delete one delivery receipt, and its captured body.\n\n404 for an id that names no row, rather than the bulk route's silent\n``failed_ids``: a single delete is a direct instruction about a row the\noperator is looking at, and \"it was already gone\" is information they need.","operationId":"delete_delivery_api_integrations_deliveries__delivery_id__delete","parameters":[{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","title":"Delivery Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["integration-console"],"summary":"Get Delivery","description":"One receipt. Never the body — that is the other grant's route.","operationId":"get_delivery_api_integrations_deliveries__delivery_id__get","parameters":[{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Delivery Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/deliveries/{delivery_id}/payload":{"get":{"tags":["integration-console"],"summary":"Get Delivery Payload","description":"The captured body, behind its own grant.\n\n**Two distinguishable 404s, and the difference is the whole point.** A\ndelivery that never stored a body (capture off and it succeeded, or it\nfailed authentication so R31 forbids storing one) and a delivery whose body\nhas aged past the body window are both \"there is no body here\" — but neither\nis \"there is no such delivery\". An operator who cannot tell them apart reads\na pruned body as a lost receipt and starts hunting a bug in the ingress. The\ndetail carries a ``code`` so the console can say which one happened.","operationId":"get_delivery_payload_api_integrations_deliveries__delivery_id__payload_get","parameters":[{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Delivery Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryPayloadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/deliveries/{delivery_id}/replay":{"post":{"tags":["integration-console"],"summary":"Replay Delivery Route","description":"Re-run one failed delivery, exactly once (R30, R31, R32).\n\n🛑 **No request body.** The path id is the entire input, and that is a\nsecurity property rather than a minimal API: everything the re-run needs is\nalready on the stored receipt, and a body parameter is the shape into which\na caller could one day supply the payload for a delivery that never\nauthenticated.\n\nEvery eligibility rule lives in the service, not here, so a second caller\ncannot reach the re-run past a gate the route happened to hold — this\nhandler only translates the refusal into a status code.","operationId":"replay_delivery_route_api_integrations_deliveries__delivery_id__replay_post","parameters":[{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Delivery Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplayResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/capture/{slug}":{"put":{"tags":["integration-console"],"summary":"Set Capture","description":"Turn payload capture on for 24 hours, or off now (R32a, D32).\n\nTakes effect on the NEXT delivery with no deploy and no restart: the ingress\nresolves capture per delivery from this row (stage 8), so the write here is\nthe whole mechanism.\n\n**ON sets an expiry; OFF clears it.** U3's prune job is what actually\nexpires the flag, and it writes exactly this pair —\n``payload_capture_enabled = false, payload_capture_expires_at = NULL``\n(``app/services/integration_receipt_prune_job.py``). An OFF that left a\nstale future timestamp behind would leave the console showing a remaining\nwindow for a capture that is already off.\n\n``/capture/{slug}`` mirrors ``/liveness/{slug}`` deliberately:\n``/{slug}/capture`` would introduce a first-segment catch-all on a prefix\nthree routers now share.","operationId":"set_capture_api_integrations_capture__slug__put","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureToggleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__routes__integration_console__CaptureStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/liveness/{slug}":{"get":{"tags":["integration-console"],"summary":"Get Integration Liveness","description":"The summary an empty feed renders in place of \"no deliveries\".\n\nServed from the existing ``integration_liveness`` row rather than an\naggregate over receipts: the counters are maintained on the delivery path\nand survive the receipt prune, so this answers \"has it ever worked\" for an\nintegration whose receipts are all older than 400 days.\n\n``/liveness/{slug}`` rather than ``/{slug}/liveness`` deliberately — the\nlatter would introduce a first-segment catch-all on a prefix two other\nrouters already share.","operationId":"get_integration_liveness_api_integrations_liveness__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationLivenessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/conformance":{"get":{"tags":["integration-console"],"summary":"Get Conformance Report","description":"R24a's eight checks for every declared integration (U9 step 7).\n\n**The unit this route completes, and why it was missing.** U9 shipped the\nwalk and the contracts test; step 7 said \"the service module renders the\nsame walk for the console, so test and report cannot diverge\", and no route\nwas built. The service asserted the parity in its docstring regardless, so\nfor the life of the epic a comment claimed a console that did not exist.\nCalling ``conformance_report()`` here — the same function the contracts\nsuite parametrises over — is what turns that claim into a fact.\n\n**No database, no provider.** The walk reads declarations out of the\nregistry and source text off disk; it opens no session and issues no HTTP,\nwhich is why this handler takes no ``db`` dependency. That is a property of\nthe service, asserted by its own tests, not an assumption made here.\n\n**Gated on the Delivery Log's own permission** rather than a sixth grant.\nR32a splits the console's permissions at actions with different blast radii\n— reading a payload, replaying, toggling capture. A conformance report is\nthe same read-only governance view as the registry table it sits beside, and\ninventing a grant that no role holds and nothing distinguishes would add a\npermission string without adding a boundary.\n\nThe first call in a process pays for the AST sweeps (~3s); they are memoised\nfor the process lifetime, so subsequent calls are a fraction of that. The\nsubject is source text on disk, which cannot change under a running process.\n\n``request.app.router.routes`` is the live route table, handed to the walk so\nC6 can resolve ``POST /webhooks/{slug}`` against what is actually registered\n(GAIT-407 U2, R2) — the same table the contracts suite passes, so the two\nstill cannot diverge.","operationId":"get_conformance_report_api_integrations_conformance_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConformanceReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/auth-provider":{"get":{"tags":["user-management"],"summary":"Get Auth Provider","description":"Report the platform's active auth provider.\n\nUsed by the user-management UI to decide whether to show\ndatabase-only affordances such as the admin password reset.\nReturns ``\"entra\"`` when SSO is enabled, otherwise ``\"database\"``.\n\nRequires: users:account:manage permission","operationId":"get_auth_provider_api_admin_auth_provider_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users":{"post":{"tags":["user-management"],"summary":"Create User","description":"Create a new user (admin only).\n\nRequires: users:account:manage permission","operationId":"create_user_api_admin_users_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["user-management"],"summary":"List Users","description":"List all users with optional filtering, search, sorting, and pagination.\n\nRequires: users:list:view permission","operationId":"list_users_api_admin_users_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by account_status; repeat for any-of","title":"Status"},"description":"Filter by account_status; repeat for any-of"},{"name":"account_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by account_type; repeat for any-of","title":"Account Type"},"description":"Filter by account_type; repeat for any-of"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by email, name or username","title":"Search"},"description":"Search by email, name or username"},{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by role name; repeat for any-of","title":"Role"},"description":"Filter by role name; repeat for any-of"},{"name":"last_login","in":"query","required":false,"schema":{"anyOf":[{"enum":["never","inactive_30d","inactive_90d"],"type":"string"},{"type":"null"}],"description":"never, or no login within 30/90 days (includes never)","title":"Last Login"},"description":"never, or no login within 30/90 days (includes never)"},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","description":"Column to sort by","default":"created_at","title":"Sort By"},"description":"Column to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","description":"Sort direction: asc or desc","default":"desc","title":"Sort Order"},"description":"Sort direction: asc or desc"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-indexed)","default":1,"title":"Page"},"description":"Page number (1-indexed)"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Results per page","default":50,"title":"Page Size"},"description":"Results per page"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/pending":{"get":{"tags":["user-management"],"summary":"List Pending Users","description":"List all pending users awaiting approval.\n\nReturns users with account_status='pending'.\n\nRequires: users:list:view permission","operationId":"list_pending_users_api_admin_users_pending_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserResponse"},"title":"Response List Pending Users Api Admin Users Pending Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/pending/count":{"get":{"tags":["user-management"],"summary":"Get Pending Count","description":"Get count of pending users (for badge display).\n\nRequires: users:list:view permission","operationId":"get_pending_count_api_admin_users_pending_count_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/locked/count":{"get":{"tags":["user-management"],"summary":"Get Locked Count","description":"Get count of locked users (for admin nav badge / conditional menu).\n\nRequires: users:list:view permission","operationId":"get_locked_count_api_admin_users_locked_count_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/reset-password":{"post":{"tags":["user-management"],"summary":"Admin Reset User Password","description":"Generate a random password, set must_change_password, return password once.\n\nRequires: users:account:manage permission\n\nPolicy guards (defense-in-depth on top of authN + authZ):\n- Throttled per acting admin (a compromised admin token can't mass-reset).\n- Self-reset is refused — admins rotate their own password via the\n  self-service ``PUT /api/users/me/password`` flow.\n- A super-admin (``*:*:*``) can only be reset by another super-admin, so an\n  account-manager can't lock out a full admin.","operationId":"admin_reset_user_password_api_admin_users__user_id__reset_password_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminResetPasswordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/export":{"get":{"tags":["user-management"],"summary":"Export Users","description":"Export users to CSV.\n\nRequires: users:list:view permission","operationId":"export_users_api_admin_users_export_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by account_status","title":"Status"},"description":"Filter by account_status"},{"name":"account_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by account_type","title":"Account Type"},"description":"Filter by account_type"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by email, name or username","title":"Search"},"description":"Search by email, name or username"},{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by role name","title":"Role"},"description":"Filter by role name"},{"name":"last_login","in":"query","required":false,"schema":{"anyOf":[{"enum":["never","inactive_30d","inactive_90d"],"type":"string"},{"type":"null"}],"description":"Last-login bucket","title":"Last Login"},"description":"Last-login bucket"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/bulk-grant-role":{"post":{"tags":["user-management"],"summary":"Bulk Grant Role","description":"Bulk grant a role to multiple users.\n\nRequires: users:account:manage permission","operationId":"bulk_grant_role_api_admin_users_bulk_grant_role_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRoleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/bulk-revoke-role":{"post":{"tags":["user-management"],"summary":"Bulk Revoke Role","description":"Bulk revoke a role from multiple users.\n\nRequires: users:account:manage permission","operationId":"bulk_revoke_role_api_admin_users_bulk_revoke_role_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRoleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/bulk-approve":{"post":{"tags":["user-management"],"summary":"Bulk Approve Users","description":"Bulk approve multiple pending users.\n\nApproves all specified users with the same set of roles.\nReturns count of successful and failed operations.\n\nRequires: users:approval:manage permission","operationId":"bulk_approve_users_api_admin_users_bulk_approve_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/bulk-reject":{"post":{"tags":["user-management"],"summary":"Bulk Reject Users","description":"Bulk reject multiple pending users.\n\nDisables all specified users.\nReturns count of successful and failed operations.\n\nRequires: users:approval:manage permission","operationId":"bulk_reject_users_api_admin_users_bulk_reject_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}":{"get":{"tags":["user-management"],"summary":"Get User","description":"Get user details by ID.\n\nRequires: users:list:view permission","operationId":"get_user_api_admin_users__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"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"}}}}}},"put":{"tags":["user-management"],"summary":"Update User","description":"Update user details.\n\nSupports updating: name, account_status, account_type, email.\n\nRequires: users:account:manage permission","operationId":"update_user_api_admin_users__user_id__put","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequest"}}}},"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"}}}}}},"delete":{"tags":["user-management"],"summary":"Delete User","description":"Disable user account (soft delete).\n\nRequires: users:account:manage permission","operationId":"delete_user_api_admin_users__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__models__user__MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/effective-access":{"get":{"tags":["user-management"],"summary":"Get User Effective Access","description":"Why can this person do what they can do? (GAIT-250 U8)\n\nEvery resolved permission with the chain that produced it: a role held\ndirectly (from the manifest floor or this environment's rows), a group they\nare in, the human baseline, or ``admin``'s synthesised ``*:*:*``.\n\nGated on ``users:list:view``, the same permission as ``GET\n/admin/users/{user_id}``, which already discloses this user's roles. The\npanel expands that answer; it does not widen the audience for it.\n\n**This is the intended state, read live.** It can lead enforcement by up to\nthe permissions-cache TTL, which the response reports so the caller can say\nso rather than claim a revocation has already taken effect. See\n``app/rbac/provenance.py`` for why the cached resolver is forbidden here.","operationId":"get_user_effective_access_api_admin_users__user_id__effective_access_get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/hard":{"delete":{"tags":["user-management"],"summary":"Hard Delete User","description":"Permanently delete a user account (break-glass, GAIT-192).\n\nRequires: the ``user_hard_delete_enabled`` feature flag ON *and* the\n``users:account:hard_delete`` permission (admins hold it via ``*:*:*``).\n\nGuardrails, in order (the flag gate above already ran as a dependency):\n- 404 if the target does not exist.\n- 409 unless the target is already ``disabled`` — the normal soft-delete\n  must happen first, as a deliberate cooling-off step.\n- 400 on self-deletion.\n- 403 when the target is a super-admin and the caller is not.\n- 400 unless ``confirm_email`` matches the target's email (typed\n  confirmation, not a checkbox).\n- 409 when the target is still referenced by a RESTRICT foreign key (e.g.\n  approval history); nothing is deleted or audited on that path.\n- the ``user_hard_deleted`` audit event and the delete are committed in one\n  transaction (see UserService.hard_delete_user) — the record and the\n  deletion are atomic, so the audit trail can never assert a deletion that\n  did not happen (or omit one that did).","operationId":"hard_delete_user_api_admin_users__user_id__hard_delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HardDeleteUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__models__user__MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/unlock":{"post":{"tags":["user-management"],"summary":"Unlock Account","description":"Unlock a locked user account.\n\nRequires: users:account:manage permission","operationId":"unlock_account_api_admin_users__user_id__unlock_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__models__user__MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/teams-test-message":{"post":{"tags":["user-management"],"summary":"Send Teams Test Message","description":"Send a user a Teams test message, as a check that Argo can reach them\n(GAIT-523 KTD10). A plain ``def``: FastAPI runs the blocking send in the\nthreadpool. Writes no audit entry, by decision.\n\nRequires: integration:teams:message permission","operationId":"send_teams_test_message_api_admin_users__user_id__teams_test_message_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamsTestMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/roles":{"post":{"tags":["user-management"],"summary":"Grant Role","description":"Grant role to user.\n\nRequires: users:account:manage permission","operationId":"grant_role_api_admin_users__user_id__roles_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__models__user__MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["user-management"],"summary":"Get User Roles Endpoint","description":"List user roles.\n\nRequires: users:list:view permission","operationId":"get_user_roles_endpoint_api_admin_users__user_id__roles_get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Get User Roles Endpoint Api Admin Users  User Id  Roles Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/roles/{role}":{"delete":{"tags":["user-management"],"summary":"Revoke Role","description":"Revoke role from user.\n\nRequires: users:account:manage permission","operationId":"revoke_role_api_admin_users__user_id__roles__role__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"role","in":"path","required":true,"schema":{"type":"string","title":"Role"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__models__user__MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/auth-method":{"patch":{"tags":["user-management"],"summary":"Set User Auth Method","description":"Change a user's authentication method (GAIT-61 Unit 6.5).\n\nFlips a user between 'local' (password) and 'sso' (Entra/Azure AD).\n- To 'sso': external_provider + external_id required, password cleared.\n- To 'local': external identity cleared, a temporary password is generated\n  and returned ONCE; must_change_password is set to true.\n\nService accounts are rejected.\n\nRequires: users:auth_method:edit permission (admin via *:*:*).","operationId":"set_user_auth_method_api_admin_users__user_id__auth_method_patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAuthMethodRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAuthMethodResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/approve":{"post":{"tags":["user-management"],"summary":"Approve User","description":"Approve pending user and assign roles.\n\nChanges account_status from 'pending' to 'active' and grants roles.\n\nRequires: users:approval:manage permission","operationId":"approve_user_api_admin_users__user_id__approve_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveUserRequest"}}}},"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"}}}}}}},"/api/admin/users/{user_id}/reject":{"post":{"tags":["user-management"],"summary":"Reject User","description":"Reject pending user.\n\nSets account_status to 'disabled'.\n\nRequires: users:approval:manage permission","operationId":"reject_user_api_admin_users__user_id__reject_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/impersonate":{"post":{"tags":["user-management"],"summary":"Start Impersonation","description":"Start an impersonation session, fully assuming the target's identity (GAIT-318 F1).\n\nMints a fresh ``access_token`` cookie carrying the target's own normal\nlogin claims plus the caller's identity under the three\n``impersonator_*`` claims (KTD1). Every subsequent request authenticates\nas the target — including permission checks — until\n``POST /api/impersonation/exit`` is called or the token expires. No\nserver-side session state is created.\n\nRequires: users:account:impersonate permission\n\nGuardrails, in order:\n- 404 if the target does not exist.\n- 400 if the caller's own token has under 30 seconds remaining (KTD2) —\n  checked first because it is about the caller, not the target.\n- 400 if the caller is already impersonating someone else (R5) — sessions\n  do not nest or chain.\n- 400 on self-targeting (AE1).\n- 400 if the target is disabled, or locked (AE2 — distinct messages).\n- 400 if the target is a service account (AE3).\n\nThe minted token's ``expires_delta`` is the caller's OWN remaining\nsession time, never a fresh ``JWT_EXPIRE_MINUTES`` window (R10) —\nbecoming someone else never extends how long the underlying login lasts.\nNo CSRF cookie rotation (KTD3).","operationId":"start_impersonation_api_admin_users__user_id__impersonate_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImpersonationSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/impersonation/exit":{"post":{"tags":["user-management"],"summary":"Exit Impersonation","description":"End the caller's impersonation session and restore their own identity (GAIT-318 F2/R9).\n\nReads ``impersonator_user_id`` off the CALLER'S OWN current token — the\nsole restoration key (KTD1). The target's identity is never consulted;\nemail is never used to restore, since email is mutable and can be\nreassigned. Mints a fresh ``access_token`` cookie carrying the admin's\nown normal login claims with none of the three ``impersonator_*``\nclaims, so the restored token is indistinguishable from one minted at\n``/login``.\n\nNo permission beyond an active impersonation session is required — a\ncaller can always return to their own identity.\n\nGuardrails, in order:\n- 400 if the caller is not currently impersonating anyone.\n- 400 if the caller's own token has under 30 seconds remaining (KTD2) —\n  the same message as the start endpoint's floor check.\n- 400 if the original admin account no longer exists (deleted\n  mid-session) — refuses rather than silently restoring a reassigned\n  email. (Defense-in-depth: KTD9's auth-layer re-verification, in\n  ``DatabaseAuthProvider.authenticate_with_token``, already refuses this\n  case at authentication time with its own 401; this is a second,\n  explicit check at the point this endpoint resolves the restoration\n  target.)\n\nNo CSRF cookie rotation (KTD3).","operationId":"exit_impersonation_api_impersonation_exit_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImpersonationSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/me/effective-access":{"get":{"tags":["user-management"],"summary":"Get Own Effective Access","description":"Why can *I* do what I can do? (GAIT-250 U8)\n\nThe same payload as the admin route, about the caller. **A separate endpoint\nrather than a special case inside that one**, and the difference is\nstructural: this takes no subject id, so there is no parameter to tamper with\nand no \"may this caller see that person?\" comparison to get wrong later. The\nonly gate is being signed in, which is the correct one — a person may always\nask why they hold what they hold.\n\nIt has to exist. The admin route is gated on ``users:list:view``, which\nalmost nobody holds, so without this a member of the group that grants the\ndashboard would watch it appear and have no way to find out why.\n\nService-account principals authenticate without a ``users`` row; they get a\n404 rather than an empty answer, because \"no access\" and \"no such subject\"\nare different statements.","operationId":"get_own_effective_access_api_users_me_effective_access_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/me/password":{"put":{"tags":["user-management"],"summary":"Change Own Password","description":"Change own password (authenticated users).\n\nRequires current password for verification.","operationId":"change_own_password_api_users_me_password_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__models__user__MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/me/default-dashboard":{"put":{"tags":["user-management"],"summary":"Set Own Default Dashboard","description":"Set (or clear) the caller's default dashboard for the Dashboards section.\n\nSelf-scoped: identity comes solely from the session — there is no\nclient-supplied user id, so there is no IDOR surface. Validation for a\nnon-null id: (1) ``dashboard:<id>:view`` exists in the permission catalog\n(id-known — no second hand-maintained registry to drift from the frontend\none), and (2) the caller holds it via the wildcard-aware\n``UserContext.has_permission`` (so admins' ``*:*:*`` passes without an\nexplicit grant). ``null`` clears the preference and skips validation.","operationId":"set_own_default_dashboard_api_users_me_default_dashboard_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDefaultDashboardRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDefaultDashboardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/roles":{"get":{"tags":["admin","rbac"],"summary":"List Roles","description":"List all roles with their permissions, and which of them come from the image.\n\n``permissions`` is this environment's ``role_permissions`` rows (DB-backed\nsince migration 055); ``floor_permissions`` is what the RBAC manifest declares\nfor the role (R27). The two overlap until U6 deletes the duplicates, and a\ncaller should treat their **union** as what the role effectively grants —\nwhich is what ``resolve_permissions_from_db`` returns.\n\n**R18: there is no admin special case here.** ``admin`` has no\n``role_permissions`` rows, so its ``permissions`` is simply empty and its\n``*:*:*`` appears under ``floor_permissions`` from the one declaration,\n``loader.ADMIN_PERMISSIONS``. That uniformity is the point: with a literal\nhere, ``permissions`` would mean \"database rows\" for ten roles and\n\"synthesised grant\" for one, and any consumer summing or diffing the field\nwould be quietly wrong about exactly the most privileged row.\n\n``manifest_fingerprint`` identifies the floor this environment is running, so\na report generated from someone's checkout can refuse to compare itself\nagainst a target running a different manifest (R23).","operationId":"list_roles_api_admin_roles_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin","rbac"],"summary":"Create Role","operationId":"create_role_api_admin_roles_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRoleRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/roles/{role_id}/holders":{"get":{"tags":["admin","rbac"],"summary":"List Role Holders","description":"Who holds this role — the reverse of the effective-access lens (R12).\n\nThe two-tier disclosure ``delete_role`` uses: a **count** for anyone who can\nread roles, **identities** only for a holder of ``users:account:manage``.\nEditing a role's grants is a decision about blast radius, so the number\nbelongs next to the checkboxes; who those people are is user administration\nand needs the permission that governs it.\n\nDeliberately roles-only. No role is ever group-derived in v1, so every holder\nhere is a direct ``user_roles`` assignment and the answer needs no union.","operationId":"list_role_holders_api_admin_roles__role_id__holders_get","parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/permissions":{"get":{"tags":["admin","rbac"],"summary":"List Permissions","description":"List all permissions in the catalog with the roles that hold each.","operationId":"list_permissions_api_admin_permissions_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/permissions/grouped":{"get":{"tags":["admin","rbac"],"summary":"List Permissions Grouped","description":"List permissions grouped by resource for easier UI rendering.\n\nBug fix (Phase 3): list_permissions returns {\"permissions\": [...]} so we\nmust unwrap before iterating — the previous code iterated the dict's keys\nand crashed with `TypeError: string indices must be integers`.","operationId":"list_permissions_grouped_api_admin_permissions_grouped_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/roles/{role_id}":{"patch":{"tags":["admin","rbac"],"summary":"Update Role","operationId":"update_role_api_admin_roles__role_id__patch","parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin","rbac"],"summary":"Delete Role","operationId":"delete_role_api_admin_roles__role_id__delete","parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/roles/{role_id}/permissions":{"put":{"tags":["admin","rbac"],"summary":"Set Role Permissions","operationId":"set_role_permissions_api_admin_roles__role_id__permissions_put","parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPermissionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/groups/people":{"get":{"tags":["admin","rbac","groups"],"summary":"Search People","description":"The member picker's search — only what the picker needs.\n\nGated on ``rbac:groups:manage``, NOT on the admin user list. Reusing that\nwould force a delegated roster manager to hold ``users:account:manage``,\nhanding them password resets and hard deletes so they can add someone to a\ngroup.\n\nFiltered to eligible accounts **at source** (KTD-5): a picker that offers\nsomeone the API will then refuse is a bug report waiting to happen.\n\n``title`` rides along for a caller cleared for directory data (GAIT-319).\nIt is what tells two people with the same name apart at the moment of\nchoosing — which is the moment a mis-pick hands the wrong person a\npermission. Searching by title is deliberately NOT added: the picker's\n``q`` stays name/email so what it matches on is still what it displays as\nthe primary line.","operationId":"search_people_api_admin_groups_people_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":200,"title":"Q"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/groups":{"get":{"tags":["admin","rbac","groups"],"summary":"List Groups","operationId":"list_groups_api_admin_groups_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin","rbac","groups"],"summary":"Create Group","description":"Create an empty group. It confers nothing until a grant is attached, which\nis a separate call gated on a separate permission.","operationId":"create_group_api_admin_groups_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/groups/{group_id}":{"get":{"tags":["admin","rbac","groups"],"summary":"Get Group","operationId":"get_group_api_admin_groups__group_id__get","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["admin","rbac","groups"],"summary":"Update Group","description":"Rename or re-describe. Grants and membership are separate endpoints —\nfolding them in here would make a mass grant look like a typo fix in the\naudit trail.","operationId":"update_group_api_admin_groups__group_id__patch","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGroupRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin","rbac","groups"],"summary":"Delete Group","description":"Delete a group, reporting the blast radius it just cleared.\n\nDeleting revokes every grant from every member at once, so the response says\nwhat went — the two-tier shape ``delete_role`` uses: a count for anyone,\nidentities only for a holder of ``users:account:manage``.\n\nUnlike ``delete_role`` this does not 409 on a populated group. A role is a\njob someone holds; a group is a list, and emptying it is the normal way to\nretire one. The disclosure is the safeguard, not a refusal.\n\n**No conferral guard here, deliberately** — see the note on\n:func:`detach_permissions`. Deleting only ever takes access away.","operationId":"delete_group_api_admin_groups__group_id__delete","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/groups/{group_id}/apply":{"post":{"tags":["admin","rbac","groups"],"summary":"Apply Changes","description":"One Save, one transaction — the whole diff or none of it.\n\n## Why this exists alongside the per-item routes\n\nThe per-item routes are correct for an interface that writes as you click.\nThe Groups screen buffers instead, matching the Roles screen, and a buffered\nSave spans grants *and* membership *and* the name. Sending that as four\nrequests means a refused attach can land after a committed detach, leaving a\ngroup half-changed in a state nobody asked for and nobody can predict. Here\nevery check runs before any write and one commit ends it.\n\n## Three things this deliberately does not collapse\n\n**The permission split.** ``rbac:groups:grant`` changes what a group grants;\n``rbac:groups:manage`` changes who is in it and what it is called. One\nendpoint must not become one permission, so the sections are gated\nseparately below and the route gate is merely \"holds either\".\n\n**The audit trail.** Each kind of change still writes its own event. A single\n``group_saved`` row would make a mass grant to thirty people\nindistinguishable from fixing a typo in the description — the exact reason\nU6 refused to fold permission events into ``group_updated``.\n\n**The revocation rule.** Detach and remove carry no conferral guard. Only\nadding can escalate; requiring the actor to hold what they remove would make\na grant un-revocable the moment its last holder leaves.","operationId":"apply_changes_api_admin_groups__group_id__apply_post","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyChangesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/groups/{group_id}/roster-report":{"get":{"tags":["admin","rbac","groups"],"summary":"Roster Report","description":"Who is missing, who has moved on, and who cannot sign in any more.\n\n**Read-only, and that is the whole design (R14).** It shows a difference; it\nnever acts on one. That is what keeps the org directory safe to consult here\n— the moment this writes, \"Entra decides who has access\" becomes true, which\nthe origin document rejected outright. A group's roster is manual by design;\nthis only tells a human where to look.\n\nFour buckets, deliberately not one:\n\n* ``candidates`` — match the filter, not in the roster.\n* ``departures`` — in the roster, in the directory, no longer matching.\n* ``unknown_to_directory`` — in the roster with **no** directory record.\n  Reported separately and never as a departure: a contractor has no Entra\n  row and never will, and listing them as leaving on every run is how a\n  report teaches its reader to ignore it.\n* ``disabled_in_argo`` — an Argo state the directory cannot see, and the\n  cheapest reliable staleness signal available. Reported **regardless** of\n  directory state and regardless of any filter, because a disabled account\n  sitting in a group that grants things is worth surfacing either way.\n\nWith no filter there is nothing to diff against, so the first two are empty\nrather than \"everyone\" — a report claiming the entire roster has departed on\nits first run is worse than no report at all.","operationId":"roster_report_api_admin_groups__group_id__roster_report_get","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"department","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Department"}},{"name":"manager_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Manager Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/groups/{group_id}/review":{"post":{"tags":["admin","rbac","groups"],"summary":"Stamp Review","description":"Record that a human looked at this roster and stands behind it.\n\nGated on ``rbac:groups:manage``, **not** ``:view`` — deliberately stricter\nthan the report it accompanies. The stamp is a claim about human attention\nand accountability, so it belongs to whoever is responsible for the roster.\nIf a read-only holder could set it, \"a manager actually checked this\" would\nstop being true and the badge would be worse than absent.\n\nIdempotent by nature: reviewing twice simply moves the date, and each one is\na real event worth recording.","operationId":"stamp_review_api_admin_groups__group_id__review_post","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/groups/{group_id}/permissions":{"post":{"tags":["admin","rbac","groups"],"summary":"Attach Permissions","description":"Attach grants to a group — a mass conferral on everyone in it.\n\nAdditive, never a replace (KTD-4). One atomic request for the whole list, so\na refusal on the third entry leaves none of them written.","operationId":"attach_permissions_api_admin_groups__group_id__permissions_post","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin","rbac","groups"],"summary":"Detach Permissions","description":"Detach grants — a mass revocation.\n\n**The revocation rule, stated once for the three endpoints that share it**\n(this one, ``remove_member``, ``delete_group``): no conferral guard. Only\n*adding* can escalate. Requiring the actor to hold what they are removing\nwould create a grant nobody can revoke the moment its last holder leaves —\nand would make a departed employee un-removable from the most powerful group\nin the system by anyone short of a super-admin. The permission gate\n(`rbac:groups:grant` / `rbac:groups:manage`) is the control here; disclosure\nin the response is the safeguard.","operationId":"detach_permissions_api_admin_groups__group_id__permissions_delete","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/groups/{group_id}/members":{"post":{"tags":["admin","rbac","groups"],"summary":"Add Members","description":"Add members — one guarded, atomic request for the whole batch.\n\nEvery candidate is checked before any is written, so a batch containing one\nineligible account applies none of it. Thirty separate calls would give\nthirty guard runs, thirty audit rows and a half-applied roster.","operationId":"add_members_api_admin_groups__group_id__members_post","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembersRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/groups/{group_id}/members/{user_id}":{"delete":{"tags":["admin","rbac","groups"],"summary":"Remove Member","description":"Remove one member, reporting what they lose.\n\nA removal is a revocation, so the response names the grants that just went —\nR13's no-silent-drop rule — and carries no conferral guard (see\n:func:`detach_permissions`). The member's own cache is invalidated\nexplicitly: once the row is gone the shared fan-out can no longer see them.","operationId":"remove_member_api_admin_groups__group_id__members__user_id__delete","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/products/metadata-schemas":{"get":{"tags":["Organization"],"summary":"List Metadata Schemas","description":"List all available integration metadata schemas.","operationId":"list_metadata_schemas_api_organization_products_metadata_schemas_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/products/metadata-schemas/{integration_type}":{"get":{"tags":["Organization"],"summary":"Get Metadata Schema","description":"Get the metadata schema for a specific integration type.","operationId":"get_metadata_schema_api_organization_products_metadata_schemas__integration_type__get","parameters":[{"name":"integration_type","in":"path","required":true,"schema":{"type":"string","title":"Integration Type"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/products":{"get":{"tags":["Organization"],"summary":"List Products","description":"List all products with integration counts.","operationId":"list_products_api_organization_products_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name (case-insensitive)","title":"Search"},"description":"Search by name (case-insensitive)"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Organization"],"summary":"Create Product","description":"Create a new product.","operationId":"create_product_api_organization_products_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/products/accessible":{"get":{"tags":["Organization"],"summary":"List Accessible Products","description":"Products the **current user** may approve PRDs for.\n\nThat is the active products they are directly assigned to, or every active\nproduct for an admin (the admin role or ``*:*:*``; PDLC access model R2/R5).\n\nFeeds the ProductMate PRD-approval product picker (a ``single_choice``\nwidget) so the real ``product_id`` comes from a click, never an LLM guess.\nAuthn-only (``get_current_user``): the result is already scoped to what the\ncaller may act on, so no extra RBAC permission is required — a user may\nalways see which products *they* can act on. The downstream\n``approve_prd`` gate (``_assert_approver_assigned_to_product``) remains the\nauthorization boundary on the resumed value.\n\nRegistered **before** ``GET /{product_id}`` so the literal ``accessible``\npath is not captured by the UUID path param.","operationId":"list_accessible_products_api_organization_products_accessible_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/products/{product_id}":{"get":{"tags":["Organization"],"summary":"Get Product","description":"Get a product with all its integration links.","operationId":"get_product_api_organization_products__product_id__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Organization"],"summary":"Update Product","description":"Update a product's fields.","operationId":"update_product_api_organization_products__product_id__put","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Organization"],"summary":"Delete Product","description":"Delete a product, all its integration links and its QualityMate data.\n\nThe product and its QualityMate rows go in one transaction (GAIT-579).\nEach test run's conversation is then deleted through\n``ConversationDeleteService``, which commits on its own.","operationId":"delete_product_api_organization_products__product_id__delete","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/products/{product_id}/deletion-impact":{"get":{"tags":["Organization"],"summary":"Get Product Deletion Impact","description":"What deleting the product would also remove (GAIT-579): its QualityMate\ntest runs, tests, verdict groups, planned actions and test run conversations, so\nthe page can say so before it deletes.","operationId":"get_product_deletion_impact_api_organization_products__product_id__deletion_impact_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/products/{product_id}/integrations":{"post":{"tags":["Organization"],"summary":"Add Integration","description":"Add an integration link to a product.","operationId":"add_integration_api_organization_products__product_id__integrations_post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddIntegrationRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/products/{product_id}/integrations/{integration_id}":{"put":{"tags":["Organization"],"summary":"Update Integration","description":"Update an integration link's external_id, display name, and/or metadata.","operationId":"update_integration_api_organization_products__product_id__integrations__integration_id__put","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIntegrationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Organization"],"summary":"Remove Integration","description":"Remove an integration link from a product.","operationId":"remove_integration_api_organization_products__product_id__integrations__integration_id__delete","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/products/{product_id}/weekly-demo-videos":{"get":{"tags":["Organization"],"summary":"List Weekly Demo Videos","description":"The product's recent weekly PRD demo videos (PDLC-336), newest first.","operationId":"list_weekly_demo_videos_api_organization_products__product_id__weekly_demo_videos_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/products/{product_id}/ado-pipelines":{"get":{"tags":["Organization"],"summary":"List Ado Pipelines","description":"List a product's connected ADO pipeline integrations (R1).","operationId":"list_ado_pipelines_api_organization_products__product_id__ado_pipelines_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Organization"],"summary":"Connect Ado Pipeline","description":"Connect an ADO pipeline to a product with its roles (GAIT-579 U20,\nR30, KTD24). 409 when it is already connected or a role is refused;\n422 for an unknown, unoffered or misconfigured role.","operationId":"connect_ado_pipeline_api_organization_products__product_id__ado_pipelines_post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectAdoPipelineRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/products/{product_id}/ado-pipelines/available":{"get":{"tags":["Organization"],"summary":"List Available Ado Pipelines","description":"The connect picker (GAIT-579 U20, KTD24): the pipelines of an ADO\norganization and project, with name, folder, id and last run.\n\nServed from the cached full list a scheduled job refreshes\n(``source: \"cache\"``, with ``refreshed_at``; the page filters it\nlocally). On a miss, one live search page instead (``source:\n\"live_search\"``; ``search`` narrows it, ``truncated`` says ADO had more,\n``refresh_enqueued`` whether this miss started a refresh of the cache).\n``502`` with a ``{\"status\": \"error\", ...}`` body when a live read fails.","operationId":"list_available_ado_pipelines_api_organization_products__product_id__ado_pipelines_available_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"organization","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"title":"Organization"}},{"name":"project","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"title":"Project"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Search"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/products/{product_id}/ado-pipelines/{integration_id}/roles":{"put":{"tags":["Organization"],"summary":"Set Ado Pipeline Roles","description":"Set the roles a pipeline holds, and each role's config (GAIT-579 U20,\nR30-R32). A role left out is removed; an empty list leaves the pipeline\nconnected with no role. Removing Deploy tracking keeps its tracked\nstages, unread.","operationId":"set_ado_pipeline_roles_api_organization_products__product_id__ado_pipelines__integration_id__roles_put","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPipelineRolesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/products/{product_id}/ado-pipelines/{integration_id}":{"delete":{"tags":["Organization"],"summary":"Remove Ado Pipeline","description":"Disconnect an ADO pipeline (R15/R17).\n\nCascades its tracked stages via the DB-level ``ON DELETE CASCADE`` (U2)\n-- never fires without ``body.confirm`` explicitly true. Does NOT touch\nany ``CicdFixRun`` row; an active fix run keeps running (R15).","operationId":"remove_ado_pipeline_api_organization_products__product_id__ado_pipelines__integration_id__delete","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveAdoPipelineRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/products/{product_id}/ado-pipelines/{integration_id}/live-stages":{"get":{"tags":["Organization"],"summary":"Get Ado Pipeline Live Stages","description":"Live picker (R2): real stage names off the pipeline's most recent\ncompleted ADO run.\n\nThree distinguishable outcomes (never collapsed into each other):\n* ``200 {\"status\": \"ok\", \"stages\": [...]}`` -- real stage names.\n* ``200 {\"status\": \"no_completed_runs\", \"stages\": []}`` -- R14's\n  blocked state (the pipeline has never finished a run). Not an HTTP\n  error: the pipeline is real, tracking is just unavailable yet.\n* ``502`` with a ``{\"status\": \"error\", ...}`` body -- R18's ADO-error\n  state (the ADO call itself failed). Distinct status code AND body\n  shape from the blocked state above.","operationId":"get_ado_pipeline_live_stages_api_organization_products__product_id__ado_pipelines__integration_id__live_stages_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/products/{product_id}/ado-pipelines/{integration_id}/tracked-stages":{"get":{"tags":["Organization"],"summary":"List Tracked Ado Stages","description":"A pipeline's tracked stages, in insertion order (R4).","operationId":"list_tracked_ado_stages_api_organization_products__product_id__ado_pipelines__integration_id__tracked_stages_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Organization"],"summary":"Add Tracked Ado Stage","description":"Track one more real ADO stage under this pipeline connection (R2/R3).\n\n``sort_order`` is assigned from this stage's real position in the\npipeline's own execution order (R4 revised) -- never reassigned on\nother rows. ``ado_stage_name`` is revalidated server-side against a\nfresh live-picker fetch (never trusted from the request alone) and\nrejected with 422 if the picker isn't in its ``\"ok\"`` state or the name\nisn't one of its current real stages; a duplicate add of an\nalready-tracked stage is idempotent, returning the existing row.","operationId":"add_tracked_ado_stage_api_organization_products__product_id__ado_pipelines__integration_id__tracked_stages_post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddTrackedAdoStageRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/products/{product_id}/ado-pipelines/{integration_id}/tracked-stages/{stage_id}":{"put":{"tags":["Organization"],"summary":"Relabel Tracked Ado Stage","description":"Rename a tracked stage's admin-facing label (R3).","operationId":"relabel_tracked_ado_stage_api_organization_products__product_id__ado_pipelines__integration_id__tracked_stages__stage_id__put","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}},{"name":"stage_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Stage Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelabelTrackedAdoStageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Organization"],"summary":"Remove Tracked Ado Stage","description":"Untrack a stage (R5). Sibling rows' ``sort_order`` is untouched.","operationId":"remove_tracked_ado_stage_api_organization_products__product_id__ado_pipelines__integration_id__tracked_stages__stage_id__delete","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}},{"name":"stage_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Stage Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/products/{product_id}/people":{"get":{"tags":["Organization"],"summary":"Get Product People","description":"Get all teams and members associated with this product.","operationId":"get_product_people_api_organization_products__product_id__people_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/product-hierarchy":{"get":{"tags":["Organization"],"summary":"Get Product Hierarchy","description":"Every certified hierarchy row, plus the replica's load manifest.","operationId":"get_product_hierarchy_api_organization_product_hierarchy_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductHierarchyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devtools/stats":{"get":{"tags":["devtools"],"summary":"Get Stats","description":"Record counts for all tracked data sets.","operationId":"get_stats_api_devtools_stats_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevToolsStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devtools/conversations":{"delete":{"tags":["devtools"],"summary":"Delete Conversations","description":"Delete all conversations, messages, and captured prompts.\n\nGoes through ``ConversationDeleteService.delete_all`` (GAIT-547 KTD21): every\nactive agent run is stopped (one wait for all of them), open pauses close,\nand every LangGraph checkpoint thread goes with its conversation. The rows\ngo with DELETE (not TRUNCATE) so the SET NULL FK on\nintegration_events.conversation_id fires correctly.","operationId":"delete_conversations_api_devtools_conversations_delete","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevToolsDeleteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devtools/integration-events":{"delete":{"tags":["devtools"],"summary":"Delete Integration Events","description":"Delete all integration events.\n\nUses DELETE (not TRUNCATE) so FK ON DELETE actions fire correctly\n(e.g. remediation_sessions.integration_event_id SET NULL).","operationId":"delete_integration_events_api_devtools_integration_events_delete","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevToolsDeleteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devtools/audit-events":{"delete":{"tags":["devtools"],"summary":"Delete Audit Events","description":"Truncate all audit events.","operationId":"delete_audit_events_api_devtools_audit_events_delete","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevToolsDeleteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devtools/sync/targets":{"get":{"tags":["devtools"],"summary":"Sync List Targets","description":"Return the configured environment-sync target catalog.\n\nSourced from ENV_SYNC_TARGETS (parsed at startup into MateConfig).\nReplaces the free-text URL input that let users paste any string.","operationId":"sync_list_targets_api_devtools_sync_targets_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncTargetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devtools/sync/test-connection":{"post":{"tags":["devtools"],"summary":"Sync Test Connection","description":"Test connectivity to the target environment. No writes.","operationId":"sync_test_connection_api_devtools_sync_test_connection_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncPreviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devtools/sync/preview":{"post":{"tags":["devtools"],"summary":"Sync Preview","description":"Fetch local + target data and return a diff.\nNo writes are performed.","operationId":"sync_preview_api_devtools_sync_preview_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncPreviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiffResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devtools/sync/inspect":{"post":{"tags":["devtools"],"summary":"Sync Inspect","description":"Return the full local + target payload for a single item so the UI can\nrender a side-by-side diff. No writes.","operationId":"sync_inspect_api_devtools_sync_inspect_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncInspectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncInspectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devtools/sync/export":{"get":{"tags":["devtools"],"summary":"Sync Export","description":"Stream a JSON bundle of local products/roles.\n\nBundle shape matches the payloads used by the sync diff pipeline so an\nimport can reuse the same diff + apply logic. Filter with the\n`data_types` query param (comma-separated subset of products,roles).\nAny other value, including the dropped ``skills`` and ``prompts``, is\nrefused with 422.","operationId":"sync_export_api_devtools_sync_export_get","parameters":[{"name":"data_types","in":"query","required":false,"schema":{"type":"string","default":"products,roles","title":"Data Types"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devtools/sync/execute":{"post":{"tags":["devtools"],"summary":"Sync Execute","description":"Execute sync: upsert products/roles between local and the target environment.\nPer-item failures do not abort the overall sync.","operationId":"sync_execute_api_devtools_sync_execute_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncExecuteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncExecuteResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devtools/diagnostics":{"get":{"tags":["devtools"],"summary":"Diagnostics","description":"Fast diagnostic snapshot of the running deployment.\n\nIncludes build info, migration state, DB row counts, prompt health,\nRedis state, feature flags, and tool registry. External integration\nprobes are intentionally excluded (they cost time + quota). Hit\n/diagnostics/integrations explicitly to run those.","operationId":"diagnostics_api_devtools_diagnostics_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devtools/diagnostics/secret-preview/{key}":{"get":{"tags":["devtools"],"summary":"Diagnostics Secret Preview","description":"Server-masked preview of a single secret in the shared format (GAIT-555 U3).\n\nReturns ``{\"key\", \"state\", \"masked\", \"label\"}`` where ``masked`` is e.g.\n``\"••••••••7Ag2\"`` — 8 bullets and the last 4 characters, never more of the\nvalue. A key that is not a secret-classified setting is **404**.\n\nThis is a deliberate, audited exception to \"secrets are presence-only\": it\nis gated by the ``devtools:maintenance:execute`` permission and is\nhuman-only (``require_person``: service accounts and API keys are refused\neven when a role grants the permission). It is available in all\nenvironments, since Diagnostics is, and every reveal is logged with the\ncaller + key. The response is never cached.","operationId":"diagnostics_secret_preview_api_devtools_diagnostics_secret_preview__key__get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devtools/diagnostics/integrations":{"post":{"tags":["devtools"],"summary":"Diagnostics Integrations","description":"Probe every configured external integration (Azure OpenAI, Search,\nAtlassian, GitHub, New Relic, Key Vault) in parallel. Each probe has\nits own timeout so a hanging service can't block the whole response.\nExplicit-trigger only — not run on every Diagnostics page load.","operationId":"diagnostics_integrations_api_devtools_diagnostics_integrations_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/events":{"get":{"tags":["audit"],"summary":"List Audit Events","description":"List audit events with optional filtering, sorting, and pagination.\n\nRequires: audit:log:view permission","operationId":"list_audit_events_api_audit_events_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"enum":["auth","skill","tool","webhook","chat","scheduler","feedback","mcp","rbac","signoff","gtm","platform","agent","env_sync","secrets"],"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"event_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Event Type"}},{"name":"user_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"User Email"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}},{"name":"sort_by","in":"query","required":false,"schema":{"enum":["created_at","category","event_type","user_email"],"type":"string","default":"created_at","title":"Sort By"}},{"name":"sort_order","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"desc","title":"Sort Order"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAuditEventsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/stats":{"get":{"tags":["audit"],"summary":"Get Audit Stats","description":"Get aggregate audit statistics over a time range.\n\nRequires: audit:analytics:view permission","operationId":"get_audit_stats_api_audit_stats_get","parameters":[{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/vocabulary":{"get":{"tags":["audit"],"summary":"Get Audit Vocabulary","description":"List the distinct categories and event types present in the audit log.\n\nFeeds the screen's filter dropdowns. Gated on ``audit:log:view`` rather than\n``audit:analytics:view`` — it is the vocabulary of the listing this\npermission already grants, not an analytic.\n\nRequires: audit:log:view permission","operationId":"get_audit_vocabulary_api_audit_vocabulary_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditVocabularyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/breakdown":{"get":{"tags":["audit"],"summary":"Get Audit Breakdown","description":"Get time-series breakdown of audit events grouped by a metadata field.\n\nDesigned for multi-line charts comparing skills or tools over time.\nRequires: audit:analytics:view permission","operationId":"get_audit_breakdown_api_audit_breakdown_get","parameters":[{"name":"category","in":"query","required":true,"schema":{"enum":["skill","tool"],"type":"string","description":"Event category to break down","title":"Category"},"description":"Event category to break down"},{"name":"group_by","in":"query","required":true,"schema":{"type":"string","description":"Metadata field to group by (e.g. skill_name, tool_name)","title":"Group By"},"description":"Metadata field to group by (e.g. skill_name, tool_name)"},{"name":"mate_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"description":"Legacy mate filter (old tool rows only)","title":"Mate Type"},"description":"Legacy mate filter (old tool rows only)"},{"name":"agent_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Filter tool calls by the agent that ran them","title":"Agent Key"},"description":"Filter tool calls by the agent that ran them"},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devin/sessions":{"get":{"tags":["devin"],"summary":"List Devin Sessions","description":"Full session list for a ``[start, end)`` window + playbooks + billing meta.\n\nThe client-side-aggregation contract: the browser derives every Usage section,\nfilter, and table from this raw list (faithful port of the source dashboard).","operationId":"list_devin_sessions_api_devin_sessions_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devin/members":{"get":{"tags":["devin"],"summary":"List Devin Members","description":"Enterprise members (paginated). ``hide_emails`` omits emails server-side.","operationId":"list_devin_members_api_devin_members_get","parameters":[{"name":"hide_emails","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Hide Emails"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Page Size"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedMembersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devin/qe-metrics":{"get":{"tags":["devin"],"summary":"Get Devin Qe Metrics","description":"Raw QE-session-metrics list for a range (aggregated client-side).","operationId":"get_devin_qe_metrics_api_devin_qe_metrics_get","parameters":[{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Date"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QeMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trello/quarters":{"get":{"tags":["trello"],"summary":"List Trello Quarters","description":"Every mapped quarter on the board, ordered by period, plus the default.\n\nOrdering comes from ``(year, quarter_number)`` — never from parsing a display\nlabel, which would sort \"Q1 2026\" before \"Q4 2025\".","operationId":"list_trello_quarters_api_trello_quarters_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuartersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trello/dashboard":{"get":{"tags":["trello"],"summary":"Get Trello Dashboard","description":"One quarter's KPIs, sections, filters and ownership gaps.\n\n``owner`` / ``initiative`` scope the SECTIONS only (R12) — the KPIs always\ndescribe the whole quarter, or the headline numbers would silently change\nmeaning as a reader narrows the view.\n\nAn unknown quarter id is a 404, never an empty success: a reader must be able\nto tell \"this quarter is not mapped\" from \"this quarter is empty\".","operationId":"get_trello_dashboard_api_trello_dashboard_get","parameters":[{"name":"quarter","in":"query","required":true,"schema":{"type":"string","description":"Trello list id of the quarter to render","title":"Quarter"},"description":"Trello list id of the quarter to render"},{"name":"owner","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter sections by Trello member ids","title":"Owner"},"description":"Filter sections by Trello member ids"},{"name":"initiative","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter sections by card ids","title":"Initiative"},"description":"Filter sections by card ids"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Trello Dashboard Api Trello Dashboard Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trello/quarter-over-quarter":{"get":{"tags":["trello"],"summary":"Get Trello Quarter Over Quarter","description":"The cross-quarter series (R14) — the discriminating capability the email\ncannot provide.\n\n``measures`` states what the axis counts, and each point carries\n``promotion_unadjusted`` so pre-feed quarters render as indicative rather than\nexact.","operationId":"get_trello_quarter_over_quarter_api_trello_quarter_over_quarter_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuarterOverQuarterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trello/goals":{"get":{"tags":["trello"],"summary":"List Trello Quarter Goals","description":"Every goal in one quarter — the whole population (G1, GAIT-272).\n\nThe five existing views are each a *filter* over goals (has a deadline,\ncompleted since last sync, missing hygiene data, parked). None of them shows the\npopulation, so a reader wanting the full list, or wanting to sort the quarter by\nowner, has had to open Trello.\n\nUnpaginated by design: ~309 items in the live quarter, well within one payload.\nBoard-wide is ~2,748, which is why the quarter scope matters. No Trello endpoint\nuses the repo's ``limit``/``offset`` convention and this does not introduce the\nfirst one.\n\nAn unknown quarter id is a 404, never an empty success.","operationId":"list_trello_quarter_goals_api_trello_goals_get","parameters":[{"name":"quarter","in":"query","required":true,"schema":{"type":"string","description":"Trello list id of the quarter to list","title":"Quarter"},"description":"Trello list id of the quarter to list"},{"name":"owner","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter goals by Trello member ids","title":"Owner"},"description":"Filter goals by Trello member ids"},{"name":"initiative","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter goals by card ids","title":"Initiative"},"description":"Filter goals by card ids"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuarterGoalsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trello/goals/{checkitem_id}/history":{"get":{"tags":["trello"],"summary":"Get Trello Goal History","description":"One goal's life: every recorded change and every tick, merged (G5–G10).\n\nBehind the SAME ``dashboard:quarterly-goals:view`` as the rest of the dashboard,\ndeliberately rather than something looser — this payload names individuals\n(who ticked what, and when an owner changed), so it belongs behind the tightest\ngrant the surface already has. No permission, role or manifest change: nobody's\naccess changes.\n\nAn id we know nothing about — no current row, no change rows, no events — is a\n404. A goal that has been hard-deleted but still has history is NOT: serving\nthat is the entire point of a history that outlives its subject.","operationId":"get_trello_goal_history_api_trello_goals__checkitem_id__history_get","parameters":[{"name":"checkitem_id","in":"path","required":true,"schema":{"type":"string","title":"Checkitem Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Trello Goal History Api Trello Goals  Checkitem Id  History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trello/lists":{"get":{"tags":["trello"],"summary":"List Trello Board Lists","description":"Every synced list with its quarter classification, mapped or not.\n\nUnmapped lists are the point: a newly created quarter list has to surface for\nclassification rather than being silently dropped, and lists whose names never\nparse (`To Be Placed`, `Themes`) need a human decision once.","operationId":"list_trello_board_lists_api_trello_lists_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoardListsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trello/quarter-map/{list_id}":{"put":{"tags":["trello"],"summary":"Set Trello Quarter Mapping","description":"Classify a list as a quarter, or re-classify it.\n\nIdempotent on the list id. Refuses a period another list already claims with a\n409 rather than letting the unique constraint surface as a 500 — two lists\nclaiming Q3 2026 would make the cross-quarter series ambiguous.","operationId":"set_trello_quarter_mapping_api_trello_quarter_map__list_id__put","parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string","title":"List Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuarterMappingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuarterMappingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["trello"],"summary":"Clear Trello Quarter Mapping","description":"Un-classify a list.\n\nDeletes the MAPPING only. The synced list, its cards and its goals all stay,\nso un-mapping never destroys the data behind a quarter's figures — a list that\ndisappears from the board keeps its already-synced history.","operationId":"clear_trello_quarter_mapping_api_trello_quarter_map__list_id__delete","parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string","title":"List Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trello/digest-recipients":{"get":{"tags":["trello"],"summary":"Get Trello Digest Recipients","description":"Who receives the Daily Board Digest, plus the domains an address may use.\n\nBehind ``manage`` rather than ``view``: this decides where board content and\nowner names are mailed, which is a narrower decision than reading the\ndashboard.\n\n``allowed_domains`` rides along deliberately. The general-purpose source for it\nis ``GET /api/system/email-domains``, which requires ``system:config:view`` — a\npermission this endpoint's audience need not hold. Without it the chip control\nreceives an empty domain array and silently stops validating, because an empty\nallow-list means \"unrestricted\" everywhere else in the stack.","operationId":"get_trello_digest_recipients_api_trello_digest_recipients_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigestRecipientsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["trello"],"summary":"Set Trello Digest Recipients","description":"Replace the recipient list. An empty list is valid — it pauses the digest.\n\nWrites only the ``recipients`` column; the send watermark on the same row is\njob-owned and must survive this call.","operationId":"set_trello_digest_recipients_api_trello_digest_recipients_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigestRecipientsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigestRecipientsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trello/digest-test-send":{"post":{"tags":["trello"],"summary":"Send Trello Digest Test","description":"Send the digest now, to the configured recipients, exactly as the job would.\n\n**It does not advance the watermark**, and that is the whole reason this is not\njust the Scheduled Jobs \"trigger now\" button. The watermark is where the next\nreal digest starts reading; moving it here would make the completions this\nemail just showed you disappear from the one the audience actually receives.\n``consecutive_skips`` is untouched for the same reason, and a stale sync is not\na reason to bail — an empty \"Completed since last run\" is a valid test result.\n\nThis mails the REAL recipient list, so the UI puts a confirmation naming every\naddress in front of it.","operationId":"send_trello_digest_test_api_trello_digest_test_send_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigestTestSendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/quality/dashboard":{"get":{"tags":["quality"],"summary":"Get Quality Dashboard","description":"The whole dashboard, already filtered to what this viewer may see.\n\nBefore the first successful run this is an explicit empty state rather than zeroed KPIs\n(R3) — a KPI reading 0 is a measurement, and there has not been one.","operationId":"get_quality_dashboard_api_quality_dashboard_get","parameters":[{"name":"scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"'all' to widen beyond your own products","title":"Scope"},"description":"'all' to widen beyond your own products"},{"name":"history","in":"query","required":false,"schema":{"type":"string","description":"Which stored backlog history the 82-week trend draws on","default":"imported","title":"History"},"description":"Which stored backlog history the 82-week trend draws on"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityDashboardPayload"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/quality/scope":{"get":{"tags":["quality"],"summary":"Get Quality Scope","description":"The viewer's current scope plus everything the picker may offer.","operationId":"get_quality_scope_api_quality_scope_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["quality"],"summary":"Put Quality Scope","description":"Set your OWN scope. There is no user id on the wire, deliberately — a route that\naccepted one would need its own authorization rule to stop a viewer rewriting somebody\nelse's dashboard, and the simplest way not to get that wrong is not to offer it.","operationId":"put_quality_scope_api_quality_scope_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/quality/runs":{"get":{"tags":["quality"],"summary":"List Quality Runs","description":"Recent refresh runs — what a comparison picks from.","operationId":"list_quality_runs_api_quality_runs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RunSummary"},"title":"Response List Quality Runs Api Quality Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/quality/drill":{"get":{"tags":["quality"],"summary":"Drill Quality Series","description":"The issues behind one cell of one widget (R9).","operationId":"drill_quality_series_api_quality_drill_get","parameters":[{"name":"series","in":"query","required":true,"schema":{"type":"string","description":"Series key, e.g. backlog_snapshot","title":"Series"},"description":"Series key, e.g. backlog_snapshot"},{"name":"cell_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Which cell of the widget","title":"Cell Key"},"description":"Which cell of the widget"},{"name":"product_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Key"}},{"name":"as_of","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrillResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/quality/compare":{"get":{"tags":["quality"],"summary":"Compare Quality Runs","description":"What changed between two recorded runs (R11) — not the same thing as the trend.","operationId":"compare_quality_runs_api_quality_compare_get","parameters":[{"name":"base","in":"query","required":true,"schema":{"type":"string","description":"The earlier run id","title":"Base"},"description":"The earlier run id"},{"name":"head","in":"query","required":true,"schema":{"type":"string","description":"The later run id","title":"Head"},"description":"The later run id"},{"name":"product_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Key"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"default":500,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComparisonResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/quality/annotations":{"get":{"tags":["quality"],"summary":"List Quality Annotations","description":"Every hand-typed value, with who typed it and when (D4a).\n\n``response_model`` is set so the declared shape is enforced rather than merely documented:\nthe hand-built dict this used to return omitted ``updated_by`` and ``stale``, and with no\nresponse model nothing objected — the editor rendered attribution that never arrived.","operationId":"list_quality_annotations_api_quality_annotations_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Annotation"},"title":"Response List Quality Annotations Api Quality Annotations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["quality"],"summary":"Put Quality Annotation","description":"Write one hand-typed value.\n\nGated on ``:manage`` rather than ``:view``: these render unattributed beside computed\nmetrics, so the set of people who can change them is deliberately smaller than the set who\ncan read them.","operationId":"put_quality_annotation_api_quality_annotations_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Annotation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/launchdarkly/inventory":{"get":{"tags":["launchdarkly"],"summary":"Get Launchdarkly Inventory","description":"The whole dashboard payload for ONE project, plus the list of them all.\n\nServed as a single response rather than split across several: the header\ntallies, the rows and the freshness banner all describe one sync of one\nproject, and fetching them separately would let the browser render a count\nfrom one sync beside rows from another.\n\n``project`` is the only parameter, and it is a SCOPE. Everything that narrows\nROWS — lifecycle, presence, search — stays client-side over this one payload,\nbecause a project's whole flag inventory is small enough to send once. The\nproject cannot: the four synced projects share not one environment between\nthem, so changing it changes which columns exist and is a different request.\n\n**404 only for an unknown project.** A deployment that has not synced yet\nstill returns 200 with an empty inventory and ``freshness.has_ever_synced``\nFalse, which the screen renders as \"has not synced yet\" — a different message\nfrom \"this project has no flags\", and both different from a project that does\nnot exist here.\n\nThe refusal is raised by the service, AFTER the permission dependency has run,\nso a 404 never tells someone without the grant which project keys exist.","operationId":"get_launchdarkly_inventory_api_launchdarkly_inventory_get","parameters":[{"name":"project","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"LaunchDarkly project key to serve. Omit for the deployment's default project. An unknown or never-synced key is a 404.","title":"Project"},"description":"LaunchDarkly project key to serve. Omit for the deployment's default project. An unknown or never-synced key is a 404."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagInventoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cursor-spend/rollup":{"get":{"tags":["cursor-spend"],"summary":"Get Cursor Spend Rollup","description":"The whole dashboard payload for one scope and one period (R29's landing view).\n\nServed as a single response rather than split across several: the headline,\nthe model breakdown, the group rows, the coverage buckets and the freshness\nline all describe one snapshot of one scope, and fetching them separately\nwould let the browser render a total from one sync beside rows from another.\n\n**A response resolving to one identifiable person is audited**, whatever\nscope was asked for — see :func:`_resolved_subject`. The event is written\nAFTER the rollup, because until the query has run nobody knows whether the\ndepartment that was requested holds forty people or one.\n\n**A period can refuse a scope (422).** A department or team scope over a\nrolling window is not served, because the org position that would make it\ntrue is not recorded before 2026-08-24 and answering it from today's\ndirectory would move a transferred person's past spend to their current team\n(Amendment A, A2). The refusal carries reader-facing prose, not a code.\n\n**404 only for a scope this deployment cannot resolve.** A store that has\nnever synced is a 200 whose ``freshness.has_ever_synced`` is False (R18),\nwhich the panel renders as \"not yet synced\" — a different statement from \"this\nteam consumed nothing\", and both different from \"no such team\". The refusal is\nraised by the service, after the permission dependency, so a 404 never tells\nsomeone without the grant which departments exist.","operationId":"get_cursor_spend_rollup_api_cursor_spend_rollup_get","parameters":[{"name":"scope_kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Which slice to serve. Omit for R5a's default — the viewer's own manager subtree, falling back to organization-wide for a viewer with no reports or no directory record. One of: department, manager_subtree, organization, person, team.","title":"Scope Kind"},"description":"Which slice to serve. Omit for R5a's default — the viewer's own manager subtree, falling back to organization-wide for a viewer with no reports or no directory record. One of: department, manager_subtree, organization, person, team."},{"name":"scope_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The scope's key: an email for a person or subtree root, a name for a department or team. Omit with a department or team scope to select the visible unassigned group (R7).","title":"Scope Key"},"description":"The scope's key: an email for a person or subtree root, a name for a department or team. Omit with a department or team scope to select the visible unassigned group (R7)."},{"name":"group_by","in":"query","required":false,"schema":{"type":"string","description":"How rows inside the scope are partitioned. One of: department, manager, person, team.","default":"department","title":"Group By"},"description":"How rows inside the scope are partitioned. One of: department, manager, person, team."},{"name":"period_kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Which period shape to serve. Omit and the other parameters decide: dates mean a rolling window, a boundary means that billing cycle, neither means the current cycle. One of: current_cycle, cycle, window.","title":"Period Kind"},"description":"Which period shape to serve. Omit and the other parameters decide: dates mean a rolling window, a boundary means that billing cycle, neither means the current cycle. One of: current_cycle, cycle, window."},{"name":"cycle_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Serve this billing cycle. Omit for each seat's OWN current cycle — seats do not share a cycle boundary. Read the boundaries that actually exist from `available_cycles` on any rollup response; an invented one matches no seat and returns an empty payload.","title":"Cycle Start"},"description":"Serve this billing cycle. Omit for each seat's OWN current cycle — seats do not share a cycle boundary. Read the boundaries that actually exist from `available_cycles` on any rollup response; an invented one matches no seat and returns an empty payload."},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Rolling window, first day INCLUSIVE (UTC). Sending either date switches the read to the model-day grain, which reaches 19 months back and carries no org position — see `period.grain`.","title":"Start Date"},"description":"Rolling window, first day INCLUSIVE (UTC). Sending either date switches the read to the model-day grain, which reaches 19 months back and carries no org position — see `period.grain`."},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Rolling window, day after the last, EXCLUSIVE (UTC).","title":"End Date"},"description":"Rolling window, day after the last, EXCLUSIVE (UTC)."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumptionRollupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cursor-spend/trend":{"get":{"tags":["cursor-spend"],"summary":"Get Cursor Spend Trend","description":"Consumption and model mix over time (B2).\n\nALWAYS the model-day grain — a trend spans months and the seat-cycle grain\nholds two — so every A2 constraint applies: a department or team scope is\nrefused with reader-facing prose, because the org position that would make\nit true is not recorded before 2026-08-24.\n\n**AUDITED, on the same rule as the rollup.** An earlier version of this\ndocstring claimed a person scope \"still resolves through the same refusal\npath, so nothing widens\". That was false: ``SCOPE_PERSON`` is in\n``WINDOW_SCOPE_KINDS``, so ``?scope_kind=person&scope_key=<anyone>`` is\nserved here and returns one named person's spend broken down by month and\nmodel. On a dashboard with no per-scope authorization the trail is the only\ncompensating control, so this route writes the same event ``/rollup`` does,\nkeyed on the RESOLVED subject rather than the requested scope.","operationId":"get_cursor_spend_trend_api_cursor_spend_trend_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"First day of the trend, INCLUSIVE (UTC). Omit BOTH dates for the last 90 days. A length always names a real range, so unlike cycle_start this default cannot invent a period nothing falls in.","title":"Start Date"},"description":"First day of the trend, INCLUSIVE (UTC). Omit BOTH dates for the last 90 days. A length always names a real range, so unlike cycle_start this default cannot invent a period nothing falls in."},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Day after the last, EXCLUSIVE (UTC).","title":"End Date"},"description":"Day after the last, EXCLUSIVE (UTC)."},{"name":"bucket","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Override the x-axis grain. Omit and it follows the window length. One of: day, month, week.","title":"Bucket"},"description":"Override the x-axis grain. Omit and it follows the window length. One of: day, month, week."},{"name":"scope_kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"As on /rollup.","title":"Scope Kind"},"description":"As on /rollup."},{"name":"scope_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"As on /rollup.","title":"Scope Key"},"description":"As on /rollup."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumptionTrendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cursor-spend/managers":{"get":{"tags":["cursor-spend"],"summary":"List Cursor Spend Managers","description":"Managers a reader can scope to, heaviest subtree first (B1).\n\n**Gated by this dashboard's OWN permission, and deliberately not by the\ndirectory's.** A cursor-spend viewer must not need\n``organization:members:read`` to use the scope control — and must not be\nhanded the whole 4,115-person directory to get it. This returns only\nmanagers who actually have Cursor seats beneath them (89 of them), which is\nboth narrower and more useful: every entry resolves to a scope that has\nfigures, so the picker cannot offer one that renders as \"consumed nothing\".\n\nBuilt from the STAMPED ancestor chain rather than from a live directory\nwalk, so a manager who appears here is guaranteed to resolve to the seats\nadvertised beside them. That is also what fixes the reported defect: a VP\nwhose reports are all directors holds no seat with their own\n``manager_email``, so they were absent from the by-manager grouping while\ntheir subtree held 341 seats.\n\nNo personal figures cross this route — a subtree count is not one person's\nconsumption — so it writes no audit event. A single-person subtree is\naudited when it is READ, by the rollup route, which is where the figures\nactually are.","operationId":"list_cursor_spend_managers_api_cursor_spend_managers_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ManagerOptionResponse"},"title":"Response List Cursor Spend Managers Api Cursor Spend Managers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cursor-spend/freshness":{"get":{"tags":["cursor-spend"],"summary":"Get Cursor Spend Freshness","description":"R17, R18 on their own, for the freshness banner.\n\nThe rollup carries the same object, so this exists for the case the rollup\ncannot answer: the banner has to say \"not yet synced\" before any scope has\nbeen chosen, and has to keep saying it when a scope read 404s.\n\nNo personal figures cross this route, so it writes no audit event — there is\nno subject to name.","operationId":"get_cursor_spend_freshness_api_cursor_spend_freshness_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__routes__cursor_spend__FreshnessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cursor-spend/budget":{"get":{"tags":["cursor-spend"],"summary":"Get Cursor Spend Budget","description":"The allowance budget outlook for the contract year containing today.\n\n**Organization-wide, and takes no scope or period parameters.** That is the\ndecision, not an omission: a budget figure must never be rendered against a\nslice it was not set for, so there is deliberately no way to ask this route\nfor a department's or a person's budget. The screen shows the panel only on\nthe organization scope and hides it on a window period, where the allowance\nmeasure does not exist at all.\n\nReturns ``null`` — not 404, and not a zeroed payload — when either config key\nis missing or unusable. A 404 would read as a broken route on a dashboard\nthat is working exactly as configured, and zeroes would read as \"no spend\".\n\nNo personal figures cross this route: every figure is an organization total,\nso there is no subject to name and it writes no audit event, exactly as\n``/freshness`` does not.","operationId":"get_cursor_spend_budget_api_cursor_spend_budget_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BudgetOutlookResponse"},{"type":"null"}],"title":"Response Get Cursor Spend Budget Api Cursor Spend Budget Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cursor-spend/claude-runs":{"get":{"tags":["cursor-spend"],"summary":"Get Claude Run Spend Series","description":"Claude list-price spend per UTC dispatch day (KTD14, PDLC-332).\n\nSummed across DevMate units, CI/CD fix runs and remediation sessions — the\nthree tables that carry ``list_cost_cents``. **Organization-wide and takes\nno scope:** Cursor's seat-grain trend has no home for per-session cost, and\nthere is deliberately no per-person breakdown. No personal figures cross\nthis route, so it writes no audit event, exactly as ``/budget`` does not.\n\nA hard-deleted run's cost drops out with its units (accepted in KTD14).","operationId":"get_claude_run_spend_series_api_cursor_spend_claude_runs_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"First day, INCLUSIVE (UTC). Omit BOTH dates for the last 90 days, as on /trend.","title":"Start Date"},"description":"First day, INCLUSIVE (UTC). Omit BOTH dates for the last 90 days, as on /trend."},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Day after the last, EXCLUSIVE (UTC).","title":"End Date"},"description":"Day after the last, EXCLUSIVE (UTC)."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaudeRunSpendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scrummate/readiness/epics":{"get":{"tags":["ScrumMate"],"summary":"List Epics","description":"Tracked Epics, one page. Records with no value for the sort field sort last.","operationId":"list_epics_api_scrummate_readiness_epics_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}},{"name":"project","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Project"}},{"name":"sort","in":"query","required":false,"schema":{"enum":["score","graded_at","key"],"type":"string","default":"graded_at","title":"Sort"}},{"name":"order","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"desc","title":"Order"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EpicListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scrummate/readiness/epics/{record_id}":{"get":{"tags":["ScrumMate"],"summary":"Get Epic","description":"One Epic with its merged history (20 per page), open queue entries and the caller's rights.\n\n``latest_run`` is the newest run, whichever history page was asked for.","operationId":"get_epic_api_scrummate_readiness_epics__record_id__get","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Record Id"}},{"name":"history_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"History Before"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EpicDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scrummate/readiness/epics/{record_id}/refresh":{"post":{"tags":["ScrumMate"],"summary":"Refresh Epic","description":"Re-read the Epic's mirrored fields from Jira. Reads only; never writes to Jira.\n\nAn Epic Jira no longer has answers 200 with ``found_in_jira`` false and the\nrecord unchanged and still listed. Records are keyed by site, so one from\nanother Jira site is refused before any Jira call.","operationId":"refresh_epic_api_scrummate_readiness_epics__record_id__refresh_post","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Record Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshedEpic"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scrummate/readiness/epics/{record_id}/grade":{"post":{"tags":["ScrumMate"],"summary":"Grade Epic","description":"Grade now. Blocks while a started run works (200 with the run); a run\nalready active is attached to (202 with its entry). A plain ``def`` on\npurpose: the grader runs its own event loop, so no caller may be async.","operationId":"grade_epic_api_scrummate_readiness_epics__record_id__grade_post","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Record Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scrummate/readiness/epics/{record_id}/queue/{entry_id}/fire-now":{"post":{"tags":["ScrumMate"],"summary":"Fire Entry Now","description":"Make a pending entry due now; it still waits behind an active run.","operationId":"fire_entry_now_api_scrummate_readiness_epics__record_id__queue__entry_id__fire_now_post","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Record Id"}},{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entry Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueEntryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scrummate/readiness/epics/{record_id}/queue/{entry_id}/cancel":{"post":{"tags":["ScrumMate"],"summary":"Cancel Entry","description":"Cancel a pending entry before it starts.","operationId":"cancel_entry_api_scrummate_readiness_epics__record_id__queue__entry_id__cancel_post","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Record Id"}},{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entry Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueEntryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scrummate/readiness/epics/import":{"post":{"tags":["ScrumMate"],"summary":"Import Epic","description":"Add an Epic by key. A record already tracked is returned unchanged.\n\nA development aid: production Epics arrive through the webhook, so the manual\nimport is refused there whatever the caller's permissions.","operationId":"import_epic_api_scrummate_readiness_epics_import_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportEpicRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EpicRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/qualitymate/test-runs":{"get":{"tags":["QualityMate"],"summary":"List Test Runs","description":"Test runs newest first, with status, progress verdict, validity, counts by\ncategory, actions opened and would-have, and the mode at build time per\ncapability. ``needs_attention`` keeps only waiting, stuck and failed runs,\nacross every page.","operationId":"list_test_runs_api_qualitymate_test_runs_get","parameters":[{"name":"product_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Product Id"}},{"name":"pipeline_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Pipeline Id"}},{"name":"include_backfilled","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Backfilled"}},{"name":"needs_attention","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Needs Attention"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Test Runs Api Qualitymate Test Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-argo-read-tool":"quality_get_test_run"}},"/api/qualitymate/test-runs/{test_run_id}":{"get":{"tags":["QualityMate"],"summary":"Get Test Run","description":"One test run's list: items with their tests and actions, the\ntest-run-level actions, alerts, and the previous and next test run.","operationId":"get_test_run_api_qualitymate_test_runs__test_run_id__get","parameters":[{"name":"test_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Test Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Test Run Api Qualitymate Test Runs  Test Run Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-argo-read-tool":"quality_get_test_run"},"delete":{"tags":["QualityMate"],"summary":"Delete Test Run","description":"Hard-delete one test run with everything QualityMate recorded for it,\nthen its conversations (current and earlier).","operationId":"delete_test_run_api_qualitymate_test_runs__test_run_id__delete","parameters":[{"name":"test_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Test Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Test Run Api Qualitymate Test Runs  Test Run Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/qualitymate/test-runs/{test_run_id}/items/{item_id}":{"get":{"tags":["QualityMate"],"summary":"Get Item","description":"One item's evidence (attempts, history strip) and its actions. A fix\naction handed to DevMate carries ``devmate_run_id`` when the caller may see\nthat DevMate run (GAIT-579 U14), else ``None``, and ``review_run_status``,\nthe status of QualityMate's review run of its PR's latest flagged commit\n(U15), else ``None``. Who decided the item, its Decisions, the earlier\nactions a person's decision left in place, and whether the caller may\ndecide it now come from ``triage_service.get_item`` (person decisions\nplan U4).","operationId":"get_item_api_qualitymate_test_runs__test_run_id__items__item_id__get","parameters":[{"name":"test_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Test Run Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Item Api Qualitymate Test Runs  Test Run Id  Items  Item Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-argo-read-tool":"quality_get_item"}},"/api/qualitymate/tests/{test_id}/history":{"get":{"tags":["QualityMate"],"summary":"Get Test History","description":"One test's outcomes test run by test run, with counts over valid test runs.","operationId":"get_test_history_api_qualitymate_tests__test_id__history_get","parameters":[{"name":"test_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Test Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":60,"minimum":1,"default":20,"title":"Limit"}},{"name":"test_run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Count up to and including this test run.","title":"Test Run Id"},"description":"Count up to and including this test run."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Test History Api Qualitymate Tests  Test Id  History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-argo-read-tool":"quality_test_history"}},"/api/qualitymate/items/{item_id}/decision":{"post":{"tags":["QualityMate"],"summary":"Decide Item","description":"Set the item's category as a person's decision and plan that\ncategory's action through QualityMate's rules. Answers the decision, each\naction's outcome (``planned``, ``would_have``, ``skipped_policy`` with its\nreason, ``already_planned`` or ``already_done`` with its link) and the\nitem's earlier actions outside Argo that nothing undoes (``prior_actions``).","operationId":"decide_item_api_qualitymate_items__item_id__decision_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Decide Item Api Qualitymate Items  Item Id  Decision Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/qualitymate/settings":{"get":{"tags":["QualityMate"],"summary":"Get Settings","description":"The capability switches (state, since when, by whom, why a switch-on is\nblocked) and the seeded global rules, read only.","operationId":"get_settings_api_qualitymate_settings_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Settings Api Qualitymate Settings Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/qualitymate/capabilities/{capability}/switch-on":{"post":{"tags":["QualityMate"],"summary":"Switch Capability On","description":"Switch a capability on for every product with QualityMate on (KTD15).\n409 with the reasons, naming each product, when it is refused.","operationId":"switch_capability_on_api_qualitymate_capabilities__capability__switch_on_post","parameters":[{"name":"capability","in":"path","required":true,"schema":{"enum":["park","bug","fix","xray"],"type":"string","title":"Capability"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Switch Capability On Api Qualitymate Capabilities  Capability  Switch On Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/qualitymate/capabilities/{capability}/switch-off":{"post":{"tags":["QualityMate"],"summary":"Switch Capability Off","description":"Switch a capability off (back to shadow) for every product.","operationId":"switch_capability_off_api_qualitymate_capabilities__capability__switch_off_post","parameters":[{"name":"capability","in":"path","required":true,"schema":{"enum":["park","bug","fix","xray"],"type":"string","title":"Capability"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Switch Capability Off Api Qualitymate Capabilities  Capability  Switch Off Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/qualitymate/products/{product_id}/settings":{"get":{"tags":["QualityMate"],"summary":"Get Product Settings","description":"Everything the product's QualityMate card draws, in one read. A product\nadmin without ``qualitymate:settings:manage`` reads it too and sees the card\nread only (``can_edit`` false; U21 state 14.6); saving stays behind\n``qualitymate:settings:manage`` (Dirk, 2026-10-25).","operationId":"get_product_settings_api_qualitymate_products__product_id__settings_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Product Settings Api Qualitymate Products  Product Id  Settings Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["QualityMate"],"summary":"Put Product Settings","description":"Change a product's QualityMate settings, creating them on first use.\n422 for a bad value (a Jira project the product has no link to, a recipient\noutside the allow list); 409 when turning on is refused.","operationId":"put_product_settings_api_qualitymate_products__product_id__settings_put","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Put Product Settings Api Qualitymate Products  Product Id  Settings Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/qualitymate/pipelines/{pipeline_integration_id}/backfill":{"post":{"tags":["QualityMate"],"summary":"Start Backfill","description":"Start seeding a Test runs pipeline's history (U4), once at a time per\npipeline. 409 with the running progress when one is already going; 422 for a\npipeline without the Test runs role.","operationId":"start_backfill_api_qualitymate_pipelines__pipeline_integration_id__backfill_post","parameters":[{"name":"pipeline_integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pipeline Integration Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BackfillRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Start Backfill Api Qualitymate Pipelines  Pipeline Integration Id  Backfill Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["QualityMate"],"summary":"Get Backfill Progress","description":"The pipeline's backfill state: idle, queued, running, done or failed,\nwith test runs captured of N and the durable count of seeded test runs.","operationId":"get_backfill_progress_api_qualitymate_pipelines__pipeline_integration_id__backfill_get","parameters":[{"name":"pipeline_integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pipeline Integration Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Backfill Progress Api Qualitymate Pipelines  Pipeline Integration Id  Backfill Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/qualitymate/pipelines/{pipeline_integration_id}/builds":{"get":{"tags":["QualityMate"],"summary":"List Pipeline Builds","description":"The pipeline's finished scheduled builds, newest first, read from ADO,\neach with its test run in Argo (or ``null``).","operationId":"list_pipeline_builds_api_qualitymate_pipelines__pipeline_integration_id__builds_get","parameters":[{"name":"pipeline_integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pipeline Integration Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Pipeline Builds Api Qualitymate Pipelines  Pipeline Integration Id  Builds Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/qualitymate/pipelines/{pipeline_integration_id}/analyze":{"post":{"tags":["QualityMate"],"summary":"Analyze Build","description":"Sort one finished scheduled build of the pipeline. 202 when a triage run\nis queued (``started``: a build Argo had not seen; ``promoted``: a\nbackfilled one, from its stored capture); 200 ``already_sorted`` when\nnothing starts.","operationId":"analyze_build_api_qualitymate_pipelines__pipeline_integration_id__analyze_post","parameters":[{"name":"pipeline_integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pipeline Integration Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Analyze Build Api Qualitymate Pipelines  Pipeline Integration Id  Analyze Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/qualitymate/test-runs/{test_run_id}/rerun":{"post":{"tags":["QualityMate"],"summary":"Rerun Triage","description":"Sort a sorted test run again from its stored capture, in a new\nconversation. The earlier triage run stays readable.","operationId":"rerun_triage_api_qualitymate_test_runs__test_run_id__rerun_post","parameters":[{"name":"test_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Test Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Rerun Triage Api Qualitymate Test Runs  Test Run Id  Rerun Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/qualitymate/test-runs/{test_run_id}/deletion-impact":{"get":{"tags":["QualityMate"],"summary":"Get Test Run Deletion Impact","description":"What deleting the test run removes, and the refusal's code (or null).","operationId":"get_test_run_deletion_impact_api_qualitymate_test_runs__test_run_id__deletion_impact_get","parameters":[{"name":"test_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Test Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Test Run Deletion Impact Api Qualitymate Test Runs  Test Run Id  Deletion Impact Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/qualitymate/pipelines/{pipeline_integration_id}/test-runs/deletion-impact":{"get":{"tags":["QualityMate"],"summary":"Get Pipeline Deletion Impact","description":"What deleting every test run of the pipeline removes, the ADO pipeline\nid the confirm asks for, and the refusal's code (or null).","operationId":"get_pipeline_deletion_impact_api_qualitymate_pipelines__pipeline_integration_id__test_runs_deletion_impact_get","parameters":[{"name":"pipeline_integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pipeline Integration Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Pipeline Deletion Impact Api Qualitymate Pipelines  Pipeline Integration Id  Test Runs Deletion Impact Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/qualitymate/pipelines/{pipeline_integration_id}/test-runs":{"delete":{"tags":["QualityMate"],"summary":"Delete Pipeline Test Runs","description":"Hard-delete every test run of the pipeline (history included), their\nconversations, and the pipeline's backfill progress record. 422 when the\nconfirm is not the ADO pipeline id.","operationId":"delete_pipeline_test_runs_api_qualitymate_pipelines__pipeline_integration_id__test_runs_delete","parameters":[{"name":"pipeline_integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pipeline Integration Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteTestRunsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Pipeline Test Runs Api Qualitymate Pipelines  Pipeline Integration Id  Test Runs Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/endpoint-usage/capture-state":{"get":{"tags":["endpoint-usage"],"summary":"Get Capture State","description":"R12, R27, R28. Whether this report's emptiness means anything.\n\nThe screen renders this as the banner above everything else, because reading\na usage figure without knowing whether capture was on is how an endpoint gets\ndeleted for being unused when it was merely unrecorded.","operationId":"get_capture_state_api_endpoint_usage_capture_state_get","parameters":[{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window start (ISO 8601). Defaults to 7 days before the end.","title":"From Date"},"description":"Window start (ISO 8601). Defaults to 7 days before the end."},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window end (ISO 8601). Defaults to now.","title":"To Date"},"description":"Window end (ISO 8601). Defaults to now."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__routes__endpoint_usage__CaptureStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/endpoint-usage/endpoints":{"get":{"tags":["endpoint-usage"],"summary":"Get Endpoint Summary","description":"R10, R24. The Overview table — including endpoints nobody called.\n\nThe zero-count rows are the reason this route exists in this shape: they come\nfrom the served application's own registered-route inventory, because no\naggregate over recorded events can name an endpoint that recorded none\n(KTD27). Public paths, the SPA shell and currently excluded paths are\nsubtracted from that inventory, or they would sit at the top of the dead list\nforever.\n\n**The three facets narrow the whole window, not the page.** Pagination is\nserver-side, so a filter the screen applied to the rows it already holds would\nanswer a smaller question than the one the reader asked: with 137 endpoints\nacross three pages, \"which POST endpoints are unused\" would quietly mean\n\"…among the fifty page 1 happened to contain\". They narrow the never-called\ninventory rows too, and every total in the response describes the filtered\npopulation.\n\n**There is no ``role`` facet, and that is a decision rather than an\nomission.** No row in this table carries roles: an endpoint-summary row is an\naggregate over every caller, and one endpoint is typically called by several\npeople holding different roles. By-role figures come from ``/breakdowns``,\nwhich is a different shape (one entry per role, from a lateral unnest of the\nstamped snapshot), and a role facet here would have to invent a rule — \"any\ncaller held it\"? \"most callers\"? — that the row's own columns could not show.\n\n**There is no ``user`` facet either**, for a different reason: one person's\nendpoints are ``GET /users/{user_email}/endpoints``. That is a reframe of the\ntable around an individual, not a narrowing of this one — it carries the\nsubject's roles, and it writes the audit event KTD30 requires whenever a named\nperson's activity is read. Folding it in here as a query parameter would route\nan audited read through an unaudited endpoint.","operationId":"get_endpoint_summary_api_endpoint_usage_endpoints_get","parameters":[{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window start (ISO 8601).","title":"From Date"},"description":"Window start (ISO 8601)."},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window end (ISO 8601).","title":"To Date"},"description":"Window end (ISO 8601)."},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","description":"Column to sort the endpoint table by. Allowlisted — anything else is a 400, never interpolated. One of: call_count, error_count, last_called_at, method, p95_time_to_headers_ms, path_template.","default":"call_count","title":"Sort By"},"description":"Column to sort the endpoint table by. Allowlisted — anything else is a 400, never interpolated. One of: call_count, error_count, last_called_at, method, p95_time_to_headers_ms, path_template."},{"name":"descending","in":"query","required":false,"schema":{"type":"boolean","description":"Sort descending.","default":true,"title":"Descending"},"description":"Sort descending."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"1-based page number.","default":1,"title":"Page"},"description":"1-based page number."},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Rows per page. Maximum 200.","default":50,"title":"Page Size"},"description":"Rows per page. Maximum 200."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case-insensitive substring of the path template. Matched literally, never as a pattern. Longer than 200 characters is a 400 rather than a silent truncation.","title":"Search"},"description":"Case-insensitive substring of the path template. Matched literally, never as a pattern. Longer than 200 characters is a 400 rather than a silent truncation."},{"name":"method","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact HTTP method, case-insensitive (GET, POST, …).","title":"Method"},"description":"Exact HTTP method, case-insensitive (GET, POST, …)."},{"name":"mate_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The row's TOP Mate — the column the table shows. An endpoint another Mate also called, but less often, is not returned here.","title":"Mate Type"},"description":"The row's TOP Mate — the column the table shows. An endpoint another Mate also called, but less often, is not returned here."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/endpoint-usage/screens":{"get":{"tags":["endpoint-usage"],"summary":"Get Screen Summary","description":"R37, R39, R40, R41. Usage by SCREEN — the other vantage point on one window.\n\nThe mirror of ``/endpoints``: the same rows, grouped by the screen a request\ncame from instead of the endpoint it reached. Both are clean partitions of one\nfact table, so ``total_calls`` here equals ``totals.total_calls`` there for the\nsame window, and the screen counts plus ``no_screen.call_count`` sum to it.\n\n**Not paged, unlike ``/endpoints``.** The screen population is bounded by the\nfrontend's own route declarations — tens of rows — so there is no page to be\non. Paging it would let \"which screens are unused\" quietly mean \"among the\nones this page happens to hold\", which is the misreading this whole feature\nexists to prevent.\n\n**No facets, unlike ``/endpoints``.** That route's ``search``, ``method`` and\n``mate_type`` filter aggregated ENDPOINT rows, and a screen row aggregates over\nmany templates and many verbs, so it has none of those columns to test;\n``mate_type`` there means \"this endpoint's top Mate\", which has no\nscreen-grouped equivalent asking the same question. Offering them here as\nrow-level predicates would answer a different question from the endpoint table\nand the two vantage points would silently disagree — so the facet bar belongs\nto the Endpoints vantage point and reconciliation stays unconditional. This is\nthe same reasoning that keeps ``role`` off ``/endpoints``.\n\n**Screens with no calls are listed** (R41, KTD44), derived from the frontend\nroute allowlist rather than from recorded events, because a screen nobody\nvisited has no rows to be found in. Two caveats belong on screen beside them,\nnot here: a screen is only visible to this report **if it makes an API call**\n(``DashboardsIndex`` renders from context and issues none), and two declared\npatterns can render one screen (``…/mates/tools`` and\n``…/mates/tools/:toolName``), which shows as two rows.\n\nEVERY declared pattern is listed, sign-in screens included. U18 withheld them\non the reasoning that capture never sees an unauthenticated request; the live\nwalkthrough found five authenticated rows on ``/login``, because the session\nbootstrap fires from that screen the instant the cookie is set. See the note\nin ``app.core.frontend_views``.\n\nAggregate, so no audit event (R29, KTD30) — reading one named person is what\ngets recorded.","operationId":"get_screen_summary_api_endpoint_usage_screens_get","parameters":[{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window start (ISO 8601).","title":"From Date"},"description":"Window start (ISO 8601)."},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window end (ISO 8601).","title":"To Date"},"description":"Window end (ISO 8601)."},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","description":"Sort column. One of: call_count, client_view, distinct_endpoints, distinct_users, error_count, last_seen_at, p95_time_to_headers_ms. Anything else is a 400, never a silent default.","default":"call_count","title":"Sort By"},"description":"Sort column. One of: call_count, client_view, distinct_endpoints, distinct_users, error_count, last_seen_at, p95_time_to_headers_ms. Anything else is a 400, never a silent default."},{"name":"sort_dir","in":"query","required":false,"schema":{"type":"string","description":"'asc' or 'desc'.","default":"desc","title":"Sort Dir"},"description":"'asc' or 'desc'."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/endpoint-usage/screen-endpoints":{"get":{"tags":["endpoint-usage"],"summary":"Get Screen Endpoints","description":"R38, KTD42. The endpoints one screen called — a partition of that screen.\n\nThe children sum to ``parent_call_count``, and that figure equals the screen's\nrow in ``/screens`` for the same window. Both are asserted (KTD45).\n\n**``no_screen`` is an explicit flag, not an absent parameter.** Letting a\nmissing ``client_view`` mean \"the screenless category\" would be tidy and would\nalso turn a caller's forgotten parameter into a confident wrong answer about a\ndifferent population. Passing neither is a 400, and so is passing both.\n\nAn unvisited screen returns zero and no children rather than a 404: a\nzero-count row is expandable, it simply has nothing under it, and 404ing would\nmake those rows behave differently from every other row in the table.","operationId":"get_screen_endpoints_api_endpoint_usage_screen_endpoints_get","parameters":[{"name":"client_view","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The screen to expand, as a frontend route pattern. Omit it and pass no_screen=true for the screenless category. Exactly one of the two.","title":"Client View"},"description":"The screen to expand, as a frontend route pattern. Omit it and pass no_screen=true for the screenless category. Exactly one of the two."},{"name":"no_screen","in":"query","required":false,"schema":{"type":"boolean","description":"Expand the screenless category (non-browser and background traffic) instead of a named screen.","default":false,"title":"No Screen"},"description":"Expand the screenless category (non-browser and background traffic) instead of a named screen."},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window start (ISO 8601).","title":"From Date"},"description":"Window start (ISO 8601)."},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window end (ISO 8601).","title":"To Date"},"description":"Window end (ISO 8601)."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenEndpointDrilldownResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/endpoint-usage/endpoint-screens":{"get":{"tags":["endpoint-usage"],"summary":"Get Endpoint Screens","description":"R38, KTD42. The screens that called one endpoint — the other direction.\n\nBoth ``path_template`` and ``method`` are required, because that pair is what\nthe endpoint table calls one endpoint: ``GET /api/audit/events`` and\n``POST /api/audit/events`` are two rows there, so a drill-down keyed on the\ntemplate alone would sum to a parent no row displays.\n\nOne child may carry ``client_view: null`` — this endpoint's screenless share.\n\nA separate route from ``/screen-endpoints`` rather than one read whose caller\nnames the grouping column: the two are symmetric, and collapsing them is how a\ncaller-supplied string reaches a ``GROUP BY``.","operationId":"get_endpoint_screens_api_endpoint_usage_endpoint_screens_get","parameters":[{"name":"path_template","in":"query","required":true,"schema":{"type":"string","description":"The endpoint's route TEMPLATE, as the report displays it.","title":"Path Template"},"description":"The endpoint's route TEMPLATE, as the report displays it."},{"name":"method","in":"query","required":true,"schema":{"type":"string","description":"The endpoint's HTTP method.","title":"Method"},"description":"The endpoint's HTTP method."},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window start (ISO 8601).","title":"From Date"},"description":"Window start (ISO 8601)."},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window end (ISO 8601).","title":"To Date"},"description":"Window end (ISO 8601)."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointScreenDrilldownResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/endpoint-usage/breakdowns":{"get":{"tags":["endpoint-usage"],"summary":"Get Breakdowns","description":"R10, R34. Most-called, and calls by Mate, by role and by view.\n\nServed together because the charts sit side by side describing one window;\nfetching them separately would let the screen render one chart's window\nbeside another's.\n\n**The by-view chart shows named screens only** (R35). A call that recorded no\nview is not a screen that made it, so it is not an entry — its volume arrives\nas ``no_view_call_count``/``no_view_share`` instead, which is what lets the\nscreen say \"of the calls that named a screen\" rather than implying the chart\naccounts for the whole window. ``total_call_count`` here is the same figure\n``/endpoints`` reports as ``totals.total_calls`` for the same window, so the\ntwo views can be reconciled.","operationId":"get_breakdowns_api_endpoint_usage_breakdowns_get","parameters":[{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window start (ISO 8601).","title":"From Date"},"description":"Window start (ISO 8601)."},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window end (ISO 8601).","title":"To Date"},"description":"Window end (ISO 8601)."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/endpoint-usage/trends":{"get":{"tags":["endpoint-usage"],"summary":"Get Trends","description":"R19, KTD21, KTD25. How call volume and p95 move across the window.\n\nBucket width follows the window LENGTH (KTD25): the ladder reaches below a day,\nbecause the shortest window this report supports is one hour and an hourly\nbucket renders it as a single point — the summary figure drawn as a chart.\n\nVolume, latency and the per-endpoint series arrive together for the reason\n``/breakdowns`` serves three charts together: they sit stacked on one screen\ndescribing one window, and fetching them separately would let one chart's x\naxis disagree with another's.","operationId":"get_trends_api_endpoint_usage_trends_get","parameters":[{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window start (ISO 8601).","title":"From Date"},"description":"Window start (ISO 8601)."},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window end (ISO 8601).","title":"To Date"},"description":"Window end (ISO 8601)."},{"name":"endpoint","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Endpoint to draw its own series for, as 'METHOD /path/template' — the same spelling /breakdowns returns. Repeatable. Anything else is a 400: a typo answered with an empty line reads as 'nobody called it'. At most 15 are drawn and the rest are named in 'dropped_series'.","title":"Endpoint"},"description":"Endpoint to draw its own series for, as 'METHOD /path/template' — the same spelling /breakdowns returns. Repeatable. Anything else is a 400: a typo answered with an empty line reads as 'nobody called it'. At most 15 are drawn and the rest are named in 'dropped_series'."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrendsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/endpoint-usage/users":{"get":{"tags":["endpoint-usage"],"summary":"Get Heaviest Callers","description":"R18, AE18. The heaviest callers, so a person can be found without a name.\n\nThis route exists because the per-user views were otherwise a dead end: you had\nto already know whose activity you wanted. It writes NO audit event — unlike the\ntwo routes below it, which name an individual (KTD30). This one displays\nidentities but names nobody in particular, and auditing fifty subjects per page\nwould bury the targeted lookups the trail exists to make findable.","operationId":"get_heaviest_callers_api_endpoint_usage_users_get","parameters":[{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window start (ISO 8601).","title":"From Date"},"description":"Window start (ISO 8601)."},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window end (ISO 8601).","title":"To Date"},"description":"Window end (ISO 8601)."},{"name":"descending","in":"query","required":false,"schema":{"type":"boolean","description":"Heaviest first. False surfaces the lightest callers.","default":true,"title":"Descending"},"description":"Heaviest first. False surfaces the lightest callers."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"1-based page number.","default":1,"title":"Page"},"description":"1-based page number."},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Callers per page. Maximum 200.","default":50,"title":"Page Size"},"description":"Callers per page. Maximum 200."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeaviestCallersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/endpoint-usage/users/{user_email}/endpoints":{"get":{"tags":["endpoint-usage"],"summary":"Get User Endpoints","description":"R17, R29. The Overview table reframed to one person — and audited.\n\nNamed individual, so it writes the audit event for the same reason the sequence\ndoes (KTD30), with ``viewer_email`` a required service argument so a forgetful\ncaller cannot skip the trail.\n\nUnpaged: the row count is bounded by the number of endpoints the application\nregisters, not by the person's request volume.","operationId":"get_user_endpoints_api_endpoint_usage_users__user_email__endpoints_get","parameters":[{"name":"user_email","in":"path","required":true,"schema":{"type":"string","title":"User Email"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window start (ISO 8601).","title":"From Date"},"description":"Window start (ISO 8601)."},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window end (ISO 8601).","title":"To Date"},"description":"Window end (ISO 8601)."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserEndpointSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/endpoint-usage/users/{user_email}/screens":{"get":{"tags":["endpoint-usage"],"summary":"Get User Screens","description":"R42, R29. Which screens one person used — and audited, because it names them.\n\nThe aggregate counterpart to that person's sequence episodes. The two agree as\na SUBSET: every screen the visible episodes show appears here. Not equality —\nthe sequence pages and builds its episodes from the page's rows while this\ndescribes the whole window, so past page one this list is strictly larger.\n\nIts own audit event type, not the endpoints one: \"who looked at whose screens\"\nand \"who looked at whose endpoints\" are different questions, and one event type\nanswering both makes neither answerable.\n\nUnpaged, like the per-user endpoint summary and for the same reason — the row\ncount is bounded by the screens that exist, not by the person's traffic.","operationId":"get_user_screens_api_endpoint_usage_users__user_email__screens_get","parameters":[{"name":"user_email","in":"path","required":true,"schema":{"type":"string","title":"User Email"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window start (ISO 8601).","title":"From Date"},"description":"Window start (ISO 8601)."},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window end (ISO 8601).","title":"To Date"},"description":"Window end (ISO 8601)."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserScreenSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/endpoint-usage/users/{user_email}/screen-endpoints":{"get":{"tags":["endpoint-usage"],"summary":"Get User Screen Endpoints","description":"R38, R42. What one screen called for one person — and audited.\n\nThe same explicit-flag contract as `/screen-endpoints`: a missing\n``client_view`` is a 400, never a silent \"the screenless category\", because a\nforgotten parameter must not become a confident answer about a different\npopulation.","operationId":"get_user_screen_endpoints_api_endpoint_usage_users__user_email__screen_endpoints_get","parameters":[{"name":"user_email","in":"path","required":true,"schema":{"type":"string","title":"User Email"}},{"name":"client_view","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The screen's route PATTERN, exactly as `/users/{user_email}/screens` returned it. Omit and pass no_screen=true for their screenless traffic.","title":"Client View"},"description":"The screen's route PATTERN, exactly as `/users/{user_email}/screens` returned it. Omit and pass no_screen=true for their screenless traffic."},{"name":"no_screen","in":"query","required":false,"schema":{"type":"boolean","description":"Expand this person's screenless traffic. Mutually exclusive with client_view; passing neither is a 400.","default":false,"title":"No Screen"},"description":"Expand this person's screenless traffic. Mutually exclusive with client_view; passing neither is a 400."},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window start (ISO 8601).","title":"From Date"},"description":"Window start (ISO 8601)."},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window end (ISO 8601).","title":"To Date"},"description":"Window end (ISO 8601)."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenEndpointDrilldownResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/endpoint-usage/users/{user_email}/sequence":{"get":{"tags":["endpoint-usage"],"summary":"Get User Sequence","description":"R11, R29. One named person's ordered calls, and an audit trail of the read.\n\nThis is the one route on the router that names an individual, so it is the one\nroute that writes an audit event — naming the viewer AND the subject (KTD30).\nWithout it the platform could answer what a person did but not who has been\nwatching them. The service takes ``viewer_email`` as a required argument, so\nthe trail cannot be skipped by a caller that forgets it.\n\nPaged, and the page states the window's TRUE total: the heaviest caller makes\nthousands of calls a week, and a dialog that quietly showed the first hundred\nwould misrepresent the person's activity.\n\n**``view_groups`` describes the same entries as episodes** (R33, KTD37): runs\nof consecutive calls from one screen, in the order they happened. A return to\nan earlier screen is a new group. Because the runs are computed over the page\nand a run does not stop at a page boundary, a straddling run is emitted on\nboth pages with ``continues_on_next_page``/``continues_previous_page`` set —\nwithout those flags a page break would be indistinguishable from a genuine\nreturn visit.","operationId":"get_user_sequence_api_endpoint_usage_users__user_email__sequence_get","parameters":[{"name":"user_email","in":"path","required":true,"schema":{"type":"string","title":"User Email"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window start (ISO 8601).","title":"From Date"},"description":"Window start (ISO 8601)."},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window end (ISO 8601).","title":"To Date"},"description":"Window end (ISO 8601)."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"1-based page number.","default":1,"title":"Page"},"description":"1-based page number."},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Calls per page. Maximum 200.","default":100,"title":"Page Size"},"description":"Calls per page. Maximum 200."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSequenceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sdlc-delivery/dashboard":{"get":{"tags":["sdlc-delivery"],"summary":"Get Sdlc Delivery Dashboard","description":"All three views over one window of the ``sdlc_delivery`` ledger.\n\nAn empty cohort is a 200 carrying the no-data state, never a 404: a window\nwith nothing in it is an answer about that window (R19, AE10).","operationId":"get_sdlc_delivery_dashboard_api_sdlc_delivery_dashboard_get","parameters":[{"name":"preset_days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"A preset window in days — one of 15, 30, 60, 90. Ignored when an explicit range is given.","title":"Preset Days"},"description":"A preset window in days — one of 15, 30, 60, 90. Ignored when an explicit range is given."},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"First day to include (inclusive), with end_date.","title":"Start Date"},"description":"First day to include (inclusive), with end_date."},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Last day to include (inclusive), with start_date.","title":"End Date"},"description":"Last day to include (inclusive), with start_date."},{"name":"product_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Scope every figure to one product — its UUID, or the literal 'unassigned' for the workflows that have no product. Omit for all products. Typed as a string rather than a UUID because the column is nullable and a UUID cannot express the unassigned bucket.","title":"Product Id"},"description":"Scope every figure to one product — its UUID, or the literal 'unassigned' for the workflows that have no product. Omit for all products. Typed as a string rather than a UUID because the column is nullable and a UUID cannot express the unassigned bucket."},{"name":"path","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Scope every view to one delivery path (PDLC-0 R19): 'all' (default), 'prd' or 'ticket'.","title":"Path"},"description":"Scope every view to one delivery path (PDLC-0 R19): 'all' (default), 'prd' or 'ticket'."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdlcDeliveryDashboardPayload"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sdlc-board-numbers":{"get":{"tags":["sdlc-board-numbers"],"summary":"Get Board Numbers","description":"The cached board numbers for one range and project.\n\nNever waits on Snowflake: when the cache is due a read is scheduled in the\nbackground and ``state`` says so (KTD4).","operationId":"get_board_numbers_api_sdlc_board_numbers_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"First day to include (inclusive), with end_date.","title":"Start Date"},"description":"First day to include (inclusive), with end_date."},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Last day to include (inclusive), with start_date.","title":"End Date"},"description":"Last day to include (inclusive), with start_date."},{"name":"project","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"One project key from project_options. Omit for every PRD project except GTP2.","title":"Project"},"description":"One project key from project_options. Omit for every PRD project except GTP2."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoardNumbersPayload"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sdlc-board-numbers/refresh":{"post":{"tags":["sdlc-board-numbers"],"summary":"Refresh Board Numbers","description":"Start a read now, past the TTL and failure backoff, not the lock or floor.\n\n``started`` is False when a read is already running (that one carries on),\nor when the newest read finished within the refresh floor (GAIT-601).","operationId":"refresh_board_numbers_api_sdlc_board_numbers_refresh_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sdlc-board-numbers/copies":{"post":{"tags":["sdlc-board-numbers"],"summary":"Record Board Numbers Copy","description":"Record which read a Copy slide numbers came from, pinning it (KTD19).","operationId":"record_board_numbers_copy_api_sdlc_board_numbers_copies_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sdlc-engineering-metrics":{"get":{"tags":["sdlc-engineering-metrics"],"summary":"Get Engineering Metrics","description":"The cached figures for one window and scope.\n\nNever waits on Snowflake: when the cache is due a read is scheduled in the\nbackground and ``state`` says so (KTD1).","operationId":"get_engineering_metrics_api_sdlc_engineering_metrics_get","parameters":[{"name":"preset_days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"A preset window in days, including today — one of 30, 60, 90. Ignored when a custom range is given; the default is 30.","title":"Preset Days"},"description":"A preset window in days, including today — one of 30, 60, 90. Ignored when a custom range is given; the default is 30."},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"First day to include (inclusive), with end_date. No earlier than 2025-01-01.","title":"Start Date"},"description":"First day to include (inclusive), with end_date. No earlier than 2025-01-01."},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Last day to include (inclusive), with start_date.","title":"End Date"},"description":"Last day to include (inclusive), with start_date."},{"name":"line_of_business","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"One line of business from options. Omit for All.","title":"Line Of Business"},"description":"One line of business from options. Omit for All."},{"name":"reporting_group","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"One reporting group from options, within line_of_business when one is given. Omit for All.","title":"Reporting Group"},"description":"One reporting group from options, within line_of_business when one is given. Omit for All."},{"name":"product_family","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"One product family from options, within reporting_group, else line_of_business, when one is given. Omit for All.","title":"Product Family"},"description":"One product family from options, within reporting_group, else line_of_business, when one is given. Omit for All."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngineeringMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sdlc-engineering-metrics/refresh":{"post":{"tags":["sdlc-engineering-metrics"],"summary":"Refresh Engineering Metrics","description":"Start a read now, bypassing the TTL and failure backoff, not the floor.\n\n``started`` is False when a read is running (that one carries on), or the\nnewest read finished within the refresh floor (KTD13).","operationId":"refresh_engineering_metrics_api_sdlc_engineering_metrics_refresh_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngineeringMetricsRefreshResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sdlc-individual-usage":{"get":{"tags":["sdlc-individual-usage"],"summary":"Get Individual Usage","description":"Per-person weekly activity and PR share for the trailing weeks.","operationId":"get_individual_usage_api_sdlc_individual_usage_get","parameters":[{"name":"weeks","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Trailing weeks, including the current one — one of 4, 8, 12. The default is 8.","title":"Weeks"},"description":"Trailing weeks, including the current one — one of 4, 8, 12. The default is 8."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndividualUsagePayload"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/argo-usage/dashboard":{"get":{"tags":["argo-usage"],"summary":"Get Argo Usage Dashboard","description":"Every tab over one window. An empty window is a 200, never a 404.","operationId":"get_argo_usage_dashboard_api_argo_usage_dashboard_get","parameters":[{"name":"preset_days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"A preset window in days — one of 7, 30, 90. Ignored when an explicit range is given.","title":"Preset Days"},"description":"A preset window in days — one of 7, 30, 90. Ignored when an explicit range is given."},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"First day to include (inclusive), with end_date.","title":"Start Date"},"description":"First day to include (inclusive), with end_date."},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Last day to include (inclusive), with start_date.","title":"End Date"},"description":"Last day to include (inclusive), with start_date."},{"name":"mate_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Scope the Adoption tab to one agent, by its key; Autonomous work and Work done ignore it.","title":"Mate Type"},"description":"Scope the Adoption tab to one agent, by its key; Autonomous work and Work done ignore it."},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Scope every attributable section of all three tabs to one active team.","title":"Team Id"},"description":"Scope every attributable section of all three tabs to one active team."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArgoUsageDashboardPayload"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/endpoint-usage/exclusions":{"post":{"tags":["endpoint-usage-admin"],"summary":"Add Excluded Path","description":"R4, R15, R20. Stop recording a path, in this worker immediately.\n\nExcluding stops FUTURE recording only. Historical rows stay and the endpoint\nkeeps its row in the report — nothing here deletes evidence, it stops\ncollecting more.","operationId":"add_excluded_path_api_endpoint_usage_exclusions_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExclusionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExclusionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["endpoint-usage-admin"],"summary":"Remove Excluded Path","description":"R4, R20. Start recording a path again.\n\nValidated identically to the add: an entry that could never have been stored\nby this API is refused rather than searched for.","operationId":"remove_excluded_path_api_endpoint_usage_exclusions_delete","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"The excluded path to start recording again. A query parameter rather than a path segment because the value is itself a path and contains '/' and '{}'.","title":"Path"},"description":"The excluded path to start recording again. A query parameter rather than a path segment because the value is itself a path and contains '/' and '{}'."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExclusionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/feedback/messages/{message_id}":{"put":{"tags":["feedback"],"summary":"Upsert Feedback","description":"Submit or update feedback on an assistant message.","operationId":"upsert_feedback_api_feedback_messages__message_id__put","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackUpsertRequest"}}}},"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"}}}}}},"delete":{"tags":["feedback"],"summary":"Delete Feedback","description":"Remove feedback from a message (un-vote).","operationId":"delete_feedback_api_feedback_messages__message_id__delete","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/feedback/conversations/{conversation_id}":{"get":{"tags":["feedback"],"summary":"Get Conversation Feedback","description":"Get all feedback for a conversation (current user only).","operationId":"get_conversation_feedback_api_feedback_conversations__conversation_id__get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationFeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/feedback":{"get":{"tags":["feedback"],"summary":"List Feedback","description":"List all feedback with filtering and pagination (admin).","operationId":"list_feedback_api_feedback_get","parameters":[{"name":"sentiment","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sentiment"}},{"name":"mate_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mate Type"}},{"name":"user_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"}},{"name":"has_comment","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Comment"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","default":"created_at","title":"Sort By"}},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Sort Order"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/feedback/conversations/{conversation_id}/messages":{"get":{"tags":["feedback"],"summary":"Get Conversation Messages","description":"Get conversation messages for admin feedback context view.","operationId":"get_conversation_messages_api_feedback_conversations__conversation_id__messages_get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/feedback/stats":{"get":{"tags":["feedback"],"summary":"Get Feedback Stats","description":"Get aggregate feedback statistics (admin).","operationId":"get_feedback_stats_api_feedback_stats_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduler/job-types":{"get":{"tags":["Scheduler"],"summary":"List Job Types","description":"List all registered job types (for the create-job form dropdown).","operationId":"list_job_types_api_scheduler_job_types_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JobTypeResponse"},"title":"Response List Job Types Api Scheduler Job Types Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduler/cron/preview":{"post":{"tags":["Scheduler"],"summary":"Preview Cron","description":"Resolve a cron expression to its next fire times, for the create/edit form.\n\nStateless — reads nothing and writes nothing, so it sits at the same `view`\nfloor as the job-type list rather than requiring `manage`; previewing a\nschedule is not editing one.","operationId":"preview_cron_api_scheduler_cron_preview_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CronPreviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CronPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduler/jobs":{"get":{"tags":["Scheduler"],"summary":"List Jobs","description":"List all scheduled jobs with optional filters.","operationId":"list_jobs_api_scheduler_jobs_get","parameters":[{"name":"job_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Type"}},{"name":"enabled","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScheduledJobResponse"},"title":"Response List Jobs Api Scheduler Jobs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Scheduler"],"summary":"Create Job","description":"Create a new scheduled job.","operationId":"create_job_api_scheduler_jobs_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateJobRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduler/jobs/{job_id}":{"get":{"tags":["Scheduler"],"summary":"Get Job","description":"Get a single scheduled job by ID.","operationId":"get_job_api_scheduler_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Scheduler"],"summary":"Update Job","description":"Update a scheduled job. Recalculates next_run_at if cron changes.","operationId":"update_job_api_scheduler_jobs__job_id__put","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateJobRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Scheduler"],"summary":"Delete Job","description":"Delete a scheduled job and all its execution history.","operationId":"delete_job_api_scheduler_jobs__job_id__delete","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduler/jobs/{job_id}/trigger":{"post":{"tags":["Scheduler"],"summary":"Trigger Job","description":"Manually trigger a job. Returns 409 if job already has an active execution.","operationId":"trigger_job_api_scheduler_jobs__job_id__trigger_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerJobRequest","default":{"full_run":false}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobExecutionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduler/jobs/{job_id}/executions/{execution_id}/cancel":{"post":{"tags":["Scheduler"],"summary":"Cancel Execution","description":"Cancel a pending or running execution.","operationId":"cancel_execution_api_scheduler_jobs__job_id__executions__execution_id__cancel_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Execution Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobExecutionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduler/jobs/{job_id}/executions/{execution_id}":{"delete":{"tags":["Scheduler"],"summary":"Delete Execution","description":"Delete a single non-active execution from a job.","operationId":"delete_execution_api_scheduler_jobs__job_id__executions__execution_id__delete","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Execution Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduler/jobs/{job_id}/executions":{"delete":{"tags":["Scheduler"],"summary":"Clear Execution History","description":"Delete all non-active executions for a job and return deleted count.","operationId":"clear_execution_history_api_scheduler_jobs__job_id__executions_delete","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Scheduler"],"summary":"List Executions","description":"List execution history for a job with pagination.","operationId":"list_executions_api_scheduler_jobs__job_id__executions_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"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"}],"title":"Before"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobExecutionsListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduler/executions/{execution_id}":{"get":{"tags":["Scheduler"],"summary":"Get Execution","description":"Fetch a single execution plus its job's name/type.\n\nBacks the job-notification email deep link (GAIT-203, path shape updated\nin GAIT-257): the email links to ``/execution/<id>`` (or, for\nalready-sent emails, the legacy ``?execution=<id>``) and the frontend\nfetches this to open the log viewer. Gated on ``scheduler:jobs:view`` — a\nforwarded link never exposes run detail to an unauthorized visitor.","operationId":"get_execution_api_scheduler_executions__execution_id__get","parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Execution Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduler/executions/{execution_id}/logs":{"get":{"tags":["Scheduler"],"summary":"Get Execution Logs","description":"Fetch log entries for an execution. Use after_id for incremental polling.","operationId":"get_execution_logs_api_scheduler_executions__execution_id__logs_get","parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Execution Id"}},{"name":"after_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Return entries after this log ID (for incremental polling)","title":"After Id"},"description":"Return entries after this log ID (for incremental polling)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionLogsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/indexing/sources":{"get":{"tags":["Indexing"],"summary":"List Index Sources","description":"List all index sources with optional filters.","operationId":"list_index_sources_api_indexing_sources_get","parameters":[{"name":"source_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Type"}},{"name":"product_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Id"}},{"name":"enabled","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexSourceListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Indexing"],"summary":"Create Index Source","description":"Create a new index source.","operationId":"create_index_source_api_indexing_sources_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIndexSourceRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexSourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/indexing/sources/{source_id}":{"get":{"tags":["Indexing"],"summary":"Get Index Source","description":"Get a single index source by ID.","operationId":"get_index_source_api_indexing_sources__source_id__get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexSourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Indexing"],"summary":"Update Index Source","description":"Update an existing index source.","operationId":"update_index_source_api_indexing_sources__source_id__put","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIndexSourceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexSourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Indexing"],"summary":"Delete Index Source","description":"Delete an index source.","operationId":"delete_index_source_api_indexing_sources__source_id__delete","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/indexing/status":{"get":{"tags":["Indexing"],"summary":"Get Indexing Status","description":"Overview of all index sources and the last indexer run.","operationId":"get_indexing_status_api_indexing_status_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexingStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/indexing/reindex":{"post":{"tags":["Indexing"],"summary":"Trigger Reindex","description":"Trigger a re-index run. Detects the appropriate indexer job based on source type.","operationId":"trigger_reindex_api_indexing_reindex_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReindexRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReindexResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/indexing/sharepoint/drives":{"post":{"tags":["Indexing"],"summary":"List Sharepoint Drives","description":"List document libraries for a SharePoint site (Graph discovery for admin UI).","operationId":"list_sharepoint_drives_api_indexing_sharepoint_drives_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharePointDrivesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharePointDrivesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/indexing/sharepoint/preview":{"post":{"tags":["Indexing"],"summary":"Preview Sharepoint Indexing","description":"Extract, download, and chunk SharePoint files without pushing to Azure Search.","operationId":"preview_sharepoint_indexing_api_indexing_sharepoint_preview_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharePointPreviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharePointPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/indexing/documents":{"get":{"tags":["Indexing"],"summary":"List Indexed Documents","description":"List indexed documents with filtering, pagination, and sorting.","operationId":"list_indexed_documents_api_indexing_documents_get","parameters":[{"name":"source_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","default":"last_indexed_at","title":"Sort By"}},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Sort Order"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexedDocumentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/indexing/documents/stats":{"get":{"tags":["Indexing"],"summary":"Get Document Stats","description":"Aggregate stats for indexed documents by status and source.","operationId":"get_document_stats_api_indexing_documents_stats_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexedDocumentStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/indexing/telemetry":{"get":{"tags":["Indexing"],"summary":"List Search Telemetry","description":"List search telemetry events with filtering, pagination, and sorting.","operationId":"list_search_telemetry_api_indexing_telemetry_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"user_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Success"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":25,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","default":"created_at","title":"Sort By"}},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Sort Order"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchTelemetryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/indexing/telemetry/stats":{"get":{"tags":["Indexing"],"summary":"Get Telemetry Stats","description":"Aggregate stats for search telemetry.","operationId":"get_telemetry_stats_api_indexing_telemetry_stats_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchTelemetryStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/indexing/telemetry/{telemetry_id}":{"get":{"tags":["Indexing"],"summary":"Get Telemetry Event","description":"Get a single search telemetry event with full results_detail.","operationId":"get_telemetry_event_api_indexing_telemetry__telemetry_id__get","parameters":[{"name":"telemetry_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Telemetry Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchTelemetryEventResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-catalog":{"get":{"tags":["Repo Catalog"],"summary":"List Repo Catalog","description":"Paginated catalog list. Repo ownership/props are discoverable directory\ndata, so every ``repo:catalog:view`` holder sees the full field set (R6/KTD-8).","operationId":"list_repo_catalog_api_repo_catalog_get","parameters":[{"name":"outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"}},{"name":"github_org","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Org"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"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"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-catalog/github-teams":{"get":{"tags":["Repo Catalog"],"summary":"List Github Teams","description":"Live-fetch the picker's team list, with a runtime kill switch and a\npersisted-table fallback (GAIT-482 U5).\n\n``repo_catalog.github_teams_live_lookup_enabled`` (KTD7) gates whether\nthis ever attempts the GitHub call at all. When it does, KTD3's 5s\nceiling only bounds how long the route WAITS -- ``run_in_threadpool``\ndispatches the underlying blocking call off the event loop first, since\na bare ``asyncio.wait_for`` around a synchronous call would not\notherwise preempt it. The dispatched thread may still outlive that 5s\nwait (Python threads cannot be forcibly cancelled), so the underlying\nper-page REST timeout is also tightened to\n``_GITHUB_TEAMS_LIVE_LOOKUP_PAGE_TIMEOUT`` (well under the shared 30s\n``github_rest`` default) to shrink how long an abandoned thread can run\n-- this bounds each page, not the full paginated call, so a very\nmany-page org could still exceed 5s in the worst case. A late result is\nsimply discarded, never awaited further.","operationId":"list_github_teams_api_repo_catalog_github_teams_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubTeamsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-catalog/lifecycle-defaults":{"get":{"tags":["Repo Catalog"],"summary":"Get Repo Catalog Lifecycle Defaults","description":"Create-repo defaults derived from repo_catalog SystemConfig (e.g. archive exception date).","operationId":"get_repo_catalog_lifecycle_defaults_api_repo_catalog_lifecycle_defaults_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoCatalogLifecycleDefaultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-catalog/orgs/{github_org}/custom-property-schema":{"get":{"tags":["Repo Catalog"],"summary":"Get Org Custom Property Schema","description":"Org-level custom property definitions for Repo Manager (one row per github_org).\n\nPopulated by repo_catalog_sync pre-step; optional live refresh when cache is empty.","operationId":"get_org_custom_property_schema_api_repo_catalog_orgs__github_org__custom_property_schema_get","parameters":[{"name":"github_org","in":"path","required":true,"schema":{"type":"string","title":"Github Org"}},{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","description":"Fetch live from GitHub when cache is empty","default":false,"title":"Refresh"},"description":"Fetch live from GitHub when cache is empty"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgCustomPropertySchemaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-catalog/catalog-teams":{"get":{"tags":["Repo Catalog"],"summary":"List Catalog Teams","operationId":"list_catalog_teams_api_repo_catalog_catalog_teams_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubTeamsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-catalog/team-suggestions":{"get":{"tags":["Repo Catalog"],"summary":"Team Suggestions","operationId":"team_suggestions_api_repo_catalog_team_suggestions_get","parameters":[{"name":"repo_name","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Repo Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamSuggestionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-catalog/reference-data/snapshots":{"get":{"tags":["Repo Catalog"],"summary":"Get Reference Data Snapshots","operationId":"get_reference_data_snapshots_api_repo_catalog_reference_data_snapshots_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceSnapshotsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-catalog/product-hierarchy/options":{"get":{"tags":["Repo Catalog"],"summary":"List Product Hierarchy Options","operationId":"list_product_hierarchy_options_api_repo_catalog_product_hierarchy_options_get","parameters":[{"name":"field","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Field"}},{"name":"product_family","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Family"}},{"name":"line_of_business","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line Of Business"}},{"name":"disable_restrictions","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Disable Restrictions"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LookupOptionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-catalog/property-suggestions/{logical_key}":{"get":{"tags":["Repo Catalog"],"summary":"List Custom Property Suggestions","operationId":"list_custom_property_suggestions_api_repo_catalog_property_suggestions__logical_key__get","parameters":[{"name":"logical_key","in":"path","required":true,"schema":{"type":"string","title":"Logical Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LookupOptionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-catalog/repos":{"post":{"tags":["Repo Catalog"],"summary":"Create Repo","description":"Create a repository through the one shared write path (GAIT-547 KTD11).\n\n``repository_writes.create_repository`` carries the validation, the\nexemption-date clamping, the GitHub create, the catalog ingest, the owner\nnotification and the audit row; the ``create_repository`` agent tool calls\nthe same function, so chat and this button make the same repository. It is\nsynchronous, so it runs in a worker thread as each GitHub call here did.","operationId":"create_repo_api_repo_catalog_repos_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRepoRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoMutationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-catalog/repos/ingest":{"post":{"tags":["Repo Catalog"],"summary":"Retry Repo Ingest","operationId":"retry_repo_ingest_api_repo_catalog_repos_ingest_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestRetryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoMutationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-catalog/repos/{catalog_id}":{"patch":{"tags":["Repo Catalog"],"summary":"Update Repo","operationId":"update_repo_api_repo_catalog_repos__catalog_id__patch","parameters":[{"name":"catalog_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Catalog Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRepoRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoMutationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-catalog/repo-owner-default":{"get":{"tags":["Repo Catalog"],"summary":"Get Repo Owner Default","description":"The create form's default repo-owner email (GAIT-174).\n\nAny authenticated caller: this is about the caller's own identity, not repo\ndata. The form pre-fills the owner with ``email`` and leaves the field\neditable — a member may name a colleague as the owner of a repo they are\ncreating for them. Validity of whatever they name is enforced on write, not\nhere.","operationId":"get_repo_owner_default_api_repo_catalog_repo_owner_default_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoOwnerDefaultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-catalog/{catalog_id}":{"get":{"tags":["Repo Catalog"],"summary":"Get Repo Catalog Detail","operationId":"get_repo_catalog_detail_api_repo_catalog__catalog_id__get","parameters":[{"name":"catalog_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Catalog Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogRowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-catalog/sync":{"post":{"tags":["Repo Catalog"],"summary":"Trigger Repo Catalog Sync","description":"Trigger the repo_catalog_sync_all_orgs scheduled job (merged live+archive\ncatalog refresh, GAIT-447 U11). Refuses a disabled row rather than running\nit — enforced by ``SchedulerService.trigger_job`` itself, not here.","operationId":"trigger_repo_catalog_sync_api_repo_catalog_sync_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-catalog/inactivity-check/trigger":{"post":{"tags":["Repo Catalog"],"summary":"Trigger Repo Catalog Inactivity Check","description":"Force-run the repo_catalog_inactivity_check scheduled job (detection scan).\n\nMirrors the repo_catalog_sync trigger: enqueues the job via\n``SchedulerService.trigger_job`` (single-flight enforced there) and returns\nthe ``execution_id`` for the live-log viewer. Dispatch is async — the caller\ndoes not block on job completion (HTTP 202).\n\nAccepts an OPTIONAL body with a per-run ``threshold_days`` / ``time_unit``\noverride, forwarded verbatim as ``config_override`` (only the provided keys)\nso the scan simulates a shorter window. No body => no override => the scan\nuses the site-wide config.","operationId":"trigger_repo_catalog_inactivity_check_api_repo_catalog_inactivity_check_trigger_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InactivityCheckTriggerRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-archive-preview/report":{"post":{"tags":["repo-archive-preview"],"summary":"Run Report","description":"Run the archive-outreach report and return its grouped structure.\n\nReads the LOCAL repo catalog: ``build_outreach_report`` READS the persisted\n``outcome`` flag set by the inactivity scan and makes NO GitHub calls, no\nstaleness recompute, and no catalog mutation. Run the inactivity check first\nso the flags are current. The method is **POST** by convention; it takes no\nthreshold body. Any body is ignored (the endpoint does NOT 422 on an\nunexpected body, tolerating a transient frontend mismatch).\n\nReturns a discriminated payload so the UI can render R11's states without\nguessing (all three are HTTP 200 except a genuine failure, which surfaces as\nthe framework's 500):\n\n* ``{\"state\": \"below_floor\", \"count\": N, \"floor\": M}`` -- the directory has\n  too few active members to resolve owners safely (R21). Surfaced as an\n  explicit state, NOT a 500, so the preview reproduces exactly the abort the\n  scheduled job hits; the two consumers must not diverge.\n* ``{\"state\": \"ok\", \"report\": {...}}`` -- the report ran. A report whose\n  ``total_due`` is 0 (no owner groups, no escalation) is the *empty* case;\n  the client renders R11's empty state from ``total_due == 0``. Zero-due is\n  NOT an error.\n* a genuine pipeline failure is left to raise (HTTP 500). Below-floor is not\n  an error and zero-due is not an error -- only an unexpected exception is.\n\nThe ``report`` payload carries the live escalation address\n(``escalation_address``, from the R6 config key) and, when present, the ops\n``escalation_group`` -- both surfaced from the shared builder, never\nhardcoded here.","operationId":"run_report_api_repo_archive_preview_report_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Run Report Api Repo Archive Preview Report Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-archive-preview/notify":{"post":{"tags":["repo-archive-preview"],"summary":"Notify","description":"Send a real archive-outreach email for a checked subset of one owner group.\n\nOrdering of guards is deliberate:\n\n1. **R15 send gate FIRST.** If :func:`outreach_real_send_allowed` is ``False``\n   (non-prod with the per-job toggle off) the request is rejected 409 with the\n   R16 message -- no rows are loaded, no send happens.\n2. **Empty selection** -> 400, no send.\n3. **Load + org-scope** the checked rows: every ``repo_id`` must exist AND\n   belong to the active org, or the request is 404. This is the org boundary;\n   the recipient boundary is step 4.\n4. **Re-derive the recipient server-side.** Each row's owner is resolved via\n   :func:`resolve_owner_email`. The request's ``owner_key``/``is_escalation``\n   are advisory only; the destination comes ONLY from the re-derivation, so a\n   tampered request cannot redirect a real email. The checked rows must form a\n   single coherent group -- all escalation, or all resolving to the *same*\n   verified owner email -- otherwise 400.\n\nOn success returns a ``state=\"sent\"`` payload the UI turns into the \"Sent\"\nstate. ``send_*`` already stamp ``last_outreach_at``/``outreach_attempted_at``\n(crash-safe) -- this endpoint does NOT re-stamp.","operationId":"notify_api_repo_archive_preview_notify_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Notify Api Repo Archive Preview Notify Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-archive-preview/advance":{"post":{"tags":["repo-archive-preview"],"summary":"Advance","description":"Walk a checked subset of repos one outreach lifecycle step (GAIT-174).\n\nThe Preview \"Advance\" affordance: it moves each selected repo to its next\nstage now — Stale→(first notice)→Notified, Notified→(reminder)→Reminded,\nReminded→(escalate, no_response)→Escalated — sending the phase-appropriate\nemail each time. It IGNORES the ``next_action_at`` timer (an operator\nexplicitly asked to advance these) but only acts on still-due repos; a stale\nselection naming a no-longer-due repo simply skips it. Phase-4 (Escalated)\nrepos have no further stage, so the UI does not offer Advance for them.\n\nGuards mirror the Notify send point because this really delivers email:\n\n1. **R15 send gate FIRST** — 409 when real send is not allowed (non-prod with\n   the toggle off); nothing runs.\n2. **Empty selection** -> 400, no send.\n3. **Malformed id** -> 400 before any DB/send work.\n\nOn success returns ``{\"state\": \"advanced\", \"summary\": {...}}`` (channel counts\n+ ``skipped`` ids). Re-run the report afterwards to see the new phases/timers.","operationId":"advance_api_repo_archive_preview_advance_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvanceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Advance Api Repo Archive Preview Advance Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-archive-preview/reset":{"post":{"tags":["repo-archive-preview"],"summary":"Reset","description":"Clear the outreach phase + staleness verdict for a checked subset (GAIT-174).\n\nThe Preview \"Reset\" affordance: it hands the selected repos back to the scan\nas if never detected — NULLs the staleness verdict and the whole outreach\nlifecycle, but (unlike a snooze) leaves the archive-exception alone. The repos\ndrop out of the due set, so the UI removes them from the current report, and\nthe next Inactivity Check re-detects them and re-seeds Stale.\n\nSends no email and writes nothing to GitHub, so there is **no send-toggle\ngate** — only the router's env + permission guards apply. Empty selection ->\n400; a malformed id -> 400 before any DB work. Returns ``{\"state\": \"reset\",\n\"repo_ids\": [...]}`` with the ids actually cleared (active-org rows only).","operationId":"reset_api_repo_archive_preview_reset_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reset Api Repo Archive Preview Reset Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-archive-preview/fake-data":{"post":{"tags":["repo-archive-preview"],"summary":"Inject Fake Data","description":"Write the archive-exception pair to a TEST-ORG repo's GitHub custom\nproperties, then refresh that repo so the next report reflects it (R17/R19/R20).\n\nOrdering of guards is deliberate -- both the R20 org scope and the date\nvalidation run **before any GitHub call**, so a rejected request never touches\nGitHub even in a dev DB:\n\n1. **Parse the id** -- a malformed ``repo_id`` is a clean 400 (no DB/GitHub).\n2. **Load the row** by id (a DB read, not a GitHub call) -> 404 if unknown.\n3. **R20 org-scope guard.** The target repo's stored ``github_org`` must be one\n   of the two designated test orgs (``GITHUB_ORG`` / ``GITHUB_ORG_ARCHIVE``,\n   via :mod:`repo_catalog_config`). Any other org -> 403 BEFORE the write. This\n   is server-side, not UI-only; empty env values are dropped so an unset\n   ``GITHUB_ORG*`` rejects everything rather than matching a blank org.\n4. **Date validation.** A malformed ``archive_exception_date`` -> 400 here,\n   never a failed PATCH after GitHub was already touched.\n\nOnly then does it write BOTH fields together via the SHARED PATCH path\n(:meth:`GitHubTools._patch_repo_custom_property_values`). The GAIT-105 wire\nrules -- ``archive_exception`` as the strings ``\"True\"``/``\"False\"``,\n``archive_exception_date`` as DD/MM/YYYY, ``None`` -> unset, and the real\n(misspelled) GitHub key ``archiveexcepiton`` -- are applied by\n``build_repo_custom_properties_patch_payload`` inside that PATCH path. This\nendpoint hands it raw python values keyed by the real property names and never\nhand-encodes the wire format.\n\nOn success (R19) it runs a single-repo ``refresh_repo_from_github`` and returns\nan inline-usable payload: the exact wire values written (``wire_values``, incl.\nthe misspelled key) plus the refreshed row's archive columns.","operationId":"inject_fake_data_api_repo_archive_preview_fake_data_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FakeDataRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Inject Fake Data Api Repo Archive Preview Fake Data Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-archive-preview/inactivity-threshold":{"get":{"tags":["repo-archive-preview"],"summary":"Get Inactivity Threshold","description":"Return the current site-wide inactivity threshold (R18).\n\n``{time_unit, days, effective_threshold_days}``. An absent key degrades to its\ncode-level default rather than erroring. Read-only: it prefills the screen with\nthe real/default values. Per-run overrides are supplied through the U8\ninactivity-check trigger, not persisted here (override-only design). This is a\ndedicated devtools endpoint (not the generic ``/config/{key}`` route) because a\nPreview user holds ``devtools:maintenance:execute`` but is not guaranteed\n``system:config:edit``.","operationId":"get_inactivity_threshold_api_repo_archive_preview_inactivity_threshold_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Inactivity Threshold Api Repo Archive Preview Inactivity Threshold Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-outreach/{repo_id}/snooze":{"post":{"tags":["repo-outreach-owner"],"summary":"Snooze My Repo","description":"Snooze one repo the caller owns for 180 days (U3, KTD-4/KTD-5/KTD-8).\n\nThe guard order (load + org-scope, authorize, rate-limit, click-time\nre-validation, write, audit) lives in\n:func:`repository_writes.snooze_repository`.","operationId":"snooze_my_repo_api_repo_outreach__repo_id__snooze_post","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnoozeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repo-outreach/{repo_id}/archive":{"post":{"tags":["repo-outreach-owner"],"summary":"Archive My Repo","description":"Archive one repo synchronously, mirroring the create wizard (U7, KTD-5).\n\nThe guard order (load + org-scope admitting a partially archived row,\nauthorize, rate-limit, the pipeline, audit) and the server-side re-check of\n``skip_ldir_ticket`` live in :func:`repository_writes.archive_repository`,\nwhich runs in a worker thread as the pipeline always did.","operationId":"archive_my_repo_api_repo_outreach__repo_id__archive_post","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ArchiveRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repos":{"get":{"tags":["git-repos-unified"],"summary":"List Repos","description":"Scope-parameterized repo list with server search/filters and grouping-aware paging.\n\nGuard order: authorize the scope (403), validate facet values (400), build\nthe base + facet SQL predicates, then choose one of two counting/paging paths\n(KTD-4/KTD-5):\n\n* **SQL path** — every active predicate is a SQL column (``all``/``escalated``\n  with column-only facets, ``owner=anyone``): count + ``limit``/``offset`` in\n  SQL, mirroring the catalog list.\n* **Python path** — a resolution-based filter is active (``scope=mine``, or\n  ``owner ∈ {mine, unresolved}``): ownership can't be a SQL ``WHERE``, so\n  resolve + filter + count + slice in Python (SQL paging here would count/page\n  the pre-ownership set and lie).\n\nWhen ``group`` is present the full filtered set is returned (no paging) in\nboth paths; the client groups + sorts it. ``total`` is always the full\nfiltered count.\n\nREVIEW-NOTE (GAIT-174 P3-N — known & ACKNOWLEDGED, do not re-flag as new):\nthe grouped path is intentionally unbounded (no LIMIT) so the client can group\nthe whole set. Fine at today's catalog size; it has no ceiling as the catalog\ngrows. Accepted for now — add a hard cap (\"too many to group, narrow your\nfilters\") when catalog size makes it necessary. Tracked on GAIT-174.","operationId":"list_repos_api_repos_get","parameters":[{"name":"scope","in":"query","required":true,"schema":{"$ref":"#/components/schemas/RepoScope","description":"mine | all | escalated"},"description":"mine | all | escalated"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"phase","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Phase"}},{"name":"owner","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OwnerFacet","default":"anyone"}},{"name":"stale_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Stale Only"}},{"name":"show_archived","in":"query","required":false,"schema":{"type":"boolean","description":"Include archived repos — those in the archive org or carrying GitHub's own is_archived flag; default excludes them","default":false,"title":"Show Archived"},"description":"Include archived repos — those in the archive org or carrying GitHub's own is_archived flag; default excludes them"},{"name":"incomplete_properties","in":"query","required":false,"schema":{"type":"boolean","description":"Only repos with at least one unpopulated Litera registry property slot, on the same count the custom_property_count column reports","default":false,"title":"Incomplete Properties"},"description":"Only repos with at least one unpopulated Litera registry property slot, on the same count the custom_property_count column reports"},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","description":"Include repos the catalog sync could no longer find on GitHub (lifecycle_state='removed'); default excludes them","default":false,"title":"Include Deleted"},"description":"Include repos the catalog sync could no longer find on GitHub (lifecycle_state='removed'); default excludes them"},{"name":"group","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any non-empty value (except 'none') disables pagination","title":"Group"},"description":"Any non-empty value (except 'none') disables pagination"},{"name":"sort","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortKey","default":"repository"}},{"name":"sort_dir","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortDir","default":"asc"}},{"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"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnifiedRepoListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repos/export":{"get":{"tags":["git-repos-unified"],"summary":"Export Repos","description":"Export the current filtered/sorted list, unpaginated (R5-R7).\n\nReuses the exact scope/facet/sort machinery ``list_repos`` uses\n(``_authorize_scope``, ``_base_conditions``, ``_facet_conditions``,\n``_order_by_clause``) so filter and authorization semantics never drift\nbetween the grid and its export (KTD-6) — including the same 403 a\n``scope=all``/``scope=escalated`` caller without the matching permission\ngets from the list route. ``columns`` controls both which fields are\nexported and their order (KTD-5); an unrecognized ``format`` or ``columns``\nentry is a 400, never a silent fallback. Omitting ``columns`` entirely\nexports every column the grid can show, in the grid's order (GAIT-467) —\nthe header row carries the grid's own labels either way.","operationId":"export_repos_api_repos_export_get","parameters":[{"name":"scope","in":"query","required":true,"schema":{"$ref":"#/components/schemas/RepoScope","description":"mine | all | escalated"},"description":"mine | all | escalated"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"phase","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Phase"}},{"name":"owner","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OwnerFacet","default":"anyone"}},{"name":"stale_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Stale Only"}},{"name":"show_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Show Archived"}},{"name":"incomplete_properties","in":"query","required":false,"schema":{"type":"boolean","description":"Only repos with at least one unpopulated Litera registry property slot, on the same count the custom_property_count column reports","default":false,"title":"Incomplete Properties"},"description":"Only repos with at least one unpopulated Litera registry property slot, on the same count the custom_property_count column reports"},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","description":"Include repos the catalog sync could no longer find on GitHub (lifecycle_state='removed'); default excludes them. Mirrors the list route's param, so an export taken with the grid's Include Deleted filter on carries exactly the rows the grid is showing","default":false,"title":"Include Deleted"},"description":"Include repos the catalog sync could no longer find on GitHub (lifecycle_state='removed'); default excludes them. Mirrors the list route's param, so an export taken with the grid's Include Deleted filter on carries exactly the rows the grid is showing"},{"name":"columns","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Output fields, in order (core column ids and/or custom-property keys). Omit to get every column the grid can show — the fixed columns plus every custom property the orgs in scope define, in the grid's own order (GAIT-467)","title":"Columns"},"description":"Output fields, in order (core column ids and/or custom-property keys). Omit to get every column the grid can show — the fixed columns plus every custom property the orgs in scope define, in the grid's own order (GAIT-467)"},{"name":"sort","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortKey","default":"repository"}},{"name":"sort_dir","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortDir","default":"asc"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Format"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repos/{repo_id}/detail":{"get":{"tags":["git-repos-unified"],"summary":"Get Repo Detail","description":"Read-one detail for the consolidated modal, per-scope authorized (U3).\n\nReuses :func:`build_catalog_row_detail` — the same serialization the admin\ncatalog editor and the outreach detail use — so the modal renders the same\nteams and grouped custom-property cards. ``include_sensitive`` is\nunconditional: repo ownership / properties are discoverable directory data,\nso every authorized viewer gets the full field set (R6/KTD-8). The response\ncarries the server-computed ``can_edit`` flag (= :func:`can_write_row`, KTD-3)\nthe client shows the Edit affordance from.","operationId":"get_repo_detail_api_repos__repo_id__detail_get","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogRowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repos/{repo_id}/archive-capture":{"get":{"tags":["git-repos-unified"],"summary":"Get Repo Archive Capture","description":"Fetch one repo's durable archive capture by id (GAIT-242 U7, R16/R17).\n\nFed the Archive Capture modal directly BY ID (KTD2), independent of the grid,\nso a repo that is filtered out or on another page still opens. Authorization\nis the SAME general repo-properties read gate as the detail modal\n(:func:`_authorize_detail_read`, decision A): a ``repo:catalog:view`` holder\nreaches any row — including archived / non-ACTIVE — while an owner without that\npermission cannot reach an archived row (its lifecycle is outside the pipeline\nscope), matching the existing detail view.\n\nThe capture intentionally surfaces the archiver identity to all repo-view\nholders (decision A-2) — a deliberate broadening of GAIT-214 attribution\nvisibility beyond the general detail view. Returns an explicit no-record\npayload (``has_record=False``) when the column is NULL so the UI can render the\ndisabled \"No Archive Capture\" state.","operationId":"get_repo_archive_capture_api_repos__repo_id__archive_capture_get","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveCaptureResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/repos/{repo_id}":{"patch":{"tags":["git-repos-unified"],"summary":"Patch Repo","description":"Owner/escalation/manager write reusing the catalog editor's write internals (U4).\n\nGuard order: load (400/404), authorize via :func:`can_write_row` (403,\nKTD-6), enforce the ``repo_owner`` guards (422/403, KTD-13/14), then delegate\nto the shared :func:`apply_repo_update` (non-ACTIVE→409, GitHub-first write,\nhierarchy validation, cache refresh). This caller records its own audit event\nstamped with the ``actor_kind`` (owner / escalation / manager) so the audit\nlog captures the actor role the catalog path can't.","operationId":"patch_repo_api_repos__repo_id__patch","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRepoRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoMutationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/keys":{"post":{"tags":["api-keys"],"summary":"Create Api Key","description":"Create a new API key. The plaintext key is returned once and never stored.","operationId":"create_api_key_api_keys_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["api-keys"],"summary":"List Api Keys","description":"List active API keys for the authenticated user (no hashes returned).","operationId":"list_api_keys_api_keys_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KeyResponse"},"title":"Response List Api Keys Api Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/keys/{key_id}":{"delete":{"tags":["api-keys"],"summary":"Delete Api Key","description":"Delete an API key permanently. Immediately prevents further use.","operationId":"delete_api_key_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["api-keys"],"summary":"Rename Api Key","description":"Update the display name of an API key.","operationId":"rename_api_key_api_keys__key_id__patch","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/keys":{"get":{"tags":["api-keys"],"summary":"List All Api Keys","description":"List all API keys across all users (admin only).","operationId":"list_all_api_keys_api_admin_keys_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminKeyResponse"},"title":"Response List All Api Keys Api Admin Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/keys/{key_id}":{"delete":{"tags":["api-keys"],"summary":"Admin Revoke Api Key","description":"Revoke any API key (admin only).","operationId":"admin_revoke_api_key_api_admin_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/titles":{"get":{"tags":["Organization"],"summary":"List Titles","operationId":"list_titles_api_organization_titles_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"member_status","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Member Status"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Organization"],"summary":"Create Title","operationId":"create_title_api_organization_titles_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTitleRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/titles/{title_id}":{"get":{"tags":["Organization"],"summary":"Get Title","operationId":"get_title_api_organization_titles__title_id__get","parameters":[{"name":"title_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Title Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Organization"],"summary":"Update Title","operationId":"update_title_api_organization_titles__title_id__put","parameters":[{"name":"title_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Title Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTitleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Organization"],"summary":"Delete Title","operationId":"delete_title_api_organization_titles__title_id__delete","parameters":[{"name":"title_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Title Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/teams":{"get":{"tags":["Organization"],"summary":"List Teams","operationId":"list_teams_api_organization_teams_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Organization"],"summary":"Create Team","operationId":"create_team_api_organization_teams_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTeamRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/teams/{team_id}":{"get":{"tags":["Organization"],"summary":"Get Team","operationId":"get_team_api_organization_teams__team_id__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Organization"],"summary":"Update Team","operationId":"update_team_api_organization_teams__team_id__put","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTeamRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Organization"],"summary":"Delete Team","operationId":"delete_team_api_organization_teams__team_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/teams/{team_id}/members":{"get":{"tags":["Organization"],"summary":"Get Team Members","operationId":"get_team_members_api_organization_teams__team_id__members_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Active Only"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/members":{"get":{"tags":["Organization"],"summary":"List Members","operationId":"list_members_api_organization_members_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"title_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Title Id"}},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Page Size"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","default":"name","title":"Sort By"}},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","default":"asc","title":"Sort Order"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Organization"],"summary":"Create Member","operationId":"create_member_api_organization_members_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMemberRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/members/search":{"get":{"tags":["Organization"],"summary":"Search Members","description":"The owner-picker's search (R5) -- only what a type-ahead needs.\n\nGated on ``organization:member:view``, which sits in every human-facing\nrole's manifest floor (KTD3). Deliberately NOT ``rbac:groups:manage``\n(searches the wrong table -- ``users``, which includes accounts the owner\nrule would reject) and NOT ``users:list:view`` (in no role's floor; would\n403 for every repo editor). Backed by the existing ``_search_org_members``\nhelper, which is already LIKE-escaped and limited to 20 rows, filtered to\nactive members only -- a departed person is not a valid repo owner.\n\nResults are re-sorted so an exact (case-insensitive) email match, when\npresent, sorts first: R7 requires the type-ahead to resolve only on an\nunambiguous exact match, and the caller needs that match to be\nunmistakable rather than buried alphabetically among partial matches.","operationId":"search_members_api_organization_members_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":200,"title":"Q"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/members/{member_id}":{"get":{"tags":["Organization"],"summary":"Get Member","operationId":"get_member_api_organization_members__member_id__get","parameters":[{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Organization"],"summary":"Update Member","operationId":"update_member_api_organization_members__member_id__put","parameters":[{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemberRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Organization"],"summary":"Delete Member","operationId":"delete_member_api_organization_members__member_id__delete","parameters":[{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/members/{member_id}/products":{"post":{"tags":["Organization"],"summary":"Assign Product","operationId":"assign_product_api_organization_members__member_id__products_post","parameters":[{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignProductRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/members/{member_id}/products/{product_id}":{"delete":{"tags":["Organization"],"summary":"Remove Product Assignment","operationId":"remove_product_assignment_api_organization_members__member_id__products__product_id__delete","parameters":[{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/members/{member_id}/link-user":{"post":{"tags":["Organization"],"summary":"Link User","operationId":"link_user_api_organization_members__member_id__link_user_post","parameters":[{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/members/{member_id}/unlink-user":{"post":{"tags":["Organization"],"summary":"Unlink User","operationId":"unlink_user_api_organization_members__member_id__unlink_user_post","parameters":[{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/members/{member_id}/provision-user":{"post":{"tags":["Organization"],"summary":"Provision User","description":"Create a new platform user from this org member and link them.","operationId":"provision_user_api_organization_members__member_id__provision_user_post","parameters":[{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/members/by-product/{product_id}":{"get":{"tags":["Organization"],"summary":"Get Product People","description":"Get all people associated with a product (via team + direct assignment).","operationId":"get_product_people_api_organization_members_by_product__product_id__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/members/{member_id}/pins":{"post":{"tags":["Organization"],"summary":"Pin Member Field","description":"Pin a field so the directory sync won't overwrite it (is_active is not pinnable).","operationId":"pin_member_field_api_organization_members__member_id__pins_post","parameters":[{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinFieldRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/members/{member_id}/pins/{field}":{"delete":{"tags":["Organization"],"summary":"Unpin Member Field","description":"Remove a curator pin so the sync resumes updating the field.","operationId":"unpin_member_field_api_organization_members__member_id__pins__field__delete","parameters":[{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member Id"}},{"name":"field","in":"path","required":true,"schema":{"type":"string","title":"Field"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/members/{member_id}/flags/{flag_id}/acknowledge":{"post":{"tags":["Organization"],"summary":"Acknowledge Deactivation Flag","description":"Close the loop on a departure flag (R18) — records who acknowledged it.","operationId":"acknowledge_deactivation_flag_api_organization_members__member_id__flags__flag_id__acknowledge_post","parameters":[{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member Id"}},{"name":"flag_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Flag Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/organization/directory/sync/trigger":{"post":{"tags":["Organization"],"summary":"Trigger Directory Sync","description":"Enqueue an on-demand directory sync run.","operationId":"trigger_directory_sync_api_organization_directory_sync_trigger_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prd/approvals/events":{"get":{"tags":["PRD"],"summary":"Stream Approvals Events","description":"Stream ProductMate approval board changes via Server-Sent Events.\n\nEmits whenever a pending row is created (``pending_created``), an approval\nis finalized (``approval_finalized``), denied (``approval_denied``), or\ndeleted (``approval_deleted``).  The FE refetches the board on each event.\n\nAuth: ``prd:approval:view`` or ``prd:approval:view-own``.\nUses the shared Redis broadcaster + the same SSE shape as\n``/api/integrations/events/stream``.\n\nEvents are scoped per subscriber exactly as the board scopes its rows\n(``approvals_board``, PDLC access model R10/R11): a\n``prd:approval:view`` holder or an admin receives every event unchanged;\nanyone else receives only events whose ``product_id`` is one of their\ndirect product assignments, re-read per event, plus bare refetch signals\nthat carry no item data. Every publisher on the channel includes\n``product_id``. (The workflow board stream stays whole-board, KTD12.)","operationId":"stream_approvals_events_api_prd_approvals_events_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prd/approvals/{approval_id}":{"get":{"tags":["PRD"],"summary":"Get Approval","description":"Return a single approval with its full ``resolved_content`` snapshot.\n\nPermission resolution:\n\n* Caller with ``prd:approval:view`` → always returns the row.\n* Caller with ``prd:approval:view-own`` → returns only if the row's\n  product is one the caller is directly assigned to (any row, for an\n  admin); otherwise 404 (no oracle).\n* Caller with neither → 404 (oracle parity).","operationId":"get_approval_api_prd_approvals__approval_id__get","parameters":[{"name":"approval_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Approval Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["PRD"],"summary":"Delete Approval","description":"Hard-delete a ProductMate approval record.\n\nPermission: ``prd:approval:delete`` (admin only).\n\nBlocked (409) when the approval has linked DevMate runs — delete those\nfirst to avoid orphaning run provenance.","operationId":"delete_approval_api_prd_approvals__approval_id__delete","parameters":[{"name":"approval_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Approval Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prd/approvals":{"get":{"tags":["PRD"],"summary":"List Approvals","description":"Polling list endpoint. Ordered ``approved_at ASC``. Does NOT include\n``resolved_content`` (poller-shape — engine fetches full snapshot via\nthe detail endpoint on demand).","operationId":"list_approvals_api_prd_approvals_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Return approvals strictly after this ISO-8601 timestamp.","title":"Since"},"description":"Return approvals strictly after this ISO-8601 timestamp."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Max items to return (clamped to 200).","default":50,"title":"Limit"},"description":"Max items to return (clamped to 200)."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prd/approvals/{approval_id}/run-signoff":{"post":{"tags":["PRD"],"summary":"Run Signoff For Approval","description":"Run the Sign-off gate against an approval's approved content.\n\nLoads the **Approval** and reads its **stored** ``resolved_content_snapshot``\n— the content that was handed over — rather than re-resolving the live URL\n(Module F). Because Module A keeps that snapshot a\ncomplete ``resolve_prd`` body and Model B keeps it fresh on re-approval,\n*approved == gated == built*: the gate checks exactly the bytes DevMate will\nbuild. Invokes ``run_signoff`` with **strict L1 pinned** so a tech-spec-less\nPRD short-circuits to ``red`` rather than a misleading soft-mode green. The\napproval id is threaded to the trail writer so the immutable Trail records\nprovenance; the gate still writes **no `Approval`** (running ≠ approving).\n\nRunning the gate is **not** approving: it writes **no `Approval`** and never\nmutates the triggering row; re-running produces a new Trail. Guarded by\n``prd:signoff:run`` (GAIT-173 slice 2; was signoff:run:execute — no new\npermission concept, just a renamed key). Built as one verdict-branching\ninvoker indifferent to who invoked it, so a future event source can fire\nthe same path with no rework.\n\nv3: the invoker — never the pure orchestrator — owns the sad\npaths. It threads the previous linked Trail's verdict, short-circuits an\nunchanged ``green-high`` re-run with a 409 *before* the LLM runs, records\na failed PRD/rules resolve as an ``inconclusive`` Trail instead of a\nsilent 500, and fires the best-effort Jira kickback after the Trail is\nwritten.","operationId":"run_signoff_for_approval_api_prd_approvals__approval_id__run_signoff_post","parameters":[{"name":"approval_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Approval Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalSignoffRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prd/approval-readiness":{"get":{"tags":["PRD"],"summary":"Approval Readiness","description":"Can THIS account approve PRDs at all, and if not, which part is missing?\n\nExists because the refusal screen could previously only recite five possible\nreasons and leave the reader to guess. Two of the five are properties of the\naccount rather than of any approval, so they can be answered plainly without\nweakening the detail route's locator-not-capability posture: this endpoint\ntakes no id, and its answer is identical whether or not any approval exists.\n\n🛑 It reports on the CALLER only. There is no user parameter, deliberately —\n\"is Dana linked and what is she assigned to?\" is a directory question with\nits own grants, and answering it here would smuggle a second, ungated\ndirectory read into an endpoint whose whole safety argument is that it\ndiscloses nothing but your own account.\n\nAuthenticated, and otherwise ungated: a caller who lacks\n``prd:approval:create`` is precisely who needs to be told so.","operationId":"approval_readiness_api_prd_approval_readiness_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalReadiness"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prd/pending-approvals/{pending_id}":{"get":{"tags":["PRD"],"summary":"Get Pending Approval","description":"The Jira deep-link surface (R9): an awaiting PRD a permitted human can\nfinalize. The opaque id is a *locator, not a capability* — authorization,\nnot id-secrecy, is the load-bearing gate (deepening H2).\n\nOrder is load-bearing:\n\n1. **authN** — ``Depends(get_current_user)`` runs FIRST. An unauthenticated\n   Jira-email click never reaches this body (the FE sends it through the\n   login-return flow); nothing is disclosed pre-auth.\n2. **authZ** — the caller must hold ``prd:approval:create`` AND be\n   assigned to the product. Either failing → **404** (NOT 403): the id is a\n   locator, so we never confirm \"this approval exists but you can't act on\n   it\" to a possessor (no existence oracle, deepening H2 / IDOR).\n3. **content** — only THEN is any PRD content resolved/disclosed. The PRD\n   body is resolved LIVE here (the awaiting row stores no snapshot — the\n   write-once snapshot is captured at finalize); a resolve failure degrades\n   to ``body_unavailable`` with the metadata still shown, never a dead error.\n\nThe raw ``jira_actor`` (accountId/email) is NEVER serialized — only the\nredaction-safe suffix + accountType (deepening M3).","operationId":"get_pending_approval_api_prd_pending_approvals__pending_id__get","parameters":[{"name":"pending_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pending Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingApprovalDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prd/pending-approvals/{pending_id}/finalize":{"post":{"tags":["PRD"],"summary":"Finalize Pending Approval","description":"Finalize an awaiting PRD: flip ``awaiting -> approved`` + MINT the\nwrite-once Approval, attributed to the CLICKER, via the shared\n``_approve_prd_core`` (the same atomic mint the chat path and the Jira\nauto-finalize use — no third copy of the workflow-birth transaction).\n\n**CSRF posture (deepening H2, see GAIT-86):** the app has no CSRF token\nprimitive; this state-changing POST is protected by the existing\n``SameSite=Lax`` httpOnly session cookie (blocks the cross-site POST vector)\n+ same-origin ``fetchWithAuth`` + the FE ``useConfirm()`` re-confirmation.\nA dedicated CSRF token is tracked as defense-in-depth in GAIT-86.\n\n**authZ** mirrors the GET: ``prd:approval:create`` + product\nassignment, unauthorized → **404** (locator, not capability). The\nproduct-assignment gate is ALSO re-enforced inside the core (R1a), so it can\nnever be silently lost.\n\n**Double-finalize** is serialized AT THE DB inside the core: a conditional\n``UPDATE ... WHERE status='awaiting'`` + ``SELECT ... FOR UPDATE`` means two\nconcurrent finalizes mint exactly ONE Approval; the loser no-ops and returns\nthe winner's receipt (``finalized=False``). A stale (already-approved) deep\nlink takes the same idempotent no-op path.","operationId":"finalize_pending_approval_api_prd_pending_approvals__pending_id__finalize_post","parameters":[{"name":"pending_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pending Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prd/pending-approvals/{pending_id}/deny":{"post":{"tags":["PRD"],"summary":"Deny Pending Approval","description":"Deny an awaiting PRD: flip ``awaiting -> rejected`` (terminal, no Approval\nminted) + release the workflow claim so a later ``-> Approved`` re-enters.\n\nThe deny path closes the approve-only gap (a PM who decides NOT to build a\nJira-sourced PRD had no exit, and the awaiting row sat forever). It is the\nmirror of ``finalize`` and shares its posture point-for-point:\n\n* **authZ** — ``prd:approval:create`` + product assignment (the same\n  ``_user_can_finalize`` gate: whoever may approve may also decline).\n  Unauthorized → **404** (locator, not capability — no existence oracle).\n* **CSRF** — same ``SameSite=Lax`` cookie + ``useConfirm()`` posture as\n  finalize (a dedicated token is GAIT-86).\n* **Idempotent** — a stale/concurrent action that already resolved the row\n  (approved OR rejected) → ``denied=False`` no-op, never an error.\n\nThe optional ``reason`` is captured for audit + posted back to the Jira\nticket (best-effort, after commit) so the loop is visibly closed.","operationId":"deny_pending_approval_api_prd_pending_approvals__pending_id__deny_post","parameters":[{"name":"pending_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pending Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DenyRequest","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DenyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prd/approvals-board":{"get":{"tags":["PRD"],"summary":"Approvals Board","description":"The approvals board: the AWAITING rows the caller can see (the pending\nside of the state machine) + the immutable APPROVED log (paginated).\n\nVisibility for BOTH sides follows the existing approval-view model, PLUS an\napprover (``prd:approval:create``) can always see their own inbox —\na PM who can finalize must be able to find what's awaiting them even without\na separate view grant:\n\n* ``prd:approval:view`` → all rows.\n* ``prd:approval:view-own`` OR ``prd:approval:create`` → only rows on the\n  products the caller is directly assigned to, on both sides (PDLC access\n  model R10): approved rows whoever approved them, and awaiting rows\n  whether or not the caller may finalize them (``can_finalize`` says\n  that). An admin sees every row.\n* none → 403.\n\nEach approved row carries ``can_launch``: whether this caller may launch\nDevMate on it (``devmate:plan:create`` and an assignment to its product, or\nadmin — PDLC access model R12), the way an awaiting row carries\n``can_finalize``.\n\nBoth sides are newest-first. Awaiting rows are unpaginated (the working set\nis small — they clear as PMs finalize); the approved log pages backwards\nwith a ``before``/``limit`` cursor. The poller's ``GET /approvals`` keeps its\noldest-first ``since`` cursor — this ordering is the board's alone.","operationId":"approvals_board_api_prd_approvals_board_get","parameters":[{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Return APPROVED rows strictly before this ISO-8601 timestamp.","title":"Before"},"description":"Return APPROVED rows strictly before this ISO-8601 timestamp."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Max APPROVED items to return (clamped to 200).","default":50,"title":"Limit"},"description":"Max APPROVED items to return (clamped to 200)."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnifiedApprovalsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/productmate/approvals/{approval_id}":{"get":{"tags":["PRD"],"summary":"Get Approval","description":"Return a single approval with its full ``resolved_content`` snapshot.\n\nPermission resolution:\n\n* Caller with ``prd:approval:view`` → always returns the row.\n* Caller with ``prd:approval:view-own`` → returns only if the row's\n  product is one the caller is directly assigned to (any row, for an\n  admin); otherwise 404 (no oracle).\n* Caller with neither → 404 (oracle parity).","operationId":"get_approval_api_productmate_approvals__approval_id__get","deprecated":true,"parameters":[{"name":"approval_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Approval Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/productmate/approvals":{"get":{"tags":["PRD"],"summary":"List Approvals","description":"Polling list endpoint. Ordered ``approved_at ASC``. Does NOT include\n``resolved_content`` (poller-shape — engine fetches full snapshot via\nthe detail endpoint on demand).","operationId":"list_approvals_api_productmate_approvals_get","deprecated":true,"parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Return approvals strictly after this ISO-8601 timestamp.","title":"Since"},"description":"Return approvals strictly after this ISO-8601 timestamp."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Max items to return (clamped to 200).","default":50,"title":"Limit"},"description":"Max items to return (clamped to 200)."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prd/signoff/runs/{trail_id}":{"get":{"tags":["PRD"],"summary":"Get Signoff Run","description":"Fetch a single Trail by id and return its full verdict breakdown.\n\nRead-only and addressable: the detail view re-derives the same breakdown\nthe run endpoint returns from the immutable Trail, so a just-triggered run\nand a past run render identically. Never mutates the Trail. Guarded by\nprd:signoff:view (GAIT-173 slice 2 — was signoff:run:execute),\na separate, narrower permission from running the gate.\n\nScoped to match the list: a non-``view-all`` caller can only open a run they\nran or one for a product they're assigned to. A run outside that set returns\n404 (the same as an unknown id) so the detail endpoint can't be used to\nenumerate other PMs'/products' runs the list already hides.","operationId":"get_signoff_run_api_prd_signoff_runs__trail_id__get","parameters":[{"name":"trail_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trail Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignoffRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prd/signoff/runs":{"get":{"tags":["PRD"],"summary":"List Signoff Runs","description":"List past sign-off runs (Trails), newest first, offset-paginated.\n\nRead-only over the immutable Trail table (uses the existing\n``created_at DESC`` index). Returns the lightweight row shape the history\ntable needs; the full breakdown is fetched per-row via\n``GET /runs/{trail_id}``. Guarded by prd:signoff:view (GAIT-173 slice 2) —\na separate, narrower permission from prd:signoff:run (running the gate);\npreviously this endpoint required the run/execute permission, a modeling\nbug this rename fixes.\n\nScoped per caller: a ``view-all`` holder (admins via ``*:*:*``) sees every\nrun; everyone else sees only their own runs plus runs for products they're\nassigned to. Over-fetches one row to compute ``has_more`` without a second\ncount query.","operationId":"list_signoff_runs_api_prd_signoff_runs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":25,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignoffRunListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prd/criteria/l1-checks":{"get":{"tags":["PRD"],"summary":"Get L1 Checks","description":"Return the hardcoded L1 structural checks for display.\n\nRead-only. Sourced from ``l1_checker.L1_CHECKS`` (co-located with the checks\nthemselves) so the Sign-off Rules tab can show what the deterministic L1\nlayer verifies without that copy drifting from the real logic. Guarded by\nprd:criteria:view, same as the criteria-read endpoints it sits beside\n(GAIT-173).","operationId":"get_l1_checks_api_prd_criteria_l1_checks_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/L1ChecksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prd/criteria/versions":{"get":{"tags":["PRD"],"summary":"List Rules Versions","description":"List all signoff_rules prompt versions (newest first).","operationId":"list_rules_versions_api_prd_criteria_versions_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RulesVersionDetail"},"title":"Response List Rules Versions Api Prd Criteria Versions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prd/criteria/draft":{"get":{"tags":["PRD"],"summary":"Get Rules Draft","description":"Return the persisted rules draft, or 404 if none.","operationId":"get_rules_draft_api_prd_criteria_draft_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RulesVersionDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["PRD"],"summary":"Save Rules Draft","description":"Create or update the single persisted draft for signoff_rules.","operationId":"save_rules_draft_api_prd_criteria_draft_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RulesDraftSaveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RulesVersionDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["PRD"],"summary":"Delete Rules Draft","description":"Remove the persisted draft row; published rows unchanged.","operationId":"delete_rules_draft_api_prd_criteria_draft_delete","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prd/criteria/draft/publish":{"post":{"tags":["PRD"],"summary":"Publish Rules Draft","description":"Publish the draft as a normal version row (does not activate).","operationId":"publish_rules_draft_api_prd_criteria_draft_publish_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RulesVersionDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prd/criteria/versions/{version}/activate":{"put":{"tags":["PRD"],"summary":"Activate Rules Version","description":"Activate a rules version (deactivates all others).","operationId":"activate_rules_version_api_prd_criteria_versions__version__activate_put","parameters":[{"name":"version","in":"path","required":true,"schema":{"type":"integer","title":"Version"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RulesVersionDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prd/criteria/versions/{version}":{"delete":{"tags":["PRD"],"summary":"Delete Rules Version","description":"Delete a rules version. Cannot delete the active version.","operationId":"delete_rules_version_api_prd_criteria_versions__version__delete","parameters":[{"name":"version","in":"path","required":true,"schema":{"type":"integer","title":"Version"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devmate/launch-eligibility":{"get":{"tags":["DevMate"],"summary":"Launch Eligibility","description":"Whether the caller may start a DevMate planning run.\n\nBacks the \"Run in DevMate\" affordance on the ProductMate approvals page.\nThe frontend gates the button on this server-side check rather than a\nclient-side token decode alone — the server is the source of truth for\nwho may launch a run.\n\nReturns ``200 {\"can_launch\": bool}``, never 403, so the UI can hide the\naffordance cleanly. With no ``approval_id`` the answer is global: does the\ncaller hold ``devmate:plan:create``. With an ``approval_id`` it is per\napproval, the same rule ``POST /runs`` enforces: the permission AND a\ndirect assignment to that approval's product, or admin (PDLC access model\nR1/R2). An unknown approval answers ``False``. This is a *capability\nprobe*, not a run-mutating action; the launch itself re-checks.","operationId":"launch_eligibility_api_devmate_launch_eligibility_get","parameters":[{"name":"approval_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Approval Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Launch Eligibility Api Devmate Launch Eligibility Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devmate/runs":{"get":{"tags":["DevMate"],"summary":"List Runs","description":"List DevMate runs, newest-first, paginated.\n\n``run_type`` (repeatable) keeps only runs of those kinds, before the count\nand the paging, so the total and the pages cover every run of them\n(GAIT-579 U14). An unknown kind is a 422.\n\nA ``view-own`` caller sees only runs on their assigned products and the\nruns they launched (an admin sees every run); a ``view`` caller sees\neveryone's (manager-review).\nSummaries carry ``approved_by`` (drives the dashboard's approver filter).","operationId":"list_runs_api_devmate_runs_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}},{"name":"run_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Run Type"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevmateRunListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["DevMate"],"summary":"Create Run","description":"Deterministically create a DevMate run and dispatch it (R1).\n\nNo LLM-mediated step: the launcher calls this directly, killing the\n``fetch_prd``-class bug where the orchestrator never reliably invoked the\nentry tool. Enforces ``devmate:plan:create`` server-side (not just the\neligibility probe), and ``devmate:demo-video:launch`` when the body asks\nfor the demo-video run type, resolves the approved PRD, rate-limits a second\nin-flight run for the same approval, creates the run, and dispatches it.\nThe default ``implement_now`` dispatches straight to a PR; an explicit\nlegacy ``plan_first`` dispatches phase-1 via ``dispatch_phase1_planning``.\nEither way the run is stamped and an append-only audit row is written.","operationId":"create_run_api_devmate_runs_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRunRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devmate/runs/{run_id}":{"get":{"tags":["DevMate"],"summary":"Get Run","description":"Return one run's full detail.\n\n404 when the run is missing *or* a ``view-own`` caller asks for a run\nthat is not on one of their assigned products and that they did not\nlaunch (no existence oracle, matching ProductMate).","operationId":"get_run_api_devmate_runs__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevmateRunView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["DevMate"],"summary":"Delete Run","description":"Hard-delete a completed DevMate run and its child rows.\n\nPermission: ``devmate:run:delete`` (admin only).\n\nAny run status can be deleted. In-flight runs (``running``, ``planning``)\nget a best-effort Cursor agent cancel before the DB row is removed. A\nClaude run's phase-slot session is cancelled through the Claude cancel\n(KTD11), and a Claude demo-video run whose Artifact Collection is still\npending is refused with 409 (KTD12).\n\nChild rows (``devmate_units``, ``devmate_dispatch_audit``) are deleted by\nthe DB-level ``ON DELETE CASCADE`` on their ``run_id`` foreign keys.","operationId":"delete_run_api_devmate_runs__run_id__delete","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devmate/branches":{"get":{"tags":["DevMate"],"summary":"List Branches","description":"The branches a DevMate run can launch from (PDLC-328).\n\nSame gates as ``POST /api/devmate/runs`` — ``devmate:plan:create``, the\napproval must exist on a product the caller may act on (assigned, or\nadmin), the repo must be one of its product's github_repos —\nthen a live GitHub read of the repo's default branch and branch names.\nOnly names passing the base_branch refname check are listed, default first.\n\nLaunch never depends on GitHub: a failure or timeout still returns 200,\nwith just the fallback default (configured ``default_branch``, else\n``\"main\"``) and a ``message`` saying why.","operationId":"list_branches_api_devmate_branches_get","parameters":[{"name":"approval_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Approval Id"}},{"name":"repo","in":"query","required":true,"schema":{"type":"string","description":"https://github.com/owner/repo","title":"Repo"},"description":"https://github.com/owner/repo"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devmate/runs/{run_id}/approve":{"post":{"tags":["DevMate"],"summary":"Approve Run","description":"Approve a planned run and dispatch phase-2 implementation (deterministic).\n\nThis is the security-critical gate, so it is a deterministic server-side\nendpoint, where authz is enforceable at the request boundary (review\nfinding P0 #4; mirrors the ``POST /runs`` entry). It owns dispatch and\nevery gate:\n\n* **approve permission** — ``devmate:plan:approve`` (403 otherwise).\n* **product assignment** — the caller is directly assigned to the run's\n  product, or admin (404/403 otherwise, KTD5); checked before SoD.\n* **dispatch authz re-enforced** — ``devmate:run:dispatch`` on the fresh\n  phase-2 dispatch (the same gate any dispatch requires).\n* **SoD** — launcher ≠ approver by default (security finding; the launcher\n  is read from the phase-1 audit row). Opt-out is explicit + audited.\n* **one-time-use** — only a run in ``awaiting_plan_approval`` can be\n  approved; the dispatch flips it to ``running``, so a replayed approve (or\n  an approve after reject) is rejected with 409. A re-dispatch needs a fresh\n  planning run.\n* **immutable audit** — the phase-2 dispatch writes an append-only audit row.\n\nOn an optional ``edited_plan_text`` the edit is committed to the canonical\nplan path + the DB mirror re-synced (the Unit 11 edit path) BEFORE dispatch,\nall in one transaction.","operationId":"approve_run_api_devmate_runs__run_id__approve_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devmate/runs/{run_id}/reject":{"post":{"tags":["DevMate"],"summary":"Reject Run","description":"Reject a planned/in-flight run at the gate (deterministic).\n\nLike ``approve``, this is the security-critical decision so it is a\ndeterministic server-side endpoint. The\nreject semantics (Unit 13 design finding):\n\n* **authz** — ``devmate:plan:approve`` (the same gate-decision permission;\n  403 otherwise), plus a direct assignment to the run's product or admin\n  (404/403, KTD5). SoD does NOT apply: rejecting your own run is not a\n  privilege-escalation concern the way self-approval is.\n* **one-time-use / valid origin** — only a run in ``REJECTABLE_STATUSES``\n  can be rejected (a terminal/already-rejected run → 409).\n* **best-effort agent cancel** — ``DELETE /v0/agents/{id}`` if the run holds\n  a ``cursor_agent_id`` (B3 confirmed it returns 200 → EXPIRED). A missing\n  agent (404) is the expected case from ``awaiting_plan_approval`` and does\n  NOT fail the reject. A Claude run's session goes through\n  ``cancel_claude_session`` instead, and its cost is stamped on the unit\n  that owns it (PDLC-332 KTD11).\n* **mark rejected regardless** — the run goes to ``rejected`` whether or not\n  the delete succeeds. The committed plan file is left as a repo artifact;\n  \"Run again\" mints a NEW run (never reuses this run's id/path).","operationId":"reject_run_api_devmate_runs__run_id__reject_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devmate/runs/{run_id}/reconcile":{"post":{"tags":["DevMate"],"summary":"Reconcile Run","description":"Manually trigger reconciliation for a run whose webhook was missed.\n\nAsks Cursor for the run's current agent and applies what it says, through\nthe same verdict the reconcile beat uses\n(``devmate_reconcile_running_units.reconcile_run_now``): an agent Cursor\nreports finished or failed is applied; the PR on the run's branch (phase 2)\nor the committed plan (phase 1) is taken even while Cursor still says\nrunning; and a run with neither is left running\n(``lifecycle_status=\"still_running\"``). Idempotent: a run that already\nreached a terminal state is a no-op (the lifecycle returns ``noop``).\nIt never synthesises a terminal payload: a FINISHED with no PR is the\n\"opened no pull request\" failure for a phase-2 run.\n\nA Claude run instead runs the Claude per-row reconcile synchronously,\nwhich reads the session (PDLC-332 KTD9).\n\nPermission: ``devmate:run:delete`` (admin-only; same gate as hard-delete).","operationId":"reconcile_run_api_devmate_runs__run_id__reconcile_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconcileRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devmate/runs/{run_id}/review":{"post":{"tags":["DevMate"],"summary":"Retrigger Code Review","description":"Manually re-trigger the DevMate code review (PRD story 10: fresh\nfindings on the current head after pushed fixes).\n\nRun-scoped: with no body (or no ``unit_id``) every reviewable unit of the\nrun — ``pr_open`` with a ``pr_url`` — is re-enqueued; ``unit_id`` narrows\nto one unit. Reconciles rather than appends: the shared idempotent\n``enqueue_code_review`` helper keys the task id on ``(run, unit)`` and\nthe engine's inline-comment dedup (skip, not replace) keeps re-posting\nidempotent on the PR itself.\n\n**Stamp clearing (deliberate)**: ``posted``/``clean``/``skipped_cap``\nshort-circuit the review wrapper, so a terminally-stamped unit has its\nstamp trio cleared (status / reviewed_at / detail → NULL) to get a fresh\nreview. The clear is committed BEFORE the enqueue: a lost enqueue leaves\nthe unit NULL-stamped at ``pr_open``, exactly what the reconcile\nbackstop keys on — self-healing, never a silent gap.\n\n**Permission**: ``devmate:run:dispatch`` — re-triggering dispatches new\n(paid) review work for the run, the same semantic the phase-2 dispatch\ngate protects. ``devmate:run:delete`` (reconcile/delete's gate) is the\ndestructive-admin gate; nothing here is destroyed, and the PRD persona\nis the engineer who pushed fixes. The caller must also be directly\nassigned to the run's product, or admin (PDLC access model R7; 404/403\nper KTD5). The automatic review triggers are system continuations and\nare not assignment-gated (KTD6).\n\n**Product gate (ticket 34)**: a resolvable product with\n``code_review_enabled=False`` is an explicit opt-out and blocks this\nendpoint too (409) — same product flag the two automatic trigger sites\n(PR-open, reconcile) respect. Deliberately narrower than those two,\nthough: no resolvable product (no Approval at all) does NOT block a\nmanual retrigger by itself — this is an explicit human action, RBAC-gated\nalready, so only an explicit product opt-out stops it. (Such a run is\nadmin-only under the assignment check above, PDLC access model R9.)","operationId":"retrigger_code_review_api_devmate_runs__run_id__review_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RetriggerReviewRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetriggerReviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devmate/runs/{run_id}/units/{unit_id}/fix":{"post":{"tags":["DevMate"],"summary":"Launch Fix Run","description":"Launch a human-armed Fix run against a curated subset of one unit's\ncode-review findings / AC rows, plus the PR's own open review comments\n(ticket 24, the human-armed fix-loop design; PDLC-308 adds the review-\ncomments loop).\n\nCreates a new ``kind='fix'`` ``DevmateUnit`` with ``parent_unit_id`` set\nto the target (implementation) unit, dispatches it through the same\nCursor adapter seam every other DevMate dispatch uses\n(``force_branch_name`` = the parent's existing PR branch,\n``auto_create_pr=False`` — no new branch, no new PR), and persists the\ncurated payload as ``fix_lineage`` (round + finding/AC ids + their text).\nThe dispatched prompt also carries a standing section (KTD1/KTD6) telling\nthe agent to read and triage the PR's own open review comments on GitHub\nitself — no comment text enters the prompt (R4, R17); the 15-minute sweep\n(``app/core/workflows/jobs/devmate_pr_review_findings.py``) is what\nreads GitHub and stores scrubbed excerpts, served only to holders of\n``devmate:pr-review:excerpt``.\n\n**GitHub reads** (fix-findings submodule PRs KTD13): the launch reads\nGitHub once, after every gate below and before dispatch, through the\nowner-scoped client: the parent PR's current head, the parent's gitlinks\nat that head, and the head of each confirmed submodule PR that may be\nopen. Any failed read -> 502 ``{\"reason\": \"head_lookup_failed\", \"repos\"}``\nbefore any row or session exists. A unit with no such submodule PR (no\nrows, or only dropped, merged or closed ones) makes no GitHub call.\n\n**PR set** (KTD5, KTD12): per submodule path, the round covers the open\nconfirmed PR that carries the parent's current gitlink; other open PRs on\nthe path are skipped ``not_pointed_at``, merged and closed ones\n``merged``/``closed``. Cursor reaches no submodule repo; Claude reaches\none that resolves ``claude_allowed``. With a covered submodule PR and no\n``engine``, a parent repo that allows Claude runs the round on Claude. A\ncovered PR the engine cannot reach is skipped ``engine_cannot_reach``,\nexcept that Cursor chosen where Claude would reach it -> 422\n``{\"reason\": \"engine_cannot_reach\", \"engine\", \"repos\"}`` before any row.\nA repo, branch or submodule path that fails the prompt's identifier\nallow-list -> 422 ``{\"reason\": \"invalid_identifier\", \"kind\"}``, also\nbefore any row or session.\n``fix_lineage`` gains ``prs`` (parent first, with launch heads and, per\nsubmodule PR, the parent's gitlink) and ``skipped`` (KTD8) whenever the\nunit has a confirmed submodule row; without one it is unchanged.\n\n**Permission**: ``devmate:run:dispatch`` — the same gate the manual\nreview re-trigger and phase-2 dispatch use (this launches paid remote-\nagent work), plus a direct assignment to the run's product, or admin\n(PDLC access model R7; 404/403 per KTD5).\n\n**Selection**: the curated ``finding_ids``/``ac_ids`` may be empty — the\nagent triages the PR's review comments regardless. Every requested id,\nwhen present, must exist in the target unit's stored\n``code_review_detail`` envelope (unknown ids -> 422). A non-empty\nvalidated selection is deliberate curation and always launches: the\nendpoint does not re-check GitHub dismissal state, so a dismissed\nfinding is accepted like any other when explicitly checked.\n\n**Open work** (PDLC-308 R11): an EMPTY selection additionally requires\nthe server's \"has open work\" gate to be open — at least one undismissed\nengine finding, failed AC row or open swept review item. A never-swept or\nfailed-check unit with nothing confirmed is CLOSED, not unknown-open.\nA closed gate refuses with 409 ``{\"reason\": \"no_open_work\", ...}``\ncarrying the scan time (``\"Not yet checked\"`` when there is none). Dismissal state IS consulted here — but only to\ncount what is open, never to reject an explicitly checked id. The gate\nfirst reads stored state, counting every confirmed submodule PR stored\nas open; when only submodule PRs armed it, it is re-checked after the PR\nset read against the PRs the round covers, so a round whose only open\nwork is on PRs it skips is the same 409, before any row or session.\n\n**Fixability**: the target unit must be ``pr_open`` with a recorded PR\nURL and branch name, and neither merged nor closed (``merged_at``/\n``pr_closed_at`` both ``NULL``) -> 409 otherwise. The PR URL must also\nparse into an owner/repo/number (``GitHubTools.parse_pr_url``) -> 409 if\nit doesn't, since the review-comments section needs those coordinates.\n\n**Idempotency**: if a ``fix`` unit for this parent is already\n``running``, that unit is returned as-is and nothing is re-dispatched\n(a double-click or repeat call is a no-op, not a second agent) — this\napplies to an empty selection too.\n\n**Round numbering**: ``round = 1 + count(existing fix units for this\nparent)`` — a monotonic per-parent counter, independent of any fix\nunit's terminal outcome.\n\n**Engine** (PDLC-332 KTD2): the parent unit's engine unless ``engine``\noverrides it. A Claude round dispatches through the registry with the\nparent branch as the session's push branch; the Cursor call is unchanged\n(KTD3). Claude on a repo that does not allow it -> 422, missing Claude\nconfiguration -> 503, both before any row.","operationId":"launch_fix_run_api_devmate_runs__run_id__units__unit_id__fix_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"unit_id","in":"path","required":true,"schema":{"type":"string","title":"Unit Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FixRunLaunchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FixRunLaunchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devmate/engine-sessions/{session_id}/claim":{"post":{"tags":["DevMate"],"summary":"Claim Engine Session","description":"Confirm the worker may run ``session_id`` (KTD6).\n\nThe middleware answers 401 for a missing, unknown or revoked key; the\npermission check 403 for a key whose account lacks\n``devmate:engine-session:claim``, and the account check 403 for any\naccount but the worker's. The worker stops on either.\n200 stamps ``engine_claimed_at`` on every row recording the session and\nclears its queue state; 404 when no Claude row records it (the worker\nretries, then interrupts); 409 when a recording row is cancelled,\nrejected, abandoned or terminal (the worker interrupts). Every 200 carries\nthe session's ``repo_url``, ``base_branch``, ``head_branch``,\n``push_branch`` and ``run_type``, read back from Anthropic, empty ones left\nout (Worker contract). ``artifact_credential`` is always ``null``: a\ndemo-video session's worker asks :func:`engine_session_upload_url` for each\nfile instead. 503 when the read fails, and 429 when Anthropic rate-limits\nit, with nothing stamped — the worker interrupts on a 503 rather than run a\nsession it cannot set up, and retries a 429.","operationId":"claim_engine_session_api_devmate_engine_sessions__session_id__claim_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Claim Engine Session Api Devmate Engine Sessions  Session Id  Claim Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devmate/engine-sessions/{session_id}/upload-url":{"post":{"tags":["DevMate"],"summary":"Engine Session Upload Url","description":"A one-file upload key for a demo-video session's deliverable (KTD13).\n\nSame caller rules as the claim. 200 carries ``method`` (``PUT``), ``url``\n(the blob URL with a create-only SAS for that exact name, valid about 15\nminutes), ``headers`` to send with it, ``blob_url``, ``permissions``,\n``expires_at`` and ``name``. 404 when no Claude row records the session;\n409 when it returns no deliverables, is not claimed, was cancelled, or its\nupload window (20 minutes after the session ended) has closed; 422\nwhen the file breaks a rule (the type, the per-file size cap, the per-run\ncount or total, an unsafe name), with the rule in ``detail``; 503 when the\nkey cannot be minted. A repeat request for the same name re-issues a key.\nThe worker writes ``_done.json`` last, with a key of its own.","operationId":"engine_session_upload_url_api_devmate_engine_sessions__session_id__upload_url_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngineSessionUploadUrlRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Engine Session Upload Url Api Devmate Engine Sessions  Session Id  Upload Url Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/kickoffs/readiness":{"get":{"tags":["kickoffs"],"summary":"Kickoff Readiness","description":"Can THIS account open ticket kickoffs, and if not, which part is missing?\n\nThe account half of the visibility check (directory link, product\nassignment), stated outright because it holds whether or not any kickoff\nexists, so it is no oracle. The page shows it when a kickoff answers 404.","operationId":"kickoff_readiness_api_kickoffs_readiness_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KickoffReadiness"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/kickoffs/{kickoff_id}":{"get":{"tags":["kickoffs"],"summary":"Get Ticket Kickoff","description":"One kickoff and its work order, behind the visibility check.","operationId":"get_ticket_kickoff_api_kickoffs__kickoff_id__get","parameters":[{"name":"kickoff_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kickoff Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketKickoffDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/kickoffs/{kickoff_id}/branches":{"get":{"tags":["kickoffs"],"summary":"List Kickoff Branches","description":"The branches this kickoff's run can launch from, read as the PRD\nlaunch's are (``devmate_branches``). Behind the visibility check (the\nindistinguishable 404), then the repo must be one of the product's.","operationId":"list_kickoff_branches_api_kickoffs__kickoff_id__branches_get","parameters":[{"name":"kickoff_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kickoff Id"}},{"name":"repo","in":"query","required":true,"schema":{"type":"string","description":"https://github.com/owner/repo","title":"Repo"},"description":"https://github.com/owner/repo"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/kickoffs/{kickoff_id}/approve":{"post":{"tags":["kickoffs"],"summary":"Approve Ticket Kickoff","description":"Approve this kickoff's work order as shown and launch its run\n(``approve.approve_kickoff``). 200 only when this call started the run.","operationId":"approve_ticket_kickoff_api_kickoffs__kickoff_id__approve_post","parameters":[{"name":"kickoff_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kickoff Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveKickoffRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveKickoffResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devmate/code-review/rule-stats":{"get":{"tags":["DevMate"],"summary":"Get Rule Stats","description":"Per-rule findings / contested / contested-rate / repo-disable counts.\n\nRequires: ``devmate:session:view``.","operationId":"get_rule_stats_api_devmate_code_review_rule_stats_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gtm/runs":{"get":{"tags":["GTM"],"summary":"List Runs","operationId":"list_runs_api_gtm_runs_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GtmRunListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gtm/runs/{run_id}":{"get":{"tags":["GTM"],"summary":"Get Run","operationId":"get_run_api_gtm_runs__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GtmRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gtm/runs/{run_id}/adjust":{"post":{"tags":["GTM"],"summary":"Adjust Run","description":"Correct a ``complete`` run's launch class and republish (KTD7, R14).\n\nWrites the class, the PMM's reason and a reasoning line, and applies no\nstate event — ``complete`` is terminal (the edit route's precedent). On a\nrun that carries a publication the page is republished in this request\nwith the header re-stamped and the labels reconciled (the stale class\nlabel removed), without regenerating the Brief. A failed republish is\nreported in ``republish`` and leaves the run ``complete`` with the new\nclass saved (R16). A run with no publication saves and calls nothing.","operationId":"adjust_run_api_gtm_runs__run_id__adjust_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactEditResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gtm/runs/{run_id}/rerun":{"post":{"tags":["GTM"],"summary":"Rerun Run","description":"Re-run a GTM run as a NEW immutable row (\"re-run as-is\").\n\nRe-fires the trigger for this run's triggering Approval against the *current*\nApproval content. A terminal prior run (blocked / complete / error) no longer\nblocks creation (active-run idempotency), so an operator can recover a wedged\nor false-halted run without relaunching the whole DevMate build or making a\nmeaningless PRD edit. A run STRANDED in a non-terminal state — ``generating``\nor ``publishing``, left behind by a lost dispatch or a rolling deploy — is\nforce-superseded to ``error`` before the fresh row is created (R5), so it can\nno longer block every future run for that PRD; a legacy ``awaiting_pmm`` run\nis superseded the same way (PDLC-328 R17), since nothing will ever advance\nit now. Returns the resulting active run — the fresh row, or the existing\nactive one if a relaunch is already in flight. Guarded by\n``gtm:launch:approve``.","operationId":"rerun_run_api_gtm_runs__run_id__rerun_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GtmRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gtm/runs/{run_id}/artifacts/{artifact_type}":{"put":{"tags":["GTM"],"summary":"Edit Artifact","description":"Save an edit to a generated artifact draft (story 8 — refine in place).\n\nArtifacts land as *drafts the PMM refines* — this persists an edit to one\ndraft's content. Allowed only on a ``complete`` run, and only for an artifact\nthat was actually generated.\n\nOn a run that already carries a publication (R33, KTD20), the edit\nre-publishes the same Confluence page in this same request via U11's\ntransition-free publish core — ``complete`` stays terminal (no state event\nis applied) and a failed re-publish is reported in the response's\n``republish`` object rather than moving the run to ``error``, because the\nedit itself still succeeded. A run with no publication saves as before and\ncalls nothing.","operationId":"edit_artifact_api_gtm_runs__run_id__artifacts__artifact_type__put","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"artifact_type","in":"path","required":true,"schema":{"type":"string","title":"Artifact Type"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactEditResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows":{"get":{"tags":["Workflows"],"summary":"List Workflows","description":"Lists workflows (newest first), paginated. Uses the cached\n``current_stage`` — cheap; the detail endpoint re-folds authoritatively.\n\nA \"page\" is TOP-LEVEL entries (every ``sdlc_delivery`` row + orphan\n``gtm_launch`` rows), not raw rows — nested GTM runs ride along free (see\n``_group_gtm_siblings``), so ``len(response) < limit`` still means \"last\npage.\" ``limit`` caps at 200 to stay cheap as the table grows (review #14:\none workflow per DevMate run).\n\nDefault (``include_finished=False``) hides a ``gtm_launch`` at\n``complete`` and any ``off_track`` row idle >14 days; ``sdlc_delivery``\nrows are never hidden.","operationId":"list_workflows_api_workflows_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"include_finished","in":"query","required":false,"schema":{"type":"boolean","description":"The 'show finished' toggle: when true, disables the default in-flight visibility filter — every row is listed.","default":false,"title":"Include Finished"},"description":"The 'show finished' toggle: when true, disables the default in-flight visibility filter — every row is listed."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowSummary"},"title":"Response List Workflows Api Workflows Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows/stream":{"get":{"tags":["Workflows"],"summary":"Stream Workflow Board","description":"Board-level SSE on ``WORKFLOW_BOARD_CHANNEL``: fires when ANY workflow is\nborn or changes stage, so the LIST page refreshes live. The FE refetches the\nlist on each event. Mirrors ``stream_workflow`` (per-workflow detail).","operationId":"stream_workflow_board_api_workflows_stream_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows/{workflow_id}":{"get":{"tags":["Workflows"],"summary":"Get Workflow","description":"A single workflow: the full ordered definition + a per-stage state derived\nfrom a fresh re-fold of the ledger (authoritative — review S3) + next stage.","operationId":"get_workflow_api_workflows__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Workflows"],"summary":"Delete Workflow","description":"Hard-delete a workflow and its event ledger (``workflow:board:delete``).\n\nA DESTRUCTIVE dev/testing cleanup — the production v1 posture is\nsoft-delete-only, so this is deliberately gated behind its own permission\n(granted to no role by default; admin satisfies it via ``*:*:*``).\n\nThe ledger FK is ``ondelete=RESTRICT`` (``WorkflowEvent.workflow_id``), so the\nevents MUST be removed first or the workflow delete raises an IntegrityError.\nWe delete events then the workflow in ONE transaction; any linked\n``DevmateRun.workflow_id`` AND ``Approval.workflow_id`` are auto-nulled by\ntheir ``ondelete=SET NULL`` FKs, so the run + approval survive with a cleared\nreference (a run can re-attach on a later emit).\nIdempotent-ish: a missing workflow is a 404 (not a silent 204) so a caller\nlearns the id was already gone.","operationId":"delete_workflow_api_workflows__workflow_id__delete","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflow-types/{workflow_type}":{"get":{"tags":["Workflows"],"summary":"Get Workflow Type","description":"The ordered stage-set definition for a workflow type — so the board can\nrender any type generically (stages, labels, live flags, ordinals).","operationId":"get_workflow_type_api_workflow_types__workflow_type__get","parameters":[{"name":"workflow_type","in":"path","required":true,"schema":{"type":"string","title":"Workflow Type"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDefinitionView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows/{workflow_id}/stream":{"get":{"tags":["Workflows"],"summary":"Stream Workflow","description":"SSE stream of stage-change events on ``workflow:{id}``.\n\nThe publish side is the sync helper (Unit 4) on Redis db #2; here we\nsubscribe async (the FastAPI route can). Mirrors\n``stream_conversation_timeline``: a background task watches for client\ndisconnect; keepalives on idle; best-effort close on error.","operationId":"stream_workflow_api_workflows__workflow_id__stream_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows/{workflow_id}/cicd-fix-runs":{"post":{"tags":["Workflows"],"summary":"Dispatch Cicd Fix Run","description":"Dispatch a fresh coding agent to fix a workflow's red CI/CD composite\nsection.\n\nRequires ``workflow:board:view`` and ``devmate:run:dispatch``: only a\nDevMate dispatcher may start a paid Cursor run. Board viewers without\nthe dispatch permission get 403 here but still see the CI/CD section.\nThe dispatcher must also be directly assigned to the workflow's product,\nor admin (``_require_may_act_on_workflow``; 403 otherwise).\n\nAt most one ACTIVE dispatch exists per workflow at a time. The\n``Workflow`` row is locked (``with_for_update``) only for the\ncheck-then-release step below — NOT across the live Cursor dispatch\ncall: the lock is released (a commit) immediately after the\nexisting-active/red-stage checks, before the external HTTP call, so a\nslow/hung Cursor API response cannot block a concurrent ADO-driven\nwrite to this same ``Workflow`` row (e.g. stage advancement) for the\nduration of that call. The rare remaining race — two requests both\npassing the checks before either inserts its ``CicdFixRun`` row — is\ncaught by the partial unique index ``uq_cicd_fix_runs_workflow_active``\nat insert time and translated to a 409, the same outcome the lock\npreviously enforced by serializing the whole request. A second dispatch\nwhile one is active is REJECTED (409), not silently returned (unlike\n``launch_fix_run``'s idempotent short-circuit) — the control should\nsimply not be offered a second time, not silently no-op.\n\nA dispatch that fails to start — no red stage, no resolvable repo, or a\nCursor API error — never persists a ``CicdFixRun`` row: the active slot\nstays free and the caller sees an explicit failure.\n\nPDLC-332 KTD20: an optional ``{engine}`` body overrides the repo's default\nengine. With no body the engine is the repo default, and a repo with no\nmatching integration (every pre-PDLC-332 workflow) runs Cursor exactly as\nbefore. A Claude dispatch refused by the repo gate (422) or missing\nconfiguration (503) writes no row and starts no session.","operationId":"dispatch_cicd_fix_run_api_workflows__workflow_id__cicd_fix_runs_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CicdFixRunRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CicdFixRunView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows/{workflow_id}/cicd-fix-runs/{fix_run_id}/abandon":{"post":{"tags":["Workflows"],"summary":"Abandon Cicd Fix Run","description":"A dispatcher's manual \"mark inactive\" on an active CI/CD fix dispatch.\nSame gate as dispatch: ``workflow:board:view``,\n``devmate:run:dispatch`` and an assignment to the workflow's product (or\nadmin).\n\nDelegates the transition to\n``transition_cicd_fix_run_to_abandoned`` directly rather than\nreimplementing it — that function is already idempotent (a no-op on a\nnon-``active`` row); here that no-op surfaces as an explicit 409 so a\ncaller can tell \"already handled\" from \"just handled it\".\n\nAlso best-effort cancels the live Cursor agent (mirroring the DevMate\nreject path in ``devmate.py``'s ``reject_run``) — the DB transition\nalone stops Argo's own tracking, but does not stop Cursor from\ncontinuing to run and accrue cost against a dispatch nobody is\nwatching anymore. A Claude row's session goes to the Claude cancel\ninstead, and its returned cost is stamped (PDLC-332 KTD11/KTD14).","operationId":"abandon_cicd_fix_run_api_workflows__workflow_id__cicd_fix_runs__fix_run_id__abandon_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"name":"fix_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Fix Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CicdFixRunView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent-chat/runs":{"post":{"tags":["agent-chat"],"summary":"Start Run","operationId":"start_run_api_agent_chat_runs_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartRunRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Start Run Api Agent Chat Runs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent-chat/runs/{run_id}/events":{"get":{"tags":["agent-chat"],"summary":"Stream Run Events","operationId":"stream_run_events_api_agent_chat_runs__run_id__events_get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"last_event_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Event Id"}},{"name":"Last-Event-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last-Event-Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent-chat/runs/{run_id}/cancel":{"post":{"tags":["agent-chat"],"summary":"Cancel Run","operationId":"cancel_run_api_agent_chat_runs__run_id__cancel_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Run Api Agent Chat Runs  Run Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent-chat/conversations/{conversation_id}/active-run":{"get":{"tags":["agent-chat"],"summary":"Active Run","operationId":"active_run_api_agent_chat_conversations__conversation_id__active_run_get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Active Run Api Agent Chat Conversations  Conversation Id  Active Run Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent-chat/pauses":{"get":{"tags":["agent-chat"],"summary":"Waiting For Me","operationId":"waiting_for_me_api_agent_chat_pauses_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Waiting For Me Api Agent Chat Pauses Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent-chat/runs/{run_id}/resume":{"post":{"tags":["agent-chat"],"summary":"Resume Run","operationId":"resume_run_api_agent_chat_runs__run_id__resume_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeRunRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents":{"get":{"tags":["agents-admin"],"summary":"List Agents","operationId":"list_agents_api_admin_agents_get","parameters":[{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Agents Api Admin Agents Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["agents-admin"],"summary":"Create Agent","operationId":"create_agent_api_admin_agents_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Agent Api Admin Agents Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agent-tools":{"get":{"tags":["agents-admin"],"summary":"List Grantable Tools","description":"The ``tools`` catalog, with what decides ask-first (effect, irreversible)\nand whether each tool's integration is configured (the guard hides it if not).","operationId":"list_grantable_tools_api_admin_agent_tools_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Grantable Tools Api Admin Agent Tools Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agent-models":{"get":{"tags":["agents-admin"],"summary":"List Agent Models","description":"The active chat models an agent or a stored prompt may run on.\n\nMoved from the retired ``GET /api/models/available`` (GAIT-547 U23), with\nthe same response: one entry per active chat model a save would accept\n(``model_references.model_choice``), with ``choice_warning`` set on one that\nruns only after the move to the AI Gateway. The Agent Definitions and Stored\nPrompts screens both pick a model, so either screen's view permission is\nenough.","operationId":"list_agent_models_api_admin_agent_models_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Agent Models Api Admin Agent Models Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/{key}":{"get":{"tags":["agents-admin"],"summary":"Get Agent","operationId":"get_agent_api_admin_agents__key__get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Agent Api Admin Agents  Key  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["agents-admin"],"summary":"Update Agent","operationId":"update_agent_api_admin_agents__key__patch","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Agent Api Admin Agents  Key  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agents-admin"],"summary":"Delete Agent","description":"Soft delete. Its open pauses are cancelled and its runs stopped (U32);\nthe counts are returned.","operationId":"delete_agent_api_admin_agents__key__delete","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Agent Api Admin Agents  Key  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/{key}/suspend":{"post":{"tags":["agents-admin"],"summary":"Suspend Agent","description":"Switch a live agent off (U32, R39): new chats and calls are refused, its\nopen pauses are cancelled and its runs stopped. ``stopped`` has the counts.","operationId":"suspend_agent_api_admin_agents__key__suspend_post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuspendRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Suspend Agent Api Admin Agents  Key  Suspend Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/{key}/resume":{"post":{"tags":["agents-admin"],"summary":"Resume Agent","description":"Make a suspended agent live again.","operationId":"resume_agent_api_admin_agents__key__resume_post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Resume Agent Api Admin Agents  Key  Resume Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/{key}/restore":{"post":{"tags":["agents-admin"],"summary":"Restore Agent","description":"Bring a deleted agent back under its key, ``hidden`` (U32, R40). Held to\n``agents:definition:delete``: the permission that removed it.","operationId":"restore_agent_api_admin_agents__key__restore_post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Restore Agent Api Admin Agents  Key  Restore Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/{key}/tools":{"put":{"tags":["agents-admin"],"summary":"Set Tool Grants","description":"Replace the agent's tool grants with exactly ``grants``.","operationId":"set_tool_grants_api_admin_agents__key__tools_put","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolGrantsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Tool Grants Api Admin Agents  Key  Tools Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/{key}/callable-agents":{"put":{"tags":["agents-admin"],"summary":"Set Call Grants","description":"Replace the agents this one may reach, each with its call and delegate\nsettings (U19). A loop across both is refused with 409.","operationId":"set_call_grants_api_admin_agents__key__callable_agents_put","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallGrantsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Call Grants Api Admin Agents  Key  Callable Agents Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/{key}/skills":{"put":{"tags":["agents-admin"],"summary":"Set Skill Grants","description":"Replace the agent's skills. A missing expected tool is a warning.","operationId":"set_skill_grants_api_admin_agents__key__skills_put","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillGrantsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Skill Grants Api Admin Agents  Key  Skills Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/{key}/prompt":{"get":{"tags":["agents-admin"],"summary":"Get Agent Prompt","operationId":"get_agent_prompt_api_admin_agents__key__prompt_get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Agent Prompt Api Admin Agents  Key  Prompt Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/{key}/prompt/draft":{"put":{"tags":["agents-admin"],"summary":"Save Agent Prompt Draft","operationId":"save_agent_prompt_draft_api_admin_agents__key__prompt_draft_put","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Save Agent Prompt Draft Api Admin Agents  Key  Prompt Draft Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agents-admin"],"summary":"Delete Agent Prompt Draft","operationId":"delete_agent_prompt_draft_api_admin_agents__key__prompt_draft_delete","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/{key}/prompt/draft/publish":{"post":{"tags":["agents-admin"],"summary":"Publish Agent Prompt Draft","operationId":"publish_agent_prompt_draft_api_admin_agents__key__prompt_draft_publish_post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Publish Agent Prompt Draft Api Admin Agents  Key  Prompt Draft Publish Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/{key}/prompt/versions/{version_number}/activate":{"put":{"tags":["agents-admin"],"summary":"Activate Agent Prompt Version","operationId":"activate_agent_prompt_version_api_admin_agents__key__prompt_versions__version_number__activate_put","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","title":"Version Number"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Activate Agent Prompt Version Api Admin Agents  Key  Prompt Versions  Version Number  Activate Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/{key}/prompt/versions/{version_number}":{"delete":{"tags":["agents-admin"],"summary":"Delete Agent Prompt Version","operationId":"delete_agent_prompt_version_api_admin_agents__key__prompt_versions__version_number__delete","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","title":"Version Number"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/sdlc-roles":{"get":{"tags":["agents-admin"],"summary":"List Roles","operationId":"list_roles_api_admin_sdlc_roles_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Roles Api Admin Sdlc Roles Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["agents-admin"],"summary":"Create Role","operationId":"create_role_api_admin_sdlc_roles_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Role Api Admin Sdlc Roles Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/sdlc-roles/{key}":{"patch":{"tags":["agents-admin"],"summary":"Update Role","operationId":"update_role_api_admin_sdlc_roles__key__patch","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Role Api Admin Sdlc Roles  Key  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agents-admin"],"summary":"Delete Role","operationId":"delete_role_api_admin_sdlc_roles__key__delete","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skill-definitions":{"get":{"tags":["agents-admin"],"summary":"List Skills","operationId":"list_skills_api_admin_skill_definitions_get","parameters":[{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Skills Api Admin Skill Definitions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["agents-admin"],"summary":"Create Skill","operationId":"create_skill_api_admin_skill_definitions_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Skill Api Admin Skill Definitions Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skill-definitions/{key}":{"get":{"tags":["agents-admin"],"summary":"Get Skill","operationId":"get_skill_api_admin_skill_definitions__key__get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Skill Api Admin Skill Definitions  Key  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["agents-admin"],"summary":"Update Skill","operationId":"update_skill_api_admin_skill_definitions__key__patch","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Skill Api Admin Skill Definitions  Key  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agents-admin"],"summary":"Delete Skill","operationId":"delete_skill_api_admin_skill_definitions__key__delete","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skill-definitions/{key}/prompt":{"get":{"tags":["agents-admin"],"summary":"Get Skill Definition Prompt","operationId":"get_skill_definition_prompt_api_admin_skill_definitions__key__prompt_get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Skill Definition Prompt Api Admin Skill Definitions  Key  Prompt Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skill-definitions/{key}/prompt/draft":{"put":{"tags":["agents-admin"],"summary":"Save Skill Definition Prompt Draft","operationId":"save_skill_definition_prompt_draft_api_admin_skill_definitions__key__prompt_draft_put","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Save Skill Definition Prompt Draft Api Admin Skill Definitions  Key  Prompt Draft Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agents-admin"],"summary":"Delete Skill Definition Prompt Draft","operationId":"delete_skill_definition_prompt_draft_api_admin_skill_definitions__key__prompt_draft_delete","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skill-definitions/{key}/prompt/draft/publish":{"post":{"tags":["agents-admin"],"summary":"Publish Skill Definition Prompt Draft","operationId":"publish_skill_definition_prompt_draft_api_admin_skill_definitions__key__prompt_draft_publish_post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Publish Skill Definition Prompt Draft Api Admin Skill Definitions  Key  Prompt Draft Publish Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skill-definitions/{key}/prompt/versions/{version_number}/activate":{"put":{"tags":["agents-admin"],"summary":"Activate Skill Definition Prompt Version","operationId":"activate_skill_definition_prompt_version_api_admin_skill_definitions__key__prompt_versions__version_number__activate_put","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","title":"Version Number"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Activate Skill Definition Prompt Version Api Admin Skill Definitions  Key  Prompt Versions  Version Number  Activate Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skill-definitions/{key}/prompt/versions/{version_number}":{"delete":{"tags":["agents-admin"],"summary":"Delete Skill Definition Prompt Version","operationId":"delete_skill_definition_prompt_version_api_admin_skill_definitions__key__prompt_versions__version_number__delete","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","title":"Version Number"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/stored-prompts":{"get":{"tags":["agents-admin"],"summary":"List Stored Prompts","operationId":"list_stored_prompts_api_admin_stored_prompts_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Stored Prompts Api Admin Stored Prompts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["agents-admin"],"summary":"Create Stored Prompt","operationId":"create_stored_prompt_api_admin_stored_prompts_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoredPromptCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Stored Prompt Api Admin Stored Prompts Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/stored-prompts/gateway-test-options":{"get":{"tags":["agents-admin"],"summary":"Gateway Test Options","description":"Whether the gateway settings are present and which models a test run may\nuse. Needs only ``agents:prompt:test``, not the models registry permissions.","operationId":"gateway_test_options_api_admin_stored_prompts_gateway_test_options_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Gateway Test Options Api Admin Stored Prompts Gateway Test Options Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/stored-prompts/{key}":{"get":{"tags":["agents-admin"],"summary":"Get Stored Prompt","operationId":"get_stored_prompt_api_admin_stored_prompts__key__get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Stored Prompt Api Admin Stored Prompts  Key  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["agents-admin"],"summary":"Update Stored Prompt","operationId":"update_stored_prompt_api_admin_stored_prompts__key__patch","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoredPromptUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Stored Prompt Api Admin Stored Prompts  Key  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/stored-prompts/{key}/test-run":{"post":{"tags":["agents-admin"],"summary":"Test Run Stored Prompt","operationId":"test_run_stored_prompt_api_admin_stored_prompts__key__test_run_post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Test Run Stored Prompt Api Admin Stored Prompts  Key  Test Run Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/stored-prompts/{key}/prompt":{"get":{"tags":["agents-admin"],"summary":"Get Stored Prompt Prompt","operationId":"get_stored_prompt_prompt_api_admin_stored_prompts__key__prompt_get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Stored Prompt Prompt Api Admin Stored Prompts  Key  Prompt Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/stored-prompts/{key}/prompt/draft":{"put":{"tags":["agents-admin"],"summary":"Save Stored Prompt Prompt Draft","operationId":"save_stored_prompt_prompt_draft_api_admin_stored_prompts__key__prompt_draft_put","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Save Stored Prompt Prompt Draft Api Admin Stored Prompts  Key  Prompt Draft Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agents-admin"],"summary":"Delete Stored Prompt Prompt Draft","operationId":"delete_stored_prompt_prompt_draft_api_admin_stored_prompts__key__prompt_draft_delete","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/stored-prompts/{key}/prompt/draft/publish":{"post":{"tags":["agents-admin"],"summary":"Publish Stored Prompt Prompt Draft","operationId":"publish_stored_prompt_prompt_draft_api_admin_stored_prompts__key__prompt_draft_publish_post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Publish Stored Prompt Prompt Draft Api Admin Stored Prompts  Key  Prompt Draft Publish Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/stored-prompts/{key}/prompt/versions/{version_number}/activate":{"put":{"tags":["agents-admin"],"summary":"Activate Stored Prompt Prompt Version","operationId":"activate_stored_prompt_prompt_version_api_admin_stored_prompts__key__prompt_versions__version_number__activate_put","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","title":"Version Number"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Activate Stored Prompt Prompt Version Api Admin Stored Prompts  Key  Prompt Versions  Version Number  Activate Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/stored-prompts/{key}/prompt/versions/{version_number}":{"delete":{"tags":["agents-admin"],"summary":"Delete Stored Prompt Prompt Version","operationId":"delete_stored_prompt_prompt_version_api_admin_stored_prompts__key__prompt_versions__version_number__delete","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","title":"Version Number"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/directory":{"get":{"tags":["agent-directory"],"summary":"Agent Directory","operationId":"agent_directory_api_agents_directory_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Agent Directory Api Agents Directory Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/config/public":{"get":{"tags":["config"],"summary":"Get Public Config","description":"Non-sensitive configuration values needed by the frontend UI.","operationId":"get_public_config_api_config_public_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/login":{"post":{"summary":"Login","description":"Authenticate user with username and password.\n\nReturns a JWT token AND sets it as an httpOnly cookie for SSE authentication.\n\nAuthentication is handled by DatabaseAuthProvider (database-backed authentication).\n\nSecurity:\n    - Token returned in response body (for API clients)\n    - Token set as httpOnly cookie (for EventSource/SSE)\n    - Cookie is httpOnly (prevents XSS)\n    - Cookie is SameSite=Lax (prevents CSRF)\n    - Cookie is Secure in production (HTTPS only)","operationId":"login_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bootstrap-first-admin":{"post":{"summary":"Bootstrap First Admin","description":"Create the first admin user when the ``users`` table is empty.\n\nUsed by ``argo auth bootstrap`` when no JWT exists yet. Disabled outside\nlocal/dev environments and when ``AUTH_PROVIDER`` is not ``database``.\nRefuses to run if any user row already exists.","operationId":"bootstrap_first_admin_bootstrap_first_admin_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BootstrapFirstAdminRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BootstrapFirstAdminResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/logout":{"post":{"summary":"Logout","description":"Logout user by clearing the httpOnly cookie.\n\nThis endpoint clears the access_token cookie, effectively logging out\nthe user. The operation is idempotent - calling it multiple times has\nthe same effect.\n\nSecurity:\n    - Sets cookie with empty value and immediate expiry (max_age=0)\n    - httpOnly prevents JavaScript access\n    - Same SameSite and Secure attributes as login\n    - No authentication required (idempotent operation)\n\nReturns:\n    Success message confirming logout","operationId":"logout_logout_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/history/{conversation_id}":{"get":{"summary":"Get History","description":"Get conversation history from PostgreSQL.\n\nReturns all messages for the specified conversation in chronological order.\nOnly the conversation owner can access history.","operationId":"get_history_history__conversation_id__get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations":{"get":{"summary":"List Conversations","description":"List conversations for the authenticated user.\n\nSupports filtering by mate_type and pagination.\nResults are sorted by updated_at (most recent first).\n\nQuery Parameters:\n    - mate_type (optional): Filter by mate type (e.g. ops, sre, scrum, ask)\n    - limit (optional, default=50): Maximum conversations to return\n    - offset (optional, default=0): Pagination offset\n\nReturns:\n    List of conversations with metadata and last message preview","operationId":"list_conversations_conversations_get","parameters":[{"name":"mate_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mate Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}":{"delete":{"summary":"Delete Conversation","description":"Delete a conversation (hard delete).\n\nPermanently deletes the conversation and all its messages from the database.\nOnly the conversation owner can delete it.\n\nPath Parameters:\n    - conversation_id: UUID of the conversation\n\nReturns:\n    Success message","operationId":"delete_conversation_conversations__conversation_id__delete","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__main__MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update Conversation","description":"Update a conversation (currently supports renaming via title field).\n\nOnly the conversation owner can update it.\n\nPath Parameters:\n    - conversation_id: UUID of the conversation\n\nRequest Body:\n    - title: New title for the conversation (1-500 characters)\n\nReturns:\n    Updated conversation details","operationId":"update_conversation_conversations__conversation_id__patch","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health","description":"Liveness probe - Is the application alive?\n\nUsed by Container Apps to determine if the container should be restarted.\nThis check should be fast (< 100ms) and simple.\n\nReturns:\n    200 OK: Application is alive and responsive","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/health/migrations":{"get":{"summary":"Health Migrations","description":"Migration readiness probe — is the database schema actually at head?\n\nGAIT-66: liveness/readiness only proved \"the container is up\", never \"the\nmigrations applied\". `argo deploy {quick,full,infra}` polls this endpoint\nafter the image flip and fails the deploy unless it returns 200/\"ok\".\n\nReturns:\n    200 {\"status\": \"ok\", current, head, version}        — DB is at head\n    503 {\"status\": \"behind\", current, head, pending}    — DB is behind head\n    503 {\"status\": \"unknown\", error}                    — couldn't determine state","operationId":"health_migrations_health_migrations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/scheduler":{"get":{"summary":"Health Scheduler","description":"Scheduler liveness probe — is Celery beat actually firing dispatch ticks?\n\nThe container-level alerts (replicas-zero, restart-count) prove the beat\ncontainer is *running*; they cannot see the silent failure where beat is up\nbut no longer enqueuing ``dispatch_due_jobs`` (wedged broker, stuck loop) —\nthe exact shape of the original scheduled-jobs outage. Beat writes a heartbeat\nto Redis after every successful tick (~60s); this endpoint reports whether that\nheartbeat is fresh.\n\nReturns:\n    200 {\"status\": \"ok\",      last_dispatch_at, age_seconds, threshold_seconds}\n    503 {\"status\": \"stale\",   last_dispatch_at, age_seconds, threshold_seconds}\n    503 {\"status\": \"missing\", last_dispatch_at: null, threshold_seconds}\n    503 {\"status\": \"unknown\", error}  — heartbeat store unreachable","operationId":"health_scheduler_health_scheduler_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ready":{"get":{"summary":"Ready","description":"Status endpoint - Comprehensive application status (ALWAYS returns 200 OK).\n\nThis is NOT a blocking readiness probe - it provides detailed status information\nfor monitoring and diagnostics but never blocks traffic.\n\nChecks:\n    - Base secrets (Azure OpenAI, JWT)\n    - Configuration (endpoints, deployment names)\n    - Agent runtime\n    - Integration health (GitHub, Jira, Confluence, New Relic)\n\nReturns:\n    200 OK: Always (with detailed status in response body)\n\nStatus Indicators:\n    - \"ok\": Fully configured and ready\n    - \"degraded\": Partially configured (some optional features missing)\n    - \"not_configured\": Missing required configuration\n    - \"error\": Exception during check","operationId":"ready_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/status":{"get":{"summary":"Status Page","description":"HTML status page - Visual representation of application health.\n\nShows a user-friendly dashboard of all configuration and integration status.\nUseful for quick visual inspection of application health.\n\nReturns:\n    HTML page with status dashboard","operationId":"status_page_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/user":{"get":{"summary":"Get User","description":"Get current authenticated user information.\n\nReturns user details including roles and permissions for frontend use.\nThe frontend can use permissions to show/hide UI elements.","operationId":"get_user_user_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Root","description":"Serve the React frontend UI.","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/{full_path}":{"get":{"summary":"Serve Frontend","description":"Serve React frontend for all non-API routes (React Router handles routing).\n\nMust be defined LAST so API routes take precedence.\nStarlette resolves app.mount() sub-apps before @app.get routes, so\nmounted sub-apps like /mcp are NOT shadowed by this catch-all — see the\n`/mcp` mount above for why that ordering must stay module-level.\n\nStatic files in the frontend dist root (e.g. favicon, manifest) are\nserved directly; everything else falls through to index.html for\nclient-side routing.","operationId":"serve_frontend__full_path__get","parameters":[{"name":"full_path","in":"path","required":true,"schema":{"type":"string","title":"Full Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AcceptanceCheckView":{"properties":{"description":{"type":"string","title":"Description"},"verification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verification"}},"type":"object","required":["description"],"title":"AcceptanceCheckView","description":"One acceptance criterion of a plan unit (projected from ``spec``)."},"AcceptanceCriterionView":{"properties":{"id":{"type":"string","title":"Id"},"text":{"type":"string","title":"Text"},"verdict":{"type":"string","title":"Verdict"},"evidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence"}},"type":"object","required":["id","text","verdict"],"title":"AcceptanceCriterionView","description":"One spec-reviewer AC row (ticket 17's stable ``ac-N`` ids)."},"ActiveUsersSection":{"properties":{"change":{"$ref":"#/components/schemas/CountChange"},"trend":{"items":{"$ref":"#/components/schemas/TrendPoint"},"type":"array","title":"Trend"}},"type":"object","required":["change","trend"],"title":"ActiveUsersSection"},"Activity":{"properties":{"chats":{"type":"integer","title":"Chats"},"devmate_runs":{"type":"integer","title":"Devmate Runs"},"prds_approved":{"type":"integer","title":"Prds Approved"},"devmate_prs":{"type":"integer","title":"Devmate Prs"},"active":{"type":"boolean","title":"Active"}},"type":"object","required":["chats","devmate_runs","prds_approved","devmate_prs","active"],"title":"Activity"},"AddIntegrationRequest":{"properties":{"integration_type":{"type":"string","maxLength":100,"title":"Integration Type"},"external_id":{"type":"string","maxLength":255,"minLength":1,"title":"External Id"},"display_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Display Name"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["integration_type","external_id"],"title":"AddIntegrationRequest"},"AddTrackedAdoStageRequest":{"properties":{"ado_stage_name":{"type":"string","maxLength":255,"minLength":1,"title":"Ado Stage Name"},"display_label":{"type":"string","maxLength":255,"minLength":1,"title":"Display Label"}},"type":"object","required":["ado_stage_name","display_label"],"title":"AddTrackedAdoStageRequest"},"AdjustRequest":{"properties":{"launch_class":{"type":"string","title":"Launch Class","description":"major | minor | silent"},"reason":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Reason"}},"type":"object","required":["launch_class"],"title":"AdjustRequest"},"AdminKeyResponse":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"key_prefix":{"type":"string","title":"Key Prefix"},"name":{"type":"string","title":"Name"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"}},"type":"object","required":["id","user_id","key_prefix","name","is_active","created_at","last_used_at","expires_at"],"title":"AdminKeyResponse"},"AdminResetPasswordResponse":{"properties":{"generated_password":{"type":"string","title":"Generated Password"},"user_id":{"type":"string","title":"User Id"}},"type":"object","required":["generated_password","user_id"],"title":"AdminResetPasswordResponse","description":"Admin-generated one-time password response (database auth only)."},"Adoption":{"properties":{"opened":{"$ref":"#/components/schemas/AdoptionNumbers"},"merged":{"$ref":"#/components/schemas/AdoptionNumbers"},"by_project":{"items":{"$ref":"#/components/schemas/ProjectAdoption"},"type":"array","title":"By Project"},"trend_granularity":{"type":"string","enum":["week","month"],"title":"Trend Granularity"},"trend":{"items":{"$ref":"#/components/schemas/AdoptionTrendPoint"},"type":"array","title":"Trend"}},"type":"object","required":["opened","merged","by_project","trend_granularity","trend"],"title":"Adoption","description":"Argo adoption: the share of a board's PRs that went through Argo.\n\n``opened`` counts Board PRs opened in the range, ``merged`` those merged in\nit, each PR once; ``by_project`` has one row per board in scope, and a PR\nnaming two boards counts under both. ``trend`` is PRs opened and PRDs created\nper ``trend_granularity`` period, oldest first; ``[]`` when no Board PR was\nopened and no PRD created in the range."},"AdoptionNumbers":{"properties":{"prs":{"type":"integer","title":"Prs"},"through_argo":{"type":"integer","title":"Through Argo"},"outside_argo":{"type":"integer","title":"Outside Argo"},"adoption_rate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Adoption Rate"}},"type":"object","required":["prs","through_argo","outside_argo","adoption_rate"],"title":"AdoptionNumbers","description":"Board PRs opened (or merged) in the range, and how many DevMate opened.\n\n``adoption_rate`` is ``through_argo`` over ``prs``, a whole percent, or\n``None`` when there are no such Board PRs."},"AdoptionTab":{"properties":{"headline":{"type":"integer","title":"Headline","description":"Active users, for the tab label (R19)."},"active_users":{"$ref":"#/components/schemas/ActiveUsersSection"},"conversations":{"$ref":"#/components/schemas/ConversationsSection"},"thumbs_up":{"$ref":"#/components/schemas/ThumbsUpSection"},"teams":{"$ref":"#/components/schemas/TeamAdoptionSection"},"teams_reach":{"$ref":"#/components/schemas/TeamsReachSection"}},"type":"object","required":["headline","active_users","conversations","thumbs_up","teams","teams_reach"],"title":"AdoptionTab"},"AdoptionTrendPoint":{"properties":{"period_start":{"type":"string","format":"date","title":"Period Start"},"period_end":{"type":"string","format":"date","title":"Period End"},"opened":{"$ref":"#/components/schemas/AdoptionNumbers"},"opened_total":{"$ref":"#/components/schemas/AdoptionNumbers"},"partial":{"type":"boolean","title":"Partial"}},"type":"object","required":["period_start","period_end","opened","opened_total","partial"],"title":"AdoptionTrendPoint","description":"Adoption for one Chicago week or month: PRs opened in it.\n\n``period_start`` is the first day of the bucket (a Monday, or the 1st of a\nmonth). ``partial`` is set when the bucket reaches past the range, so it\nholds only part of a period; ``period_end`` is its last day."},"AdvanceRequest":{"properties":{"repo_ids":{"items":{"type":"string"},"type":"array","title":"Repo Ids"}},"type":"object","required":["repo_ids"],"title":"AdvanceRequest","description":"An Advance request: which repos to walk one lifecycle step.\n\n``repo_ids`` is the list of catalog-row UUIDs the operator chose (a single\nrow's button or the checked selection). The server re-derives each repo's\nowner + phase; there is deliberately **no recipient/phase field** in the\nrequest. Advancing IGNORES the ``next_action_at`` timer — the operator asked\nto move these now — but still only acts on repos that are genuinely due."},"AgentCreateRequest":{"properties":{"key":{"type":"string","maxLength":50,"minLength":1,"title":"Key"},"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"description":{"type":"string","minLength":1,"title":"Description"},"icon":{"type":"string","maxLength":32,"minLength":1,"title":"Icon"},"color_token":{"type":"string","maxLength":32,"minLength":1,"title":"Color Token"},"status":{"type":"string","title":"Status","default":"hidden"},"kind":{"type":"string","title":"Kind","default":"prompt"},"workflow_key":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Workflow Key"},"model_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model Name"},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Effort"},"reasoning_summary":{"type":"boolean","title":"Reasoning Summary","default":false},"people_can_chat":{"type":"boolean","title":"People Can Chat","default":true},"agents_can_call":{"type":"boolean","title":"Agents Can Call","default":false},"sdlc_role_key":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Sdlc Role Key"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt","description":"The first prompt version, active"}},"additionalProperties":false,"type":"object","required":["key","name","description","icon","color_token"],"title":"AgentCreateRequest"},"AgentUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string","maxLength":32,"minLength":1},{"type":"null"}],"title":"Icon"},"color_token":{"anyOf":[{"type":"string","maxLength":32,"minLength":1},{"type":"null"}],"title":"Color Token"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"workflow_key":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Workflow Key"},"model_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model Name"},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Effort"},"reasoning_summary":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reasoning Summary"},"people_can_chat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"People Can Chat"},"agents_can_call":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Agents Can Call"},"sdlc_role_key":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Sdlc Role Key"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"additionalProperties":false,"type":"object","title":"AgentUpdateRequest","description":"Every field optional; ``key`` is not one of them (it never changes)."},"AiEnablementSection":{"properties":{"ai_pr_share":{"$ref":"#/components/schemas/RatioTile"},"ai_line_share":{"$ref":"#/components/schemas/RatioTile"}},"type":"object","required":["ai_pr_share","ai_line_share"],"title":"AiEnablementSection"},"AnalyzeRequest":{"properties":{"build_id":{"type":"integer","minimum":1.0,"title":"Build Id"}},"additionalProperties":false,"type":"object","required":["build_id"],"title":"AnalyzeRequest"},"Annotation":{"properties":{"series":{"type":"string","title":"Series"},"scope_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Key"},"period_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Key"},"value_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Text"},"value_number":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value Number"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"cadence":{"anyOf":[{"type":"string","enum":["weekly","monthly"]},{"type":"null"}],"title":"Cadence"},"stale":{"type":"boolean","title":"Stale","default":false}},"type":"object","required":["series"],"title":"Annotation","description":"A value a human typed (D4).\n\n``srePerf.engHoursSaved``, ``overviewCallouts`` and the whole Major Incident tab share\none property: nobody computes them. D4a is why ``updated_at`` and ``stale`` are on the\nwire -- an annotation typed in March rendering beside a \"refreshed last night\" banner\nwould reintroduce exactly the problem this dashboard exists to solve."},"AnnotationRequest":{"properties":{"series":{"type":"string","maxLength":64,"minLength":1,"title":"Series"},"scope_key":{"type":"string","maxLength":128,"title":"Scope Key","default":""},"period_key":{"type":"string","maxLength":32,"title":"Period Key","default":""},"value_text":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}],"title":"Value Text"},"value_number":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value Number"},"cadence":{"anyOf":[{"type":"string","enum":["weekly","monthly"]},{"type":"null"}],"title":"Cadence"}},"type":"object","required":["series"],"title":"AnnotationRequest","description":"``PUT /annotations``. Upserts on ``(series, scope_key, period_key)``."},"ApplyChangesRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"attach":{"items":{"type":"string"},"type":"array","title":"Attach"},"detach":{"items":{"type":"string"},"type":"array","title":"Detach"},"add_members":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Add Members"},"remove_members":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Remove Members"}},"type":"object","title":"ApplyChangesRequest","description":"One Save, expressed as a diff rather than a desired state.\n\nA diff and not a set: ``attach``/``detach`` say what changed, so two admins\nediting one group cannot silently revert each other and nothing is deleted by\nomission. That property is why the per-item wire shape exists (KTD-4), and it\nsurvives here intact — this endpoint changes when the writes happen, not what\nthey say.\n\nEvery field is optional and an omitted one means \"leave it alone\", which is\nmaterially different from an empty list (\"remove them all\" is expressed by\nnaming them in ``detach``)."},"ApprovalDetail":{"properties":{"approval":{"$ref":"#/components/schemas/ApprovalSummary"},"resolved_content":{"additionalProperties":true,"type":"object","title":"Resolved Content"},"signoff_status":{"$ref":"#/components/schemas/ApprovalSignoffStatus"}},"type":"object","required":["approval","resolved_content","signoff_status"],"title":"ApprovalDetail"},"ApprovalListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ApprovalSummary"},"type":"array","title":"Items"},"next_since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Since"}},"type":"object","required":["items","next_since"],"title":"ApprovalListResponse"},"ApprovalReadiness":{"properties":{"has_permission":{"type":"boolean","title":"Has Permission"},"linked_to_org_member":{"type":"boolean","title":"Linked To Org Member"},"assigned_product_count":{"type":"integer","title":"Assigned Product Count"}},"type":"object","required":["has_permission","linked_to_org_member","assigned_product_count"],"title":"ApprovalReadiness","description":"Whether the CALLER's own account is able to approve PRDs at all.\n\n🛑 Deliberately says nothing about any particular approval, and takes no\napproval id. The detail route answers an indistinguishable 404 for \"missing\"\nand for \"exists but you may not act on it\", so the opaque id stays a locator\nrather than a capability — a readiness check keyed on an id would hand back\nexactly the oracle that posture exists to deny.\n\nWhat is left is still the half that matters in practice: two of the five\nconditions are facts about the ACCOUNT, not about the approval, so they can\nbe stated outright. A reader who is simply unlinked learns it here instead\nof guessing between five possibilities."},"ApprovalSignoffRunResponse":{"properties":{"verdict":{"type":"string","title":"Verdict"},"verdict_reason":{"type":"string","title":"Verdict Reason"},"trail_id":{"type":"string","title":"Trail Id"}},"type":"object","required":["verdict","verdict_reason","trail_id"],"title":"ApprovalSignoffRunResponse","description":"Result of running the Sign-off gate from an approval row.\n\nCarries just enough for the row to resolve to a badge and deep-link to the\nfull Trail in the ``/signoff`` workspace by ``trail_id``."},"ApprovalSignoffStatus":{"properties":{"status":{"type":"string","title":"Status"},"devmate_armed":{"type":"boolean","title":"Devmate Armed"},"verdict":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verdict"},"trail_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trail Id"},"stale":{"type":"boolean","title":"Stale","default":false}},"type":"object","required":["status","devmate_armed","verdict","trail_id"],"title":"ApprovalSignoffStatus","description":"Derived sign-off status for an approval (issue #02).\n\nProjected from the approval's *latest* linked **Trail** by the pure\n``derive_status`` (module B) — never stored on the immutable ``Approval``\nrow. ``trail_id`` deep-links the full breakdown in the ``/signoff``\nworkspace; it (and ``verdict``) are null in the never-gated case.\n\n``stale`` (Model B) is True when the approval content was\noverwritten on a re-approval since the gate last ran — the Trail's\n``prd_content_hash`` no longer matches the current stored body. A stale\nstatus disarms DevMate and re-labels the gate (\"Re-gate — PRD changed\")\nwhile KEEPING the last run's ``verdict``/``trail_id`` so the UI can still\nshow what the prior run found. Verdict-agnostic (any verdict can be stale)."},"ApprovalSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"approved_at":{"type":"string","format":"date-time","title":"Approved At"},"approved_by_user_id":{"type":"string","format":"uuid","title":"Approved By User Id"},"approver_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approver Display Name"},"pm_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pm Note"},"content_source":{"additionalProperties":true,"type":"object","title":"Content Source"},"prd_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prd Title"},"jira_issue_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jira Issue Key"},"product_id":{"type":"string","format":"uuid","title":"Product Id"},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name"},"repos":{"items":{"$ref":"#/components/schemas/LaunchRepoOption"},"type":"array","title":"Repos"},"signoff_status":{"$ref":"#/components/schemas/ApprovalSignoffStatus"}},"type":"object","required":["id","approved_at","approved_by_user_id","approver_display_name","pm_note","content_source","prd_title","product_id","product_name","repos","signoff_status"],"title":"ApprovalSummary","description":"Approval row WITHOUT ``resolved_content`` (used in list responses)."},"ApproveKickoffRequest":{"properties":{"repo":{"type":"string","title":"Repo","description":"https://github.com/owner/repo"},"base_branch":{"type":"string","title":"Base Branch","default":"main"},"mode":{"type":"string","enum":["plan_first","implement_now"],"title":"Mode","default":"implement_now"},"run_type":{"type":"string","enum":["implement","demo-video"],"title":"Run Type","default":"implement"},"fingerprint":{"type":"string","title":"Fingerprint"}},"type":"object","required":["repo","fingerprint"],"title":"ApproveKickoffRequest","description":"The launch options plus the fingerprint of the work order the caller\nwas shown (KTD16). Required: an approval of nothing in particular is not an\napproval."},"ApproveKickoffResponse":{"properties":{"outcome":{"type":"string","const":"launched","title":"Outcome"},"message":{"type":"string","title":"Message"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Url"}},"type":"object","required":["outcome","message","run_id","run_url"],"title":"ApproveKickoffResponse"},"ApproveRunRequest":{"properties":{"edited_plan_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edited Plan Text"}},"type":"object","title":"ApproveRunRequest","description":"Body for ``POST /api/devmate/runs/{id}/approve`` (Unit 12).\n\n``edited_plan_text`` is the OPTIONAL full edited markdown (\"approve with\nthis edit\"): when present, it is committed to the canonical plan path and\nthe DB mirror is re-synced (the Unit 11 edit path) BEFORE phase-2 dispatch,\nin one transaction. When absent, the already-committed plan is approved\nas-is. This is the explicit edit-payload contract the frontend ``save``\nbuilds against (full markdown, not a diff — Unit 11/14)."},"ApproveRunResponse":{"properties":{"run_id":{"type":"string","title":"Run Id"},"status":{"type":"string","title":"Status"},"phase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phase"},"cursor_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Agent Id"},"unit_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Unit Count"}},"type":"object","required":["run_id","status"],"title":"ApproveRunResponse"},"ApproveUserRequest":{"properties":{"roles":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Roles","description":"List of role names to assign"}},"type":"object","required":["roles"],"title":"ApproveUserRequest","description":"Request model for approving pending user with multiple roles.","example":{"roles":["chat_user","pmm"]}},"ArchiveCaptureResponse":{"properties":{"repo_id":{"type":"string","title":"Repo Id"},"full_name":{"type":"string","title":"Full Name"},"has_record":{"type":"boolean","title":"Has Record"},"record":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Record"},"display":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Display"}},"type":"object","required":["repo_id","full_name","has_record"],"title":"ArchiveCaptureResponse","description":"The durable archive capture for one repo (GAIT-242 U7).\n\n``record`` is the stored ``archive_record`` JSONB verbatim (the modal's raw\nJSON tab); ``display`` is the structured, field-labelled view (the pretty\ntab). Both are ``None`` when ``has_record`` is False — an archived-outside-Argo\nor pre-capture repo — which drives the disabled \"No Archive Capture\" button."},"ArchiveRequest":{"properties":{"skip_ldir_ticket":{"type":"boolean","title":"Skip Ldir Ticket","default":false}},"type":"object","title":"ArchiveRequest","description":"Optional archive options. ``skip_ldir_ticket`` is an admin-only, non-prod\ntesting bypass of the audit-ticket create; it is re-checked server-side (see\n:func:`archive_my_repo`) and silently ignored for anyone else or in prod."},"ArchiveResponse":{"properties":{"repo_id":{"type":"string","title":"Repo Id"},"repo_name":{"type":"string","title":"Repo Name"},"full_name":{"type":"string","title":"Full Name"},"archive_org":{"type":"string","title":"Archive Org"},"status":{"type":"string","enum":["transferred","finalization_pending","archive_unverified"],"title":"Status"},"archived":{"type":"boolean","title":"Archived"},"transferred":{"type":"boolean","title":"Transferred"},"pending":{"type":"boolean","title":"Pending"},"already_transferred":{"type":"boolean","title":"Already Transferred"},"ldir_ticket_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ldir Ticket Key"},"ldir_ticket_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ldir Ticket Url"},"archiver_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archiver Email"},"archiver_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archiver Name"},"permission_snapshot":{"items":{"$ref":"#/components/schemas/ArchiveTeamPermission"},"type":"array","title":"Permission Snapshot","default":[]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["repo_id","repo_name","full_name","archive_org","status","archived","transferred","pending","already_transferred"],"title":"ArchiveResponse","description":"Aggregate result of the synchronous archive pipeline (mirrors the dict\n``archive_repo`` returns). ``transferred`` is the confirmed GitHub move;\n``finalization_pending`` means the archive landed but the transfer is still\ncompleting (owner + ops get the follow-up email); ``archive_unverified``\nmeans the pipeline could not confirm the end state on GitHub and refused to\nclaim the archive happened (GAIT-419 R4).\n\n``archive_unverified`` MUST stay in this literal. It is the honest outcome\nthe whole of GAIT-419 exists to make possible, and leaving it out does not\nsuppress it — it makes FastAPI's response validation reject the payload and\nreturn an opaque 500 instead, which is a worse lie than the one being\nfixed."},"ArchiveTeamPermission":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"org":{"type":"string","title":"Org"},"permission":{"type":"string","title":"Permission"}},"type":"object","required":["name","slug","org","permission"],"title":"ArchiveTeamPermission","description":"One team's captured permission in the pre-archive snapshot (R5)."},"ArgoUsageDashboardPayload":{"properties":{"window":{"$ref":"#/components/schemas/WindowState"},"previous_window":{"$ref":"#/components/schemas/WindowState","description":"Same length, ending where `window` starts (R5)."},"granularity":{"type":"string","enum":["day","week"],"title":"Granularity","description":"Trend bucket unit: days up to 31 days, ISO weeks above."},"filters":{"$ref":"#/components/schemas/ArgoUsageFilterState"},"adoption":{"$ref":"#/components/schemas/AdoptionTab"},"autonomous":{"$ref":"#/components/schemas/AutonomousTab"},"work_done":{"$ref":"#/components/schemas/WorkDoneTab"}},"type":"object","required":["window","previous_window","granularity","filters","adoption","autonomous","work_done"],"title":"ArgoUsageDashboardPayload"},"ArgoUsageFilterState":{"properties":{"mate_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mate Type"},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"teams":{"items":{"$ref":"#/components/schemas/TeamOption"},"type":"array","title":"Teams"},"mate_types":{"items":{"type":"string"},"type":"array","title":"Mate Types","description":"Agent keys with chats, by name."},"mate_names":{"additionalProperties":{"type":"string"},"type":"object","title":"Mate Names","description":"Each agent key's display name."},"mate_colors":{"additionalProperties":{"type":"string"},"type":"object","title":"Mate Colors","description":"Each agent key's palette colour token; absent with no agent row."}},"type":"object","required":["mate_type","team_id","teams","mate_types","mate_names","mate_colors"],"title":"ArgoUsageFilterState","description":"The filters this payload was scoped to, echoed, plus the options (KTD2):\nleaders hold no permission to read the org-teams API."},"ArtifactAttachmentView":{"properties":{"name":{"type":"string","title":"Name"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"jira_attachment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jira Attachment Id"},"content_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Url"},"skip_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skip Reason"}},"type":"object","required":["name"],"title":"ArtifactAttachmentView","description":"One line of a demo-video unit's artifact record (U5 / KTD6).\n\nEither an ATTACHED file (``jira_attachment_id`` set, ``skip_reason``\n``None``) or a SKIPPED one (the reverse). One view model rather than two\nbecause the UI renders a single list in listing order and a skipped file\nis still a file the operator needs named."},"ArtifactEditRequest":{"properties":{"content":{"type":"string","maxLength":100000,"title":"Content"}},"type":"object","required":["content"],"title":"ArtifactEditRequest"},"ArtifactEditResponse":{"properties":{"id":{"type":"string","title":"Id"},"state":{"type":"string","title":"State"},"launch_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Launch Class"},"reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning"},"proposed_artifacts":{"items":{"type":"string"},"type":"array","title":"Proposed Artifacts"},"artifacts":{"additionalProperties":true,"type":"object","title":"Artifacts"},"intake_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Intake Fields"},"gaps":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Gaps"},"total_score":{"anyOf":[{"type":"integer"},{"type":"number"},{"type":"null"}],"title":"Total Score"},"criteria_scores":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Criteria Scores"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier"},"tier_split":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier Split"},"low_confidence_criteria":{"items":{"type":"string"},"type":"array","title":"Low Confidence Criteria","default":[]},"publication":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Publication"},"product":{"anyOf":[{"$ref":"#/components/schemas/ProductRef"},{"type":"null"}]},"gating_verdict":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gating Verdict"},"prd_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prd Ref"},"pmm_feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pmm Feedback"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"triggering_approval_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triggering Approval Id"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"},"sibling_sdlc_workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sibling Sdlc Workflow Id"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"republish":{"anyOf":[{"$ref":"#/components/schemas/RepublishResult"},{"type":"null"}]}},"type":"object","required":["id","state","launch_class","reasoning","proposed_artifacts","artifacts","intake_fields","gaps","total_score","criteria_scores","flags","tier","tier_split","publication","product","gating_verdict","prd_ref","pmm_feedback","error_message","triggering_approval_id","workflow_id","sibling_sdlc_workflow_id","created_at","updated_at"],"title":"ArtifactEditResponse","description":"``GtmRunResponse`` plus the ``republish`` outcome of a route that\nrepublishes in-request (the artifact edit and the post-completion adjust).\n``None`` when the run carries no publication (nothing was attempted)."},"AssignProductRequest":{"properties":{"product_id":{"type":"string","format":"uuid","title":"Product Id"}},"type":"object","required":["product_id"],"title":"AssignProductRequest"},"AttributionBucketResponse":{"properties":{"attribution_kind":{"type":"string","title":"Attribution Kind"},"seat_count":{"type":"integer","title":"Seat Count"},"consumption_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Consumption Cents","description":"Measures ALLOWANCE CONSUMPTION — the allowance this drew down, not cash billed."}},"type":"object","required":["attribution_kind","seat_count","consumption_cents"],"title":"AttributionBucketResponse"},"AuditEventResponse":{"properties":{"id":{"type":"string","title":"Id"},"category":{"type":"string","title":"Category"},"event_type":{"type":"string","title":"Event Type"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","category","event_type"],"title":"AuditEventResponse","description":"Single audit event."},"AuditStatsResponse":{"properties":{"total_events":{"type":"integer","title":"Total Events"},"unique_users":{"type":"integer","title":"Unique Users","default":0},"tool_calls":{"type":"integer","title":"Tool Calls","default":0},"by_category":{"items":{"$ref":"#/components/schemas/CategoryBreakdown"},"type":"array","title":"By Category"},"by_event_type":{"items":{"$ref":"#/components/schemas/EventTypeBreakdown"},"type":"array","title":"By Event Type"},"by_user":{"items":{"$ref":"#/components/schemas/UserBreakdown"},"type":"array","title":"By User"},"time_series":{"items":{"$ref":"#/components/schemas/TimeSeriesPoint"},"type":"array","title":"Time Series"}},"type":"object","required":["total_events","by_category","by_event_type","by_user","time_series"],"title":"AuditStatsResponse","description":"Aggregate audit statistics."},"AuditVocabularyResponse":{"properties":{"categories":{"items":{"type":"string"},"type":"array","title":"Categories"},"event_types":{"items":{"type":"string"},"type":"array","title":"Event Types"},"by_category":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"By Category","default":{}}},"type":"object","required":["categories","event_types"],"title":"AuditVocabularyResponse","description":"The distinct categories and event types present in the log."},"AuthProviderResponse":{"properties":{"auth_provider":{"type":"string","enum":["database","entra"],"title":"Auth Provider"}},"type":"object","required":["auth_provider"],"title":"AuthProviderResponse","description":"Active platform auth provider, for gating database-only UI affordances."},"AutomationRowResponse":{"properties":{"automation_id":{"type":"string","title":"Automation Id","description":"Cursor's own automation identifier, as shown in its UI."},"person":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Person","description":"The seat the vendor attributed this automation's usage to: a person's email, or a SERVICE ACCOUNT name where the automation ran as one rather than as somebody. NULL when the grain holds no seat for it — render that as unattributed, never as blank."},"seat_count":{"type":"integer","title":"Seat Count","description":"Distinct seats this automation's usage landed on. One in every case observed; above one, `person` is only the first of them."},"request_count":{"type":"integer","title":"Request Count"},"observed_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Observed Cents","description":"Measures ALLOWANCE CONSUMPTION — the allowance this drew down, not cash billed. OBSERVED, not derived: unlike a model row, this is not scaled against the seat-cycle total. Automation spend already sits inside the owning person's seat total — the vendor bills it to them — so scaling it there would present a slice of somebody's spend as a separate charge."},"share_of_automation":{"type":"number","title":"Share Of Automation","description":"Share of AUTOMATION spend in scope, not of the scope total: these rows are for comparing automations against each other."}},"type":"object","required":["automation_id","person","seat_count","request_count","observed_cents","share_of_automation"],"title":"AutomationRowResponse","description":"One automation's slice of the per-request grain."},"AutomationSummaryResponse":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/AutomationRowResponse"},"type":"array","title":"Rows"},"observed_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Observed Cents","description":"Measures ALLOWANCE CONSUMPTION — the allowance this drew down, not cash billed. Total automation spend in scope."},"request_count":{"type":"integer","title":"Request Count"},"share_of_observed":{"type":"number","title":"Share Of Observed","description":"Automation spend over the DAY grain's own total, both halves from one grain. Measured against the seat-cycle headline instead, this would move whenever the two grains drifted, for reasons having nothing to do with automations."}},"type":"object","required":["rows","observed_cents","request_count","share_of_observed"],"title":"AutomationSummaryResponse","description":"How much of the scope's observed spend was automation, and which ones."},"AutonomousTab":{"properties":{"headline":{"type":"integer","title":"Headline","description":"All autonomous runs, for the tab label."},"change":{"$ref":"#/components/schemas/CountChange"},"failed_change":{"$ref":"#/components/schemas/CountChange"},"trend":{"items":{"$ref":"#/components/schemas/OutcomeTrendPoint"},"type":"array","title":"Trend","description":"DevMate, CI-fix and GTM runs summed per bucket."},"devmate":{"$ref":"#/components/schemas/RunOutcomes"},"cicd_fix":{"$ref":"#/components/schemas/RunOutcomes"},"gtm":{"$ref":"#/components/schemas/RunOutcomes"}},"type":"object","required":["headline","change","failed_change","trend","devmate","cicd_fix","gtm"],"title":"AutonomousTab","description":"Never takes the Mate filter (KTD9)."},"BackfillRequest":{"properties":{"count":{"anyOf":[{"type":"integer","maximum":200.0,"minimum":1.0},{"type":"null"}],"title":"Count"}},"additionalProperties":false,"type":"object","title":"BackfillRequest"},"BackstopSummary":{"properties":{"kind":{"type":"string","title":"Kind"},"target":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target"}},"type":"object","required":["kind","target"],"title":"BackstopSummary","description":"What reconciles a delivery that never arrived — and whether its absence\nis a provider constraint or unbuilt debt (KD11, plan step 4).\n\n🛑 **The reason is read off the declaration; it is not invented here.** There\nis no ``no_backstop_reason`` field on ``IntegrationDeclaration`` — KD11's\nconstraint-versus-debt distinction is carried by ``Exemption``\n(``behaviour`` / ``provider_constraint`` / ``verified_at``), which U1 built\nand which refuses a bare assertion. So this response publishes the declared\nfacts and nothing else: the reconcile kind and target, plus every exemption\nthe declaration carries. A push-only integration with ``kind='none'`` and an\nexemption is a constraint; the same integration with no exemption is debt,\nand the console can say which WITHOUT the API asserting something no\ndeclaration is the source of.\n\nAs of U9 phase 1 both push declarations answer ``beat`` —\n``devmate-reconcile-pr-states`` for github, ``jira-reconcile-prd-approvals``\nfor atlassian — and the four outbound-only declarations answer ``none``\nbecause they have no ingress to reconcile. The one exemption in the tree is\n``snowflake``'s, against C4 rather than against a reconcile. So no row is\ncurrently rendered as debt; ``atlassian`` was, until its already-built\nreconcile was declared."},"BillingMeta":{"properties":{"projected_eom_acu":{"type":"number","title":"Projected Eom Acu"},"billing_days_elapsed":{"type":"integer","title":"Billing Days Elapsed"},"billing_total_days":{"type":"integer","title":"Billing Total Days"},"monthly_allocation_acu":{"type":"number","title":"Monthly Allocation Acu"}},"type":"object","required":["projected_eom_acu","billing_days_elapsed","billing_total_days","monthly_allocation_acu"],"title":"BillingMeta"},"BoardApprovalSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"approved_at":{"type":"string","format":"date-time","title":"Approved At"},"approved_by_user_id":{"type":"string","format":"uuid","title":"Approved By User Id"},"approver_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approver Display Name"},"pm_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pm Note"},"content_source":{"additionalProperties":true,"type":"object","title":"Content Source"},"prd_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prd Title"},"jira_issue_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jira Issue Key"},"product_id":{"type":"string","format":"uuid","title":"Product Id"},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name"},"repos":{"items":{"$ref":"#/components/schemas/LaunchRepoOption"},"type":"array","title":"Repos"},"signoff_status":{"$ref":"#/components/schemas/ApprovalSignoffStatus"},"can_launch":{"type":"boolean","title":"Can Launch"}},"type":"object","required":["id","approved_at","approved_by_user_id","approver_display_name","pm_note","content_source","prd_title","product_id","product_name","repos","signoff_status","can_launch"],"title":"BoardApprovalSummary","description":"An approved row on the approvals board: the list shape plus the\ncaller's own DevMate launch capability."},"BoardListRow":{"properties":{"list_id":{"type":"string","title":"List Id"},"name":{"type":"string","title":"Name"},"archived":{"type":"boolean","title":"Archived"},"card_count":{"type":"integer","title":"Card Count"},"mapped":{"type":"boolean","title":"Mapped"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"},"quarter_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quarter Number"},"display_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Label"}},"type":"object","required":["list_id","name","archived","card_count","mapped"],"title":"BoardListRow"},"BoardListsResponse":{"properties":{"lists":{"items":{"$ref":"#/components/schemas/BoardListRow"},"type":"array","title":"Lists"}},"type":"object","required":["lists"],"title":"BoardListsResponse"},"BoardNumbers":{"properties":{"prds_created":{"type":"integer","title":"Prds Created"},"prds_shipped":{"type":"integer","title":"Prds Shipped"},"ship_rate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ship Rate"},"prs":{"type":"integer","title":"Prs"},"by_status":{"$ref":"#/components/schemas/StatusCounts"},"merged":{"type":"integer","title":"Merged"},"merge_rate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Merge Rate"},"draft_rate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draft Rate"},"open_rate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Open Rate"},"decline_rate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Decline Rate"}},"type":"object","required":["prds_created","prds_shipped","ship_rate","prs","by_status","merged","merge_rate","draft_rate","open_rate","decline_rate"],"title":"BoardNumbers","description":"One Handled-by view: the six slide numbers plus the PR status groups.\n\nRates are whole percents, or ``None`` when the denominator is empty."},"BoardNumbersPayload":{"properties":{"state":{"type":"string","enum":["loading","refreshing","ready","unavailable"],"title":"State"},"read_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Read Id"},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Read At"},"jira_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Jira Synced At"},"github_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Github Synced At"},"latest_failure":{"anyOf":[{"$ref":"#/components/schemas/Failure"},{"type":"null"}]},"range":{"$ref":"#/components/schemas/Range"},"project":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project"},"project_options":{"items":{"type":"string"},"type":"array","title":"Project Options"},"views":{"anyOf":[{"$ref":"#/components/schemas/Views"},{"type":"null"}]},"adoption":{"anyOf":[{"$ref":"#/components/schemas/Adoption"},{"type":"null"}]},"prd_adoption":{"anyOf":[{"$ref":"#/components/schemas/PrdAdoption"},{"type":"null"}]},"changes":{"items":{"$ref":"#/components/schemas/ChangeEntry"},"type":"array","title":"Changes"},"since_last_copy":{"anyOf":[{"$ref":"#/components/schemas/ChangeEntry"},{"type":"null"}]},"last_copy":{"anyOf":[{"$ref":"#/components/schemas/LastCopy"},{"type":"null"}]}},"type":"object","required":["state","read_id","read_at","jira_synced_at","github_synced_at","latest_failure","range","project","project_options","views","adoption","prd_adoption","changes","since_last_copy","last_copy"],"title":"BoardNumbersPayload","description":"``GET /api/sdlc-board-numbers``."},"BootstrapFirstAdminRequest":{"properties":{"email":{"type":"string","title":"Email","description":"Admin email"},"password":{"type":"string","title":"Password","description":"Password (min 12 characters)"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Display name"}},"type":"object","required":["email","password"],"title":"BootstrapFirstAdminRequest","description":"Create the first admin user when the database has no users (local/dev only)."},"BootstrapFirstAdminResponse":{"properties":{"email":{"type":"string","title":"Email"},"message":{"type":"string","title":"Message"}},"type":"object","required":["email","message"],"title":"BootstrapFirstAdminResponse"},"BranchListResponse":{"properties":{"default_branch":{"type":"string","title":"Default Branch"},"branches":{"items":{"type":"string"},"type":"array","title":"Branches"},"truncated":{"type":"boolean","title":"Truncated","default":false},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["default_branch","branches"],"title":"BranchListResponse","description":"A launch branch picker's list (PDLC-328).\n\n``branches`` always starts with ``default_branch``. ``message`` is set only\nwhen GitHub could not be read and ``branches`` is just the fallback default."},"BreakdownEntryResponse":{"properties":{"name":{"type":"string","title":"Name"},"call_count":{"type":"integer","title":"Call Count"}},"type":"object","required":["name","call_count"],"title":"BreakdownEntryResponse"},"BreakdownResponse":{"properties":{"series":{"items":{"$ref":"#/components/schemas/BreakdownSeries"},"type":"array","title":"Series"},"totals":{"items":{"$ref":"#/components/schemas/BreakdownTotal"},"type":"array","title":"Totals"},"other_count":{"type":"integer","title":"Other Count","default":0}},"type":"object","required":["series","totals"],"title":"BreakdownResponse"},"BreakdownSeries":{"properties":{"name":{"type":"string","title":"Name"},"data":{"items":{"$ref":"#/components/schemas/BreakdownSeriesPoint"},"type":"array","title":"Data"}},"type":"object","required":["name","data"],"title":"BreakdownSeries"},"BreakdownSeriesPoint":{"properties":{"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["count"],"title":"BreakdownSeriesPoint"},"BreakdownTotal":{"properties":{"name":{"type":"string","title":"Name"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["name","count"],"title":"BreakdownTotal"},"BreakdownsResponse":{"properties":{"window_from":{"type":"string","format":"date-time","title":"Window From"},"window_to":{"type":"string","format":"date-time","title":"Window To"},"top_endpoints":{"items":{"$ref":"#/components/schemas/BreakdownEntryResponse"},"type":"array","title":"Top Endpoints"},"by_mate":{"items":{"$ref":"#/components/schemas/BreakdownEntryResponse"},"type":"array","title":"By Mate"},"by_role":{"items":{"$ref":"#/components/schemas/BreakdownEntryResponse"},"type":"array","title":"By Role"},"by_view":{"items":{"$ref":"#/components/schemas/BreakdownEntryResponse"},"type":"array","title":"By View"},"total_call_count":{"type":"integer","title":"Total Call Count"},"no_view_call_count":{"type":"integer","title":"No View Call Count"},"no_view_share":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"No View Share"},"top_n":{"type":"integer","title":"Top N"}},"type":"object","required":["window_from","window_to","top_endpoints","by_mate","by_role","by_view","total_call_count","no_view_call_count","no_view_share","top_n"],"title":"BreakdownsResponse"},"BudgetOutlookResponse":{"properties":{"annual_budget_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Annual Budget Cents","description":"The configured annual ALLOWANCE budget, in cents. Allowance consumption only — seat fees are excluded, so this is not total Cursor cost."},"contract_year_start":{"type":"string","format":"date","title":"Contract Year Start"},"contract_year_end":{"type":"string","format":"date","title":"Contract Year End","description":"EXCLUSIVE."},"pace_reference_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Pace Reference Cents","description":"One twelfth of the annual budget — the fixed denominator for percent-of-reference. Measures ALLOWANCE CONSUMPTION capacity, not cash billed. A pace marker, NOT a budget set for any particular period."},"grain":{"type":"string","title":"Grain","description":"The grain that answered the YEAR: always 'model_day', because the budget year's earliest months predate the mirror and exist in no other grain."},"period_grain":{"type":"string","title":"Period Grain","description":"The grain that answered the CURRENT PERIOD — 'seat_cycle' where the mirror holds the vendor's own cycle total, else 'model_day'. A period is a calendar month and therefore one Cursor allowance cycle, so this is normally authoritative and reconciles exactly to the billed figure."},"data_through":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Data Through","description":"Last day counted as complete. The newest day in the mirror is excluded because the sync was part-way through it, so this is behind the wall clock — by design, and the screen should show it."},"complete_days_in_period":{"type":"integer","title":"Complete Days In Period"},"forecast_unavailable_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forecast Unavailable Reason"},"consumed_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Consumed Cents","description":"Measures ALLOWANCE CONSUMPTION — the allowance this drew down, not cash billed."},"remaining_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Remaining Cents","description":"Budget minus consumed, in ALLOWANCE CONSUMPTION terms rather than cash billed. Negative once the budget is exceeded."},"forecast_cents":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Forecast Cents","description":"Projected ALLOWANCE CONSUMPTION for the whole contract year at the measured rates — what the year costs if nothing changes, including the months after the budget runs out. Null when the rate basis is too thin; never zero, which would read as on track."},"percent_of_budget":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Percent Of Budget"},"over_budget_cents":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Over Budget Cents","description":"Projected ALLOWANCE CONSUMPTION beyond the budget, or null when inside it. Consumption does not stop on the exhaustion date and the vendor's own limits do not stop it either, so this is what the rest of the contract year adds on top."},"on_pace_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"On Pace Cents","description":"Where ALLOWANCE CONSUMPTION would stand today if it were exactly on pace — the budget prorated by days elapsed. Backward-looking, so it can sit under budget while the forecast sits over; both are true."},"exhaustion_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Exhaustion Date","description":"The day the remaining allowance runs out at the measured rates, or null when it survives the contract year."},"required_cut_fraction":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Required Cut Fraction","description":"Fraction the current daily rates must fall by to land on budget (0.32 = 32%), or null when no cut is needed. Scales weekday and weekend rates together, preserving their measured ratio."},"period_start":{"type":"string","format":"date","title":"Period Start"},"period_end":{"type":"string","format":"date","title":"Period End","description":"EXCLUSIVE."},"period_consumed_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Period Consumed Cents","description":"Measures ALLOWANCE CONSUMPTION — the allowance this drew down, not cash billed."},"period_forecast_cents":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Period Forecast Cents","description":"Projected ALLOWANCE CONSUMPTION for the current contract period. Null when the rate basis is too thin."},"period_percent_of_reference":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Period Percent Of Reference"},"period_on_pace_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Period On Pace Cents","description":"The same on-pace marker for the current cycle: ALLOWANCE CONSUMPTION prorated by days elapsed in the cycle."},"seat_limit_cents":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Seat Limit Cents","description":"Sum of the vendor's own per-seat monthly ALLOWANCE CONSUMPTION limits for this cycle. Context for the exhaustion date, not a budget: it runs about twice the budget's monthly pace, so nothing stops automatically when the budget is spent."},"weekday_rate_cents":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Weekday Rate Cents","description":"Mean weekday ALLOWANCE CONSUMPTION per day over the trailing rate window."},"weekend_rate_cents":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Weekend Rate Cents","description":"Mean weekend ALLOWANCE CONSUMPTION per day. Around 6% of the weekday rate in practice — a single blended daily rate is why a naive projection drifts."},"periods":{"items":{"$ref":"#/components/schemas/ContractPeriodPointResponse"},"type":"array","title":"Periods"},"rising_periods":{"type":"integer","title":"Rising Periods","description":"Consecutive COMPLETE periods whose pace reading rose."},"pace_alert":{"type":"boolean","title":"Pace Alert","description":"The pace rule: three consecutive rising complete periods AND the latest above the reference. Direction and level together, so a plateau at a high level does not keep firing."},"is_over_budget":{"type":"boolean","title":"Is Over Budget"}},"type":"object","required":["annual_budget_cents","contract_year_start","contract_year_end","pace_reference_cents","grain","period_grain","data_through","complete_days_in_period","forecast_unavailable_reason","consumed_cents","remaining_cents","forecast_cents","percent_of_budget","over_budget_cents","on_pace_cents","exhaustion_date","required_cut_fraction","period_start","period_end","period_consumed_cents","period_forecast_cents","period_percent_of_reference","period_on_pace_cents","seat_limit_cents","weekday_rate_cents","weekend_rate_cents","periods","rising_periods","pace_alert","is_over_budget"],"title":"BudgetOutlookResponse","description":"Allowance budget, pace, and where the contract year lands (GAIT-481).\n\n``null`` from the endpoint when no usable budget is configured; the screen\nthen shows no budget panel at all rather than a zero.\n\nRead ``grain`` AND ``period_grain`` — they differ, and the difference is the\npoint. A period is a **calendar month**, which is exactly one Cursor\nallowance cycle, so the monthly figures normally come from the vendor's own\nper-cycle total and reconcile to the billed number precisely. The YEAR\ncannot: its earliest months predate this mirror (the vendor retains roughly\nthree cycles) and exist only in the day grain, which runs ~0.5% above the\ncycles where both are present. The screen must say which answered which\nrather than implying one figure for both.\n\nEvery forecast field is ``null`` together when the rate basis is too thin;\n``forecast_unavailable_reason`` says which case. Zero would read as \"on\ntrack\", which is the opposite of \"not yet known\"."},"BuildVelocitySection":{"properties":{"lead_time":{"$ref":"#/components/schemas/LeadTimeTile"}},"type":"object","required":["lead_time"],"title":"BuildVelocitySection"},"BulkDeleteRequest":{"properties":{"delivery_ids":{"items":{"type":"string"},"type":"array","maxItems":500,"minItems":1,"title":"Delivery Ids"}},"type":"object","required":["delivery_ids"],"title":"BulkDeleteRequest","description":"The receipts to destroy, named explicitly.\n\nIDS, never a filter. A filter would let the set change between the sentence\nthe operator confirmed and the rows the server removed — the feed is live,\nand a delivery arriving mid-confirmation would be deleted without ever\nhaving been seen. What was ticked is what goes.\n\nThe cap mirrors the observability bulk delete's 500: a bound the console's\n50-row page cannot reach, so it only ever refuses a caller that is not the\nconsole."},"BulkDeleteResponse":{"properties":{"deleted_count":{"type":"integer","title":"Deleted Count"},"failed_ids":{"items":{"type":"string"},"type":"array","title":"Failed Ids","default":[]}},"type":"object","required":["deleted_count"],"title":"BulkDeleteResponse","description":"How many went, and which did not.\n\nPartial success is a RESULT, not an error (the observability bulk delete\nsettles it the same way). An id that names a row already pruned, or already\ndeleted by someone else's console, must not fail the other 49."},"BulkRoleRequest":{"properties":{"user_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"User Ids"},"role":{"type":"string","title":"Role"}},"type":"object","required":["user_ids","role"],"title":"BulkRoleRequest","description":"Request model for bulk role grant/revoke operations.","example":{"role":"chat_user","user_ids":["123e4567-e89b-12d3-a456-426614174000"]}},"BulkRoleResponse":{"properties":{"success":{"type":"integer","title":"Success"},"failed":{"type":"integer","title":"Failed"},"errors":{"items":{},"type":"array","title":"Errors"}},"type":"object","required":["success","failed"],"title":"BulkRoleResponse","description":"Response model for bulk role operations.","example":{"errors":[],"failed":0,"success":3}},"CallGrantBody":{"properties":{"agent":{"type":"string","title":"Agent"},"call":{"type":"boolean","title":"Call","default":true},"delegate":{"type":"boolean","title":"Delegate","default":false}},"additionalProperties":false,"type":"object","required":["agent"],"title":"CallGrantBody","description":"One callee and the grant's two settings (GAIT-579 U19)."},"CallGrantsRequest":{"properties":{"grants":{"items":{"$ref":"#/components/schemas/CallGrantBody"},"type":"array","title":"Grants"}},"additionalProperties":false,"type":"object","required":["grants"],"title":"CallGrantsRequest"},"Capabilities":{"properties":{"can_grade":{"type":"boolean","title":"Can Grade"},"can_manage":{"type":"boolean","title":"Can Manage"},"can_import":{"type":"boolean","title":"Can Import"}},"type":"object","required":["can_grade","can_manage","can_import"],"title":"Capabilities"},"CaptureToggleRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"CaptureToggleRequest","description":"The only thing an operator decides. The WINDOW is not negotiable (D32)."},"CatalogListResponse":{"properties":{"repos":{"items":{"$ref":"#/components/schemas/CatalogRowResponse"},"type":"array","title":"Repos"},"total":{"type":"integer","title":"Total"},"as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of"}},"type":"object","required":["repos","total"],"title":"CatalogListResponse"},"CatalogRowResponse":{"properties":{"id":{"type":"string","title":"Id"},"github_node_id":{"type":"string","title":"Github Node Id"},"github_org":{"type":"string","title":"Github Org"},"github_org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Org Id"},"repo_name":{"type":"string","title":"Repo Name"},"full_name":{"type":"string","title":"Full Name"},"repo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Url"},"lifecycle_state":{"type":"string","title":"Lifecycle State"},"absent_since":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Absent Since"},"owner_login":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Login"},"repo_owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Owner"},"archive_exception":{"type":"boolean","title":"Archive Exception","default":false},"archive_exception_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archive Exception Date"},"last_outreach_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Outreach At"},"last_activity_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Activity At"},"last_push_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Push At"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"outcome_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome Reason"},"last_refreshed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Refreshed At"},"last_scan_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Scan At"},"owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"},"ops_escalation_emails":{"items":{"type":"string"},"type":"array","title":"Ops Escalation Emails","default":[]},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"teams":{"anyOf":[{"items":{"$ref":"#/components/schemas/TeamAssignment"},"type":"array"},{"type":"null"}],"title":"Teams"},"primary_team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Team"},"additional_teams":{"anyOf":[{"items":{"$ref":"#/components/schemas/TeamAssignment"},"type":"array"},{"type":"null"}],"title":"Additional Teams"},"archived_on_github":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived On Github"},"archive_capture_state":{"type":"string","title":"Archive Capture State","default":"none"},"teams_unavailable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Teams Unavailable"},"custom_properties":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Properties"},"custom_property_fields":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Custom Property Fields"},"can_edit":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Can Edit"},"can_snooze":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Can Snooze"},"can_archive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Can Archive"},"archive_read_only":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archive Read Only"},"partially_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Partially Archived"},"escalation_locked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Escalation Locked"},"property_nag_count":{"type":"integer","title":"Property Nag Count","default":0}},"type":"object","required":["id","github_node_id","github_org","repo_name","full_name","lifecycle_state"],"title":"CatalogRowResponse","description":"The catalog-editor / read-only detail-modal payload for one repo.\n\nBuilt from :meth:`GithubRepoCatalog.to_dict` in :func:`_serialize_row`, which\npasses the dict through this model. Pydantic ignores keys not declared here,\nso this class is the deliberate projection of ``to_dict`` down to the fields\nthe editor and detail modal render — the frontend ``RepoCatalogRow`` mirror.\n\nIntentionally OMITTED (present in ``to_dict``, not surfaced here):\n\n* Outreach-cadence bookkeeping — ``outreach_phase``, ``next_action_at``,\n  ``phase_started``, ``outreach_attempted_at``. The list/outreach surfaces\n  expose the lifecycle-facing ones through their own ``UnifiedRepoRow`` model;\n  the editor doesn't render them.\n* Archival attribution — ``archived_by_email``, ``archived_by_name``,\n  ``archived_at``. The archived state the modal needs is surfaced as\n  :attr:`archived_on_github` (set from ``is_archived``).\n* Internal plumbing — ``sync_run_id`` and the raw ``created_at`` /\n  ``updated_at`` / ``repo_created_at`` audit timestamps.\n\nIf a consumer ever needs one of these, add the field here deliberately (and to\n``RepoCatalogRow``) rather than widening the model wholesale."},"CategoryBreakdown":{"properties":{"category":{"type":"string","title":"Category"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["category","count"],"title":"CategoryBreakdown"},"ChangeEntry":{"properties":{"newer_read_id":{"type":"string","title":"Newer Read Id"},"newer_checked_at":{"type":"string","format":"date-time","title":"Newer Checked At"},"older_read_id":{"type":"string","title":"Older Read Id"},"older_checked_at":{"type":"string","format":"date-time","title":"Older Checked At"},"before":{"$ref":"#/components/schemas/BoardNumbers"},"after":{"$ref":"#/components/schemas/BoardNumbers"},"moved":{"items":{"type":"string","enum":["prds_created","prds_shipped","ship_rate","prs","draft","open","declined","merged","merge_rate"]},"type":"array","title":"Moved"},"prds_entered":{"items":{"type":"string"},"type":"array","title":"Prds Entered"},"prds_left":{"items":{"type":"string"},"type":"array","title":"Prds Left"},"prds_became_shipped":{"items":{"type":"string"},"type":"array","title":"Prds Became Shipped"},"prds_stopped_shipped":{"items":{"type":"string"},"type":"array","title":"Prds Stopped Shipped"},"prs_entered":{"items":{"type":"string"},"type":"array","title":"Prs Entered"},"prs_left":{"items":{"type":"string"},"type":"array","title":"Prs Left"},"prs_regrouped":{"items":{"$ref":"#/components/schemas/PrRegrouped"},"type":"array","title":"Prs Regrouped"},"split":{"anyOf":[{"$ref":"#/components/schemas/ChangeSplit"},{"type":"null"}]}},"type":"object","required":["newer_read_id","newer_checked_at","older_read_id","older_checked_at","before","after","moved","prds_entered","prds_left","prds_became_shipped","prds_stopped_shipped","prs_entered","prs_left","prs_regrouped","split"],"title":"ChangeEntry","description":"How the All view moved from an older read to a newer one (KTD8, KTD18)."},"ChangePasswordRequest":{"properties":{"old_password":{"type":"string","title":"Old Password"},"new_password":{"type":"string","minLength":12,"title":"New Password","description":"New password must be at least 12 characters"}},"type":"object","required":["old_password","new_password"],"title":"ChangePasswordRequest","description":"Request model for user changing their own password.","example":{"new_password":"newsecurepassword123","old_password":"currentpassword"}},"ChangeSplit":{"properties":{"through_before":{"$ref":"#/components/schemas/BoardNumbers"},"through_after":{"$ref":"#/components/schemas/BoardNumbers"},"outside_before":{"$ref":"#/components/schemas/BoardNumbers"},"outside_after":{"$ref":"#/components/schemas/BoardNumbers"},"prds_entered_through":{"items":{"type":"string"},"type":"array","title":"Prds Entered Through"},"prds_left_through":{"items":{"type":"string"},"type":"array","title":"Prds Left Through"},"prs_entered_through":{"items":{"type":"string"},"type":"array","title":"Prs Entered Through"},"prs_left_through":{"items":{"type":"string"},"type":"array","title":"Prs Left Through"}},"type":"object","required":["through_before","through_after","outside_before","outside_after","prds_entered_through","prds_left_through","prs_entered_through","prs_left_through"],"title":"ChangeSplit","description":"Before and after for the Through Argo and Outside Argo views.\n\nThe lists name what entered or left Through Argo (R17); Outside Argo moved\nthe other way."},"CicdFixRunRequest":{"properties":{"engine":{"anyOf":[{"type":"string","enum":["cursor","claude"]},{"type":"null"}],"title":"Engine"}},"type":"object","title":"CicdFixRunRequest","description":"Optional dispatch body (PDLC-332 KTD20). ``engine`` overrides the repo's\ndefault for this one dispatch; omitted, the repo default applies."},"CicdFixRunView":{"properties":{"id":{"type":"string","title":"Id"},"workflow_id":{"type":"string","title":"Workflow Id"},"state":{"type":"string","title":"State"},"cursor_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Agent Id"},"pr_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pr Url"},"branch_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Name"},"dispatched_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dispatched By"},"red_stages":{"items":{"type":"string"},"type":"array","title":"Red Stages","default":[]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"}},"type":"object","required":["id","workflow_id","state"],"title":"CicdFixRunView","description":"Response for both the dispatch and mark-inactive actions."},"ClaudeRunSpendPointResponse":{"properties":{"bucket":{"type":"string","format":"date","title":"Bucket","description":"The UTC day the sessions were dispatched."},"list_cost_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"List Cost Cents","description":"Measures CLAUDE LIST-PRICE COST in whole cents — Anthropic's list price for the sessions, stamped when each ends. Not allowance consumption and not an invoiced amount."},"sessions":{"type":"integer","title":"Sessions","description":"Claude sessions dispatched that day that have a cost."}},"type":"object","required":["bucket","list_cost_cents","sessions"],"title":"ClaudeRunSpendPointResponse","description":"One UTC dispatch day of Claude spend (KTD14). No per-person field."},"ClaudeRunSpendResponse":{"properties":{"start_date":{"type":"string","format":"date","title":"Start Date","description":"First day, INCLUSIVE (UTC)."},"end_date":{"type":"string","format":"date","title":"End Date","description":"Day after the last, EXCLUSIVE (UTC)."},"points":{"items":{"$ref":"#/components/schemas/ClaudeRunSpendPointResponse"},"type":"array","title":"Points","description":"Days with recorded cost only, oldest first."},"total_list_cost_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total List Cost Cents","description":"Measures CLAUDE LIST-PRICE COST in whole cents — Anthropic's list price for the sessions, stamped when each ends. Not allowance consumption and not an invoiced amount."},"total_sessions":{"type":"integer","title":"Total Sessions"}},"type":"object","required":["start_date","end_date","points","total_list_cost_cents","total_sessions"],"title":"ClaudeRunSpendResponse","description":"The Claude series: an organization aggregate per dispatch day (KTD14)."},"ClearHistoryResponse":{"properties":{"deleted":{"type":"integer","minimum":0.0,"title":"Deleted"}},"type":"object","required":["deleted"],"title":"ClearHistoryResponse"},"CodeReviewFindingView":{"properties":{"id":{"type":"string","title":"Id"},"rule_id":{"type":"string","title":"Rule Id"},"path":{"type":"string","title":"Path"},"line":{"type":"integer","title":"Line"},"message":{"type":"string","title":"Message"},"reviewer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer"},"dismissed":{"type":"boolean","title":"Dismissed","default":false}},"type":"object","required":["id","rule_id","path","line","message"],"title":"CodeReviewFindingView","description":"One inline finding, with the curation view's identity + dismissal state.\n\n``id`` is the same ``dismissal_key(rule_id, path, line)`` composite the\nticket-24 fix-launch endpoint validates ``finding_ids`` against — the\ncuration view sends this value back verbatim."},"CohortState":{"properties":{"workflow_count":{"type":"integer","title":"Workflow Count"},"has_data":{"type":"boolean","title":"Has Data","description":"False for an empty cohort. The panel renders the no-data state rather than a screen of zeroes."}},"type":"object","required":["workflow_count","has_data"],"title":"CohortState","description":"What the window selected (R8), and R19's explicit no-data state.\n\nThe excluded population is NOT counted here — it is a data-quality signal\nwith its own count and named workflows, and duplicating the number would\nlet the two drift."},"ComparisonCell":{"properties":{"series":{"type":"string","title":"Series"},"period_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Key"},"product_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Key"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"},"dim1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dim1"},"base":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Base"},"head":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Head"},"delta":{"type":"number","title":"Delta"}},"type":"object","required":["series","delta"],"title":"ComparisonCell"},"ComparisonResponse":{"properties":{"base":{"type":"string","title":"Base"},"head":{"type":"string","title":"Head"},"cells":{"items":{"$ref":"#/components/schemas/ComparisonCell"},"type":"array","title":"Cells"},"changed":{"type":"integer","title":"Changed","default":0},"truncated":{"type":"boolean","title":"Truncated","default":false}},"type":"object","required":["base","head"],"title":"ComparisonResponse","description":"What actually changed between two recorded runs (R11).\n\nDeliberately labelled apart from the weekly trend. The trend is recomputed from source on\nevery run and therefore always tells *today's* version of history; this tells what moved\nbetween two runs. Reading one as the other is how a recomputation looks like a regression."},"ConfigUpdateRequest":{"properties":{"value":{"type":"string","title":"Value"}},"type":"object","required":["value"],"title":"ConfigUpdateRequest","description":"Request body for updating config value."},"ConfirmVersionRequest":{"properties":{"row_version":{"type":"integer","title":"Row Version"},"version_id":{"type":"string","title":"Version Id"},"expiry_state":{"type":"string","title":"Expiry State"},"expiry_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expiry Date"}},"additionalProperties":true,"type":"object","required":["row_version","version_id","expiry_state"],"title":"ConfirmVersionRequest"},"ConformanceCheckResult":{"properties":{"check":{"type":"string","title":"Check"},"verdict":{"type":"string","title":"Verdict"},"detail":{"type":"string","title":"Detail"},"evidence":{"items":{"type":"string"},"type":"array","title":"Evidence"},"applies_to":{"type":"string","title":"Applies To"},"waivable":{"type":"boolean","title":"Waivable"}},"type":"object","required":["check","verdict","detail","evidence","applies_to","waivable"],"title":"ConformanceCheckResult","description":"One of R24a's eight checks, for one integration.\n\n``verdict`` carries the full five-value vocabulary rather than a boolean —\n``passed_by_declaration`` (R26) and ``declared_but_unwired`` are precisely\nthe two states a pass/fail rendering would erase, and they are the ones KD11\ndraws its constraint-versus-debt distinction between."},"ConformanceIntegrationReport":{"properties":{"slug":{"type":"string","title":"Slug"},"display_name":{"type":"string","title":"Display Name"},"checks":{"items":{"$ref":"#/components/schemas/ConformanceCheckResult"},"type":"array","title":"Checks"},"exemption_count":{"type":"integer","title":"Exemption Count"},"outbound_modules_scanned":{"type":"integer","title":"Outbound Modules Scanned"},"outbound_call_sites":{"type":"integer","title":"Outbound Call Sites"},"egress_bypass_sites":{"type":"integer","title":"Egress Bypass Sites"},"egress_wired_sites":{"type":"integer","title":"Egress Wired Sites"}},"type":"object","required":["slug","display_name","checks","exemption_count","outbound_modules_scanned","outbound_call_sites","egress_bypass_sites","egress_wired_sites"],"title":"ConformanceIntegrationReport","description":"One integration against the mandatory core (R25)."},"ConformanceReportResponse":{"properties":{"integrations":{"items":{"$ref":"#/components/schemas/ConformanceIntegrationReport"},"type":"array","title":"Integrations"},"verdicts":{"items":{"type":"string"},"type":"array","title":"Verdicts"},"generated_at":{"type":"string","title":"Generated At"}},"type":"object","required":["integrations","verdicts","generated_at"],"title":"ConformanceReportResponse","description":"The conformance walk, rendered for the console (R24, R25, KTD10).\n\n🛑 **This response is what makes KTD10 true rather than aspirational.**\n``app/services/integration_conformance.py`` claimed in its own docstring\nthat its walk was \"the same walk the console renders\" from the day it\nshipped, and nothing rendered it — no route, no frontend, no importer\noutside its two test files. The claim was found by review, not by a test,\nbecause a docstring cannot fail. The service is now genuinely shared: this\nroute and ``tests/contracts/test_integration_conformance.py`` call the same\nfunction, so the report an operator reads and the assertions CI runs cannot\ndisagree."},"ConnectAdoPipelineRequest":{"properties":{"external_id":{"type":"string","maxLength":255,"minLength":1,"title":"External Id"},"display_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Display Name"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"roles":{"anyOf":[{"items":{"$ref":"#/components/schemas/PipelineRoleBody"},"type":"array"},{"type":"null"}],"title":"Roles"}},"type":"object","required":["external_id"],"title":"ConnectAdoPipelineRequest","description":"Connect an ADO pipeline to a product with its roles (KTD24).\n\n``roles`` omitted gives the pipeline the default Deploy tracking role,\nlike every other path that creates a pipeline link; ``roles: []``\nconnects it with no role (it stays connected and nothing reads it)."},"ConnectRequest":{"properties":{"save_anyway":{"type":"boolean","title":"Save Anyway","default":false}},"type":"object","title":"ConnectRequest","description":"Request body for connecting an integration. It carries no values."},"ConsumptionRollupResponse":{"properties":{"scope":{"$ref":"#/components/schemas/ScopeSelectionResponse"},"group_by":{"type":"string","title":"Group By"},"period":{"$ref":"#/components/schemas/PeriodSelectionResponse"},"available_cycles":{"items":{"$ref":"#/components/schemas/CyclePeriodResponse"},"type":"array","title":"Available Cycles"},"seat_count":{"type":"integer","title":"Seat Count","description":"Seats in the scope. On a CYCLE this counts seats holding a cycle row; on a WINDOW it counts seats that actually consumed inside it, which is the only count the day grain can honestly produce."},"consumption_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Consumption Cents","description":"Measures ALLOWANCE CONSUMPTION — the allowance this drew down, not cash billed. The authoritative headline (KTD1); every other allowance figure here is a partition or a derivation of it. ON A WINDOW this measure changes (Amendment A, A3): it becomes the sum of per-request charges inside the window rather than a draw-down against a cycle's allowance. Branch on period.grain before labelling it."},"usage_based_cents":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Usage Based Cents","description":"Measures INCREMENTAL CASH BILLED beyond the allowance — the only figure here that is money actually charged, and NOT part of any allowance consumption total on this payload. NULL — not zero — on a window: the incremental-cash split lives on the seat-cycle grain only, and zero would assert an absence nothing has measured."},"seats":{"items":{"$ref":"#/components/schemas/SeatRowResponse"},"type":"array","title":"Seats","description":"EMPTY on a window. A seat row states an allowance limit and a stamped org position, and a rolling window has neither."},"groups":{"items":{"$ref":"#/components/schemas/GroupRowResponse"},"type":"array","title":"Groups"},"models":{"items":{"$ref":"#/components/schemas/ModelBreakdownRowResponse"},"type":"array","title":"Models"},"automations":{"$ref":"#/components/schemas/AutomationSummaryResponse"},"model_grain":{"$ref":"#/components/schemas/ModelGrainReconciliationResponse"},"not_charged":{"$ref":"#/components/schemas/NotChargedSummaryResponse"},"coverage":{"$ref":"#/components/schemas/CoverageSummaryResponse"},"freshness":{"$ref":"#/components/schemas/app__api__routes__cursor_spend__FreshnessResponse"}},"type":"object","required":["scope","group_by","period","available_cycles","seat_count","consumption_cents","usage_based_cents","seats","groups","models","automations","model_grain","not_charged","coverage","freshness"],"title":"ConsumptionRollupResponse","description":"Everything the consumption screen renders for one scope and period (R29)."},"ConsumptionTrendResponse":{"properties":{"period":{"$ref":"#/components/schemas/PeriodSelectionResponse"},"scope":{"$ref":"#/components/schemas/ScopeSelectionResponse"},"bucket":{"type":"string","title":"Bucket","description":"One of: day, month, week. Derived from the window length unless the caller names one."},"models":{"items":{"type":"string"},"type":"array","title":"Models","description":"The bands in descending WHOLE-WINDOW spend, 'Other' last. THE ORDER IS THE STACKING ORDER — decided server-side so two charts over one payload cannot stack differently. The top-N is resolved once over the window, never per bucket, so a band never enters or leaves mid-series."},"points":{"items":{"$ref":"#/components/schemas/app__api__routes__cursor_spend__TrendPointResponse"},"type":"array","title":"Points"}},"type":"object","required":["period","scope","bucket","models","points"],"title":"ConsumptionTrendResponse","description":"Consumption and model mix over time, for one scope (B2)."},"ContractPeriodPointResponse":{"properties":{"start":{"type":"string","format":"date","title":"Start","description":"First day of the period, INCLUSIVE."},"end":{"type":"string","format":"date","title":"End","description":"Day after the last, EXCLUSIVE."},"consumption_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Consumption Cents","description":"Measures ALLOWANCE CONSUMPTION — the allowance this drew down, not cash billed."},"percent_of_reference":{"type":"number","title":"Percent Of Reference","description":"Consumption as a percentage of the fixed pace reference. Over 100 means the period ran above an even twelfth of the annual allowance — not that a budget for this period was breached."},"is_current":{"type":"boolean","title":"Is Current"},"is_projected":{"type":"boolean","title":"Is Projected","description":"True when any part of this period is projected rather than measured — the current period's tail included. A consumer must not draw a projected period as measured."}},"type":"object","required":["start","end","consumption_cents","percent_of_reference","is_current","is_projected"],"title":"ContractPeriodPointResponse","description":"One 10th-to-9th contract period on the pace trend (GAIT-481).\n\n``percent_of_reference`` divides by a FIXED reference (annual ÷ 12), which is\nwhat makes two periods comparable — a rise means spend rose, not that the\ntarget moved. Consumers must not re-derive it against a remaining-budget\ndenominator; that drifts on flat spend."},"ConversationDetailResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Conversation UUID"},"mate_type":{"type":"string","title":"Mate Type","description":"Mate type (e.g. ops, sre, scrum, ask)"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Auto-generated conversation title"},"message_count":{"type":"integer","title":"Message Count","description":"Number of messages in conversation"},"created_at":{"type":"string","title":"Created At","description":"ISO timestamp when conversation was created"},"updated_at":{"type":"string","title":"Updated At","description":"ISO timestamp of last update"},"messages":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Messages","description":"Full message history"}},"type":"object","required":["id","mate_type","message_count","created_at","updated_at","messages"],"title":"ConversationDetailResponse","description":"Response for GET /conversations/{id} - full conversation with messages."},"ConversationFeedbackResponse":{"properties":{"feedback":{"additionalProperties":{"$ref":"#/components/schemas/FeedbackResponse"},"type":"object","title":"Feedback"}},"type":"object","required":["feedback"],"title":"ConversationFeedbackResponse"},"ConversationListItem":{"properties":{"id":{"type":"string","title":"Id","description":"Conversation UUID"},"mate_type":{"type":"string","title":"Mate Type","description":"Mate type (e.g. ops, sre, scrum, ask)"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Auto-generated conversation title"},"message_count":{"type":"integer","title":"Message Count","description":"Number of messages in conversation"},"created_at":{"type":"string","title":"Created At","description":"ISO timestamp when conversation was created"},"updated_at":{"type":"string","title":"Updated At","description":"ISO timestamp of last update"},"last_message_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Message Preview","description":"Preview of last message"}},"type":"object","required":["id","mate_type","message_count","created_at","updated_at"],"title":"ConversationListItem","description":"Single conversation in list response."},"ConversationListResponse":{"properties":{"conversations":{"items":{"$ref":"#/components/schemas/ConversationListItem"},"type":"array","title":"Conversations","description":"List of conversations"},"total":{"type":"integer","title":"Total","description":"Total number of conversations matching filters"},"limit":{"type":"integer","title":"Limit","description":"Limit used for pagination"},"offset":{"type":"integer","title":"Offset","description":"Offset used for pagination"}},"type":"object","required":["conversations","total","limit","offset"],"title":"ConversationListResponse","description":"Response for GET /conversations."},"ConversationUpdateRequest":{"properties":{"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title","description":"New title for the conversation"}},"type":"object","required":["title"],"title":"ConversationUpdateRequest"},"ConversationsSection":{"properties":{"change":{"$ref":"#/components/schemas/CountChange"},"unidentified":{"type":"integer","title":"Unidentified","description":"Part of the total (R17)."},"by_mate":{"items":{"$ref":"#/components/schemas/MateCount"},"type":"array","title":"By Mate","description":"Ranked by volume."},"by_mate_trend":{"items":{"$ref":"#/components/schemas/MateTrend"},"type":"array","title":"By Mate Trend","description":"Each Mate's trend, in by_mate order (R7)."},"trend":{"items":{"$ref":"#/components/schemas/TrendPoint"},"type":"array","title":"Trend"}},"type":"object","required":["change","unidentified","by_mate","by_mate_trend","trend"],"title":"ConversationsSection"},"CopyRequest":{"properties":{"read_id":{"type":"string","format":"uuid","title":"Read Id"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"project":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project"},"handled_by":{"type":"string","enum":["all","through_argo","outside_argo"],"title":"Handled By"}},"type":"object","required":["read_id","handled_by"],"title":"CopyRequest","description":"``POST /api/sdlc-board-numbers/copies``: which read a copy came from."},"CopyResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"read_id":{"type":"string","format":"uuid","title":"Read Id"},"copied_at":{"type":"string","format":"date-time","title":"Copied At"}},"type":"object","required":["id","read_id","copied_at"],"title":"CopyResponse"},"CountChange":{"properties":{"current":{"type":"integer","title":"Current"},"previous":{"type":"integer","title":"Previous"},"change_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change Pct","description":"(current - previous) / previous * 100, or null when is_new or the current period has no data."},"is_new":{"type":"boolean","title":"Is New","description":"The previous period had none and this one has some: read 'New', not an infinite percentage."}},"type":"object","required":["current","previous","change_pct","is_new"],"title":"CountChange"},"CoverageSummaryResponse":{"properties":{"buckets":{"items":{"$ref":"#/components/schemas/AttributionBucketResponse"},"type":"array","title":"Buckets"},"organization_unmatched_seat_count":{"type":"integer","title":"Organization Unmatched Seat Count"},"organization_unmatched_consumption_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Organization Unmatched Consumption Cents","description":"Measures ALLOWANCE CONSUMPTION — the allowance this drew down, not cash billed."}},"type":"object","required":["buckets","organization_unmatched_seat_count","organization_unmatched_consumption_cents"],"title":"CoverageSummaryResponse","description":"What makes an organization-wide total reconcile to its parts (R12)."},"CreateGroupRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"CreateGroupRequest"},"CreateIndexSourceRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"For confluence_space: Confluence space key (not the space display name)."},"source_type":{"type":"string","maxLength":50,"minLength":1,"title":"Source Type"},"source_identifier":{"type":"string","maxLength":255,"minLength":1,"title":"Source Identifier","description":"Azure AI Search productName on indexed chunks (LiteraMind filter)."},"product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Id"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["name","source_type","source_identifier"],"title":"CreateIndexSourceRequest"},"CreateJobRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"job_type":{"type":"string","maxLength":100,"minLength":1,"title":"Job Type"},"cron_expression":{"type":"string","maxLength":100,"minLength":1,"title":"Cron Expression"},"timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Timezone"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"enabled":{"type":"boolean","title":"Enabled","default":true},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Description"},"notify_trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notify Trigger"},"notify_recipient_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notify Recipient Mode"},"notify_emails":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Notify Emails"},"notify_include_logs":{"type":"boolean","title":"Notify Include Logs","default":false}},"type":"object","required":["name","job_type","cron_expression"],"title":"CreateJobRequest"},"CreateKeyRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["name"],"title":"CreateKeyRequest"},"CreateKeyResponse":{"properties":{"key":{"type":"string","title":"Key"},"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["key","id","name","key_prefix","created_at"],"title":"CreateKeyResponse"},"CreateMemberRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"email":{"type":"string","maxLength":254,"title":"Email"},"title_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Title Id"},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"}},"type":"object","required":["name","email"],"title":"CreateMemberRequest"},"CreateProductRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"status":{"type":"string","title":"Status","default":"active"}},"type":"object","required":["name"],"title":"CreateProductRequest"},"CreateRepoRequest":{"properties":{"repo_name":{"type":"string","maxLength":100,"minLength":1,"title":"Repo Name"},"repo_owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Owner"},"primary_team":{"type":"string","title":"Primary Team","default":""},"additional_teams":{"items":{"$ref":"#/components/schemas/TeamAssignment"},"type":"array","title":"Additional Teams"},"archive_exception":{"type":"string","title":"Archive Exception","default":"No"},"archive_exception_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archive Exception Date"},"custom_properties":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Properties"},"create_jira_audit_ticket":{"type":"boolean","title":"Create Jira Audit Ticket","default":true}},"type":"object","required":["repo_name"],"title":"CreateRepoRequest"},"CreateRoleRequest":{"properties":{"name":{"type":"string","maxLength":50,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"}},"type":"object","required":["name"],"title":"CreateRoleRequest"},"CreateRunRequest":{"properties":{"repo":{"type":"string","title":"Repo","description":"https://github.com/owner/repo"},"base_branch":{"type":"string","title":"Base Branch","default":"main"},"mode":{"type":"string","enum":["plan_first","implement_now"],"title":"Mode","default":"implement_now"},"run_type":{"type":"string","enum":["implement","demo-video"],"title":"Run Type","default":"implement"},"approval_id":{"type":"string","format":"uuid","title":"Approval Id"},"acknowledge_unsigned":{"type":"boolean","title":"Acknowledge Unsigned","default":false},"engine":{"anyOf":[{"type":"string","enum":["cursor","claude"]},{"type":"null"}],"title":"Engine"}},"type":"object","required":["repo","approval_id"],"title":"CreateRunRequest","description":"Body for ``POST /api/devmate/runs`` (deterministic entry, Unit 7).\n\nThe launch options (repo, base branch, mode, run type) are the shared\n:class:`~app.schemas.devmate.launch.LaunchOptions`; the launcher adds the\napproved-PRD ``approval_id`` (the Approval row carries no repo)."},"CreateRunResponse":{"properties":{"run_id":{"type":"string","title":"Run Id"},"status":{"type":"string","title":"Status"},"cursor_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Agent Id"}},"type":"object","required":["run_id","status"],"title":"CreateRunResponse"},"CreateTeamRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"product_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Product Id"},"jira_scrum_team_id":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Jira Scrum Team Id"}},"type":"object","required":["name"],"title":"CreateTeamRequest"},"CreateTitleRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"CreateTitleRequest"},"CreateUserRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","minLength":12,"title":"Password","description":"Password must be at least 12 characters"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles","description":"List of role names to assign"}},"type":"object","required":["email","password"],"title":"CreateUserRequest","description":"Request model for creating a new user.","example":{"email":"newuser@litera.com","name":"New User","password":"securepassword123","roles":["chat_user"]}},"CronPreviewRequest":{"properties":{"cron_expression":{"type":"string","maxLength":100,"minLength":1,"title":"Cron Expression"},"timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Timezone"},"count":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Count","default":3}},"type":"object","required":["cron_expression"],"title":"CronPreviewRequest"},"CronPreviewResponse":{"properties":{"valid":{"type":"boolean","title":"Valid"},"timezone":{"type":"string","title":"Timezone"},"next_runs":{"items":{"type":"string"},"type":"array","title":"Next Runs"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["valid","timezone"],"title":"CronPreviewResponse","description":"Next fire times for an unsaved expression.\n\n``valid=False`` is returned with HTTP 200 rather than a 4xx: this is called\non a debounced keystroke, so a half-typed expression is the normal case, not\na client error. Returning 422 here would flood the error monitoring with\npeople typing."},"CurrentPeriod":{"properties":{"year":{"type":"integer","title":"Year"},"quarter_number":{"type":"integer","title":"Quarter Number"}},"type":"object","required":["year","quarter_number"],"title":"CurrentPeriod"},"CyclePeriodResponse":{"properties":{"cycle_start":{"type":"string","format":"date-time","title":"Cycle Start"},"seat_count":{"type":"integer","title":"Seat Count"},"is_current":{"type":"boolean","title":"Is Current"}},"type":"object","required":["cycle_start","seat_count","is_current"],"title":"CyclePeriodResponse","description":"One billing cycle the snapshot holds, for the period control.\n\nEnumerated rather than guessed: ``cycle_start`` is an exact-equality filter,\nso a control that invented a boundary would match no seat and return an\nempty payload the screen would render as \"consumed nothing\"."},"DataQualityView":{"properties":{"devmate_backfill":{"$ref":"#/components/schemas/Signal"},"negative_duration":{"$ref":"#/components/schemas/Signal"},"deploy_run_join_miss":{"$ref":"#/components/schemas/Signal"},"stage_cache_disagreement":{"$ref":"#/components/schemas/Signal"},"stage_coverage":{"items":{"$ref":"#/components/schemas/StageCoverageRow"},"type":"array","title":"Stage Coverage"},"stage_skip_gap":{"$ref":"#/components/schemas/Signal"},"excluded_population":{"$ref":"#/components/schemas/Signal"},"offenders":{"items":{"$ref":"#/components/schemas/OffenderRow"},"type":"array","title":"Offenders"}},"type":"object","required":["devmate_backfill","negative_duration","deploy_run_join_miss","stage_cache_disagreement","stage_coverage","stage_skip_gap","excluded_population","offenders"],"title":"DataQualityView","description":"R1's third peer view: the seven signals, side by side.\n\nNothing here ranks, weights, scores or grades them against each other\n(R18). A verdict rule was designed for this dashboard and deliberately\nremoved: over seven signals of different kinds it either goes permanently\nred or needs invented thresholds, and either way it hides the counts behind\na word."},"DecisionRequest":{"properties":{"category":{"type":"string","title":"Category"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"based_on_decision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Based On Decision Id"}},"additionalProperties":false,"type":"object","required":["category"],"title":"DecisionRequest"},"DeleteTestRunsRequest":{"properties":{"confirm":{"type":"string","maxLength":64,"minLength":1,"title":"Confirm"}},"additionalProperties":false,"type":"object","required":["confirm"],"title":"DeleteTestRunsRequest"},"DeliveryDetail":{"properties":{"id":{"type":"string","title":"Id"},"integration_slug":{"type":"string","title":"Integration Slug"},"integration_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Name"},"direction":{"type":"string","title":"Direction"},"delivery_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Identifier"},"auth_verdict":{"type":"string","title":"Auth Verdict"},"dispatch_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dispatch Outcome"},"terminal_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terminal Status"},"in_progress":{"type":"boolean","title":"In Progress"},"handler_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handler Status"},"routed_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Routed To"},"received_at":{"type":"string","title":"Received At"},"resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"replay_of_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Replay Of Id"},"actor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor"},"payload_available":{"type":"boolean","title":"Payload Available"},"payload_delivery_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payload Delivery Id"},"replayed_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Replayed By Id"},"related_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Related Label"},"related_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Related Path"}},"type":"object","required":["id","integration_slug","integration_name","direction","delivery_identifier","auth_verdict","dispatch_outcome","terminal_status","in_progress","handler_status","routed_to","received_at","resolved_at","error","replay_of_id","actor","payload_available","payload_delivery_id","replayed_by_id","related_label","related_path"],"title":"DeliveryDetail","description":"The receipt plus whether a body exists to ask for.\n\n``payload_available`` is what lets the console offer the body link only when\nfollowing it would succeed, and lets it say \"not captured\" instead of\nrendering a 404 as a fetch failure."},"DeliveryEntry":{"properties":{"id":{"type":"string","title":"Id"},"integration_slug":{"type":"string","title":"Integration Slug"},"integration_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Name"},"direction":{"type":"string","title":"Direction"},"delivery_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Identifier"},"auth_verdict":{"type":"string","title":"Auth Verdict"},"dispatch_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dispatch Outcome"},"terminal_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terminal Status"},"in_progress":{"type":"boolean","title":"In Progress"},"handler_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handler Status"},"routed_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Routed To"},"received_at":{"type":"string","title":"Received At"},"resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"replay_of_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Replay Of Id"},"actor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor"}},"type":"object","required":["id","integration_slug","integration_name","direction","delivery_identifier","auth_verdict","dispatch_outcome","terminal_status","in_progress","handler_status","routed_to","received_at","resolved_at","error","replay_of_id","actor"],"title":"DeliveryEntry","description":"One receipt as the console reads it.\n\nNo ``body`` and no ``idempotency_key``: see the module docstring. ``error``\nis present because it is already scrubbed at persistence (R14) — the\nreceipt's whole purpose is to answer \"what went wrong\" without a second\ngrant."},"DeliveryListResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/DeliveryEntry"},"type":"array","title":"Entries"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["entries","total","page","page_size"],"title":"DeliveryListResponse","description":"``PaginatedAuditEventsResponse`` with ``entries`` in place of ``events``.\n\n``total`` is the number of receipts matching the active filters WITHIN the\nwindow — the \"(N total)\" the table renders, not the size of the table.\n``page_size`` is the size actually used, so a clamped request reads back the\nnumber it got rather than the number it asked for."},"DeliveryPayloadResponse":{"properties":{"delivery_id":{"type":"string","title":"Delivery Id"},"integration_slug":{"type":"string","title":"Integration Slug"},"byte_size":{"type":"integer","title":"Byte Size"},"body":{"title":"Body"}},"type":"object","required":["delivery_id","integration_slug","byte_size","body"],"title":"DeliveryPayloadResponse"},"DenyRequest":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"DenyRequest","description":"The deny action's body: an OPTIONAL free-text reason the PM declined.\n\nThe reason is captured for audit + echoed into the Jira comment. ``None`` /\nempty is allowed (deny without explanation); whitespace is stripped and an\nempty result is normalized to ``None``."},"DenyResponse":{"properties":{"pending_approval_id":{"type":"string","format":"uuid","title":"Pending Approval Id"},"title":{"type":"string","title":"Title"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"denied":{"type":"boolean","title":"Denied"}},"type":"object","required":["pending_approval_id","title","workflow_id","denied"],"title":"DenyResponse","description":"The result of denying an awaiting approval (or the idempotent no-op when\nit was already resolved — approved/rejected — by another path).\n\nNo Approval is minted (deny is terminal-without-Approval). ``denied`` is True\nonly when THIS call won the conditional UPDATE (awaiting -> rejected)."},"Derailment":{"properties":{"ever_derailed":{"type":"integer","title":"Ever Derailed"},"recovered":{"type":"integer","title":"Recovered"},"derailed_now":{"type":"integer","title":"Derailed Now"}},"type":"object","required":["ever_derailed","recovered","derailed_now"],"title":"Derailment","description":"R28's three counts, which deliberately do NOT partition.\n\n``ever_derailed`` scans the raw trail for derail event types;\n``recovered`` and ``derailed_now`` are read off the projector's fold. A\n``unit_error`` the fold ignored outright is in the first and in neither of\nthe others, and the gap between them is itself a signal — there is no\nfourth count that reconciles it."},"DevToolsDeleteResult":{"properties":{"deleted_count":{"type":"integer","title":"Deleted Count"}},"type":"object","required":["deleted_count"],"title":"DevToolsDeleteResult"},"DevToolsStatsResponse":{"properties":{"conversations":{"type":"integer","title":"Conversations"},"messages":{"type":"integer","title":"Messages"},"captured_prompts":{"type":"integer","title":"Captured Prompts"},"integration_events":{"type":"integer","title":"Integration Events"},"users":{"type":"integer","title":"Users"},"audit_events":{"type":"integer","title":"Audit Events","default":0}},"type":"object","required":["conversations","messages","captured_prompts","integration_events","users"],"title":"DevToolsStatsResponse"},"DevmateRunListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DevmateRunSummary"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["items","total","page","page_size","total_pages"],"title":"DevmateRunListResponse","description":"Paginated list response (mirrors ``PaginatedPromptsResponse``)."},"DevmateRunSummary":{"properties":{"id":{"type":"string","title":"Id"},"prd_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prd Title"},"jira_issue_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jira Issue Key"},"repo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo"},"status":{"type":"string","title":"Status"},"phase":{"type":"string","title":"Phase"},"mode":{"type":"string","title":"Mode","default":"plan_first"},"run_type":{"type":"string","title":"Run Type","default":"implement"},"failure_substate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Substate"},"dispatched_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Dispatched At"},"cursor_agent_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Agent Url"},"units_total":{"type":"integer","title":"Units Total","default":0},"prs_open":{"type":"integer","title":"Prs Open","default":0},"approved_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved By"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"all_merged":{"type":"boolean","title":"All Merged","default":false},"engine":{"type":"string","title":"Engine","default":"cursor"},"queue_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Queue State"}},"type":"object","required":["id","status","phase"],"title":"DevmateRunSummary","description":"A row in the runs list."},"DevmateRunView":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"phase":{"type":"string","title":"Phase"},"mode":{"type":"string","title":"Mode","default":"plan_first"},"run_type":{"type":"string","title":"Run Type","default":"implement"},"failure_substate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Substate"},"repo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo"},"base_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Branch"},"ticket_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ticket Id"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"approved_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved By"},"approved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Approved At"},"dispatched_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Dispatched At"},"cursor_agent_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Agent Url"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"units":{"items":{"$ref":"#/components/schemas/DevmateUnitView"},"type":"array","title":"Units"},"phases":{"items":{"$ref":"#/components/schemas/RunPhaseView"},"type":"array","title":"Phases"},"proposed_plan":{"anyOf":[{"$ref":"#/components/schemas/ProposedPlanView"},{"type":"null"}]},"prd_snapshot":{"anyOf":[{"$ref":"#/components/schemas/PrdSnapshotView"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"qualitymate_fix":{"anyOf":[{"$ref":"#/components/schemas/QualityMateFixSourceView"},{"type":"null"}]},"jira_issue_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jira Issue Key"},"all_merged":{"type":"boolean","title":"All Merged","default":false},"engine":{"type":"string","title":"Engine","default":"cursor"},"engine_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engine Model"},"queue_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Queue State"},"claude_list_cost_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Claude List Cost Cents"},"cursor_cost_untracked":{"type":"boolean","title":"Cursor Cost Untracked","default":true},"repo_default_engine":{"type":"string","title":"Repo Default Engine","default":"cursor"},"repo_claude_allowed":{"type":"boolean","title":"Repo Claude Allowed","default":false},"claude_available":{"type":"boolean","title":"Claude Available","default":false}},"type":"object","required":["id","status","phase"],"title":"DevmateRunView","description":"Full detail for one run — the multi-actor timeline payload."},"DevmateUnitView":{"properties":{"unit_id":{"type":"string","title":"Unit Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"pr_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pr Url"},"branch_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Name"},"merged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Merged At"},"pr_closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pr Closed At"},"dispatched_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Dispatched At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"fidelity_review_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fidelity Review Status"},"fidelity_reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Fidelity Reviewed At"},"fidelity_review_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fidelity Review Summary"},"has_detail":{"type":"boolean","title":"Has Detail","default":false},"code_review_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Review Status"},"code_reviewed_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Reviewed Sha"},"code_review_finding_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Code Review Finding Count"},"cursor_agent_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Agent Url"},"engine":{"type":"string","title":"Engine","default":"cursor"},"engine_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engine Model"},"queue_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Queue State"},"list_cost_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"List Cost Cents"},"kind":{"type":"string","title":"Kind","default":"implementation"},"parent_unit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Unit Id"},"reviewers":{"items":{"$ref":"#/components/schemas/ReviewerStatusView"},"type":"array","title":"Reviewers"},"code_review_findings":{"items":{"$ref":"#/components/schemas/CodeReviewFindingView"},"type":"array","title":"Code Review Findings"},"acceptance_criteria":{"items":{"$ref":"#/components/schemas/AcceptanceCriterionView"},"type":"array","title":"Acceptance Criteria"},"fix_rounds":{"items":{"$ref":"#/components/schemas/FixRoundView"},"type":"array","title":"Fix Rounds"},"fix_lineage":{"anyOf":[{"$ref":"#/components/schemas/FixRoundView"},{"type":"null"}]},"pr_review_findings":{"anyOf":[{"items":{"$ref":"#/components/schemas/PrReviewFindingView"},"type":"array"},{"type":"null"}],"title":"Pr Review Findings"},"pr_review_findings_captured_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pr Review Findings Captured At"},"pr_review_findings_truncated":{"type":"boolean","title":"Pr Review Findings Truncated","default":false},"pr_review_findings_scanned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pr Review Findings Scanned At"},"pr_review_findings_failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pr Review Findings Failed At"},"open_finding_count":{"type":"integer","title":"Open Finding Count","default":0},"has_open_work":{"type":"boolean","title":"Has Open Work","default":false},"submodule_prs":{"items":{"$ref":"#/components/schemas/SubmodulePrView"},"type":"array","title":"Submodule Prs"},"submodule_prs_pending":{"type":"boolean","title":"Submodule Prs Pending","default":false},"artifacts":{"items":{"$ref":"#/components/schemas/ArtifactAttachmentView"},"type":"array","title":"Artifacts"},"artifact_collection":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artifact Collection"}},"type":"object","required":["unit_id"],"title":"DevmateUnitView","description":"Live state of one plan unit — the per-unit card in the timeline."},"DiffResultResponse":{"properties":{"products":{"items":{"$ref":"#/components/schemas/ProductDiffItemResponse"},"type":"array","title":"Products"},"roles":{"items":{"$ref":"#/components/schemas/RoleDiffItemResponse"},"type":"array","title":"Roles","default":[]},"summary":{"$ref":"#/components/schemas/DiffSummaryResponse"}},"type":"object","required":["products","summary"],"title":"DiffResultResponse"},"DiffSummaryResponse":{"properties":{"new":{"type":"integer","title":"New"},"changed":{"type":"integer","title":"Changed"},"unchanged":{"type":"integer","title":"Unchanged"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["new","changed","unchanged","warnings"],"title":"DiffSummaryResponse"},"DigestRecipientsRequest":{"properties":{"recipients":{"items":{"type":"string"},"type":"array","title":"Recipients","description":"Addresses the Daily Board Digest is sent to. Empty pauses it."}},"type":"object","title":"DigestRecipientsRequest"},"DigestRecipientsResponse":{"properties":{"recipients":{"items":{"type":"string"},"type":"array","title":"Recipients"},"allowed_domains":{"items":{"type":"string"},"type":"array","title":"Allowed Domains","description":"Domains a recipient may use. Empty means the outbound allow-list is unset and every domain would pass — the job refuses to send in that state rather than mailing board content anywhere."}},"type":"object","required":["recipients","allowed_domains"],"title":"DigestRecipientsResponse"},"DigestTestSendResponse":{"properties":{"subject":{"type":"string","title":"Subject"},"quarter":{"type":"string","title":"Quarter"},"recipients":{"items":{"type":"string"},"type":"array","title":"Recipients"},"dropped_recipients":{"items":{"type":"string"},"type":"array","title":"Dropped Recipients"},"tiles":{"additionalProperties":{"type":"integer"},"type":"object","title":"Tiles"}},"type":"object","required":["subject","quarter","recipients","dropped_recipients","tiles"],"title":"DigestTestSendResponse"},"DraftRequest":{"properties":{"content":{"type":"string","minLength":1,"title":"Content","description":"Draft prompt text"},"source_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Version Id","description":"Published version row id this draft was forked from"}},"additionalProperties":false,"type":"object","required":["content"],"title":"DraftRequest"},"DrillResponse":{"properties":{"series":{"type":"string","title":"Series"},"cell_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cell Key"},"as_of_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of Date"},"total":{"type":"integer","title":"Total","default":0},"jiraBase":{"type":"string","title":"Jirabase","default":""},"rows":{"items":{"$ref":"#/components/schemas/DrillRow"},"type":"array","title":"Rows"}},"type":"object","required":["series"],"title":"DrillResponse","description":"Issue-level detail for one cell of one widget (R9).\n\n``jiraBase`` and each row's ``url`` are handed to the **browser**; the server never calls\nAtlassian, so a dashboard read cannot start depending on Jira being up."},"DrillRow":{"properties":{"key":{"type":"string","title":"Key"},"product":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"created":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner"},"url":{"type":"string","title":"Url"}},"type":"object","required":["key","url"],"title":"DrillRow"},"Duration":{"properties":{"seconds":{"type":"number","title":"Seconds","description":"Signed length in seconds. For sorting and arithmetic."},"text":{"type":"string","title":"Text","description":"Day-scale rendering, e.g. '3d 4h'. For display; the frontend has no day-scale formatter of its own."}},"type":"object","required":["seconds","text"],"title":"Duration","description":"One duration, in both shapes the panel needs (see the module docstring).\n\n``seconds`` is SIGNED: an excluded transition's negative duration is the\nevidence for the signal that reports it, so it is never clamped here."},"EditRequest":{"properties":{"row_version":{"type":"integer","title":"Row Version"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"secret_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Type"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"expiry_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiry State"},"expiry_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expiry Date"},"lead_time_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lead Time Days"}},"additionalProperties":true,"type":"object","required":["row_version"],"title":"EditRequest"},"EndToEndDurations":{"properties":{"n":{"type":"integer","title":"N"},"p85":{"$ref":"#/components/schemas/Duration"},"median":{"$ref":"#/components/schemas/Duration"},"mean":{"$ref":"#/components/schemas/Duration"},"fastest":{"$ref":"#/components/schemas/Duration"},"slowest":{"$ref":"#/components/schemas/Duration"},"still_running":{"type":"integer","title":"Still Running"},"derailed":{"type":"integer","title":"Derailed"},"skipped_target":{"type":"integer","title":"Skipped Target"}},"type":"object","required":["n","p85","median","mean","fastest","slowest","still_running","derailed","skipped_target"],"title":"EndToEndDurations","description":"The end-to-end figure (R11, R32), with its OWN completion counts.\n\nCompletion is defined per statistic (R25), so ``n``, ``still_running``,\n``derailed`` and ``skipped_target`` belong to this figure and not to the\ncohort. ``p85`` is the headline (R32); the rest is the breakdown that\nmust appear in the same view (R7)."},"EndpointScreenChildResponse":{"properties":{"client_view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client View"},"call_count":{"type":"integer","title":"Call Count"},"p95_time_to_headers_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"P95 Time To Headers Ms"},"error_count":{"type":"integer","title":"Error Count"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"}},"type":"object","required":["client_view","call_count","p95_time_to_headers_ms","error_count","last_seen_at"],"title":"EndpointScreenChildResponse"},"EndpointScreenDrilldownResponse":{"properties":{"path_template":{"type":"string","title":"Path Template"},"method":{"type":"string","title":"Method"},"parent_call_count":{"type":"integer","title":"Parent Call Count"},"screens":{"items":{"$ref":"#/components/schemas/EndpointScreenChildResponse"},"type":"array","title":"Screens"}},"type":"object","required":["path_template","method","parent_call_count","screens"],"title":"EndpointScreenDrilldownResponse"},"EndpointSeriesResponse":{"properties":{"name":{"type":"string","title":"Name"},"method":{"type":"string","title":"Method"},"path_template":{"type":"string","title":"Path Template"},"total_calls":{"type":"integer","title":"Total Calls"},"points":{"items":{"$ref":"#/components/schemas/app__api__routes__endpoint_usage__TrendPointResponse"},"type":"array","title":"Points"}},"type":"object","required":["name","method","path_template","total_calls","points"],"title":"EndpointSeriesResponse"},"EndpointSummaryResponse":{"properties":{"window_from":{"type":"string","format":"date-time","title":"Window From"},"window_to":{"type":"string","format":"date-time","title":"Window To"},"rows":{"items":{"$ref":"#/components/schemas/EndpointSummaryRowResponse"},"type":"array","title":"Rows"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_rows":{"type":"integer","title":"Total Rows"},"totals":{"$ref":"#/components/schemas/EndpointUsageTotalsResponse"},"sort_by":{"type":"string","title":"Sort By"},"descending":{"type":"boolean","title":"Descending"}},"type":"object","required":["window_from","window_to","rows","page","page_size","total_rows","totals","sort_by","descending"],"title":"EndpointSummaryResponse"},"EndpointSummaryRowResponse":{"properties":{"path_template":{"type":"string","title":"Path Template"},"method":{"type":"string","title":"Method"},"call_count":{"type":"integer","title":"Call Count"},"p95_time_to_headers_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"P95 Time To Headers Ms"},"error_count":{"type":"integer","title":"Error Count"},"top_mate_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Top Mate Type"},"last_called_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Called At"},"is_registered":{"type":"boolean","title":"Is Registered"}},"type":"object","required":["path_template","method","call_count","p95_time_to_headers_ms","error_count","top_mate_type","last_called_at","is_registered"],"title":"EndpointSummaryRowResponse"},"EndpointUsageTotalsResponse":{"properties":{"total_calls":{"type":"integer","title":"Total Calls"},"distinct_endpoints":{"type":"integer","title":"Distinct Endpoints"},"distinct_users":{"type":"integer","title":"Distinct Users"},"never_called_endpoints":{"type":"integer","title":"Never Called Endpoints"},"p95_time_to_headers_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"P95 Time To Headers Ms"}},"type":"object","required":["total_calls","distinct_endpoints","distinct_users","never_called_endpoints","p95_time_to_headers_ms"],"title":"EndpointUsageTotalsResponse"},"EngineSessionUploadUrlRequest":{"properties":{"name":{"type":"string","maxLength":1024,"minLength":1,"title":"Name"},"size_bytes":{"type":"integer","minimum":0.0,"title":"Size Bytes"}},"type":"object","required":["name","size_bytes"],"title":"EngineSessionUploadUrlRequest","description":"One deliverable the worker is about to upload."},"EngineeringMetricsFailure":{"properties":{"category":{"type":"string","enum":["timeout","not_configured","permission","query_failed","empty_extract"],"title":"Category"},"at":{"type":"string","format":"date-time","title":"At"}},"type":"object","required":["category","at"],"title":"EngineeringMetricsFailure","description":"The newest failed read: its fixed category and when it finished."},"EngineeringMetricsRefreshResponse":{"properties":{"started":{"type":"boolean","title":"Started"}},"type":"object","required":["started"],"title":"EngineeringMetricsRefreshResponse","description":"``POST /api/sdlc-engineering-metrics/refresh``. ``started`` is False when a\nread is running, or the newest read finished within the refresh floor."},"EngineeringMetricsResponse":{"properties":{"state":{"type":"string","enum":["loading","refreshing","ready","unavailable"],"title":"State"},"as_of":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"As Of"},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Read At"},"failure":{"anyOf":[{"$ref":"#/components/schemas/EngineeringMetricsFailure"},{"type":"null"}]},"window":{"$ref":"#/components/schemas/EngineeringMetricsWindow"},"scope":{"$ref":"#/components/schemas/EngineeringMetricsScope"},"options":{"items":{"$ref":"#/components/schemas/LineOfBusinessOption"},"type":"array","title":"Options"},"sections":{"anyOf":[{"$ref":"#/components/schemas/EngineeringMetricsSections"},{"type":"null"}]}},"type":"object","required":["state","as_of","read_at","failure","window","scope","options","sections"],"title":"EngineeringMetricsResponse","description":"``GET /api/sdlc-engineering-metrics``."},"EngineeringMetricsScope":{"properties":{"line_of_business":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line Of Business"},"reporting_group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reporting Group"},"product_family":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Family"}},"type":"object","required":["line_of_business","reporting_group","product_family"],"title":"EngineeringMetricsScope","description":"The applied scope; ``None`` is \"All\"."},"EngineeringMetricsSections":{"properties":{"velocity":{"$ref":"#/components/schemas/VelocitySection"},"quality":{"$ref":"#/components/schemas/QualitySection"},"ai_enablement":{"$ref":"#/components/schemas/AiEnablementSection"},"build_velocity":{"$ref":"#/components/schemas/BuildVelocitySection"}},"type":"object","required":["velocity","quality","ai_enablement","build_velocity"],"title":"EngineeringMetricsSections","description":"The four panels and their six tiles, for one window and scope."},"EngineeringMetricsWindow":{"properties":{"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"days":{"type":"integer","title":"Days"},"preset_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Preset Days"}},"type":"object","required":["start_date","end_date","days","preset_days"],"title":"EngineeringMetricsWindow","description":"The inclusive days the figures cover.\n\n``days`` counts both ends; ``preset_days`` is the preset that produced the\nwindow, or ``None`` for a custom range."},"EnvironmentStatusCountResponse":{"properties":{"environment_key":{"type":"string","title":"Environment Key"},"lifecycle_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lifecycle Status"},"presence":{"type":"string","title":"Presence"},"flag_count":{"type":"integer","title":"Flag Count"}},"type":"object","required":["environment_key","lifecycle_status","presence","flag_count"],"title":"EnvironmentStatusCountResponse"},"EnvironmentSummaryResponse":{"properties":{"environment_key":{"type":"string","title":"Environment Key"},"name":{"type":"string","title":"Name"},"colour":{"type":"string","title":"Colour"},"critical":{"type":"boolean","title":"Critical"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"type":"object","required":["environment_key","name","colour","critical","tags"],"title":"EnvironmentSummaryResponse"},"EpicDetailResponse":{"properties":{"epic":{"$ref":"#/components/schemas/EpicRow"},"history":{"items":{"$ref":"#/components/schemas/HistoryEntry"},"type":"array","title":"History"},"history_before":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"History Before"},"has_more":{"type":"boolean","title":"Has More"},"latest_run":{"anyOf":[{"$ref":"#/components/schemas/HistoryEntry"},{"type":"null"}]},"queue_entries":{"items":{"$ref":"#/components/schemas/QueueEntryOut"},"type":"array","title":"Queue Entries"},"capabilities":{"$ref":"#/components/schemas/Capabilities"}},"type":"object","required":["epic","history","has_more","queue_entries","capabilities"],"title":"EpicDetailResponse"},"EpicListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EpicRow"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"project_options":{"items":{"type":"string"},"type":"array","title":"Project Options"}},"type":"object","required":["items","total","page","page_size","project_options"],"title":"EpicListResponse"},"EpicRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"project":{"type":"string","title":"Project"},"current_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Score"},"quality_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality Level"},"last_graded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Graded At"},"has_pre_argo_score":{"type":"boolean","title":"Has Pre Argo Score","default":false},"pre_argo_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pre Argo Score"},"status":{"anyOf":[{"type":"string","enum":["running","waiting","retrying","queued","not_in_jira","gave_up","failed","graded"]},{"type":"null"}],"title":"Status"},"status_attempt":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Attempt"},"jira_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jira Status"},"creator_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creator Name"},"assignee_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee Name"},"created_via":{"type":"string","title":"Created Via"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"refreshed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Refreshed At"},"jira_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jira Url"},"grade_count":{"type":"integer","title":"Grade Count","default":0}},"type":"object","required":["id","key","project","created_via","created_at"],"title":"EpicRow","description":"One tracked Epic as the list and the detail header show it."},"EventSourceShare":{"properties":{"source":{"type":"string","title":"Source"},"count":{"type":"integer","title":"Count"},"share":{"type":"number","title":"Share"}},"type":"object","required":["source","count","share"],"title":"EventSourceShare","description":"One ``workflow_events.source`` value's count and share (R29).\n\n``share`` is computed as an exact fraction and converted to ``float`` only\nhere, at the payload boundary. ``source`` is an open value set — the column\ncarries no CHECK — so an unrecognised value is its own row."},"EventTypeBreakdown":{"properties":{"event_type":{"type":"string","title":"Event Type"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["event_type","count"],"title":"EventTypeBreakdown"},"ExcludedTransitionRow":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id","description":"jira_issue_key where one exists, else the workflows.id UUID (R2) — the same identity the offender list uses."},"from_stage_key":{"type":"string","title":"From Stage Key"},"to_stage_key":{"type":"string","title":"To Stage Key"},"from_at":{"type":"string","format":"date-time","title":"From At"},"to_at":{"type":"string","format":"date-time","title":"To At"},"duration":{"$ref":"#/components/schemas/Duration"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["workflow_id","from_stage_key","to_stage_key","from_at","to_at","duration","reason"],"title":"ExcludedTransitionRow","description":"One span kept OUT of every statistic, rendered rather than hidden (R24).\n\n``reason`` is one of U2's :class:`ExclusionReason` values — a stable token,\nnot a sentence, so the panel owns the wording.\n\nThis one row shape serves BOTH excluded populations —\n``excluded_transitions`` (adjacent pairs, marked in U2's fold) and\n``excluded_end_to_end`` (a whole-journey span whose value came back zero or\ninverted, marked in U4). They travel as two lists because they are two\npopulations, but they carry the same seven facts and earn the same\nexcluded-row treatment, so a second identical model would only be a copy\nfree to drift."},"ExclusionListResponse":{"properties":{"excluded_paths":{"items":{"type":"string"},"type":"array","title":"Excluded Paths"},"changed":{"type":"boolean","title":"Changed"}},"type":"object","required":["excluded_paths","changed"],"title":"ExclusionListResponse","description":"The resulting list, so the client never has to guess or re-fetch."},"ExclusionRequest":{"properties":{"path":{"title":"Path"}},"type":"object","title":"ExclusionRequest","description":"``path`` is typed ``Any`` on purpose.\n\nDeclaring it ``str`` would make a non-string a Pydantic **422** whose\n``detail`` is a list of validation dicts. The drawer that calls this renders\n``detail`` as a sentence, so every refusal is normalised to a **400** with a\nreadable message instead (and \"rejected if it is not a string\" becomes this\nmodule's rule rather than a side effect of the framework)."},"ExecutionDetailResponse":{"properties":{"id":{"type":"string","title":"Id"},"job_id":{"type":"string","title":"Job Id"},"started_at":{"type":"string","title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"status":{"type":"string","title":"Status"},"trigger_type":{"type":"string","title":"Trigger Type"},"result_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result Summary"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"attempt_number":{"type":"integer","title":"Attempt Number","default":1},"created_at":{"type":"string","title":"Created At"},"job_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Name"},"job_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Type"}},"type":"object","required":["id","job_id","started_at","status","trigger_type","created_at"],"title":"ExecutionDetailResponse","description":"A single execution plus its parent job's name/type — enough for the\nfrontend log viewer to open from a deep link (GAIT-203 Unit 6)."},"ExecutionLogEntry":{"properties":{"id":{"type":"string","title":"Id"},"timestamp":{"type":"string","title":"Timestamp"},"level":{"type":"string","title":"Level"},"message":{"type":"string","title":"Message"},"section":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","timestamp","level","message"],"title":"ExecutionLogEntry"},"ExecutionLogsResponse":{"properties":{"log_entries":{"items":{"$ref":"#/components/schemas/ExecutionLogEntry"},"type":"array","title":"Log Entries"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["log_entries","has_more"],"title":"ExecutionLogsResponse"},"ExemptionSummary":{"properties":{"behaviour":{"type":"string","title":"Behaviour"},"provider_constraint":{"type":"string","title":"Provider Constraint"},"verified_at":{"type":"string","title":"Verified At"}},"type":"object","required":["behaviour","provider_constraint","verified_at"],"title":"ExemptionSummary","description":"A declared exemption, verbatim. ``verified_at`` is the evidence that\nstops an exemption being a bare assertion (R26)."},"Failure":{"properties":{"category":{"type":"string","enum":["timeout","not_configured","permission","query_failed","empty_extract"],"title":"Category"},"failed_at":{"type":"string","format":"date-time","title":"Failed At"}},"type":"object","required":["category","failed_at"],"title":"Failure","description":"The latest failed read: its fixed category and time, nothing else."},"FakeDataRequest":{"properties":{"repo_id":{"type":"string","title":"Repo Id"},"archive_exception":{"type":"boolean","title":"Archive Exception"},"archive_exception_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archive Exception Date"}},"type":"object","required":["repo_id","archive_exception"],"title":"FakeDataRequest","description":"Force the ``archive_exception`` pair onto ONE test-org repo (R17/R19/R20).\n\n``repo_id`` is a catalog-row UUID -- the SAME identifier the Notify endpoint\nuses, chosen over ``full_name`` so the request is unambiguous and the server\ncan load the row, read its stored ``github_org`` for the R20 scope guard, and\nrefresh exactly that row afterward.\n\n``archive_exception`` is the logical flag; an omitted/``False`` value\nserializes to the wire string ``\"False\"`` (GAIT-105 \"unset -> effective\nFalse\"). ``archive_exception_date`` is optional; when present it must parse as\na date (DD/MM/YYYY or ISO) or the request is rejected **400 before any GitHub\ncall**. A blank string is normalized to ``None`` (unset)."},"FeatureFlagToggleRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"FeatureFlagToggleRequest","description":"Request body for toggling feature flag."},"FeedbackListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FeedbackResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["items","total","page","page_size","total_pages"],"title":"FeedbackListResponse"},"FeedbackResponse":{"properties":{"id":{"type":"string","title":"Id"},"message_id":{"type":"string","title":"Message Id"},"conversation_id":{"type":"string","title":"Conversation Id"},"user_id":{"type":"string","title":"User Id"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"sentiment":{"type":"string","enum":["positive","negative"],"title":"Sentiment"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","message_id","conversation_id","user_id","sentiment","created_at","updated_at"],"title":"FeedbackResponse"},"FeedbackStatsResponse":{"properties":{"total_feedback":{"type":"integer","title":"Total Feedback"},"positive_count":{"type":"integer","title":"Positive Count"},"negative_count":{"type":"integer","title":"Negative Count"},"positive_ratio":{"type":"number","title":"Positive Ratio"},"comments_count":{"type":"integer","title":"Comments Count"}},"type":"object","required":["total_feedback","positive_count","negative_count","positive_ratio","comments_count"],"title":"FeedbackStatsResponse"},"FeedbackUpsertRequest":{"properties":{"sentiment":{"type":"string","enum":["positive","negative"],"title":"Sentiment"},"comment":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Comment"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id","description":"Optional Langfuse trace ID from chat response for human feedback scoring."}},"type":"object","required":["sentiment"],"title":"FeedbackUpsertRequest"},"FinalizeResponse":{"properties":{"approval_id":{"type":"string","format":"uuid","title":"Approval Id"},"pending_approval_id":{"type":"string","format":"uuid","title":"Pending Approval Id"},"title":{"type":"string","title":"Title"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"finalized":{"type":"boolean","title":"Finalized"}},"type":"object","required":["approval_id","pending_approval_id","title","workflow_id","finalized"],"title":"FinalizeResponse","description":"The result of finalizing an awaiting approval (or the idempotent no-op\nwhen it was already finalized by another path)."},"FixRoundCoveredPrView":{"properties":{"pr_url":{"type":"string","title":"Pr Url"},"repo_full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Full Name"},"pr_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pr Number"},"role":{"type":"string","title":"Role"},"submodule_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Submodule Path"}},"type":"object","required":["pr_url","role"],"title":"FixRoundCoveredPrView","description":"One PR a set round covers, as recorded at launch (KTD8 ``prs``)."},"FixRoundPrOutcomeView":{"properties":{"pr_url":{"type":"string","title":"Pr Url"},"repo_full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Full Name"},"pr_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pr Number"},"role":{"type":"string","title":"Role"},"outcome":{"type":"string","title":"Outcome"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["pr_url","role","outcome"],"title":"FixRoundPrOutcomeView","description":"One PR's outcome for a finished set round (R14, KTD9)."},"FixRoundSkippedPrView":{"properties":{"pr_url":{"type":"string","title":"Pr Url"},"repo_full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Full Name"},"pr_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pr Number"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["pr_url"],"title":"FixRoundSkippedPrView","description":"One PR in the set a round skipped at launch, with why (R8)."},"FixRoundView":{"properties":{"round":{"type":"integer","title":"Round"},"fix_unit_id":{"type":"string","title":"Fix Unit Id"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"finding_ids":{"items":{"type":"string"},"type":"array","title":"Finding Ids"},"ac_ids":{"items":{"type":"string"},"type":"array","title":"Ac Ids"},"covered_prs":{"items":{"$ref":"#/components/schemas/FixRoundCoveredPrView"},"type":"array","title":"Covered Prs"},"skipped":{"items":{"$ref":"#/components/schemas/FixRoundSkippedPrView"},"type":"array","title":"Skipped"},"pr_outcomes":{"anyOf":[{"items":{"$ref":"#/components/schemas/FixRoundPrOutcomeView"},"type":"array"},{"type":"null"}],"title":"Pr Outcomes"},"round_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Round Status"},"engine":{"type":"string","title":"Engine","default":"cursor"}},"type":"object","required":["round","fix_unit_id"],"title":"FixRoundView","description":"One fix run's curated payload + outcome (the human-armed fix-loop design, migration 180).\n\nReused two ways: as one entry in an IMPLEMENTATION unit's ``fix_rounds``\n(one per dispatched child) and as a FIX unit's own ``fix_lineage`` (its\nown round) — same shape, same source (a fix unit's ``fix_lineage``\nJSONB), so one flatten function builds both (see ``_fix_round_view``).\n\nFix-findings submodule PRs (KTD8, KTD9): a round over a PR set records the\nPRs it covers (``covered_prs``, parent first) and skips (``skipped``) at\nlaunch, and the outcome task adds one outcome per PR and the round status\nwhen the round finishes. ``pr_outcomes`` is ``None`` while a set round's\noutcomes are pending and ``[]`` on a single-PR round, which has none to\nwait for — a round whose submodule PRs were all skipped at launch covers\nthe parent alone and is one. ``round_status`` is ``None`` until the outcomes are written;\n``status`` stays the fix unit's own status."},"FixRunLaunchRequest":{"properties":{"finding_ids":{"items":{"type":"string"},"type":"array","title":"Finding Ids"},"ac_ids":{"items":{"type":"string"},"type":"array","title":"Ac Ids"},"engine":{"anyOf":[{"type":"string","enum":["cursor","claude"]},{"type":"null"}],"title":"Engine"}},"type":"object","title":"FixRunLaunchRequest","description":"Body for ``POST /api/devmate/runs/{run_id}/units/{unit_id}/fix``\n(ticket 24).\n\nThe curated subset a human checked in the ticket-26 curation view:\ninline-finding ids and/or per-AC-row ids, both read off the target\nunit's persisted ``code_review_detail`` envelope. Every id, when\npresent, is validated against that envelope (unknown ids -> 422); both\nlists may be empty (PDLC-308) — the dispatched agent triages the PR's\nown open review comments regardless of what was curated here.\n\n``finding_ids`` use the same shape as ``dismiss.dismissal_key``\n(``\"<rule_id>:<path>:<line>\"``) since a ``Finding`` has no id column of\nits own — this composite is already how the platform identifies one\nfinding uniquely. ``ac_ids`` are the spec reviewer's stable per-AC ids\n(``\"ac-1\"``, ``\"ac-2\"``, ... — ticket 17), read off\n``reviewers[].data.acceptance_criteria``."},"FixRunLaunchResponse":{"properties":{"run_id":{"type":"string","title":"Run Id"},"parent_unit_id":{"type":"string","title":"Parent Unit Id"},"fix_unit_id":{"type":"string","title":"Fix Unit Id"},"unit_id":{"type":"string","title":"Unit Id"},"round":{"type":"integer","title":"Round"},"status":{"type":"string","title":"Status"},"cursor_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Agent Id"},"branch_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Name"},"idempotency_key":{"type":"string","title":"Idempotency Key"}},"type":"object","required":["run_id","parent_unit_id","fix_unit_id","unit_id","round","status","idempotency_key"],"title":"FixRunLaunchResponse"},"FlagEnvironmentStateResponse":{"properties":{"environment_key":{"type":"string","title":"Environment Key"},"on":{"type":"boolean","title":"On"},"lifecycle_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lifecycle Status"},"presence":{"type":"string","title":"Presence"},"deep_link":{"type":"string","title":"Deep Link"},"last_seen_sync_at":{"type":"string","format":"date-time","title":"Last Seen Sync At"}},"type":"object","required":["environment_key","on","lifecycle_status","presence","deep_link","last_seen_sync_at"],"title":"FlagEnvironmentStateResponse"},"FlagInventoryResponse":{"properties":{"project_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Key"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"projects":{"items":{"$ref":"#/components/schemas/ProjectSummaryResponse"},"type":"array","title":"Projects"},"environments":{"items":{"$ref":"#/components/schemas/EnvironmentSummaryResponse"},"type":"array","title":"Environments"},"flags":{"items":{"$ref":"#/components/schemas/FlagRowResponse"},"type":"array","title":"Flags"},"status_counts":{"items":{"$ref":"#/components/schemas/EnvironmentStatusCountResponse"},"type":"array","title":"Status Counts"},"total_flags":{"type":"integer","title":"Total Flags"},"freshness":{"$ref":"#/components/schemas/app__api__routes__launchdarkly__FreshnessResponse"}},"type":"object","required":["project_key","project_name","projects","environments","flags","status_counts","total_flags","freshness"],"title":"FlagInventoryResponse"},"FlagRowResponse":{"properties":{"flag_key":{"type":"string","title":"Flag Key"},"name":{"type":"string","title":"Name"},"environments":{"items":{"$ref":"#/components/schemas/FlagEnvironmentStateResponse"},"type":"array","title":"Environments"}},"type":"object","required":["flag_key","name","environments"],"title":"FlagRowResponse"},"GithubOrgTeamResponse":{"properties":{"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description","default":""},"privacy":{"type":"string","title":"Privacy","default":""},"members_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Members Count"}},"type":"object","required":["name","display_name"],"title":"GithubOrgTeamResponse"},"GithubTeamsResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"organization":{"type":"string","title":"Organization"},"teams":{"items":{"$ref":"#/components/schemas/GithubOrgTeamResponse"},"type":"array","title":"Teams"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["success","organization"],"title":"GithubTeamsResponse"},"GoalOwner":{"properties":{"member_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Member Id"},"display_name":{"type":"string","title":"Display Name"}},"type":"object","required":["display_name"],"title":"GoalOwner"},"GradeResponse":{"properties":{"status":{"type":"string","enum":["started","attached"],"title":"Status"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"run":{"anyOf":[{"$ref":"#/components/schemas/HistoryEntry"},{"type":"null"}]},"entry":{"anyOf":[{"$ref":"#/components/schemas/QueueEntryOut"},{"type":"null"}]}},"type":"object","required":["status"],"title":"GradeResponse","description":"200: ``status`` is ``started`` and ``run`` is the finished run (null when\nthe run left no row). 202: ``status`` is ``attached`` and ``entry`` is the\nactive entry to watch."},"GrantRoleRequest":{"properties":{"role":{"type":"string","title":"Role"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["role"],"title":"GrantRoleRequest","description":"Request model for granting role to user.","example":{"notes":"Temporary access for project","role":"ops_developer"}},"GroupRowResponse":{"properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"label":{"type":"string","title":"Label"},"attribution_kind":{"type":"string","title":"Attribution Kind"},"is_unassigned":{"type":"boolean","title":"Is Unassigned"},"seat_count":{"type":"integer","title":"Seat Count"},"limit_dollars":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Limit Dollars","description":"The seat's ALLOWANCE CONSUMPTION ceiling in dollars — capacity already paid for, not a cash budget. SUMMED over the group's seats, so a department's figure is its whole team's ceiling. NULL on a window: a limit is monthly, and a window of arbitrary length cannot be compared to it."},"percent_of_limit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Percent Of Limit","description":"`consumption_cents` as a percentage of `limit_dollars`, crossing cents to dollars once, here. Above 100 the group consumed more than its seats' ceilings allow — which happens, so treat the ceiling as a threshold and not a hard stop. NULL where there is no ceiling to divide by."},"consumption_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Consumption Cents","description":"Measures ALLOWANCE CONSUMPTION — the allowance this drew down, not cash billed."},"usage_based_cents":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Usage Based Cents","description":"Measures INCREMENTAL CASH BILLED beyond the allowance — the only figure here that is money actually charged, and NOT part of any allowance consumption total on this payload. NULL on a window — cycle-only."},"share_of_consumption":{"type":"number","title":"Share Of Consumption"}},"type":"object","required":["key","label","attribution_kind","is_unassigned","seat_count","limit_dollars","percent_of_limit","consumption_cents","usage_based_cents","share_of_consumption"],"title":"GroupRowResponse","description":"One partition of the scope on the selected axis (R5, R7)."},"GtmRunListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/GtmRunResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"GtmRunListResponse"},"GtmRunResponse":{"properties":{"id":{"type":"string","title":"Id"},"state":{"type":"string","title":"State"},"launch_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Launch Class"},"reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning"},"proposed_artifacts":{"items":{"type":"string"},"type":"array","title":"Proposed Artifacts"},"artifacts":{"additionalProperties":true,"type":"object","title":"Artifacts"},"intake_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Intake Fields"},"gaps":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Gaps"},"total_score":{"anyOf":[{"type":"integer"},{"type":"number"},{"type":"null"}],"title":"Total Score"},"criteria_scores":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Criteria Scores"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier"},"tier_split":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier Split"},"low_confidence_criteria":{"items":{"type":"string"},"type":"array","title":"Low Confidence Criteria","default":[]},"publication":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Publication"},"product":{"anyOf":[{"$ref":"#/components/schemas/ProductRef"},{"type":"null"}]},"gating_verdict":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gating Verdict"},"prd_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prd Ref"},"pmm_feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pmm Feedback"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"triggering_approval_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triggering Approval Id"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"},"sibling_sdlc_workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sibling Sdlc Workflow Id"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","state","launch_class","reasoning","proposed_artifacts","artifacts","intake_fields","gaps","total_score","criteria_scores","flags","tier","tier_split","publication","product","gating_verdict","prd_ref","pmm_feedback","error_message","triggering_approval_id","workflow_id","sibling_sdlc_workflow_id","created_at","updated_at"],"title":"GtmRunResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HardDeleteUserRequest":{"properties":{"confirm_email":{"type":"string","format":"email","title":"Confirm Email"},"reason":{"type":"string","maxLength":1000,"minLength":1,"title":"Reason"}},"type":"object","required":["confirm_email","reason"],"title":"HardDeleteUserRequest","description":"Break-glass confirmation payload for permanent user deletion (GAIT-192).\n\n``confirm_email`` must exactly match the target's stored email — a typed\nconfirmation, not a checkbox, so the destructive call cannot be misfired.\n``reason`` is mandatory and captured in the audit trail before the row is\nremoved (the only forensic record once it is gone).","example":{"confirm_email":"duplicate.user@litera.com","reason":"GAIT-191 case-variant duplicate of duplicate.user@litera.com"}},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"commit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit"}},"type":"object","required":["status"],"title":"HealthResponse"},"HeaviestCallersResponse":{"properties":{"window_from":{"type":"string","format":"date-time","title":"Window From"},"window_to":{"type":"string","format":"date-time","title":"Window To"},"rows":{"items":{"$ref":"#/components/schemas/UserUsageRowResponse"},"type":"array","title":"Rows"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_users":{"type":"integer","title":"Total Users"},"descending":{"type":"boolean","title":"Descending"}},"type":"object","required":["window_from","window_to","rows","page","page_size","total_users","descending"],"title":"HeaviestCallersResponse"},"HierarchyRowResponse":{"properties":{"line_of_business":{"type":"string","title":"Line Of Business"},"reporting_group":{"type":"string","title":"Reporting Group"},"product_family":{"type":"string","title":"Product Family"}},"type":"object","required":["line_of_business","reporting_group","product_family"],"title":"HierarchyRowResponse","description":"One certified combination, in containment order.\n\nOrdered Line of Business -> Reporting Group -> Product Family to match the\nwarehouse, NOT the repo picker's fill order, which runs the other way and is\nthe inversion this page exists to correct."},"HierarchySnapshotResponse":{"properties":{"loaded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Loaded At"},"row_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Row Count"},"is_stale":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Stale"},"age_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Age Seconds"},"stale_after_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stale After Seconds"}},"type":"object","required":["loaded_at","row_count","is_stale","age_seconds","stale_after_seconds"],"title":"HierarchySnapshotResponse","description":"When the replica last loaded, and whether that is recent enough.\n\nEvery field is nullable together: all five are null exactly when no snapshot\nrow exists, which is the never-synced state. ``is_stale`` is null rather than\nTrue there because \"never loaded\" is not a degraded refresh — a surface that\nread a True here would render an age it does not have."},"HistoryEntry":{"properties":{"kind":{"type":"string","enum":["run","cancelled","pre_argo"],"title":"Kind"},"id":{"type":"string","format":"uuid","title":"Id"},"at":{"type":"string","format":"date-time","title":"At"},"trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger"},"run_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Kind"},"attempt":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempt"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"failure_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Code"},"failure_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Message"},"total_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Score"},"quality_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality Level"},"categories":{"anyOf":[{},{"type":"null"}],"title":"Categories"},"top_gaps":{"anyOf":[{},{"type":"null"}],"title":"Top Gaps"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"jira_write_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jira Write State"},"skill_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill Name"},"model_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Identifier"},"prompt_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Prompt Version Number"},"rules_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rules Version Number"},"template_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Template Version Number"},"rules_version_created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Rules Version Created At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"initiator_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initiator Name"},"triggered_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triggered By Name"},"jira_review_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jira Review Text"},"delivery_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Id"},"cancel_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Reason"},"cancelled_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancelled By Name"},"pre_argo_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pre Argo Score"},"pre_argo_review_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pre Argo Review Text"}},"type":"object","required":["kind","id","at"],"title":"HistoryEntry","description":"A run, a cancelled queue entry, or the pre-Argo score line.\n\n``at`` orders the history: a run's start, a cancellation's queue time, the\nrecord's creation for the pre-Argo line. Fields that do not apply to a\nkind are null."},"HistoryResponse":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"history":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"History"},"message_count":{"type":"integer","title":"Message Count"}},"type":"object","required":["conversation_id","history","message_count"],"title":"HistoryResponse"},"ImpersonationSessionResponse":{"properties":{"message":{"type":"string","title":"Message"},"user":{"$ref":"#/components/schemas/ImpersonationUserInfo"},"impersonating":{"type":"boolean","title":"Impersonating"},"impersonator":{"anyOf":[{"$ref":"#/components/schemas/ImpersonationUserInfo"},{"type":"null"}]}},"type":"object","required":["message","user","impersonating"],"title":"ImpersonationSessionResponse","description":"Response for starting or ending an impersonation session (GAIT-318 U3).\n\nMirrors the identity carried by the freshly minted ``access_token`` cookie\nso the frontend can render the identity banner / re-render the destination\nroute without a second round trip. Unlike ``LoginResponse``, the token\nitself is never included in the body — impersonation is a cookie-only,\nbrowser-driven flow (KTD1); there is no API-client use case to serve.","example":{"impersonating":true,"impersonator":{"email":"admin@litera.com","name":"Admin User","username":"admin_LSCM"},"message":"Impersonation session started.","user":{"email":"target@litera.com","name":"Target User","username":"target_LSCM"}}},"ImpersonationUserInfo":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"username":{"type":"string","title":"Username"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["email","username","name"],"title":"ImpersonationUserInfo","description":"A user's identity as reflected by an impersonation session (GAIT-318)."},"ImportEpicRequest":{"properties":{"key":{"type":"string","maxLength":100,"title":"Key"}},"type":"object","required":["key"],"title":"ImportEpicRequest"},"InactivityCheckTriggerRequest":{"properties":{"threshold_days":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold Days"},"time_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time Unit"}},"type":"object","title":"InactivityCheckTriggerRequest","description":"Optional per-run threshold override for the inactivity-check trigger.\n\nBoth fields are optional; omitting the body (or both fields) runs the scan\nagainst the site-wide config. Domain rules (``time_unit`` in\n:data:`INACTIVITY_TRIGGER_TIME_UNITS`, ``threshold_days`` non-negative) are\nvalidated in the handler so a bad value surfaces as a 400 with a string\n``detail`` rather than pydantic's 422."},"IndexSourceListResponse":{"properties":{"sources":{"items":{"$ref":"#/components/schemas/IndexSourceResponse"},"type":"array","title":"Sources"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["sources","total"],"title":"IndexSourceListResponse"},"IndexSourceResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"source_type":{"type":"string","title":"Source Type"},"source_identifier":{"type":"string","title":"Source Identifier"},"product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Id"},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name"},"product_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Slug"},"config":{"additionalProperties":true,"type":"object","title":"Config","default":{}},"enabled":{"type":"boolean","title":"Enabled","default":true},"last_indexed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Indexed At"},"created_by":{"type":"string","title":"Created By"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","name","source_type","source_identifier","created_by","created_at","updated_at"],"title":"IndexSourceResponse"},"IndexedDocumentListResponse":{"properties":{"documents":{"items":{"$ref":"#/components/schemas/IndexedDocumentResponse"},"type":"array","title":"Documents"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["documents","total","limit","offset"],"title":"IndexedDocumentListResponse"},"IndexedDocumentResponse":{"properties":{"id":{"type":"string","title":"Id"},"source_id":{"type":"string","title":"Source Id"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name"},"document_id":{"type":"string","title":"Document Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"document_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Url"},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash"},"source_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Version"},"chunk_count":{"type":"integer","title":"Chunk Count","default":0},"status":{"type":"string","title":"Status"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"source_updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Updated At"},"last_indexed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Indexed At"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","default":{}},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","source_id","document_id","status"],"title":"IndexedDocumentResponse"},"IndexedDocumentStatsResponse":{"properties":{"total_documents":{"type":"integer","title":"Total Documents"},"by_status":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Status"},"by_source":{"items":{"$ref":"#/components/schemas/SourceStats"},"type":"array","title":"By Source"},"last_updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Updated At"}},"type":"object","required":["total_documents","by_status","by_source"],"title":"IndexedDocumentStatsResponse"},"IndexingStatusResponse":{"properties":{"sources":{"items":{"$ref":"#/components/schemas/IndexSourceResponse"},"type":"array","title":"Sources"},"total_enabled":{"type":"integer","title":"Total Enabled"},"index_name":{"type":"string","title":"Index Name"},"last_run_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Run Status"},"last_run_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Run At"}},"type":"object","required":["sources","total_enabled","index_name"],"title":"IndexingStatusResponse"},"IndividualUsagePayload":{"properties":{"weeks":{"items":{"$ref":"#/components/schemas/WeekBucket"},"type":"array","title":"Weeks"},"summary":{"$ref":"#/components/schemas/Summary"},"people":{"items":{"$ref":"#/components/schemas/PersonUsage"},"type":"array","title":"People"},"pr_source":{"$ref":"#/components/schemas/PrSource"}},"type":"object","required":["weeks","summary","people","pr_source"],"title":"IndividualUsagePayload"},"IngestRetryRequest":{"properties":{"repo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Url"},"github_node_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Node Id"}},"type":"object","title":"IngestRetryRequest"},"IntegrationCalls":{"properties":{"integration":{"type":"string","title":"Integration","description":"The declared integration slug."},"name":{"type":"string","title":"Name","description":"Its display name, as Admin › Integrations shows it (KTD8)."},"writes":{"type":"integer","title":"Writes"},"reads":{"type":"integer","title":"Reads"},"total":{"type":"integer","title":"Total"},"change":{"$ref":"#/components/schemas/CountChange","description":"All calls to this integration."},"tools":{"items":{"$ref":"#/components/schemas/ToolCount"},"type":"array","title":"Tools","description":"Ranked by count, then name."}},"type":"object","required":["integration","name","writes","reads","total","change","tools"],"title":"IntegrationCalls"},"IntegrationConsoleResponse":{"properties":{"integrations":{"items":{"$ref":"#/components/schemas/IntegrationConsoleRow"},"type":"array","title":"Integrations"}},"type":"object","required":["integrations"],"title":"IntegrationConsoleResponse","description":"No pagination: the population is the declared integrations plus any\nunclaimed seeded rows — six today, and bounded by how many integrations the\nplatform has rather than by traffic."},"IntegrationConsoleRow":{"properties":{"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"enabled":{"type":"boolean","title":"Enabled"},"status":{"type":"string","title":"Status"},"health_status":{"anyOf":[{},{"type":"null"}],"title":"Health Status"},"credential_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credential Expires At"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"ingress_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingress Mode"},"expected_cadence_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Cadence Seconds"},"liveness_state":{"type":"string","title":"Liveness State"},"last_inbound_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Inbound At"},"last_outbound_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Outbound At"},"success_count":{"type":"integer","title":"Success Count"},"failure_count":{"type":"integer","title":"Failure Count"},"rejected_count":{"type":"integer","title":"Rejected Count"},"capture_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Capture Enabled"},"capture_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capture Expires At"},"declared":{"type":"boolean","title":"Declared"},"backstop":{"anyOf":[{"$ref":"#/components/schemas/BackstopSummary"},{"type":"null"}]},"replay":{"anyOf":[{"$ref":"#/components/schemas/ReplaySummary"},{"type":"null"}]},"exemptions":{"items":{"$ref":"#/components/schemas/ExemptionSummary"},"type":"array","title":"Exemptions"}},"type":"object","required":["slug","name","display_name","description","icon","enabled","status","health_status","credential_expires_at","direction","ingress_mode","expected_cadence_seconds","liveness_state","last_inbound_at","last_outbound_at","success_count","failure_count","rejected_count","capture_enabled","capture_expires_at","declared","backstop","replay","exemptions"],"title":"IntegrationConsoleRow","description":"One integration as the console's registry table renders it (R27, R3a).\n\nDeliberately carries no ``config_schema`` and no masked credential values.\nThose belong to the Connections screen and to its own grant; this row exists\nso a delivery-view holder can see the registry without holding that one."},"IntegrationLivenessResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"enabled":{"type":"boolean","title":"Enabled"},"status":{"type":"string","title":"Status"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"ingress_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingress Mode"},"expected_cadence_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Cadence Seconds"},"credential_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credential Expires At"},"last_inbound_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Inbound At"},"last_outbound_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Outbound At"},"success_count":{"type":"integer","title":"Success Count"},"failure_count":{"type":"integer","title":"Failure Count"},"rejected_count":{"type":"integer","title":"Rejected Count"},"capture_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Capture Enabled"},"capture_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capture Expires At"}},"type":"object","required":["slug","name","enabled","status","direction","ingress_mode","expected_cadence_seconds","credential_expires_at","last_inbound_at","last_outbound_at","success_count","failure_count","rejected_count","capture_enabled","capture_expires_at"],"title":"IntegrationLivenessResponse","description":"What an empty feed renders instead of \"no deliveries\" (U11 step 6).\n\nUnder KD8 a healthy integration with capture off writes no body, and four\ndeclarations have no ingress at all, so a blank feed is the NORMAL case.\nThese fields are what tell a quiet integration from a dead one without\nopening a second screen."},"JobExecutionResponse":{"properties":{"id":{"type":"string","title":"Id"},"job_id":{"type":"string","title":"Job Id"},"started_at":{"type":"string","title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"status":{"type":"string","title":"Status"},"trigger_type":{"type":"string","title":"Trigger Type"},"result_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result Summary"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"attempt_number":{"type":"integer","title":"Attempt Number","default":1},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","job_id","started_at","status","trigger_type","created_at"],"title":"JobExecutionResponse"},"JobExecutionSummary":{"properties":{"status":{"type":"string","title":"Status"},"started_at":{"type":"string","title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"trigger_type":{"type":"string","title":"Trigger Type"}},"type":"object","required":["status","started_at","trigger_type"],"title":"JobExecutionSummary"},"JobExecutionsListResponse":{"properties":{"executions":{"items":{"$ref":"#/components/schemas/JobExecutionResponse"},"type":"array","title":"Executions"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["executions","total","has_more"],"title":"JobExecutionsListResponse"},"JobTypeResponse":{"properties":{"type_name":{"type":"string","title":"Type Name"},"description":{"type":"string","title":"Description"},"config_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Schema"},"min_interval_seconds":{"type":"integer","title":"Min Interval Seconds","default":0},"default_time_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Time Limit"},"default_max_retries":{"type":"integer","title":"Default Max Retries","default":0}},"type":"object","required":["type_name","description"],"title":"JobTypeResponse"},"KeyResponse":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"key_prefix":{"type":"string","title":"Key Prefix"},"name":{"type":"string","title":"Name"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["id","user_id","key_prefix","name","is_active","created_at","last_used_at","expires_at"],"title":"KeyResponse"},"KeysRequest":{"properties":{"keys":{"items":{"type":"string"},"type":"array","maxItems":500,"minItems":1,"title":"Keys"}},"additionalProperties":true,"type":"object","required":["keys"],"title":"KeysRequest"},"KickoffReadiness":{"properties":{"linked_to_org_member":{"type":"boolean","title":"Linked To Org Member"},"assigned_product_count":{"type":"integer","title":"Assigned Product Count"}},"type":"object","required":["linked_to_org_member","assigned_product_count"],"title":"KickoffReadiness","description":"Whether the CALLER's own account can open ticket kickoffs at all. It\ntakes no kickoff id, so the locator check's 404 stays indistinguishable."},"L1CheckDescription":{"properties":{"kind":{"type":"string","title":"Kind"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"}},"type":"object","required":["kind","title","description"],"title":"L1CheckDescription"},"L1ChecksResponse":{"properties":{"checks":{"items":{"$ref":"#/components/schemas/L1CheckDescription"},"type":"array","title":"Checks"}},"type":"object","required":["checks"],"title":"L1ChecksResponse"},"LastCopy":{"properties":{"read_id":{"type":"string","format":"uuid","title":"Read Id"},"copied_at":{"type":"string","format":"date-time","title":"Copied At"},"handled_by":{"type":"string","enum":["all","through_argo","outside_argo"],"title":"Handled By"}},"type":"object","required":["read_id","copied_at","handled_by"],"title":"LastCopy","description":"The read last copied for this range and project (KTD19)."},"LaunchRepoOption":{"properties":{"url":{"type":"string","title":"Url"},"default_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Branch"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"engine":{"type":"string","title":"Engine","default":"cursor"},"claude_allowed":{"type":"boolean","title":"Claude Allowed","default":false}},"type":"object","required":["url","default_branch","label"],"title":"LaunchRepoOption","description":"One ``github_repo`` integration of the product a launch may pick.\n\nPre-resolved server-side so a launch surface never needs a separate\n``GET /products/{id}`` call (gated by ``organization:product:view``, which a\nlauncher may not hold). Only the fields the picker needs."},"LeadTimeTile":{"properties":{"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"measured":{"type":"integer","title":"Measured"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["value","measured","total"],"title":"LeadTimeTile","description":"The median days of the ``measured`` epics among ``total`` completed epics."},"LineOfBusinessOption":{"properties":{"name":{"type":"string","title":"Name"},"reporting_groups":{"items":{"$ref":"#/components/schemas/ReportingGroupOption"},"type":"array","title":"Reporting Groups"}},"type":"object","required":["name","reporting_groups"],"title":"LineOfBusinessOption","description":"A line of business and its reporting groups, both sorted by name."},"LinkUserRequest":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"}},"type":"object","required":["user_id"],"title":"LinkUserRequest"},"LiveTeamRef":{"properties":{"slug":{"type":"string","title":"Slug"},"permission":{"type":"string","title":"Permission"}},"type":"object","required":["slug","permission"],"title":"LiveTeamRef","description":"A team holding access on GitHub, with the permission it holds."},"LoginRequest":{"properties":{"username":{"type":"string","title":"Username","description":"Username"},"password":{"type":"string","title":"Password","description":"Password"}},"type":"object","required":["username","password"],"title":"LoginRequest"},"LoginResponse":{"properties":{"access_token":{"type":"string","title":"Access Token","description":"JWT access token"},"token_type":{"type":"string","title":"Token Type","description":"Token type","default":"bearer"},"user":{"additionalProperties":{"type":"string"},"type":"object","title":"User","description":"User information"}},"type":"object","required":["access_token","user"],"title":"LoginResponse"},"LookupOptionResponse":{"properties":{"value":{"type":"string","title":"Value"},"label":{"type":"string","title":"Label"},"usage_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Usage Count"}},"type":"object","required":["value","label"],"title":"LookupOptionResponse"},"LookupOptionsResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"field":{"type":"string","title":"Field"},"options":{"items":{"$ref":"#/components/schemas/LookupOptionResponse"},"type":"array","title":"Options"},"total_count":{"type":"integer","title":"Total Count","default":0},"quick_browse_threshold":{"type":"integer","title":"Quick Browse Threshold","default":50},"min_search_query_length":{"type":"integer","title":"Min Search Query Length","default":2},"snapshot_loaded_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot Loaded At"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["field"],"title":"LookupOptionsResponse"},"ManagerOptionResponse":{"properties":{"email":{"type":"string","title":"Email"},"member_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Member Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"From the directory, or null for a manager it no longer knows."},"parent_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Email","description":"Their own manager, or null for a root. Derived from the same stamped ancestor chain the subtree filter reads, so a tree built from these links cannot disagree with the totals beside them."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Directory title. What tells two managers of the same size apart — a seat count alone cannot say whether '2 seats' is a CTO of a small org or a team lead."},"seat_count":{"type":"integer","title":"Seat Count","description":"Their own seat and every seat beneath them, at any depth."}},"type":"object","required":["email","member_id","name","parent_email","title","seat_count"],"title":"ManagerOptionResponse","description":"One manager a reader can scope to, sized by their WHOLE subtree (B1).\n\n🛑 THESE FIGURES OVERLAP BETWEEN ROWS, and that is correct here. A VP's\nnumbers contain their directors'. A picker chooses exactly one row, so\nnothing is ever summed; the same rollup as a GROUPING would double-count,\nwhich is why manager remains a scope and not a rollup axis."},"MateCount":{"properties":{"mate_type":{"type":"string","title":"Mate Type"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["mate_type","count"],"title":"MateCount"},"MateRatings":{"properties":{"mate_type":{"type":"string","title":"Mate Type"},"positive":{"type":"integer","title":"Positive"},"total":{"type":"integer","title":"Total"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","required":["mate_type","positive","total","rate"],"title":"MateRatings"},"MateTrend":{"properties":{"mate_type":{"type":"string","title":"Mate Type"},"trend":{"items":{"$ref":"#/components/schemas/TrendPoint"},"type":"array","title":"Trend"}},"type":"object","required":["mate_type","trend"],"title":"MateTrend"},"McpCallsSection":{"properties":{"change":{"$ref":"#/components/schemas/CountChange","description":"All completed MCP calls."},"tools":{"items":{"$ref":"#/components/schemas/ToolCount"},"type":"array","title":"Tools","description":"Ranked by count, then name."}},"type":"object","required":["change","tools"],"title":"McpCallsSection","description":"Argo over MCP, apart from the chat table. Every MCP tool is a read."},"MeasurementsView":{"properties":{"stage_pairs":{"items":{"$ref":"#/components/schemas/StagePairDurations"},"type":"array","title":"Stage Pairs"},"prd_to_merged":{"anyOf":[{"$ref":"#/components/schemas/EndToEndDurations"},{"type":"null"}]},"per_workflow":{"items":{"$ref":"#/components/schemas/WorkflowEndToEndRow"},"type":"array","title":"Per Workflow"},"excluded_transitions":{"items":{"$ref":"#/components/schemas/ExcludedTransitionRow"},"type":"array","title":"Excluded Transitions"},"excluded_end_to_end":{"items":{"$ref":"#/components/schemas/ExcludedTransitionRow"},"type":"array","title":"Excluded End To End"}},"type":"object","required":["stage_pairs","per_workflow","excluded_transitions","excluded_end_to_end"],"title":"MeasurementsView","description":"R1's first peer view. Not rendered in front of the other two.\n\n``excluded_end_to_end`` is the end-to-end counterpart of\n``excluded_transitions``: a completion whose span came back zero or\ninverted enters no headline, and R24's \"rendered as an excluded row rather\nthan hidden\" applies to it for the same reason it applies to a pair. An\nall-back-filled workflow is the routine case — one transaction gives its\nwhole trail the same ``occurred_at`` — so this list being non-empty while\n``prd_to_merged`` is ``null`` is a real window, not a corrupted one."},"MemberResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"},"enterprise_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enterprise Role"},"last_login":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Login"},"login_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Login Count"},"sessions_created_count":{"type":"integer","title":"Sessions Created Count"}},"type":"object","required":["user_id","sessions_created_count"],"title":"MemberResponse"},"MembersRequest":{"properties":{"user_ids":{"items":{"type":"string","format":"uuid"},"type":"array","minItems":1,"title":"User Ids"}},"type":"object","required":["user_ids"],"title":"MembersRequest"},"ModelBreakdownRowResponse":{"properties":{"model":{"type":"string","title":"Model"},"request_count":{"type":"integer","title":"Request Count"},"consumption_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Consumption Cents","description":"Measures ALLOWANCE CONSUMPTION — the allowance this drew down, not cash billed. DERIVED: this model's share of the model-day grain applied to the authoritative seat-cycle total (KTD1), so the rows sum to the headline by construction."},"observed_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Observed Cents","description":"Measures ALLOWANCE CONSUMPTION — the allowance this drew down, not cash billed. The unscaled figure the model-day grain holds, kept so the derivation above is inspectable."},"share_of_consumption":{"type":"number","title":"Share Of Consumption"},"cost_per_request_cents":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Cost Per Request Cents","description":"Measures ALLOWANCE CONSUMPTION — the allowance this drew down, not cash billed. Null — not zero — for a model with no charged requests: \"no rate\" and \"a rate of nothing\" are different statements."},"not_charged_request_count":{"type":"integer","title":"Not Charged Request Count"}},"type":"object","required":["model","request_count","consumption_cents","observed_cents","share_of_consumption","cost_per_request_cents","not_charged_request_count"],"title":"ModelBreakdownRowResponse","description":"One model's consumption inside the scope (R4, R21)."},"ModelGrainReconciliationResponse":{"properties":{"authoritative_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Authoritative Cents","description":"Measures ALLOWANCE CONSUMPTION — the allowance this drew down, not cash billed. The seat-cycle grain's total."},"observed_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Observed Cents","description":"Measures ALLOWANCE CONSUMPTION — the allowance this drew down, not cash billed. The model-day grain's total."},"variance_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Variance Cents","description":"Measures ALLOWANCE CONSUMPTION — the allowance this drew down, not cash billed. Authoritative minus observed: positive means the model-day grain is trailing (the ordinary overnight case)."},"has_model_grain":{"type":"boolean","title":"Has Model Grain"},"is_reconciled":{"type":"boolean","title":"Is Reconciled"}},"type":"object","required":["authoritative_cents","observed_cents","variance_cents","has_model_grain","is_reconciled"],"title":"ModelGrainReconciliationResponse","description":"KTD1's cross-grain check, surfaced rather than swallowed."},"ModelUpdateRequest":{"properties":{"display_name":{"type":"string","maxLength":255,"title":"Display Name"},"provider":{"type":"string","maxLength":50,"title":"Provider"},"deployment_name":{"type":"string","maxLength":255,"title":"Deployment Name"},"kind":{"type":"string","maxLength":50,"title":"Kind"},"family":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Family"},"is_active":{"type":"boolean","title":"Is Active","default":true},"context_window":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Context Window"},"system_prompt_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"System Prompt Tokens"},"response_buffer":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Response Buffer"},"safety_margin":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Safety Margin"},"embedding_dimensions":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Embedding Dimensions"},"supports_tools":{"type":"boolean","title":"Supports Tools","default":true},"supports_streaming":{"type":"boolean","title":"Supports Streaming","default":true},"is_judge_eligible":{"type":"boolean","title":"Is Judge Eligible","default":false},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"gateway_model_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Gateway Model Name"}},"type":"object","required":["display_name","provider","deployment_name","kind"],"title":"ModelUpdateRequest","description":"Body for PUT — same shape as create, but ``name`` comes from the path."},"ModelUpsertRequest":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"},"display_name":{"type":"string","maxLength":255,"title":"Display Name"},"provider":{"type":"string","maxLength":50,"title":"Provider"},"deployment_name":{"type":"string","maxLength":255,"title":"Deployment Name"},"kind":{"type":"string","maxLength":50,"title":"Kind"},"family":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Family"},"is_active":{"type":"boolean","title":"Is Active","default":true},"context_window":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Context Window"},"system_prompt_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"System Prompt Tokens"},"response_buffer":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Response Buffer"},"safety_margin":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Safety Margin"},"embedding_dimensions":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Embedding Dimensions"},"supports_tools":{"type":"boolean","title":"Supports Tools","default":true},"supports_streaming":{"type":"boolean","title":"Supports Streaming","default":true},"is_judge_eligible":{"type":"boolean","title":"Is Judge Eligible","default":false},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"gateway_model_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Gateway Model Name"}},"type":"object","required":["name","display_name","provider","deployment_name","kind"],"title":"ModelUpsertRequest","description":"Body shared by POST (create) and PUT (full update) endpoints."},"NoScreenSummaryResponse":{"properties":{"call_count":{"type":"integer","title":"Call Count"},"distinct_endpoints":{"type":"integer","title":"Distinct Endpoints"},"distinct_users":{"type":"integer","title":"Distinct Users"},"p95_time_to_headers_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"P95 Time To Headers Ms"},"error_count":{"type":"integer","title":"Error Count"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"}},"type":"object","required":["call_count","distinct_endpoints","distinct_users","p95_time_to_headers_ms","error_count","last_seen_at"],"title":"NoScreenSummaryResponse","description":"R40, KTD43. Non-browser and background traffic.\n\nDeliberately NOT a ``ScreenSummaryRowResponse`` and deliberately carrying no\nname: it is not a screen, and a backend-supplied label would be\nindistinguishable from a screen actually called that (the same reasoning as\nKTD38's refusal to label a null ``client_view``). The naming is the report's\njob."},"NotChargedRowResponse":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"request_count":{"type":"integer","title":"Request Count"}},"type":"object","required":["reason","request_count"],"title":"NotChargedRowResponse"},"NotChargedSummaryResponse":{"properties":{"request_count":{"type":"integer","title":"Request Count"},"reasons":{"items":{"$ref":"#/components/schemas/NotChargedRowResponse"},"type":"array","title":"Reasons"}},"type":"object","required":["request_count","reasons"],"title":"NotChargedSummaryResponse","description":"R24. Excluded from every money total, reported alongside them."},"NotifyRequest":{"properties":{"owner_key":{"type":"string","title":"Owner Key"},"repo_ids":{"items":{"type":"string"},"type":"array","title":"Repo Ids"},"is_escalation":{"type":"boolean","title":"Is Escalation","default":false}},"type":"object","required":["owner_key","repo_ids"],"title":"NotifyRequest","description":"A Notify request: which owner group, and which of its repos to send for.\n\n``repo_ids`` is the list of catalog-row UUIDs the operator checked in the UI\n-- the send covers exactly this subset (R14). ``owner_key`` and\n``is_escalation`` are the client's *view* of which group it thinks it is\nacting on; both are advisory only. The server NEVER trusts a client-supplied\nrecipient address: the destination is re-derived from each row's stored\n``repo_owner`` via :func:`resolve_owner_email` (non-escalation) or resolved\nfresh from config inside :func:`send_ops_escalation` (escalation). A tampered\nrequest therefore cannot redirect a real archive email away from the\ndirectory-verified address.\n\nThere is deliberately **no recipient/email field** in this schema."},"OffenderRow":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"signals":{"items":{"type":"string"},"type":"array","title":"Signals"}},"type":"object","required":["workflow_id","signals"],"title":"OffenderRow","description":"One workflow and every signal name it tripped (KTD7).\n\nDeduplicated by workflow so a single badly back-filled workflow does not\nread as four separate problems."},"OrgCustomPropertySchemaResponse":{"properties":{"github_org":{"type":"string","title":"Github Org"},"github_org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Org Id"},"properties":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Properties"},"property_count":{"type":"integer","title":"Property Count","default":0},"fetched_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fetched At"},"schema_unavailable":{"type":"boolean","title":"Schema Unavailable","default":false},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["github_org"],"title":"OrgCustomPropertySchemaResponse"},"OutcomeCounts":{"properties":{"succeeded":{"type":"integer","title":"Succeeded"},"failed":{"type":"integer","title":"Failed"},"stopped":{"type":"integer","title":"Stopped"},"in_progress":{"type":"integer","title":"In Progress"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["succeeded","failed","stopped","in_progress","total"],"title":"OutcomeCounts","description":"R18. The four run outcomes."},"OutcomeTrendPoint":{"properties":{"start":{"type":"string","format":"date","title":"Start"},"partial":{"type":"boolean","title":"Partial"},"counts":{"$ref":"#/components/schemas/OutcomeCounts"}},"type":"object","required":["start","partial","counts"],"title":"OutcomeTrendPoint"},"OwnerFacet":{"type":"string","enum":["anyone","mine","unresolved"],"title":"OwnerFacet","description":"Owner filter facet. ``mine`` / ``unresolved`` are resolution-based (KTD-8)."},"PaginatedAuditEventsResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/AuditEventResponse"},"type":"array","title":"Events"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["events","total","page","page_size"],"title":"PaginatedAuditEventsResponse","description":"Paginated list of audit events."},"PaginatedMembersResponse":{"properties":{"members":{"items":{"$ref":"#/components/schemas/MemberResponse"},"type":"array","title":"Members"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["members","total","page","page_size"],"title":"PaginatedMembersResponse"},"PendingApprovalActor":{"properties":{"external_id_suffix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id Suffix"},"account_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Type"}},"type":"object","title":"PendingApprovalActor","description":"The *redaction-safe* \"who triggered this\" shown on the deep-link surface.\n\nThe raw Jira ``accountId``/``email`` are NEVER serialized (deepening M3).\nThe stored ``jira_actor`` JSONB is already redacted to a short suffix +\n``accountType`` (``_redact_actor_for_storage``); this model is the contract\nthat the API only ever exposes that redacted shape, never the raw actor."},"PendingApprovalDetail":{"properties":{"pending_approval":{"$ref":"#/components/schemas/PendingApprovalSummary"},"prd_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prd Title"},"prd_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prd Body"},"body_unavailable":{"type":"boolean","title":"Body Unavailable","default":false}},"type":"object","required":["pending_approval","prd_title","prd_body"],"title":"PendingApprovalDetail","description":"The deep-link surface payload: the awaiting metadata + the *live-resolved*\nPRD title/body for display. The body is resolved read-only here; the\nwrite-once snapshot is captured by ``_approve_prd_core`` at finalize.\n\n``body_unavailable`` is set when the live Jira resolve fails (deleted ticket,\ntransient Jira outage) — the surface still renders the metadata + a clear\nnext step rather than a dead error."},"PendingApprovalSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status"},"source":{"type":"string","title":"Source"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"product_id":{"type":"string","format":"uuid","title":"Product Id"},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name"},"jira_issue_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jira Issue Key"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"jira_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jira Url"},"triggered_by":{"anyOf":[{"$ref":"#/components/schemas/PendingApprovalActor"},{"type":"null"}]},"can_finalize":{"type":"boolean","title":"Can Finalize"}},"type":"object","required":["id","status","source","created_at","product_id","product_name","jira_issue_key","jira_url","triggered_by","can_finalize"],"title":"PendingApprovalSummary","description":"An ``awaiting`` PRD approval — the pending side of the state machine.\n\nUsed both in the unified list (the approvals board) and as the metadata\nhalf of the deep-link detail. Carries NO PRD body (the body is resolved\nlive on the detail endpoint and re-resolved authoritatively at finalize)."},"PerDeveloperTile":{"properties":{"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"numerator":{"type":"integer","title":"Numerator"},"developers":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Developers"},"reason":{"anyOf":[{"type":"string","enum":["no_developers","small_team"]},{"type":"null"}],"title":"Reason"}},"type":"object","required":["value","numerator","developers","reason"],"title":"PerDeveloperTile","description":"A per-developer figure (AS3, AS14).\n\n``value`` is ``None`` when hidden, and ``reason`` says why. ``developers``\nis the mean FTE, 0.0 with no developers and ``None`` for a small team,\nwhose FTE is never revealed."},"PeriodSelectionResponse":{"properties":{"kind":{"type":"string","title":"Kind","description":"One of: current_cycle, cycle, window."},"cycle_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cycle Start","description":"The cycle boundary served. Null for the current cycle, and always null on a window."},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date","description":"Window grain only: the first day, INCLUSIVE."},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date","description":"Window grain only: the day after the last, EXCLUSIVE."},"grain":{"type":"string","title":"Grain","description":"seat_cycle | model_day. seat_cycle carries allowance figures, the stamped org position and the cycle coverage buckets; model_day carries none of the three and reaches 19 months back."},"label":{"type":"string","title":"Label"}},"type":"object","required":["kind","cycle_start","start_date","end_date","grain","label"],"title":"PeriodSelectionResponse","description":"Which period was served, and which grain answered for it (Amendment A).\n\n``grain`` is the field a consumer branches on, and it decides three things\nat once. ``seat_cycle`` means the vendor's own allowance figures, the stamped\norg position, and the cycle-shaped coverage buckets. ``model_day`` means a\nrolling window measured from per-request charges: no allowance framing, no\norg rollups, no incremental-cash split, and a coverage panel that reports\n\"no seat today\" money instead of a cycle's buckets."},"PermissionsRequest":{"properties":{"permissions":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Permissions"}},"type":"object","required":["permissions"],"title":"PermissionsRequest"},"PersonUsage":{"properties":{"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team"},"github_login":{"type":"string","title":"Github Login"},"active_weeks":{"type":"integer","title":"Active Weeks"},"totals":{"$ref":"#/components/schemas/Activity"},"by_week":{"items":{"$ref":"#/components/schemas/Activity"},"type":"array","title":"By Week"},"prs":{"anyOf":[{"$ref":"#/components/schemas/PrShare"},{"type":"null"}]},"prs_by_week":{"anyOf":[{"items":{"$ref":"#/components/schemas/PrShare"},"type":"array"},{"type":"null"}],"title":"Prs By Week"}},"type":"object","required":["email","name","team","github_login","active_weeks","totals","by_week","prs","prs_by_week"],"title":"PersonUsage"},"PinFieldRequest":{"properties":{"field":{"type":"string","maxLength":64,"minLength":1,"title":"Field"}},"type":"object","required":["field"],"title":"PinFieldRequest"},"PipelineRoleBody":{"properties":{"role":{"type":"string","maxLength":50,"title":"Role"},"config":{"additionalProperties":true,"type":"object","title":"Config"}},"type":"object","required":["role"],"title":"PipelineRoleBody","description":"One role a pipeline should hold, with its config (GAIT-579 U20)."},"PlanUnitView":{"properties":{"unit_id":{"type":"string","title":"Unit Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"acceptance_criteria":{"items":{"$ref":"#/components/schemas/AcceptanceCheckView"},"type":"array","title":"Acceptance Criteria"},"files_touched_estimate":{"items":{"type":"string"},"type":"array","title":"Files Touched Estimate"}},"type":"object","required":["unit_id"],"title":"PlanUnitView","description":"The structured spec for one plan unit, for the dashboard drill-down.\n\nSourced from ``DevmateUnit.spec`` (the JSONB structured plan-unit B9\npersisted on the row) merged with the unit's stable id/title. The live\n*state* of the unit (status, PR, review) lives on ``DevmateUnitView`` —\nthis is the static \"what was planned\" half."},"PlaybookRow":{"properties":{"playbook_id":{"type":"string","title":"Playbook Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"},"org_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Name"}},"type":"object","required":["playbook_id"],"title":"PlaybookRow","description":"Matches ``src/types/index.ts::Playbook``."},"PrRegrouped":{"properties":{"pr_ref":{"type":"string","title":"Pr Ref"},"before":{"type":"string","enum":["draft","open","declined","merged"],"title":"Before"},"after":{"type":"string","enum":["draft","open","declined","merged"],"title":"After"}},"type":"object","required":["pr_ref","before","after"],"title":"PrRegrouped"},"PrReviewFindingView":{"properties":{"kind":{"type":"string","title":"Kind"},"id":{"type":"string","title":"Id"},"thread_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Id"},"author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"},"is_bot":{"type":"boolean","title":"Is Bot","default":false},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"},"line":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line"},"is_outdated":{"type":"boolean","title":"Is Outdated","default":false},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"excerpt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Excerpt"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"addressed_in_round":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Addressed In Round"},"submitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Submitted At"}},"type":"object","required":["kind","id"],"title":"PrReviewFindingView","description":"One still-open review finding swept off the PR (PDLC-308 R12).\n\nA projection of one item in the ``pr_review_findings`` snapshot the\n15-minute sweep stores — a third party's unresolved review thread\n(``thread``), a PR-level review body (``review``) or a top-level\nconversation comment (``comment``).\n\n``excerpt`` is the only field carrying third-party TEXT, and it is the\nonly field gated by ``devmate:pr-review:excerpt`` (R22/KTD17): it is\n``None`` for a caller without that permission and for the agent tool,\nalways. Every other field — author, location, URL, round tag — rides on\nthe run-view permission, so a viewer without the excerpt permission\nstill sees who commented and where."},"PrShare":{"properties":{"merged":{"type":"integer","title":"Merged"},"through_argo":{"type":"integer","title":"Through Argo"},"share":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Share"}},"type":"object","required":["merged","through_argo","share"],"title":"PrShare"},"PrSource":{"properties":{"state":{"type":"string","enum":["loading","refreshing","ready","unavailable"],"title":"State"},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Read At"},"github_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Github Synced At"},"latest_failure":{"anyOf":[{"$ref":"#/components/schemas/Failure"},{"type":"null"}]},"authors_unavailable":{"type":"boolean","title":"Authors Unavailable","default":false}},"type":"object","required":["state","read_at","github_synced_at","latest_failure"],"title":"PrSource","description":"The Board numbers read the PR figures come from."},"PrdAdoption":{"properties":{"steps":{"items":{"$ref":"#/components/schemas/PrdFunnelStep"},"type":"array","title":"Steps"},"cohorts":{"items":{"$ref":"#/components/schemas/PrdCohort"},"type":"array","title":"Cohorts"},"pooled":{"$ref":"#/components/schemas/PrdCohort"},"tiles":{"$ref":"#/components/schemas/PrdTiles"},"flow":{"items":{"$ref":"#/components/schemas/PrdFlowWeek"},"type":"array","title":"Flow"},"stuck_min_days":{"type":"integer","title":"Stuck Min Days"},"stuck":{"items":{"$ref":"#/components/schemas/PrdStuck"},"type":"array","title":"Stuck"},"boards":{"items":{"$ref":"#/components/schemas/PrdBoardRow"},"type":"array","title":"Boards"}},"type":"object","required":["steps","cohorts","pooled","tiles","flow","stuck_min_days","stuck","boards"],"title":"PrdAdoption","description":"The PRD adoption view of ``GET /api/sdlc-board-numbers``.\n\nBuilt from the same PRDs, Argo approvals and linked PRs as the tiles. A funnel\nstep the data cannot support is left out of ``steps``, never estimated:\n``signoff`` is absent from a read stored before Sign-off facts were read."},"PrdBoardRow":{"properties":{"project":{"type":"string","title":"Project"},"created":{"type":"integer","title":"Created"},"approved":{"type":"integer","title":"Approved"},"approved_rate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Approved Rate"},"merged_through_argo":{"type":"integer","title":"Merged Through Argo"},"outside_argo":{"type":"integer","title":"Outside Argo"}},"type":"object","required":["project","created","approved","approved_rate","merged_through_argo","outside_argo"],"title":"PrdBoardRow"},"PrdCitationView":{"properties":{"source_url":{"type":"string","title":"Source Url"},"fetched_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Fetched At"},"revision_pointer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revision Pointer"}},"type":"object","required":["source_url"],"title":"PrdCitationView","description":"One provenance entry of the approval snapshot (a ProductMate ``Citation``).\n\nWritten at approval time as the source issue URL plus one entry per\nattachment actually fetched — the only record of WHICH attachments made it\ninto the snapshot, which is what a ``text_only`` (degraded) fidelity hides.\n\nProjected into a local view rather than re-validated into the productmate\n``Citation`` model: the stored rows are plain JSONB dicts, and ``Citation``\nis a strict (``HttpUrl``, ``extra=\"forbid\"``) input-side model whose\nvalidation error would blow up the whole run view. Same rule as every other\nnested projection here — flatten defensively, never leak the raw dict.\n\n``revision_pointer`` is always ``None`` today — the approval writer records\nno filenames. If it ever carries filenames, gate ``citations`` behind\n``include_body``: filenames are content-bearing in a way opaque attachment\nURLs are not."},"PrdCohort":{"properties":{"week_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Week Start"},"week_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Week End"},"partial":{"type":"boolean","title":"Partial"},"counts":{"items":{"type":"integer"},"type":"array","title":"Counts"},"share_of_created":{"items":{"anyOf":[{"type":"integer"},{"type":"null"}]},"type":"array","title":"Share Of Created"},"step_rate":{"items":{"anyOf":[{"type":"integer"},{"type":"null"}]},"type":"array","title":"Step Rate"},"median_days":{"items":{"anyOf":[{"type":"number"},{"type":"null"}]},"type":"array","title":"Median Days"}},"type":"object","required":["week_start","week_end","partial","counts","share_of_created","step_rate","median_days"],"title":"PrdCohort","description":"PRDs created in one Chicago week, and how far they got.\n\nEvery list is aligned with ``PrdAdoption.steps``. ``counts`` are the PRDs that\nreached the step and every step it is nested under; ``share_of_created`` and\n``step_rate`` are whole percents over the created count and over the step's\nparent (``PrdFunnelStep.after``; ``None`` over zero). ``median_days[i]`` is\nthe median wait from the parent step to step ``i`` among PRDs that reached\n``i``, one decimal, ``None`` when none did; the first entry is always\n``None``. The pooled cohort has no week."},"PrdFlowWeek":{"properties":{"week_start":{"type":"string","format":"date","title":"Week Start"},"week_end":{"type":"string","format":"date","title":"Week End"},"partial":{"type":"boolean","title":"Partial"},"created":{"type":"integer","title":"Created"},"approved":{"type":"integer","title":"Approved"},"shipped":{"type":"integer","title":"Shipped"}},"type":"object","required":["week_start","week_end","partial","created","approved","shipped"],"title":"PrdFlowWeek","description":"Events in one Chicago week, not cumulative: PRDs created, Argo approvals\nand PRDs that reached Done, whenever the PRD itself was created."},"PrdFunnelStep":{"properties":{"key":{"type":"string","enum":["created","approved","signoff","pr_opened","pr_merged","done"],"title":"Key"},"label":{"type":"string","title":"Label"},"after":{"anyOf":[{"type":"string","enum":["created","approved","signoff","pr_opened","pr_merged","done"]},{"type":"null"}],"title":"After"}},"type":"object","required":["key","label","after"],"title":"PrdFunnelStep"},"PrdRatio":{"properties":{"numerator":{"type":"integer","title":"Numerator"},"denominator":{"type":"integer","title":"Denominator"},"rate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate"}},"type":"object","required":["numerator","denominator","rate"],"title":"PrdRatio"},"PrdSnapshotView":{"properties":{"approval_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approval Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"jira_issue_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jira Issue Key"},"body_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Text"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"},"snapshot_fidelity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot Fidelity"},"citations":{"items":{"$ref":"#/components/schemas/PrdCitationView"},"type":"array","title":"Citations"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"source_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Label"},"body_omitted":{"type":"boolean","title":"Body Omitted","default":false}},"type":"object","title":"PrdSnapshotView","description":"The approval snapshot the run was generated from.\n\n``body_text`` is the snapshot text — the source of record. It is omitted\n(None, with ``body_omitted=True``) when the caller lacks the ProductMate\npermission to read approval bodies; ``approval_id`` + ``source_url`` are\nstill returned so the UI can show \"Source: Confluence ↗\".\n\n``source_url`` / ``source_label`` point at the *original* artifact, which\nmay have drifted since approval — the UI presents the snapshot as primary\nand this link as a caveated secondary.\n\n``citations`` is the approval-time provenance of the snapshot text (issue +\none entry per attachment fetched) — it is what makes a ``text_only``\n``snapshot_fidelity`` legible: which attachments got in, and which didn't.\n\n``jira_issue_key`` is the PRD's Jira ticket (``None`` for a keyless chat\napproval) — metadata like the title, so it survives ``body_omitted``."},"PrdStuck":{"properties":{"key":{"type":"string","title":"Key"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"project":{"type":"string","title":"Project"},"days_waiting":{"type":"integer","title":"Days Waiting"},"reason":{"anyOf":[{"type":"string","enum":["signoff_red","signoff_inconclusive","signoff_not_run","no_run_started","waiting_on_plan_approval","run_failed","no_pr_yet"]},{"type":"null"}],"title":"Reason"}},"type":"object","required":["key","title","project","days_waiting","reason"],"title":"PrdStuck","description":"A PRD Argo approved that has no Argo-opened PR yet. Team and board level:\nno person is named."},"PrdTiles":{"properties":{"approval_window_days":{"type":"integer","title":"Approval Window Days"},"approved_in_window":{"$ref":"#/components/schemas/PrdRatio"},"merged_through_argo":{"$ref":"#/components/schemas/PrdRatio"},"merged_of_approved":{"$ref":"#/components/schemas/PrdRatio"},"outside_argo":{"$ref":"#/components/schemas/PrdRatio"}},"type":"object","required":["approval_window_days","approved_in_window","merged_through_argo","merged_of_approved","outside_argo"],"title":"PrdTiles"},"ProcessUsageView":{"properties":{"live_work_by_stage":{"items":{"$ref":"#/components/schemas/StageLiveWork"},"type":"array","title":"Live Work By Stage"},"derailment":{"$ref":"#/components/schemas/Derailment"},"events_by_source":{"items":{"$ref":"#/components/schemas/EventSourceShare"},"type":"array","title":"Events By Source"}},"type":"object","required":["live_work_by_stage","derailment","events_by_source"],"title":"ProcessUsageView","description":"R1's second peer view — how the process is used, not how long it takes."},"ProductDiffItemResponse":{"properties":{"name":{"type":"string","title":"Name"},"status":{"type":"string","enum":["new","changed","unchanged"],"title":"Status"},"local_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Local Fingerprint"},"target_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Fingerprint"}},"type":"object","required":["name","status"],"title":"ProductDiffItemResponse"},"ProductFilterState":{"properties":{"selected":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selected","description":"The `product_id` this payload was filtered by — a UUID, the literal `unassigned`, or null for every product."},"options":{"items":{"$ref":"#/components/schemas/app__schemas__sdlc_delivery__ProductOption"},"type":"array","title":"Options"}},"type":"object","required":["selected","options"],"title":"ProductFilterState","description":"Which product the payload was scoped to, echoed back.\n\nEchoed rather than assumed: the panel renders the control from this, so a\nreload with a filter in the URL cannot show \"All products\" over a scoped\npayload."},"ProductHierarchyResponse":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/HierarchyRowResponse"},"type":"array","title":"Rows"},"snapshot":{"$ref":"#/components/schemas/HierarchySnapshotResponse"}},"type":"object","required":["rows","snapshot"],"title":"ProductHierarchyResponse","description":"The whole taxonomy in one payload.\n\nUnpaged on purpose: the certified set is ~41 rows, and the page's entire\nreason to exist is that every value is visible at once."},"ProductRef":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"}},"type":"object","required":["id","name","slug"],"title":"ProductRef","description":"The run's Product — id, name, slug (R23). Joined from the run's\ntriggering Approval, since ``GtmRun`` carries no direct Product FK."},"ProductSettingsUpdate":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"park_tag":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Park Tag"},"cap_percent":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":1.0},{"type":"null"}],"title":"Cap Percent"},"cap_denominator":{"anyOf":[{"type":"string","enum":["test_run","fixed"]},{"type":"null"}],"title":"Cap Denominator"},"cap_denominator_fixed":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Cap Denominator Fixed"},"jira_project":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Jira Project"},"jira_issue_type":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Jira Issue Type"},"digest_recipients":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":200},{"type":"null"}],"title":"Digest Recipients"},"bug_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Bug Team Id"}},"additionalProperties":false,"type":"object","title":"ProductSettingsUpdate","description":"A product's QualityMate settings. Every field is optional: only the\nfields sent change. Pipelines and test repos are not settings here (U20\nowns them), so any other field is refused."},"ProjectAdoption":{"properties":{"project":{"type":"string","title":"Project"},"opened":{"$ref":"#/components/schemas/AdoptionNumbers"},"merged":{"$ref":"#/components/schemas/AdoptionNumbers"}},"type":"object","required":["project","opened","merged"],"title":"ProjectAdoption"},"ProjectSummaryResponse":{"properties":{"project_key":{"type":"string","title":"Project Key"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"flag_count":{"type":"integer","title":"Flag Count"},"last_successful_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Successful Sync At"}},"type":"object","required":["project_key","name","flag_count","last_successful_sync_at"],"title":"ProjectSummaryResponse","description":"One entry in the dashboard's scope selector."},"ProposedPlanView":{"properties":{"plan_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Text"},"approved_plan_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved Plan Text"},"units":{"items":{"$ref":"#/components/schemas/PlanUnitView"},"type":"array","title":"Units"}},"type":"object","title":"ProposedPlanView","description":"The structured proposed plan a human reviews / looks back on.\n\n``plan_text`` is the canonical rendered-markdown artifact (what the HITL\ngate shows by default); ``units`` is the structured outline the\ndashboard's \"Structured\" toggle drills into. Retained on the run after\napproval — present for awaiting-approval *and* running/complete runs."},"QeMetricsResponse":{"properties":{"sessions":{"items":{"$ref":"#/components/schemas/QeSessionRow"},"type":"array","title":"Sessions"},"synced_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Synced At"}},"type":"object","required":["sessions"],"title":"QeMetricsResponse"},"QeSessionRow":{"properties":{"session_id":{"type":"string","title":"Session Id"},"session_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Url"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"org_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Name"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"acu_used":{"type":"number","title":"Acu Used"},"xray_ticket_count":{"type":"integer","title":"Xray Ticket Count"},"tests_pushed":{"type":"boolean","title":"Tests Pushed"},"pr_raised":{"type":"boolean","title":"Pr Raised"},"qe_success":{"type":"boolean","title":"Qe Success"},"session_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Size"},"playbook_used":{"type":"boolean","title":"Playbook Used"},"playbook_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Playbook Id"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},"type":"object","required":["session_id","acu_used","xray_ticket_count","tests_pushed","pr_raised","qe_success","playbook_used"],"title":"QeSessionRow","description":"Matches ``src/types/index.ts::QeSessionMetrics`` (client-aggregation contract)."},"QualityDashboardPayload":{"properties":{"data":{"additionalProperties":true,"type":"object","title":"Data"},"run":{"$ref":"#/components/schemas/RunStamp"},"series":{"additionalProperties":{"$ref":"#/components/schemas/SeriesStamp"},"type":"object","title":"Series"},"scope":{"$ref":"#/components/schemas/ScopeState"},"annotations":{"additionalProperties":{"$ref":"#/components/schemas/Annotation"},"type":"object","title":"Annotations"}},"type":"object","title":"QualityDashboardPayload","description":"The full response body for ``GET /api/quality/dashboard``.\n\n``data`` is intentionally untyped: it is the shipped ``DATA`` object, held verbatim so\nthe frozen 2026-07-27 fixture is a drop-in for it (D3). Modelling its ~38 keys here\nwould create a second definition of the wire shape that could drift from the fixture,\nwhich is the one thing the fixture exists to prevent. The *envelope* is what carries a\ncontract; the payload body is carried, not re-specified."},"QualityMateFixResultView":{"properties":{"outcome":{"type":"string","title":"Outcome"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"returned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Returned At"}},"type":"object","required":["outcome"],"title":"QualityMateFixResultView","description":"How a QualityMate fix's work order ended: what DevMate returned\n(``pr_opened`` / ``no_pr``), or the order's own end (``timed_out``,\n``cancelled``, ``failed``) when it returned nothing."},"QualityMateFixSourceView":{"properties":{"test_run_exists":{"type":"boolean","title":"Test Run Exists"},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name"},"test_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Run Id"},"item_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Id"},"run_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Date"},"build_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Build Id"},"can_open":{"type":"boolean","title":"Can Open","default":false},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"},"handed_over_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Handed Over At"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Goal"},"result":{"anyOf":[{"$ref":"#/components/schemas/QualityMateFixResultView"},{"type":"null"}]}},"type":"object","required":["test_run_exists"],"title":"QualityMateFixSourceView","description":"Where a ``qualitymate-fix`` run came from (GAIT-579 U14, mockup screens\n23 and 27): the QualityMate test run and item, why the test was handed over,\nand what DevMate returned. ``can_open`` says whether the viewer may open\nthat item in QualityMate (it exists, and they hold the Test Runs view)."},"QualitySection":{"properties":{"bugs_per_million_lines":{"$ref":"#/components/schemas/RatioTile"}},"type":"object","required":["bugs_per_million_lines"],"title":"QualitySection"},"QuarterGoalRow":{"properties":{"checkitem_id":{"type":"string","title":"Checkitem Id"},"text":{"type":"string","title":"Text"},"context":{"type":"string","title":"Context"},"card_id":{"type":"string","title":"Card Id"},"card_name":{"type":"string","title":"Card Name"},"card_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Url"},"card_archived":{"type":"boolean","title":"Card Archived"},"below_the_line":{"type":"boolean","title":"Below The Line"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"checklist_name":{"type":"string","title":"Checklist Name"},"owner":{"$ref":"#/components/schemas/GoalOwner"},"due":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Due"},"state":{"type":"string","title":"State"},"lifecycle":{"type":"string","title":"Lifecycle"},"promoted_to_card_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promoted To Card Id"},"last_changed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Changed At"}},"type":"object","required":["checkitem_id","text","context","card_id","card_name","card_archived","below_the_line","checklist_name","owner","state","lifecycle"],"title":"QuarterGoalRow"},"QuarterGoalsQuarter":{"properties":{"quarter_list_id":{"type":"string","title":"Quarter List Id"},"year":{"type":"integer","title":"Year"},"quarter_number":{"type":"integer","title":"Quarter Number"},"display_label":{"type":"string","title":"Display Label"},"archived":{"type":"boolean","title":"Archived"},"is_historical":{"type":"boolean","title":"Is Historical"}},"type":"object","required":["quarter_list_id","year","quarter_number","display_label","archived","is_historical"],"title":"QuarterGoalsQuarter"},"QuarterGoalsResponse":{"properties":{"quarter":{"$ref":"#/components/schemas/QuarterGoalsQuarter"},"goals":{"items":{"$ref":"#/components/schemas/QuarterGoalRow"},"type":"array","title":"Goals"},"total_in_quarter":{"type":"integer","title":"Total In Quarter"},"data_as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data As Of"},"awaiting_first_sync":{"type":"boolean","title":"Awaiting First Sync"},"applied_filters":{"additionalProperties":true,"type":"object","title":"Applied Filters"}},"type":"object","required":["quarter","goals","total_in_quarter","awaiting_first_sync","applied_filters"],"title":"QuarterGoalsResponse"},"QuarterMappingRequest":{"properties":{"year":{"type":"integer","maximum":2100.0,"minimum":2000.0,"title":"Year"},"quarter_number":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Quarter Number"},"display_label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Display Label"}},"type":"object","required":["year","quarter_number"],"title":"QuarterMappingRequest"},"QuarterMappingResponse":{"properties":{"list_id":{"type":"string","title":"List Id"},"name":{"type":"string","title":"Name"},"year":{"type":"integer","title":"Year"},"quarter_number":{"type":"integer","title":"Quarter Number"},"display_label":{"type":"string","title":"Display Label"},"mapped":{"type":"boolean","title":"Mapped"}},"type":"object","required":["list_id","name","year","quarter_number","display_label","mapped"],"title":"QuarterMappingResponse"},"QuarterOption":{"properties":{"quarter_list_id":{"type":"string","title":"Quarter List Id"},"year":{"type":"integer","title":"Year"},"quarter_number":{"type":"integer","title":"Quarter Number"},"display_label":{"type":"string","title":"Display Label"},"archived":{"type":"boolean","title":"Archived"},"is_current":{"type":"boolean","title":"Is Current"},"is_historical":{"type":"boolean","title":"Is Historical"}},"type":"object","required":["quarter_list_id","year","quarter_number","display_label","archived","is_current","is_historical"],"title":"QuarterOption"},"QuarterOverQuarterResponse":{"properties":{"series":{"items":{"$ref":"#/components/schemas/QuarterSeriesPoint"},"type":"array","title":"Series"},"measures":{"type":"string","title":"Measures"},"feed_depth_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feed Depth From"},"data_as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data As Of"}},"type":"object","required":["series","measures"],"title":"QuarterOverQuarterResponse"},"QuarterSeriesPoint":{"properties":{"quarter_list_id":{"type":"string","title":"Quarter List Id"},"year":{"type":"integer","title":"Year"},"quarter_number":{"type":"integer","title":"Quarter Number"},"display_label":{"type":"string","title":"Display Label"},"goals":{"type":"integer","title":"Goals"},"completed":{"type":"integer","title":"Completed"},"in_flight":{"type":"boolean","title":"In Flight"},"promotion_unadjusted":{"type":"boolean","title":"Promotion Unadjusted"}},"type":"object","required":["quarter_list_id","year","quarter_number","display_label","goals","completed","in_flight","promotion_unadjusted"],"title":"QuarterSeriesPoint"},"QuartersResponse":{"properties":{"quarters":{"items":{"$ref":"#/components/schemas/QuarterOption"},"type":"array","title":"Quarters"},"default_quarter_list_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Quarter List Id"},"current_period":{"$ref":"#/components/schemas/CurrentPeriod"},"current_quarter_unmapped":{"type":"boolean","title":"Current Quarter Unmapped"},"data_as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data As Of"}},"type":"object","required":["quarters","current_period","current_quarter_unmapped"],"title":"QuartersResponse"},"QueueEntryOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status"},"kind":{"type":"string","title":"Kind"},"trigger":{"type":"string","title":"Trigger"},"attempt":{"type":"integer","title":"Attempt"},"eligible_at":{"type":"string","format":"date-time","title":"Eligible At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage"}},"type":"object","required":["id","status","kind","trigger","attempt","eligible_at"],"title":"QueueEntryOut"},"Range":{"properties":{"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"window_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Window Start"},"window_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Window End"},"status_as_of":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Status As Of"}},"type":"object","required":["start_date","end_date","window_start","window_end","status_as_of"],"title":"Range","description":"The inclusive dates asked for, and the half-open window they bound.\n\n``window_end`` is the earlier of the end date's next Chicago midnight and\nthe read time (KTD9); ``status_as_of`` is that same instant. The window is\n``None`` with no cached read."},"RateChange":{"properties":{"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate","description":"Positive / all ratings, 0–1; null with none."},"previous_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Rate"},"ratings":{"type":"integer","title":"Ratings","description":"Ratings in the current period (R8)."},"previous_ratings":{"type":"integer","title":"Previous Ratings"},"change_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change Points","description":"(rate - previous_rate) * 100, in percentage points."},"is_new":{"type":"boolean","title":"Is New"}},"type":"object","required":["rate","previous_rate","ratings","previous_ratings","change_points","is_new"],"title":"RateChange"},"RatioTile":{"properties":{"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"numerator":{"type":"integer","title":"Numerator"},"denominator":{"type":"integer","title":"Denominator"}},"type":"object","required":["value","numerator","denominator"],"title":"RatioTile","description":"``numerator`` over ``denominator``, scaled; ``value`` is ``None`` over 0."},"ReconcileRunResponse":{"properties":{"run_id":{"type":"string","title":"Run Id"},"lifecycle_status":{"type":"string","title":"Lifecycle Status"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["run_id","lifecycle_status"],"title":"ReconcileRunResponse"},"RedirectHoldConsumeResponse":{"properties":{"target":{"type":"string","title":"Target"},"status":{"type":"string","enum":["consumed","absent","expired","invalid"],"title":"Status"}},"type":"object","required":["target","status"],"title":"RedirectHoldConsumeResponse"},"RedirectHoldPeekResponse":{"properties":{"target":{"type":"string","title":"Target"},"status":{"type":"string","enum":["present","absent","expired","invalid"],"title":"Status"}},"type":"object","required":["target","status"],"title":"RedirectHoldPeekResponse"},"RedirectHoldSeedRequest":{"properties":{"path":{"type":"string","maxLength":2048,"title":"Path"}},"type":"object","required":["path"],"title":"RedirectHoldSeedRequest"},"ReferenceSnapshotsResponse":{"properties":{"certified_hierarchy_loaded_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Certified Hierarchy Loaded At"},"certified_hierarchy_row_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Certified Hierarchy Row Count"},"suggestions_loaded_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggestions Loaded At"},"suggestions_row_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Suggestions Row Count"}},"type":"object","title":"ReferenceSnapshotsResponse"},"RefreshResponse":{"properties":{"started":{"type":"boolean","title":"Started"},"state":{"type":"string","const":"refreshing","title":"State","default":"refreshing"}},"type":"object","required":["started"],"title":"RefreshResponse","description":"``POST /api/sdlc-board-numbers/refresh``. ``started`` is False when a\nread was already running (that read carries on), or when the newest read\nfinished within the refresh floor."},"RefreshedEpic":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"project":{"type":"string","title":"Project"},"current_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Score"},"quality_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality Level"},"last_graded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Graded At"},"has_pre_argo_score":{"type":"boolean","title":"Has Pre Argo Score","default":false},"pre_argo_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pre Argo Score"},"status":{"anyOf":[{"type":"string","enum":["running","waiting","retrying","queued","not_in_jira","gave_up","failed","graded"]},{"type":"null"}],"title":"Status"},"status_attempt":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Attempt"},"jira_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jira Status"},"creator_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creator Name"},"assignee_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee Name"},"created_via":{"type":"string","title":"Created Via"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"refreshed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Refreshed At"},"jira_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jira Url"},"grade_count":{"type":"integer","title":"Grade Count","default":0},"found_in_jira":{"type":"boolean","title":"Found In Jira","default":true}},"type":"object","required":["id","key","project","created_via","created_at"],"title":"RefreshedEpic","description":"The row a manual refresh returns, plus what the read found."},"RegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"confirm_password":{"type":"string","title":"Confirm Password"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["email","password","confirm_password"],"title":"RegisterRequest","description":"User registration request."},"RegisterResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"user_id":{"type":"string","title":"User Id"}},"type":"object","required":["success","message","user_id"],"title":"RegisterResponse","description":"User registration response."},"RegistryImportRequest":{"properties":{"commit_sha":{"type":"string","maxLength":64,"title":"Commit Sha"},"selections":{"items":{"$ref":"#/components/schemas/RegistrySelection"},"type":"array","maxItems":500,"title":"Selections"}},"type":"object","required":["commit_sha"],"title":"RegistryImportRequest"},"RegistrySelection":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"},"fingerprint":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Fingerprint"},"fields":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":10},{"type":"null"}],"title":"Fields"}},"type":"object","required":["name"],"title":"RegistrySelection","description":"One model the admin chose to apply: a registry id (new) or a row name,\nwith the fingerprint discovery showed for it (``None`` for a new model)."},"ReindexRequest":{"properties":{"full":{"type":"boolean","title":"Full","description":"Full re-index (ignore since) or incremental","default":false},"source_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Source Ids","description":"Limit to specific source IDs (empty = all enabled)"}},"type":"object","title":"ReindexRequest"},"ReindexResponse":{"properties":{"message":{"type":"string","title":"Message"},"execution_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Id"}},"type":"object","required":["message"],"title":"ReindexResponse"},"RejectRunRequest":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Reason"}},"type":"object","title":"RejectRunRequest","description":"Body for ``POST /api/devmate/runs/{id}/reject`` (Unit 13).\n\n``reason`` is an OPTIONAL operator note recorded on the run + narrated. The\nreject mutation itself takes no other input — it is a state transition, not\na dispatch. Capped at the schema boundary (it is persisted + narrated into\nthe shared chat timeline)."},"RejectRunResponse":{"properties":{"run_id":{"type":"string","title":"Run Id"},"status":{"type":"string","title":"Status"},"agent_cancelled":{"type":"boolean","title":"Agent Cancelled","default":false}},"type":"object","required":["run_id","status"],"title":"RejectRunResponse"},"RelabelTrackedAdoStageRequest":{"properties":{"display_label":{"type":"string","maxLength":255,"minLength":1,"title":"Display Label"}},"type":"object","required":["display_label"],"title":"RelabelTrackedAdoStageRequest"},"RemoveAdoPipelineRequest":{"properties":{"confirm":{"type":"boolean","title":"Confirm","description":"Must be true to confirm cascading deletion of this pipeline's tracked stages. Omitted or false is rejected.","default":false}},"type":"object","title":"RemoveAdoPipelineRequest","description":"R17: disconnecting a pipeline cascades its tracked stages -- this\nbody's ``confirm`` flag must be explicitly true before that fires.\nMirrors the typed-confirmation convention already used for the other\nhard-delete guardrail in this codebase (``HardDeleteUserRequest`` /\n``user_management.py``'s break-glass endpoint), simplified to a plain\nboolean since there is no meaningful \"type the name\" value here."},"RenameKeyRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"RenameKeyRequest"},"RenameRequest":{"properties":{"new_name":{"type":"string","maxLength":100,"title":"New Name"}},"type":"object","required":["new_name"],"title":"RenameRequest"},"ReplayResponse":{"properties":{"delivery_id":{"type":"string","title":"Delivery Id"},"replay_of_id":{"type":"string","title":"Replay Of Id"},"dispatch_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dispatch Outcome"}},"type":"object","required":["delivery_id","replay_of_id","dispatch_outcome"],"title":"ReplayResponse","description":"What the operator's replay produced.\n\n``delivery_id`` is the NEW receipt and ``replay_of_id`` the original, so the\nconsole can jump straight to the row it just created without re-reading the\nfeed. The original is unchanged and still reads ``failed`` (D31)."},"ReplaySummary":{"properties":{"handler_idempotent":{"type":"boolean","title":"Handler Idempotent"},"side_effects":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Side Effects"}},"type":"object","required":["handler_idempotent","side_effects"],"title":"ReplaySummary","description":"R32's consequence warning — the text an operator sees before a replay\nre-runs side effects.\n\n``side_effects`` is REQUIRED by ``IdempotencyPolicy.__post_init__`` whenever\n``handler_idempotent`` is False, so where the warning matters the text\nalways exists. It is exposed here rather than at replay time because the\nconsole has to show the consequence BEFORE the operator commits to it, and\nU12's replay control lives on the row this response describes."},"RepoActionSection":{"properties":{"change":{"$ref":"#/components/schemas/CountChange"},"chat":{"type":"integer","title":"Chat","description":"From an agent tool call."},"screen":{"type":"integer","title":"Screen","description":"From Argo's own screens."},"unrecorded":{"type":"integer","title":"Unrecorded","description":"No recorded source (rows before 2026-10-15)."}},"type":"object","required":["change","chat","screen","unrecorded"],"title":"RepoActionSection","description":"R12, KTD7. ``change.current == chat + screen + unrecorded``."},"RepoCatalogLifecycleDefaultsResponse":{"properties":{"inactivity_days":{"type":"integer","title":"Inactivity Days"},"keep_active_defer_days":{"type":"integer","title":"Keep Active Defer Days"},"default_archive_exception_date":{"type":"string","title":"Default Archive Exception Date"}},"type":"object","required":["inactivity_days","keep_active_defer_days","default_archive_exception_date"],"title":"RepoCatalogLifecycleDefaultsResponse"},"RepoMutationResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"repo_created":{"type":"boolean","title":"Repo Created","default":false},"catalog_ready":{"type":"boolean","title":"Catalog Ready","default":false},"catalog_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Catalog Id"},"repo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Url"},"repo_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Name"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"ldir_ticket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ldir Ticket"},"ldir_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ldir Url"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"teams_labeled":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Teams Labeled"},"team_changes":{"anyOf":[{"items":{"$ref":"#/components/schemas/TeamChangeReport"},"type":"array"},{"type":"null"}],"title":"Team Changes"},"teams_also_on_github":{"anyOf":[{"items":{"$ref":"#/components/schemas/LiveTeamRef"},"type":"array"},{"type":"null"}],"title":"Teams Also On Github"},"teams_refresh_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Teams Refresh State"}},"type":"object","required":["success"],"title":"RepoMutationResponse"},"RepoOwnerDefaultResponse":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","required":["email"],"title":"RepoOwnerDefaultResponse","description":"The create form's default repo-owner value (GAIT-174).\n\n``email`` is the caller's own email, used to pre-fill the owner field — the\ncommon case is still that you create a repo for yourself.\n\nThis used to carry a ``locked`` flag that pinned the field to the caller\nwhenever they were an active member, so a member could only ever create a\nrepo for themselves. That restriction was lifted: creating a repo on a\ncolleague's behalf is ordinary delegated work, and it displaces no one\nbecause the repo does not exist yet. The owner must still resolve to an\nactive member — that check lives server-side in ``repo_owner_write_error``,\nwhich is where it belongs."},"RepoScope":{"type":"string","enum":["mine","all","escalated"],"title":"RepoScope","description":"The three list scopes; each has its own authorization gate (KTD-2)."},"ReportingGroupOption":{"properties":{"name":{"type":"string","title":"Name"},"families":{"items":{"type":"string"},"type":"array","title":"Families"}},"type":"object","required":["name","families"],"title":"ReportingGroupOption","description":"A reporting group and its product families, both sorted by name."},"RepublishResult":{"properties":{"status":{"type":"string","title":"Status"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["status"],"title":"RepublishResult","description":"A route's report of a same-request re-publish attempt (R33, KTD20;\nPDLC-328 R16) — never raised, always reported. ``message`` is the\nclassified cause on a failed attempt, ``None`` on success."},"ResetRequest":{"properties":{"repo_ids":{"items":{"type":"string"},"type":"array","title":"Repo Ids"}},"type":"object","required":["repo_ids"],"title":"ResetRequest","description":"A Reset request: which repos to clear back to a pre-detection state.\n\n``repo_ids`` is the list of catalog-row UUIDs the operator checked. Reset is a\npure local-state clear — no email, no GitHub write — so there is no send gate."},"ResumeEntry":{"properties":{"interruptId":{"type":"string","title":"Interruptid"},"status":{"type":"string","enum":["resolved","cancelled"],"title":"Status"},"payload":{"anyOf":[{},{"type":"null"}],"title":"Payload"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"additionalProperties":true,"type":"object","required":["interruptId","status"],"title":"ResumeEntry","description":"An answer to one interrupt, sent on the run that continues from it."},"ResumeRunRequest":{"properties":{"resume":{"items":{"$ref":"#/components/schemas/ResumeEntry"},"type":"array","title":"Resume"}},"additionalProperties":false,"type":"object","title":"ResumeRunRequest"},"RetriggerReviewRequest":{"properties":{"unit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit Id"}},"type":"object","title":"RetriggerReviewRequest","description":"Body for ``POST /api/devmate/runs/{id}/review`` (ticket 09).\n\n``unit_id`` optionally narrows the re-trigger to one unit of the run;\nabsent (or no body at all) means every reviewable unit — ``pr_open``\nwith a ``pr_url``."},"RetriggerReviewResponse":{"properties":{"run_id":{"type":"string","title":"Run Id"},"reenqueued":{"items":{"$ref":"#/components/schemas/RetriggeredReviewUnit"},"type":"array","title":"Reenqueued"}},"type":"object","required":["run_id","reenqueued"],"title":"RetriggerReviewResponse"},"RetriggeredReviewUnit":{"properties":{"unit_id":{"type":"string","title":"Unit Id"},"task_id":{"type":"string","title":"Task Id"},"previous_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Status"}},"type":"object","required":["unit_id","task_id"],"title":"RetriggeredReviewUnit"},"ReviewerStatusView":{"properties":{"name":{"type":"string","title":"Name"},"ran":{"type":"boolean","title":"Ran"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["name","ran"],"title":"ReviewerStatusView","description":"One roster seat's terminal status (mirrors engine ``ReviewerStatus``).\n\n``ran=False`` covers BOTH a genuine crash and a structural skip (e.g. the\nspec seat with no spec text) — the engine envelope does not distinguish\nthem, only ``error`` carries the (always-present-when-not-ran) reason.\nA seat absent from the envelope's ``reviewers`` array (disabled, or the\npanel never reached — cap trip/diff-fetch failure) is likewise \"did not\nrun\"; the frontend fills that gap itself rather than this view inventing\na synthetic row for a name it never saw."},"RoleCreateRequest":{"properties":{"key":{"type":"string","maxLength":50,"minLength":1,"title":"Key"},"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"is_active":{"type":"boolean","title":"Is Active","default":true}},"additionalProperties":false,"type":"object","required":["key","name"],"title":"RoleCreateRequest"},"RoleDiffItemResponse":{"properties":{"name":{"type":"string","title":"Name"},"status":{"type":"string","enum":["new","changed","unchanged","warning"],"title":"Status"},"is_system_role":{"type":"boolean","title":"Is System Role","default":false},"local_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Local Fingerprint"},"target_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Fingerprint"},"warning_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning Message"}},"type":"object","required":["name","status"],"title":"RoleDiffItemResponse"},"RoleUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"additionalProperties":false,"type":"object","title":"RoleUpdateRequest"},"RowVersionRequest":{"properties":{"row_version":{"type":"integer","title":"Row Version"}},"additionalProperties":true,"type":"object","required":["row_version"],"title":"RowVersionRequest"},"RuleStat":{"properties":{"rule_id":{"type":"string","title":"Rule Id"},"findings":{"type":"integer","title":"Findings"},"contested":{"type":"integer","title":"Contested"},"contested_rate":{"type":"number","title":"Contested Rate"},"repo_disables":{"type":"integer","title":"Repo Disables"},"third_party_findings":{"type":"integer","title":"Third Party Findings"},"third_party_resolved":{"type":"integer","title":"Third Party Resolved"}},"type":"object","required":["rule_id","findings","contested","contested_rate","repo_disables","third_party_findings","third_party_resolved"],"title":"RuleStat","description":"One rule's keep/kill numbers."},"RuleStatsResponse":{"properties":{"rules":{"items":{"$ref":"#/components/schemas/RuleStat"},"type":"array","title":"Rules"}},"type":"object","required":["rules"],"title":"RuleStatsResponse"},"RulesDraftSaveRequest":{"properties":{"content":{"type":"string","minLength":1,"title":"Content"},"source_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Version Id"}},"type":"object","required":["content"],"title":"RulesDraftSaveRequest"},"RulesVersionDetail":{"properties":{"id":{"type":"string","title":"Id"},"version_number":{"type":"integer","title":"Version Number"},"content":{"type":"string","title":"Content"},"is_active":{"type":"boolean","title":"Is Active"},"is_draft":{"type":"boolean","title":"Is Draft"},"source_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Version Id"},"source_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Version Number"},"created_by":{"type":"string","title":"Created By"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","version_number","content","is_active","is_draft","created_by"],"title":"RulesVersionDetail"},"RunOutcomes":{"properties":{"counts":{"$ref":"#/components/schemas/OutcomeCounts"},"trend":{"items":{"$ref":"#/components/schemas/OutcomeTrendPoint"},"type":"array","title":"Trend"},"change":{"$ref":"#/components/schemas/CountChange","description":"All runs of this type (R5, AE8)."},"failed_change":{"$ref":"#/components/schemas/CountChange","description":"Failed runs; a rise is bad (KTD13)."}},"type":"object","required":["counts","trend","change","failed_change"],"title":"RunOutcomes"},"RunPhaseView":{"properties":{"phase":{"type":"string","title":"Phase"},"state":{"type":"string","title":"State"},"dispatched_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dispatched By"},"dispatched_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Dispatched At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"cursor_agent_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Agent Url"}},"type":"object","required":["phase","state"],"title":"RunPhaseView","description":"One leg of a run's lifecycle as an auditable timeline step.\n\nBuilt from the append-only ``DevmateDispatchAudit`` ledger (the dispatch\nEVENT: who, when, which agent) merged with the run/unit completion signals.\nA CE-recipe run has up to two phases: ``planning`` (phase-1 ``ce:plan``) and\n``implementing`` (phase-2 ``ce:work``/``ce:review``). The operator timeline\nrenders one step per phase showing: dispatched-to-Cursor by <actor> at\n<time>, a ``cursor_agent_url`` to inspect that agent, and the outcome.\n\n``state`` is a coarse step state the UI maps to an icon:\n``done`` | ``active`` | ``error``. ``cursor_agent_url`` carries the agent id\nonly inside the URL (the no-leak invariant)."},"RunStamp":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"status":{"anyOf":[{"type":"string","enum":["running","ok","partial","failed"]},{"type":"null"}],"title":"Status"},"trigger":{"anyOf":[{"type":"string","enum":["schedule","manual"]},{"type":"null"}],"title":"Trigger"}},"type":"object","title":"RunStamp","description":"Which refresh run this payload was read from (R3)."},"RunSummary":{"properties":{"id":{"type":"string","title":"Id"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"status":{"anyOf":[{"type":"string","enum":["running","ok","partial","failed"]},{"type":"null"}],"title":"Status"},"trigger":{"anyOf":[{"type":"string","enum":["schedule","manual"]},{"type":"null"}],"title":"Trigger"},"series_ok":{"type":"integer","title":"Series Ok","default":0},"series_failed":{"type":"integer","title":"Series Failed","default":0},"comparable":{"type":"boolean","title":"Comparable","default":true}},"type":"object","required":["id"],"title":"RunSummary","description":"One row of ``GET /runs`` — the picker for a comparison."},"ScheduledJobResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"job_type":{"type":"string","title":"Job Type"},"cron_expression":{"type":"string","title":"Cron Expression"},"timezone":{"type":"string","title":"Timezone","default":"UTC"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"enabled":{"type":"boolean","title":"Enabled"},"last_run_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Run At"},"next_run_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Run At"},"created_by":{"type":"string","title":"Created By"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"notify_trigger":{"type":"string","enum":["off","failures_only","all_runs"],"title":"Notify Trigger","default":"failures_only"},"notify_recipient_mode":{"type":"string","enum":["admins","custom_list"],"title":"Notify Recipient Mode","default":"admins"},"notify_emails":{"items":{"type":"string"},"type":"array","title":"Notify Emails"},"notify_include_logs":{"type":"boolean","title":"Notify Include Logs","default":false},"last_execution":{"anyOf":[{"$ref":"#/components/schemas/JobExecutionSummary"},{"type":"null"}]}},"type":"object","required":["id","name","job_type","cron_expression","config","enabled","created_by","created_at","updated_at"],"title":"ScheduledJobResponse"},"ScopeRequest":{"properties":{"mode":{"type":"string","enum":["mine","all"],"title":"Mode","default":"mine"},"product_keys":{"items":{"type":"string"},"type":"array","title":"Product Keys"}},"type":"object","title":"ScopeRequest","description":"``PUT /scope``. A viewer sets their OWN scope — there is no user id on the wire."},"ScopeResponse":{"properties":{"mode":{"type":"string","enum":["mine","all"],"title":"Mode","default":"mine"},"product_keys":{"items":{"type":"string"},"type":"array","title":"Product Keys"},"notice_code":{"type":"string","enum":["scoped","all_products","not_linked","linked_no_products","no_selection"],"title":"Notice Code","default":"no_selection"},"can_view_all":{"type":"boolean","title":"Can View All","default":false},"available_products":{"items":{"$ref":"#/components/schemas/app__schemas__quality__ProductOption"},"type":"array","title":"Available Products"},"unmapped_products":{"type":"integer","title":"Unmapped Products","default":0}},"type":"object","title":"ScopeResponse","description":"The scope plus what the picker may offer."},"ScopeSelectionResponse":{"properties":{"kind":{"type":"string","title":"Kind","description":"One of: department, manager_subtree, organization, person, team."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"The scope's key — an email for a person or subtree root, a name for a department or team. Null for the organization, and also for the visible unassigned department/team group."},"member_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Member Id"},"label":{"type":"string","title":"Label"},"is_default":{"type":"boolean","title":"Is Default"},"viewer_member_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Viewer Member Id"},"fallback_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fallback Reason"}},"type":"object","required":["kind","key","member_id","label","is_default","viewer_member_id","fallback_reason"],"title":"ScopeSelectionResponse","description":"Which slice was served, and whether the viewer asked for it (R5a)."},"ScopeState":{"properties":{"mode":{"type":"string","enum":["mine","all"],"title":"Mode","default":"mine"},"product_keys":{"items":{"type":"string"},"type":"array","title":"Product Keys"},"notice_code":{"type":"string","enum":["scoped","all_products","not_linked","linked_no_products","no_selection"],"title":"Notice Code","default":"no_selection"},"can_view_all":{"type":"boolean","title":"Can View All","default":false}},"type":"object","title":"ScopeState","description":"The product scope this payload was computed for (R13, R16, R16a).\n\nEnforced server-side. ``product_keys`` is what was actually applied, which is not\nnecessarily what was requested -- when ``notice_code`` is ``not_linked`` the viewer\ngets the org-wide payload by safe degradation."},"ScreenEndpointChildResponse":{"properties":{"path_template":{"type":"string","title":"Path Template"},"method":{"type":"string","title":"Method"},"call_count":{"type":"integer","title":"Call Count"},"p95_time_to_headers_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"P95 Time To Headers Ms"},"error_count":{"type":"integer","title":"Error Count"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"}},"type":"object","required":["path_template","method","call_count","p95_time_to_headers_ms","error_count","last_seen_at"],"title":"ScreenEndpointChildResponse"},"ScreenEndpointDrilldownResponse":{"properties":{"client_view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client View"},"parent_call_count":{"type":"integer","title":"Parent Call Count"},"endpoints":{"items":{"$ref":"#/components/schemas/ScreenEndpointChildResponse"},"type":"array","title":"Endpoints"}},"type":"object","required":["client_view","parent_call_count","endpoints"],"title":"ScreenEndpointDrilldownResponse"},"ScreenSummaryResponse":{"properties":{"window_from":{"type":"string","format":"date-time","title":"Window From"},"window_to":{"type":"string","format":"date-time","title":"Window To"},"screens":{"items":{"$ref":"#/components/schemas/ScreenSummaryRowResponse"},"type":"array","title":"Screens"},"no_screen":{"$ref":"#/components/schemas/NoScreenSummaryResponse"},"total_calls":{"type":"integer","title":"Total Calls"},"total_distinct_users":{"type":"integer","title":"Total Distinct Users"},"sort_by":{"type":"string","title":"Sort By"},"sort_dir":{"type":"string","title":"Sort Dir"}},"type":"object","required":["window_from","window_to","screens","no_screen","total_calls","total_distinct_users","sort_by","sort_dir"],"title":"ScreenSummaryResponse"},"ScreenSummaryRowResponse":{"properties":{"client_view":{"type":"string","title":"Client View"},"call_count":{"type":"integer","title":"Call Count"},"distinct_endpoints":{"type":"integer","title":"Distinct Endpoints"},"distinct_users":{"type":"integer","title":"Distinct Users"},"p95_time_to_headers_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"P95 Time To Headers Ms"},"error_count":{"type":"integer","title":"Error Count"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"},"is_registered":{"type":"boolean","title":"Is Registered"}},"type":"object","required":["client_view","call_count","distinct_endpoints","distinct_users","p95_time_to_headers_ms","error_count","last_seen_at","is_registered"],"title":"ScreenSummaryRowResponse"},"SdlcDeliveryDashboardPayload":{"properties":{"window":{"$ref":"#/components/schemas/WindowState"},"cohort":{"$ref":"#/components/schemas/CohortState"},"products":{"$ref":"#/components/schemas/ProductFilterState"},"path":{"type":"string","enum":["all","prd","ticket"],"title":"Path","description":"The delivery path every view was read for (PDLC-0 R19): workflows of either origin, PRD-path only, or Jira ticket only."},"ticket_runs_started":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ticket Runs Started","description":"Ticket runs (implement runs on origin=ticket workflows) started in the window, scoped by the product filter (PDLC-0 R20). Null on the PRD path."},"stages":{"items":{"$ref":"#/components/schemas/StageDefinition"},"type":"array","title":"Stages","description":"The sdlc_delivery definition's stages, in canonical order with off_track last — the one vocabulary every stage_key in this payload resolves against (R30, R31)."},"measurements":{"$ref":"#/components/schemas/MeasurementsView"},"process_usage":{"$ref":"#/components/schemas/ProcessUsageView"},"data_quality":{"$ref":"#/components/schemas/DataQualityView"}},"type":"object","required":["window","cohort","products","path","ticket_runs_started","stages","measurements","process_usage","data_quality"],"title":"SdlcDeliveryDashboardPayload","description":"The full response body for ``GET /api/sdlc-delivery/dashboard``.\n\nOne payload, three peer views (KTD4, R13). Separate endpoints would fold\nseparately and could disagree — the same workflow counted derailed by one\nview and still-running by another in the same page load."},"SearchTelemetryEventResponse":{"properties":{"id":{"type":"string","title":"Id"},"query":{"type":"string","title":"Query"},"query_length":{"type":"integer","title":"Query Length"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"mate_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mate Type"},"result_count":{"type":"integer","title":"Result Count","default":0},"success":{"type":"boolean","title":"Success","default":true},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"top_relevance_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top Relevance Score"},"top_reranker_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top Reranker Score"},"avg_reranker_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Reranker Score"},"labels_filter":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Labels Filter"},"results_detail":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Results Detail"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","query","query_length"],"title":"SearchTelemetryEventResponse"},"SearchTelemetryListResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/SearchTelemetryEventResponse"},"type":"array","title":"Events"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["events","total","limit","offset"],"title":"SearchTelemetryListResponse"},"SearchTelemetryStatsResponse":{"properties":{"total_searches":{"type":"integer","title":"Total Searches"},"successful_searches":{"type":"integer","title":"Successful Searches"},"failed_searches":{"type":"integer","title":"Failed Searches"},"avg_result_count":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Result Count"},"avg_duration_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Duration Ms"},"avg_reranker_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Reranker Score"},"searches_last_24h":{"type":"integer","title":"Searches Last 24H"},"searches_last_7d":{"type":"integer","title":"Searches Last 7D"}},"type":"object","required":["total_searches","successful_searches","failed_searches","searches_last_24h","searches_last_7d"],"title":"SearchTelemetryStatsResponse"},"SeatRowResponse":{"properties":{"seat_email":{"type":"string","title":"Seat Email"},"vendor_user_id":{"type":"string","title":"Vendor User Id"},"cycle_start":{"type":"string","format":"date-time","title":"Cycle Start"},"consumption_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Consumption Cents","description":"Measures ALLOWANCE CONSUMPTION — the allowance this drew down, not cash billed."},"usage_based_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Usage Based Cents","description":"Measures INCREMENTAL CASH BILLED beyond the allowance — the only figure here that is money actually charged, and NOT part of any allowance consumption total on this payload."},"limit_dollars":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Limit Dollars","description":"The seat's ALLOWANCE CONSUMPTION ceiling in dollars — capacity already paid for, not a cash budget."},"is_default_limit":{"type":"boolean","title":"Is Default Limit"},"attribution_kind":{"type":"string","title":"Attribution Kind","description":"person | machine | unmatched."},"vendor_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Detail","description":"Vendor-side detail for diagnosing an unmatched seat (R11)."},"manager_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manager Email"},"department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department"},"team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"}},"type":"object","required":["seat_email","vendor_user_id","cycle_start","consumption_cents","usage_based_cents","limit_dollars","is_default_limit","attribution_kind","vendor_detail","manager_email","department","team","title"],"title":"SeatRowResponse","description":"One vendor seat, on its OWN billing cycle."},"SequenceEntryResponse":{"properties":{"event_id":{"type":"string","format":"uuid","title":"Event Id"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"method":{"type":"string","title":"Method"},"path_template":{"type":"string","title":"Path Template"},"status_code":{"type":"integer","title":"Status Code"},"time_to_headers_ms":{"type":"integer","title":"Time To Headers Ms"},"mate_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mate Type"}},"type":"object","required":["event_id","occurred_at","method","path_template","status_code","time_to_headers_ms","mate_type"],"title":"SequenceEntryResponse"},"SequenceViewGroupResponse":{"properties":{"client_view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client View"},"entry_count":{"type":"integer","title":"Entry Count"},"first_event_id":{"type":"string","format":"uuid","title":"First Event Id"},"last_event_id":{"type":"string","format":"uuid","title":"Last Event Id"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"ended_at":{"type":"string","format":"date-time","title":"Ended At"},"continues_previous_page":{"type":"boolean","title":"Continues Previous Page"},"continues_on_next_page":{"type":"boolean","title":"Continues On Next Page"}},"type":"object","required":["client_view","entry_count","first_event_id","last_event_id","started_at","ended_at","continues_previous_page","continues_on_next_page"],"title":"SequenceViewGroupResponse","description":"R33, KTD37. One episode: a run of CONSECUTIVE calls from one screen.\n\nThe groups partition ``UserSequenceResponse.entries`` in order, so a renderer\nwalks the entries consuming ``entry_count`` at a time; the two event ids are\nthe ends of that span so it can check its alignment rather than trust the\narithmetic. Returning to an earlier screen is a NEW group, never a merge."},"SeriesStamp":{"properties":{"as_of_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of Date"},"status":{"anyOf":[{"type":"string","enum":["ok","failed","skipped"]},{"type":"null"}],"title":"Status"},"stale":{"type":"boolean","title":"Stale","default":false},"scopable":{"type":"boolean","title":"Scopable","default":true},"served_org_wide":{"type":"boolean","title":"Served Org Wide","default":false},"expert_caveat":{"type":"boolean","title":"Expert Caveat","default":false},"provenance":{"type":"string","enum":["live","imported","derived","mixed"],"title":"Provenance","default":"live"},"failure_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Category"}},"type":"object","title":"SeriesStamp","description":"Per-series freshness and capability (R5c, R13a).\n\nStaleness is reported **per series**, not once per dashboard: a single failing series\nmust not present the other sixteen as stale, and must not hide behind them either."},"SessionPullRequest":{"properties":{"pr_url":{"type":"string","title":"Pr Url"},"pr_status":{"type":"string","title":"Pr Status"}},"type":"object","required":["pr_url","pr_status"],"title":"SessionPullRequest"},"SessionRow":{"properties":{"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"service_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service User Id"},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"},"is_service_user":{"type":"boolean","title":"Is Service User","default":false},"session_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Name"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"acu_used":{"type":"number","title":"Acu Used"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"org_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Name"},"playbook_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Playbook Id"},"pull_requests":{"items":{"$ref":"#/components/schemas/SessionPullRequest"},"type":"array","title":"Pull Requests","default":[]}},"type":"object","required":["acu_used"],"title":"SessionRow","description":"Matches ``DevinSession`` on the frontend (nullable where Argo columns are)."},"SessionsResponse":{"properties":{"sessions":{"items":{"$ref":"#/components/schemas/SessionRow"},"type":"array","title":"Sessions"},"playbooks":{"items":{"$ref":"#/components/schemas/PlaybookRow"},"type":"array","title":"Playbooks"},"billing":{"$ref":"#/components/schemas/BillingMeta"},"data_as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data As Of"}},"type":"object","required":["sessions","playbooks","billing"],"title":"SessionsResponse"},"SetActiveRequest":{"properties":{"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["is_active"],"title":"SetActiveRequest"},"SetAuthMethodRequest":{"properties":{"auth_method":{"type":"string","pattern":"^(local|sso)$","title":"Auth Method"},"external_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Provider"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},"type":"object","required":["auth_method"],"title":"SetAuthMethodRequest","description":"Request model for PATCH /api/admin/users/{id}/auth-method (GAIT-61).","example":{"auth_method":"sso","external_id":"00000000-0000-0000-0000-000000000000","external_provider":"azure_ad"}},"SetAuthMethodResponse":{"properties":{"id":{"type":"string","title":"Id"},"auth_method":{"type":"string","title":"Auth Method"},"external_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Provider"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"generated_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generated Password"},"must_change_password":{"type":"boolean","title":"Must Change Password","default":false}},"type":"object","required":["id","auth_method"],"title":"SetAuthMethodResponse","description":"Response model for PATCH /api/admin/users/{id}/auth-method (GAIT-61).\n\nWhen auth_method flips to 'local', a temporary password is generated and\nreturned once (admin conveys it to the user out of band, must_change_password\nis set)."},"SetDefaultDashboardRequest":{"properties":{"default_dashboard":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Default Dashboard","description":"Dashboard id to set as default, or null to clear."}},"type":"object","title":"SetDefaultDashboardRequest","description":"Request model for setting/clearing the caller's default dashboard (GAIT-198).\n\n``default_dashboard`` is the dashboard id (e.g. \"devin\"); ``None`` clears the\npreference. The endpoint validates the id against the permission catalog and\nthe caller's own grants — there is no client-supplied user id (self-scoped).","example":{"default_dashboard":"devin"}},"SetDefaultDashboardResponse":{"properties":{"default_dashboard":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Dashboard","description":"The persisted default dashboard id, or null if cleared."}},"type":"object","title":"SetDefaultDashboardResponse","description":"Response for the default-dashboard write — the persisted value (GAIT-198)."},"SetPermissionsRequest":{"properties":{"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"},"retained":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Retained"}},"type":"object","title":"SetPermissionsRequest"},"SetPipelineRolesRequest":{"properties":{"roles":{"items":{"$ref":"#/components/schemas/PipelineRoleBody"},"type":"array","title":"Roles"}},"type":"object","required":["roles"],"title":"SetPipelineRolesRequest","description":"The full set of roles the pipeline should hold; a role left out is\nremoved."},"SharePointDriveInfo":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"web_url":{"type":"string","title":"Web Url","default":""},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["id","name"],"title":"SharePointDriveInfo"},"SharePointDrivesRequest":{"properties":{"site_host":{"type":"string","maxLength":255,"minLength":1,"title":"Site Host"},"site_path":{"type":"string","maxLength":500,"minLength":1,"title":"Site Path"},"site_id":{"type":"string","maxLength":500,"title":"Site Id","default":""}},"type":"object","required":["site_host","site_path"],"title":"SharePointDrivesRequest"},"SharePointDrivesResponse":{"properties":{"site_id":{"type":"string","title":"Site Id"},"drives":{"items":{"$ref":"#/components/schemas/SharePointDriveInfo"},"type":"array","title":"Drives"}},"type":"object","required":["site_id","drives"],"title":"SharePointDrivesResponse"},"SharePointIncludeItem":{"properties":{"path":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Path","description":"Path within library"},"item_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Item Id","description":"Graph drive item id"},"product_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Product Name","description":"Azure Search productName for this file"}},"type":"object","title":"SharePointIncludeItem"},"SharePointPreviewRequest":{"properties":{"site_host":{"type":"string","maxLength":255,"minLength":1,"title":"Site Host"},"site_path":{"type":"string","maxLength":500,"minLength":1,"title":"Site Path"},"site_id":{"type":"string","maxLength":500,"title":"Site Id","default":""},"drive_id":{"type":"string","maxLength":255,"title":"Drive Id","default":""},"drive_name":{"type":"string","maxLength":255,"title":"Drive Name","default":""},"folder_path":{"type":"string","maxLength":500,"title":"Folder Path","default":"/"},"scope":{"type":"string","title":"Scope","description":"folder_tree (default) or files (explicit include_items only)","default":"folder_tree"},"include_items":{"items":{"$ref":"#/components/schemas/SharePointIncludeItem"},"type":"array","title":"Include Items"},"file_types":{"items":{"type":"string"},"type":"array","title":"File Types"},"product_folders":{"items":{"type":"string"},"type":"array","title":"Product Folders","description":"When set, only index files under these top-level product folders"},"recursive":{"type":"boolean","title":"Recursive","default":true},"product_name":{"type":"string","title":"Product Name","description":"Azure Search productName when not inferred from product folder","default":"General"},"max_file_size_mb":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"Max File Size Mb","default":50},"max_documents":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Max Documents","description":"Cap documents downloaded and chunked for preview","default":5},"truncate_content_chars":{"type":"integer","maximum":5000.0,"minimum":0.0,"title":"Truncate Content Chars","description":"Truncate chunk content in response (0 = no truncation)","default":500}},"type":"object","required":["site_host","site_path"],"title":"SharePointPreviewRequest"},"SharePointPreviewResponse":{"properties":{"index_name":{"type":"string","title":"Index Name"},"index_schema":{"additionalProperties":true,"type":"object","title":"Index Schema"},"summary":{"additionalProperties":true,"type":"object","title":"Summary"},"documents":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Documents"},"failed_documents":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Failed Documents"},"chunks":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Chunks"}},"type":"object","required":["index_name","index_schema","summary","documents","failed_documents","chunks"],"title":"SharePointPreviewResponse"},"Signal":{"properties":{"count":{"type":"integer","title":"Count"},"workflow_ids":{"items":{"type":"string"},"type":"array","title":"Workflow Ids"}},"type":"object","required":["count","workflow_ids"],"title":"Signal","description":"One data-quality signal: a count plus the workflows it names (R2, R3).\n\n``count`` is in the signal's OWN unit and ``workflow_ids`` is deduplicated,\nso the two need not have equal lengths: negative durations count PAIRS and\ndeploy-run join misses count EVENTS, while the other five count workflows\n(KTD7 — signals are not deduplicated by workflow; the offender list is)."},"SignoffRunListItem":{"properties":{"trail_id":{"type":"string","title":"Trail Id"},"prd_ref":{"type":"string","title":"Prd Ref"},"prd_slug":{"type":"string","title":"Prd Slug"},"verdict":{"type":"string","title":"Verdict"},"verdict_reason":{"type":"string","title":"Verdict Reason"},"l1_passed":{"type":"boolean","title":"L1 Passed"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["trail_id","prd_ref","prd_slug","verdict","verdict_reason","l1_passed"],"title":"SignoffRunListItem","description":"A single past-run row for the history list — no breakdown.\n\nThe full Verdict breakdown lives behind ``GET /runs/{trail_id}``; this list\ncarries only what the table renders, so a page of history stays cheap."},"SignoffRunListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SignoffRunListItem"},"type":"array","title":"Items"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["items","limit","offset","has_more"],"title":"SignoffRunListResponse"},"SignoffRunResponse":{"properties":{"verdict":{"type":"string","title":"Verdict"},"verdict_reason":{"type":"string","title":"Verdict Reason"},"trail_id":{"type":"string","title":"Trail Id"},"l1_passed":{"type":"boolean","title":"L1 Passed"},"l1_blocks":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"L1 Blocks"},"named_blocks":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Named Blocks","default":[]},"named_triggers":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Named Triggers","default":[]},"failure_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Class"},"external_knowledge_checklist":{"items":{"type":"string"},"type":"array","title":"External Knowledge Checklist","default":[]},"story_results":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Story Results","default":[]},"decomposability":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Decomposability"},"narration":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Narration","default":[]},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"langfuse_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Langfuse Url"}},"type":"object","required":["verdict","verdict_reason","trail_id","l1_passed","l1_blocks"],"title":"SignoffRunResponse"},"SkillCreateRequest":{"properties":{"key":{"type":"string","maxLength":100,"minLength":1,"title":"Key"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"type":"string","minLength":1,"title":"Description"},"expected_tools":{"items":{"type":"string"},"type":"array","title":"Expected Tools"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt","description":"The first version, active"}},"additionalProperties":false,"type":"object","required":["key","name","description"],"title":"SkillCreateRequest"},"SkillGrantsRequest":{"properties":{"skills":{"items":{"type":"string"},"type":"array","title":"Skills"}},"additionalProperties":false,"type":"object","required":["skills"],"title":"SkillGrantsRequest"},"SkillUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Description"},"expected_tools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Expected Tools"}},"additionalProperties":false,"type":"object","title":"SkillUpdateRequest"},"SnoozeResponse":{"properties":{"state":{"type":"string","enum":["snoozed","not_due"],"title":"State"},"repo_id":{"type":"string","title":"Repo Id"},"full_name":{"type":"string","title":"Full Name"},"defer_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Defer Days"},"archive_exception_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archive Exception Date"},"wire_values":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Wire Values"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["state","repo_id","full_name"],"title":"SnoozeResponse","description":"One snooze result. ``snoozed`` when the 180-day exception was written;\n``not_due`` when the repo was already active again (a no-op that still\ncleared the lifecycle). ``defer_days`` / ``archive_exception_date`` /\n``wire_values`` are present only on the ``snoozed`` path; ``detail`` only on\n``not_due``."},"SortDir":{"type":"string","enum":["asc","desc"],"title":"SortDir"},"SortKey":{"type":"string","enum":["repository","days_left","last_activity","created_at","custom_property_count"],"title":"SortKey"},"SourceStats":{"properties":{"source_id":{"type":"string","title":"Source Id"},"source_name":{"type":"string","title":"Source Name"},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name"},"total":{"type":"integer","title":"Total","default":0},"indexed":{"type":"integer","title":"Indexed","default":0},"failed":{"type":"integer","title":"Failed","default":0},"stale":{"type":"integer","title":"Stale","default":0}},"type":"object","required":["source_id","source_name"],"title":"SourceStats"},"StageCoverageRow":{"properties":{"stage_key":{"type":"string","title":"Stage Key"},"reached":{"type":"integer","title":"Reached"},"skipped_past":{"type":"integer","title":"Skipped Past"},"not_yet_reached":{"type":"integer","title":"Not Yet Reached"}},"type":"object","required":["stage_key","reached","skipped_past","not_yet_reached"],"title":"StageCoverageRow","description":"R17. One canonical stage, three questions kept apart.\n\nA workflow sitting at ``implementing`` has not reached ``pr_open`` but has\nnot skipped it, so collapsing any two of these loses the distinction the\nview exists to show. Carries no threshold: the requirement names no\nbaseline, share or cutoff, so there is none to render."},"StageDefinition":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"activity":{"type":"string","enum":["working","waiting"],"title":"Activity"},"ordinal":{"type":"integer","title":"Ordinal"},"live":{"type":"boolean","title":"Live"},"event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type","description":"The raw workflow_events.event_type behind this stage, for R31's label/raw-name control. Not the same vocabulary as `key`."}},"type":"object","required":["key","label","activity","ordinal","live"],"title":"StageDefinition","description":"One stage of the ``sdlc_delivery`` definition, for resolving keys.\n\nEvery field is copied verbatim from the definition's own ``StageDef`` — no\nvalue here is coined, reworded or renumbered — so the panel and the\nworkflow board render one vocabulary.\n\n``activity`` says how to portray the stage WHILE IT IS ACTIVE: ``working``\n(a machine is busy) versus ``waiting`` (parked on a human handoff or an\nexternal signal). It is a property of the stage, not of the projection.\n\n``ordinal`` is the position in the linear journey; ``off_track`` carries\nthe sentinel ``-1``, which is how a consumer tells the non-positional\nrecovery stage apart without special-casing its key.\n\n``event_type`` is the RAW EVENT TYPE behind the stage — a different\nvocabulary from ``key``, and the one R31's naming control switches to.\nSeven of the ten positional stages happen to share a spelling with their\nevent type; three do not (``requirements`` is written by\n``requirements_opened``, ``planning`` by ``planning_started``,\n``implementing`` by ``implementing_started``), which is why the key cannot\nstand in for it. ``None`` where the projector maps no event type onto the\nstage, rather than a guess."},"StageLiveWork":{"properties":{"stage_key":{"type":"string","title":"Stage Key"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["stage_key","count"],"title":"StageLiveWork","description":"How many of the window's workflows sit at one stage now (R27).\n\nDerived from a re-fold of each ledger, never from the ``current_stage``\ncache R16 treats as non-authoritative. Every canonical stage plus\n``off_track`` appears, zero-filled."},"StagePairDurations":{"properties":{"from_stage_key":{"type":"string","title":"From Stage Key"},"to_stage_key":{"type":"string","title":"To Stage Key"},"n":{"type":"integer","title":"N"},"median":{"$ref":"#/components/schemas/Duration"},"mean":{"$ref":"#/components/schemas/Duration"},"p85":{"$ref":"#/components/schemas/Duration"},"slowest":{"$ref":"#/components/schemas/Duration"}},"type":"object","required":["from_stage_key","to_stage_key","n","median","mean","p85","slowest"],"title":"StagePairDurations","description":"One adjacent stage pair's statistics, over its INCLUDED durations only.\n\nMeasured first-entry to first-entry (R26). A pair no workflow traversed\nproduces no row at all rather than a row with ``n=0`` (R19)."},"StageView":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"ordinal":{"type":"integer","title":"Ordinal"},"live":{"type":"boolean","title":"Live","description":"A real v1 source feeds this stage (vs a hollow stub)."},"state":{"type":"string","enum":["done","active","pending","off_track","derailed"],"title":"State","description":"done | active | pending | off_track"},"activity":{"type":"string","title":"Activity","description":"How to portray this stage WHILE ACTIVE: 'working' (machine busy → spinner) vs 'waiting' (parked on a human/external signal → static marker). Carried from the definition; the board only uses it when state == 'active'.","default":"working"},"entered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entered At","description":"ISO-8601 instant the journey FIRST entered this stage, from the ledger event that carried it. None when no event maps to this stage — a stage the high-water fold passed WITHOUT its own event (a journey that jumped straight to pr_open leaves requirements done-but-undated), the off_track pseudo-stage, or any not-yet- reached stage. The board renders nothing for None; it must never substitute a neighbouring stage's instant."}},"type":"object","required":["key","label","ordinal","live","state"],"title":"StageView","description":"One stage as the board should render it."},"StartRunRequest":{"properties":{"agent_key":{"type":"string","maxLength":50,"minLength":1,"title":"Agent Key"},"message":{"type":"string","maxLength":32000,"minLength":1,"title":"Message"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"eval_experiment":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Eval Experiment"}},"additionalProperties":false,"type":"object","required":["agent_key","message"],"title":"StartRunRequest"},"StatusCounts":{"properties":{"draft":{"type":"integer","title":"Draft"},"open":{"type":"integer","title":"Open"},"declined":{"type":"integer","title":"Declined"},"merged":{"type":"integer","title":"Merged"}},"type":"object","required":["draft","open","declined","merged"],"title":"StatusCounts","description":"PRs by their status group at the range end."},"StoredPromptCreateRequest":{"properties":{"key":{"type":"string","maxLength":100,"minLength":1,"title":"Key"},"description":{"type":"string","title":"Description","default":""},"model_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model Name"},"sends_to_model":{"type":"boolean","title":"Sends To Model","default":true},"prompt":{"type":"string","minLength":1,"title":"Prompt","description":"The first version, active"}},"additionalProperties":false,"type":"object","required":["key","prompt"],"title":"StoredPromptCreateRequest"},"StoredPromptUpdateRequest":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"model_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Model Name"}},"additionalProperties":false,"type":"object","title":"StoredPromptUpdateRequest"},"SubmodulePrView":{"properties":{"repo_full_name":{"type":"string","title":"Repo Full Name"},"pr_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pr Number"},"pr_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pr Url"},"submodule_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Submodule Path"},"pr_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pr State"},"status":{"type":"string","title":"Status"},"drop_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Drop Reason"},"open_finding_count":{"type":"integer","title":"Open Finding Count","default":0},"sweep_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sweep State"},"pr_review_findings":{"anyOf":[{"items":{"$ref":"#/components/schemas/PrReviewFindingView"},"type":"array"},{"type":"null"}],"title":"Pr Review Findings"},"pr_review_findings_captured_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pr Review Findings Captured At"},"pr_review_findings_truncated":{"type":"boolean","title":"Pr Review Findings Truncated","default":false},"pr_review_findings_scanned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pr Review Findings Scanned At"},"pr_review_findings_failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pr Review Findings Failed At"},"claude_reachable":{"type":"boolean","title":"Claude Reachable","default":false},"pointed_at":{"type":"boolean","title":"Pointed At","default":true}},"type":"object","required":["repo_full_name","status"],"title":"SubmodulePrView","description":"One row of a unit's PR set besides the parent (fix-findings submodule\nPRs R3, R4, R5).\n\nA ``confirmed`` row is a submodule PR in the set; a ``dropped`` row is a\ncandidate that failed confirmation, with ``drop_reason`` (KTD3 codes,\n``lookup_failed`` included) and possibly no PR. The swept fields mirror the\nparent's and are filled only for a confirmed, open row of an open parent —\nthe rows whose snapshot counts toward the gate (``open_submodule_snapshots``);\nevery other row has ``pr_review_findings`` ``None``, a zero count and no\n``sweep_state``. ``excerpt`` follows the parent's ``devmate:pr-review:excerpt``\nrule. ``claude_reachable`` is whether a Claude round can push to the row's\nrepository, resolved by the caller (``claude_reaches_repo``); ``False``\nwhen the caller did not resolve it."},"Summary":{"properties":{"active_users":{"type":"integer","title":"Active Users"},"active_users_by_week":{"items":{"type":"integer"},"type":"array","title":"Active Users By Week"},"prs":{"anyOf":[{"$ref":"#/components/schemas/PrShare"},{"type":"null"}]},"prs_by_week":{"anyOf":[{"items":{"$ref":"#/components/schemas/PrShare"},"type":"array"},{"type":"null"}],"title":"Prs By Week"},"unattributed_prs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Unattributed Prs"}},"type":"object","required":["active_users","active_users_by_week","prs","prs_by_week","unattributed_prs"],"title":"Summary"},"SuspendRequest":{"properties":{"reason":{"type":"string","minLength":1,"title":"Reason"},"until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until","description":"Timezone-aware; omitted = until an admin resumes it"}},"additionalProperties":false,"type":"object","required":["reason"],"title":"SuspendRequest","description":"Why the agent is switched off, and (optionally) when it is live again."},"SyncExecuteRequest":{"properties":{"target_url":{"type":"string","title":"Target Url"},"target_token":{"type":"string","title":"Target Token"},"data_types":{"items":{"type":"string","enum":["products","roles"]},"type":"array","title":"Data Types"},"direction":{"type":"string","enum":["push","pull"],"title":"Direction","default":"push"},"conflict_strategy":{"type":"string","enum":["overwrite","skip"],"title":"Conflict Strategy","default":"skip"},"selected_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/SyncSelectedItem"},"type":"array"},{"type":"null"}],"title":"Selected Items"}},"type":"object","required":["target_url","target_token","data_types"],"title":"SyncExecuteRequest"},"SyncExecuteResultResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SyncItemResultResponse"},"type":"array","title":"Items"},"summary":{"$ref":"#/components/schemas/SyncSummaryResponse"}},"type":"object","required":["items","summary"],"title":"SyncExecuteResultResponse"},"SyncInspectRequest":{"properties":{"target_url":{"type":"string","title":"Target Url"},"target_token":{"type":"string","title":"Target Token"},"kind":{"type":"string","enum":["product","role"],"title":"Kind"},"name":{"type":"string","title":"Name"}},"type":"object","required":["target_url","target_token","kind","name"],"title":"SyncInspectRequest"},"SyncInspectResponse":{"properties":{"kind":{"type":"string","enum":["product","role"],"title":"Kind"},"name":{"type":"string","title":"Name"},"local":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Local"},"target":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Target"}},"type":"object","required":["kind","name"],"title":"SyncInspectResponse"},"SyncItemResultResponse":{"properties":{"kind":{"type":"string","enum":["product","role"],"title":"Kind"},"name":{"type":"string","title":"Name"},"status":{"type":"string","enum":["created","updated","skipped","failed","warning"],"title":"Status"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["kind","name","status"],"title":"SyncItemResultResponse"},"SyncPreviewRequest":{"properties":{"target_url":{"type":"string","title":"Target Url"},"target_token":{"type":"string","title":"Target Token"},"data_types":{"items":{"type":"string","enum":["products","roles"]},"type":"array","title":"Data Types"},"direction":{"type":"string","enum":["push","pull"],"title":"Direction","default":"push"}},"type":"object","required":["target_url","target_token","data_types"],"title":"SyncPreviewRequest"},"SyncSelectedItem":{"properties":{"kind":{"type":"string","enum":["product","role"],"title":"Kind"},"name":{"type":"string","title":"Name"}},"type":"object","required":["kind","name"],"title":"SyncSelectedItem"},"SyncSummaryResponse":{"properties":{"created":{"type":"integer","title":"Created"},"updated":{"type":"integer","title":"Updated"},"skipped":{"type":"integer","title":"Skipped"},"failed":{"type":"integer","title":"Failed"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["created","updated","skipped","failed","warnings"],"title":"SyncSummaryResponse"},"SyncTargetResponse":{"properties":{"name":{"type":"string","title":"Name"},"url":{"type":"string","title":"Url"}},"type":"object","required":["name","url"],"title":"SyncTargetResponse"},"SyncTargetsResponse":{"properties":{"targets":{"items":{"$ref":"#/components/schemas/SyncTargetResponse"},"type":"array","title":"Targets"}},"type":"object","required":["targets"],"title":"SyncTargetsResponse"},"TeamAdoptionSection":{"properties":{"teams":{"items":{"$ref":"#/components/schemas/TeamRow"},"type":"array","title":"Teams","description":"Ranked by active users."},"no_team":{"type":"integer","title":"No Team","description":"Active users with no active team (R10)."}},"type":"object","required":["teams","no_team"],"title":"TeamAdoptionSection"},"TeamAssignment":{"properties":{"name":{"type":"string","title":"Name"},"permission":{"type":"string","title":"Permission","default":"read"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["name"],"title":"TeamAssignment"},"TeamChangeReport":{"properties":{"action":{"type":"string","title":"Action"},"slug":{"type":"string","title":"Slug"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"permission":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Permission"},"previous_permission":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Permission"},"status":{"type":"string","title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["action","slug","status"],"title":"TeamChangeReport","description":"One team-access outcome from a reconciled save (GAIT-312).\n\nBuilt from the call the server actually made, not from what the request\nasked for: ``permission`` is the level sent to GitHub and\n``previous_permission`` the live level it replaced. ``status`` is\n``applied`` / ``failed`` / ``no_call``, so a change suppressed because live\nalready matched is reported rather than silently dropped."},"TeamOption":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"TeamOption"},"TeamRow":{"properties":{"team_id":{"type":"string","format":"uuid","title":"Team Id"},"name":{"type":"string","title":"Name","description":"The TEAM's name."},"active_users":{"type":"integer","title":"Active Users"},"headcount":{"type":"integer","title":"Headcount"},"share":{"type":"number","title":"Share"}},"type":"object","required":["team_id","name","active_users","headcount","share"],"title":"TeamRow"},"TeamSuggestionsResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"suggestions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Suggestions"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["success"],"title":"TeamSuggestionsResponse"},"TeamsReachSection":{"properties":{"connected":{"type":"integer","title":"Connected"},"seen_last_30_days":{"type":"integer","title":"Seen Last 30 Days"},"follows_window":{"type":"boolean","const":false,"title":"Follows Window","default":false},"follows_filters":{"type":"boolean","const":false,"title":"Follows Filters","default":false}},"type":"object","required":["connected","seen_last_30_days"],"title":"TeamsReachSection","description":"R12. Ignores the window and both filters, and says so (R14)."},"TeamsTestMessageResponse":{"properties":{"result":{"type":"string","enum":["sent","not_added","unreachable","domain_not_allowed","rate_limited","not_configured","target_inactive"],"title":"Result"}},"type":"object","required":["result"],"title":"TeamsTestMessageResponse"},"TestConnectionResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"message":{"type":"string","title":"Message"}},"type":"object","required":["ok","message"],"title":"TestConnectionResponse"},"TestRunRequest":{"properties":{"input":{"type":"string","maxLength":32000,"minLength":1,"title":"Input"},"content":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Content","description":"Text to try instead of the active version"},"gateway_model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Gateway Model","description":"Try the prompt on this registry model through the AI Gateway"}},"additionalProperties":false,"type":"object","required":["input"],"title":"TestRunRequest"},"ThumbsUpSection":{"properties":{"change":{"$ref":"#/components/schemas/RateChange"},"by_mate":{"items":{"$ref":"#/components/schemas/MateRatings"},"type":"array","title":"By Mate","description":"Ranked by rating count."}},"type":"object","required":["change","by_mate"],"title":"ThumbsUpSection"},"TicketKickoffDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"ticket_key":{"type":"string","title":"Ticket Key"},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name"},"jira_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jira Url"},"status":{"$ref":"#/components/schemas/TicketKickoffStatus"},"work_order":{"$ref":"#/components/schemas/WorkOrderView"},"repos":{"items":{"$ref":"#/components/schemas/LaunchRepoOption"},"type":"array","title":"Repos"},"viewer_is_approver":{"type":"boolean","title":"Viewer Is Approver"},"can_approve":{"type":"boolean","title":"Can Approve"},"launch_failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Launch Failure Reason"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"approved_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved By Name"},"approved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Approved At"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Url"}},"type":"object","required":["id","ticket_key","product_name","jira_url","status","work_order","repos","viewer_is_approver","can_approve","launch_failure_reason","created_at","approved_by_name","approved_at","run_id","run_url"],"title":"TicketKickoffDetail"},"TicketKickoffStatus":{"type":"string","enum":["pending","approved","failed_launch"],"title":"TicketKickoffStatus","description":"Lifecycle of one ticket kickoff (PDLC-0, KTD17).\n\n``pending`` is the birth state: a send created the approval link and no one\nhas approved it. ``pending`` -> ``approved`` when an approver approves the\nwork order and its run launches; ``pending`` -> ``failed_launch`` when the\nlaunch is refused after approval. Only the approve service writes the two\nlater states (single forward-only writer); both are terminal."},"TimeSeriesPoint":{"properties":{"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["count"],"title":"TimeSeriesPoint"},"ToolCallsSection":{"properties":{"change":{"$ref":"#/components/schemas/CountChange","description":"All completed calls."},"writes":{"type":"integer","title":"Writes"},"reads":{"type":"integer","title":"Reads"},"integrations":{"items":{"$ref":"#/components/schemas/IntegrationCalls"},"type":"array","title":"Integrations","description":"Ranked by total, then slug."}},"type":"object","required":["change","writes","reads","integrations"],"title":"ToolCallsSection","description":"Completed calls only (R6); a tool that reports its own failure in an\nordinary result is stored as completed, so writes are \"completed write\ncalls\", not changes known to have landed."},"ToolCount":{"properties":{"tool_name":{"type":"string","title":"Tool Name"},"effect":{"type":"string","title":"Effect","description":"The declared effect: `writes` or `reads`."},"count":{"type":"integer","title":"Count"},"change":{"$ref":"#/components/schemas/CountChange"}},"type":"object","required":["tool_name","effect","count","change"],"title":"ToolCount"},"ToolGrantBody":{"properties":{"tool_name":{"type":"string","maxLength":255,"minLength":1,"title":"Tool Name"},"ask_first":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ask First","description":"Writes only. Omitted: an existing write grant keeps its setting, a new one asks first; a read never asks."}},"additionalProperties":false,"type":"object","required":["tool_name"],"title":"ToolGrantBody"},"ToolGrantsRequest":{"properties":{"grants":{"items":{"$ref":"#/components/schemas/ToolGrantBody"},"type":"array","title":"Grants"}},"additionalProperties":false,"type":"object","required":["grants"],"title":"ToolGrantsRequest"},"TrackingOnlyRequest":{"properties":{"key":{"type":"string","title":"Key"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"secret_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Type"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"expiry_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiry State"},"expiry_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expiry Date"},"lead_time_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lead Time Days"}},"additionalProperties":true,"type":"object","required":["key"],"title":"TrackingOnlyRequest"},"TrendPoint":{"properties":{"start":{"type":"string","format":"date","title":"Start"},"partial":{"type":"boolean","title":"Partial","description":"The window cuts this bucket short."},"count":{"type":"integer","title":"Count"}},"type":"object","required":["start","partial","count"],"title":"TrendPoint"},"TrendsResponse":{"properties":{"window_from":{"type":"string","format":"date-time","title":"Window From"},"window_to":{"type":"string","format":"date-time","title":"Window To"},"bucket":{"type":"string","title":"Bucket"},"bucket_seconds":{"type":"integer","title":"Bucket Seconds"},"first_bucket_is_partial":{"type":"boolean","title":"First Bucket Is Partial"},"last_bucket_is_partial":{"type":"boolean","title":"Last Bucket Is Partial"},"points":{"items":{"$ref":"#/components/schemas/app__api__routes__endpoint_usage__TrendPointResponse"},"type":"array","title":"Points"},"total_calls":{"type":"integer","title":"Total Calls"},"series":{"items":{"$ref":"#/components/schemas/EndpointSeriesResponse"},"type":"array","title":"Series"},"series_cap":{"type":"integer","title":"Series Cap"},"requested_series":{"type":"integer","title":"Requested Series"},"dropped_series":{"items":{"type":"string"},"type":"array","title":"Dropped Series"}},"type":"object","required":["window_from","window_to","bucket","bucket_seconds","first_bucket_is_partial","last_bucket_is_partial","points","total_calls","series","series_cap","requested_series","dropped_series"],"title":"TrendsResponse"},"TriggerJobRequest":{"properties":{"full_run":{"type":"boolean","title":"Full Run","default":false}},"type":"object","title":"TriggerJobRequest"},"TriggerSyncResponse":{"properties":{"execution_id":{"type":"string","title":"Execution Id"},"job_id":{"type":"string","title":"Job Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["execution_id","job_id","message"],"title":"TriggerSyncResponse"},"UnifiedApprovalsResponse":{"properties":{"pending":{"items":{"$ref":"#/components/schemas/PendingApprovalSummary"},"type":"array","title":"Pending"},"approved":{"items":{"$ref":"#/components/schemas/BoardApprovalSummary"},"type":"array","title":"Approved"},"next_before":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Before"}},"type":"object","required":["pending","approved","next_before"],"title":"UnifiedApprovalsResponse","description":"The approvals board: the awaiting rows the caller can see, plus the\nimmutable approved log. Two lists, one fetch — the FE renders them as the\ntwo states of one machine. Both lists are newest-first; ``next_before`` is\nthe ``before`` cursor for the next (older) page of the approved log."},"UnifiedRepoListResponse":{"properties":{"repos":{"items":{"$ref":"#/components/schemas/UnifiedRepoRow"},"type":"array","title":"Repos"},"total":{"type":"integer","title":"Total"},"as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of"},"hidden_removed":{"type":"integer","title":"Hidden Removed","default":0}},"type":"object","required":["repos","total"],"title":"UnifiedRepoListResponse","description":"The list payload. ``total`` is the full *filtered* count (KTD-5) — the\nhonest badge/pagination number, not the page length."},"UnifiedRepoRow":{"properties":{"id":{"type":"string","title":"Id"},"full_name":{"type":"string","title":"Full Name"},"repo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Url"},"repo_owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Owner"},"outreach_phase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outreach Phase"},"next_action_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Action At"},"last_activity_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Activity At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"stale_projected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stale Projected At"},"phase_started":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phase Started"},"owner_display":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Display"},"owner_resolved":{"type":"boolean","title":"Owner Resolved","default":false},"escalation_reason":{"type":"string","title":"Escalation Reason","default":""},"github_org":{"type":"string","title":"Github Org"},"lifecycle_state":{"type":"string","title":"Lifecycle State"},"absent_since":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Absent Since"},"archived":{"type":"boolean","title":"Archived","default":false},"partially_archived":{"type":"boolean","title":"Partially Archived","default":false},"archive_capture_state":{"type":"string","title":"Archive Capture State","default":"none"},"can_edit":{"type":"boolean","title":"Can Edit","default":false},"can_snooze":{"type":"boolean","title":"Can Snooze","default":false},"can_archive":{"type":"boolean","title":"Can Archive","default":false},"custom_properties":{"additionalProperties":true,"type":"object","title":"Custom Properties"},"custom_property_count":{"type":"integer","title":"Custom Property Count","default":0},"property_nag_count":{"type":"integer","title":"Property Nag Count","default":0}},"type":"object","required":["id","full_name","repo_owner","outreach_phase","next_action_at","last_activity_at","github_org","lifecycle_state"],"title":"UnifiedRepoRow","description":"One repo row on the consolidated Git Repos screen (KTD-1/KTD-7).\n\nThe superset the three legacy rows converged on: the owner row's lifecycle\nfields, the escalated row's owner-resolution + reason fields, plus\n``github_org`` / ``lifecycle_state`` for the Organization group dimension and\nthe three server-computed capability flags the client renders affordances\nfrom (never re-deriving permissions in the browser).\n\n* ``outreach_phase`` / ``next_action_at`` are ``None`` for healthy repos (the\n  UI renders Phase and Days-left as \"—\").\n* ``stale_projected_at`` — for a healthy repo, the projected date it would\n  next go due; ``None`` for lifecycle repos.\n* ``owner_display`` — the resolved owner email when directory-verified,\n  otherwise the raw ``repo_owner`` free-text; never blank when an owner\n  exists. ``owner_resolved`` labels which.\n* ``escalation_reason`` — the resolution/escalation reason label (mirrors the\n  ops-email grouping); meaningful mainly for Escalated rows."},"UpdateGroupRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"UpdateGroupRequest"},"UpdateIndexSourceRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name","description":"For confluence_space: Confluence space key."},"source_type":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Source Type"},"source_identifier":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Source Identifier","description":"Azure AI Search productName on indexed chunks."},"product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Id"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"type":"object","title":"UpdateIndexSourceRequest"},"UpdateIntegrationRequest":{"properties":{"external_id":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"External Id"},"display_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Display Name"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"UpdateIntegrationRequest"},"UpdateJobRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"cron_expression":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Cron Expression"},"timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Timezone"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Description"},"notify_trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notify Trigger"},"notify_recipient_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notify Recipient Mode"},"notify_emails":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Notify Emails"},"notify_include_logs":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Notify Include Logs"}},"type":"object","title":"UpdateJobRequest"},"UpdateMemberRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}],"title":"Email"},"title_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Title Id"},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"UpdateMemberRequest"},"UpdateProductRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"code_review_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Code Review Enabled"},"code_review_rules_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Code Review Rules Enabled"},"code_review_spec_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Code Review Spec Enabled"},"code_review_security_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Code Review Security Enabled"},"weekly_prd_demo_video_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Weekly Prd Demo Video Enabled"}},"type":"object","title":"UpdateProductRequest"},"UpdateRepoRequest":{"properties":{"repo_owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Owner"},"custom_properties":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Properties"},"primary_team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Team"},"additional_teams":{"anyOf":[{"items":{"$ref":"#/components/schemas/TeamAssignment"},"type":"array"},{"type":"null"}],"title":"Additional Teams"},"reconcile_team_access":{"type":"boolean","title":"Reconcile Team Access","default":false},"team_grants":{"anyOf":[{"items":{"$ref":"#/components/schemas/TeamAssignment"},"type":"array"},{"type":"null"}],"title":"Team Grants"},"team_revocations":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Team Revocations"},"team_permission_changes":{"anyOf":[{"items":{"$ref":"#/components/schemas/TeamAssignment"},"type":"array"},{"type":"null"}],"title":"Team Permission Changes"},"submitted_teams":{"anyOf":[{"items":{"$ref":"#/components/schemas/TeamAssignment"},"type":"array"},{"type":"null"}],"title":"Submitted Teams"}},"additionalProperties":false,"type":"object","title":"UpdateRepoRequest","description":"A repo metadata edit. Team access is reconciled only on explicit opt-in.\n\n``reconcile_team_access`` is the only trigger for a team write, and the\nchange set states what to do: ``team_grants`` and ``team_permission_changes``\ncarry a team name (slug or display name) plus the intended permission,\n``team_revocations`` carries slugs to remove, and ``submitted_teams`` is the\ncaller's full post-edit team set, used for reporting only — it never drives a\nmutation (GAIT-312).\n\n``primary_team`` and ``additional_teams`` are retained for **detection\nonly** and are never forwarded to the tool layer. The edit form used to send\nthem on every save from Argo's stored copy of the team list, so their\npresence was read as intent and an unrelated edit rewrote the repo's whole\nGitHub team access. Any client still sending them is out of date, and that\nshape is refused rather than silently reconciled or silently ignored — a\ndropped team change is the same defect inverted.\n\nUnknown fields are refused for that same reason, in the other rollout\ndirection. During a rolling deploy a client can be *ahead* of the replica it\nreaches, and a field this model has not learned about yet would otherwise be\ndropped in silence — the caller is told the save succeeded while the intent\nit named went nowhere. Refusing the payload turns that into an error the\ncaller can retry, which is the whole point of stating team intent explicitly.\n``primary_team`` and ``additional_teams`` stay declared above, so the\nout-of-date-client shape still gets its own specific message rather than a\ngeneric unknown-field one."},"UpdateRoleRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"UpdateRoleRequest"},"UpdateTeamRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"product_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Product Id"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"jira_scrum_team_id":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Jira Scrum Team Id"}},"type":"object","title":"UpdateTeamRequest"},"UpdateTitleRequest":{"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":"UpdateTitleRequest"},"UpdateUserRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"account_status":{"anyOf":[{"type":"string","pattern":"^(active|locked|disabled|pending)$"},{"type":"null"}],"title":"Account Status"},"account_type":{"anyOf":[{"type":"string","pattern":"^(user|service_account)$"},{"type":"null"}],"title":"Account Type"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"}},"type":"object","title":"UpdateUserRequest","description":"Request model for updating user details.","example":{"account_status":"active","account_type":"user","email":"newemail@litera.com","name":"Updated Name"}},"UserBreakdown":{"properties":{"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["count"],"title":"UserBreakdown"},"UserEndpointRowResponse":{"properties":{"method":{"type":"string","title":"Method"},"path_template":{"type":"string","title":"Path Template"},"call_count":{"type":"integer","title":"Call Count"},"p95_time_to_headers_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"P95 Time To Headers Ms"},"error_count":{"type":"integer","title":"Error Count"},"last_called_at":{"type":"string","format":"date-time","title":"Last Called At"}},"type":"object","required":["method","path_template","call_count","p95_time_to_headers_ms","error_count","last_called_at"],"title":"UserEndpointRowResponse"},"UserEndpointSummaryResponse":{"properties":{"user_email":{"type":"string","title":"User Email"},"roles_at_the_time":{"items":{"type":"string"},"type":"array","title":"Roles At The Time"},"account_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Type"},"window_from":{"type":"string","format":"date-time","title":"Window From"},"window_to":{"type":"string","format":"date-time","title":"Window To"},"rows":{"items":{"$ref":"#/components/schemas/UserEndpointRowResponse"},"type":"array","title":"Rows"},"total_calls":{"type":"integer","title":"Total Calls"},"total_endpoints":{"type":"integer","title":"Total Endpoints"}},"type":"object","required":["user_email","roles_at_the_time","account_type","window_from","window_to","rows","total_calls","total_endpoints"],"title":"UserEndpointSummaryResponse"},"UserListResponse":{"properties":{"users":{"items":{"$ref":"#/components/schemas/UserResponse"},"type":"array","title":"Users"},"total":{"type":"integer","title":"Total"},"unfiltered_total":{"type":"integer","title":"Unfiltered Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["users","total","unfiltered_total","page","page_size"],"title":"UserListResponse","description":"Paginated response model for user list with filtering.","example":{"page":1,"page_size":50,"total":42,"unfiltered_total":120,"users":[]}},"UserResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"username":{"type":"string","title":"Username"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"account_type":{"type":"string","title":"Account Type"},"account_status":{"type":"string","title":"Account Status"},"failed_login_attempts":{"type":"integer","title":"Failed Login Attempts"},"must_change_password":{"type":"boolean","title":"Must Change Password","default":false},"locked_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Locked Until"},"last_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles"},"auth_method":{"type":"string","title":"Auth Method","default":"local"},"external_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Provider"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department"}},"type":"object","required":["id","email","username","name","account_type","account_status","failed_login_attempts","locked_until","last_login_at","created_at","updated_at","created_by"],"title":"UserResponse","description":"Response model for user details.","example":{"account_status":"active","account_type":"user","created_at":"2026-02-01T09:00:00Z","created_by":"admin@litera.com","email":"user@litera.com","failed_login_attempts":0,"id":"123e4567-e89b-12d3-a456-426614174000","last_login_at":"2026-02-15T10:30:00Z","must_change_password":false,"name":"User Name","roles":["chat_user"],"updated_at":"2026-02-15T10:30:00Z","username":"user_LSCM"}},"UserScreenSummaryResponse":{"properties":{"user_email":{"type":"string","title":"User Email"},"window_from":{"type":"string","format":"date-time","title":"Window From"},"window_to":{"type":"string","format":"date-time","title":"Window To"},"screens":{"items":{"$ref":"#/components/schemas/ScreenSummaryRowResponse"},"type":"array","title":"Screens"},"no_screen":{"$ref":"#/components/schemas/NoScreenSummaryResponse"},"total_calls":{"type":"integer","title":"Total Calls"}},"type":"object","required":["user_email","window_from","window_to","screens","no_screen","total_calls"],"title":"UserScreenSummaryResponse"},"UserSequenceResponse":{"properties":{"user_email":{"type":"string","title":"User Email"},"roles_at_the_time":{"items":{"type":"string"},"type":"array","title":"Roles At The Time"},"account_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Type"},"window_from":{"type":"string","format":"date-time","title":"Window From"},"window_to":{"type":"string","format":"date-time","title":"Window To"},"entries":{"items":{"$ref":"#/components/schemas/SequenceEntryResponse"},"type":"array","title":"Entries"},"view_groups":{"items":{"$ref":"#/components/schemas/SequenceViewGroupResponse"},"type":"array","title":"View Groups"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_calls":{"type":"integer","title":"Total Calls"}},"type":"object","required":["user_email","roles_at_the_time","account_type","window_from","window_to","entries","view_groups","page","page_size","total_calls"],"title":"UserSequenceResponse"},"UserUsageRowResponse":{"properties":{"user_email":{"type":"string","title":"User Email"},"roles_at_the_time":{"items":{"type":"string"},"type":"array","title":"Roles At The Time"},"account_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Type"},"call_count":{"type":"integer","title":"Call Count"},"distinct_endpoints":{"type":"integer","title":"Distinct Endpoints"},"top_mate_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Top Mate Type"},"last_called_at":{"type":"string","format":"date-time","title":"Last Called At"}},"type":"object","required":["user_email","roles_at_the_time","account_type","call_count","distinct_endpoints","top_mate_type","last_called_at"],"title":"UserUsageRowResponse"},"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"},"VelocitySection":{"properties":{"prs_per_developer":{"$ref":"#/components/schemas/PerDeveloperTile"},"lines_per_developer":{"$ref":"#/components/schemas/PerDeveloperTile"}},"type":"object","required":["prs_per_developer","lines_per_developer"],"title":"VelocitySection"},"Views":{"properties":{"all":{"$ref":"#/components/schemas/BoardNumbers"},"through_argo":{"$ref":"#/components/schemas/BoardNumbers"},"outside_argo":{"$ref":"#/components/schemas/BoardNumbers"},"prd_through_rate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Prd Through Rate"}},"type":"object","required":["all","through_argo","outside_argo","prd_through_rate"],"title":"Views"},"WeekBucket":{"properties":{"start":{"type":"string","format":"date","title":"Start"},"end":{"type":"string","format":"date","title":"End"},"partial":{"type":"boolean","title":"Partial"}},"type":"object","required":["start","end","partial"],"title":"WeekBucket"},"WindowState":{"properties":{"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"start_at":{"type":"string","format":"date-time","title":"Start At"},"end_at":{"type":"string","format":"date-time","title":"End At"},"preset_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Preset Days","description":"The preset that produced this window, or null for an explicitly-picked range."}},"type":"object","required":["start_date","end_date","start_at","end_at"],"title":"WindowState","description":"Which window produced these figures (R20, R21).\n\n``start_date``/``end_date`` are the INCLUSIVE calendar days the reader\npicked; ``start_at``/``end_at`` are the half-open ``[start_at, end_at)``\ninstants the query actually bound. Both travel because the pair is what\nmakes a quoted figure reproducible."},"WorkDoneTab":{"properties":{"headline":{"type":"integer","title":"Headline","description":"Completed write calls, for the tab label (R1)."},"changes":{"$ref":"#/components/schemas/CountChange","description":"Completed write calls; equals tool_calls' writes (R16)."},"tool_calls":{"$ref":"#/components/schemas/ToolCallsSection"},"mcp":{"$ref":"#/components/schemas/McpCallsSection"},"repos_created":{"$ref":"#/components/schemas/RepoActionSection"},"repos_archived":{"$ref":"#/components/schemas/RepoActionSection"}},"type":"object","required":["headline","changes","tool_calls","mcp","repos_created","repos_archived"],"title":"WorkDoneTab","description":"Never takes the Mate filter (R3)."},"WorkOrderView":{"properties":{"text":{"type":"string","title":"Text"},"fingerprint":{"type":"string","title":"Fingerprint"},"too_large":{"type":"boolean","title":"Too Large"},"source":{"type":"string","enum":["live","approved"],"title":"Source"}},"type":"object","required":["text","fingerprint","too_large","source"],"title":"WorkOrderView","description":"The work order exactly as DevMate receives it (KTD16)."},"WorkflowCicdDispatchView":{"properties":{"id":{"type":"string","title":"Id"},"state":{"type":"string","title":"State"},"pr_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pr Url"},"cursor_agent_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Agent Url"},"engine":{"type":"string","title":"Engine","default":"cursor"},"queue_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Queue State"}},"type":"object","required":["id","state"],"title":"WorkflowCicdDispatchView","description":"One ``CicdFixRun`` dispatch, as a board progress row or a plain\nhistory link — no status/outcome text on history entries; the active\ndispatch's ``state`` IS its inline lifecycle indicator, a distinct\nprogress display, not an outcome label.\n\n``engine`` names the engine it runs on and ``queue_state`` is its Claude\nworker-queue stamp (PDLC-332 KTD8), or ``needs_attention`` for a claimed\nsession paused for hours (GAIT-620), read only while the run's session is\nin flight — active with no PR — so a stamp the reconcile has not yet\ncleared never shows on a finished run; ``cursor_agent_url`` links the\nagent: Cursor's page, or the Claude session's Console page."},"WorkflowCicdHistoryEntryView":{"properties":{"id":{"type":"string","title":"Id"},"pr_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pr Url"},"cursor_agent_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Agent Url"},"engine":{"type":"string","title":"Engine","default":"cursor"}},"type":"object","required":["id"],"title":"WorkflowCicdHistoryEntryView","description":"One PAST (terminal) dispatch attempt, as the history popover's plain\nlink pair plus the engine it ran on — no ``state``/status text."},"WorkflowCicdSectionView":{"properties":{"stages":{"items":{"$ref":"#/components/schemas/WorkflowStageStatusView"},"type":"array","title":"Stages"},"composite_status":{"type":"string","title":"Composite Status"},"active_dispatch":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCicdDispatchView"},{"type":"null"}]},"history_count":{"type":"integer","title":"History Count"},"history":{"items":{"$ref":"#/components/schemas/WorkflowCicdHistoryEntryView"},"type":"array","title":"History"},"default_engine":{"type":"string","title":"Default Engine","default":"cursor"},"claude_allowed":{"type":"boolean","title":"Claude Allowed","default":false}},"type":"object","required":["stages","composite_status","history_count"],"title":"WorkflowCicdSectionView","description":"The composite \"CI/CD\" section: per-stage status, the derived\ncomposite, the current active dispatch's progress, and past-attempt\nhistory.\n\nCaller-resolved and threaded like ``deploy_runs``/``gtm_links`` above, via\n``_cicd_section_for_workflow`` — always non-None on the detail view (the\nsection always renders), with an ALL-``not_run`` ``stages`` list and\nempty ``history`` for a workflow that has never had a dispatch."},"WorkflowDefinitionView":{"properties":{"workflow_type":{"type":"string","title":"Workflow Type"},"stages":{"items":{"$ref":"#/components/schemas/StageView"},"type":"array","title":"Stages"}},"type":"object","required":["workflow_type","stages"],"title":"WorkflowDefinitionView","description":"The ordered stage-set for a workflow type (no per-workflow projection)."},"WorkflowDeployRunView":{"properties":{"target_stage":{"type":"string","title":"Target Stage"},"status":{"type":"string","title":"Status"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","required":["target_stage","status"],"title":"WorkflowDeployRunView","description":"One post-merge stage's latest Deploy run, as the board's status chip.\n\nProjected by the CALLER from the workflow's Product (``DeployRun`` carries\nno workflow FK -- rows are per-product) via\n``app.integrations.ado_pipeline.board.latest_deploy_runs_for_product`` --\nthe latest row per stage by ``stage_finished_at``. ``status`` is\n``succeeded``/``failed``, carried verbatim; there is no \"pending\" value\n(see ``DeployRunStatus``). ``url`` is the ADO run results page -- the\nboard's link renders only when it is set.\n\nA failed run renders a red chip on its stage and never derails the\njourney: it is threaded and rendered independently of\n``stages``/``off_track_reason`` below, on whichever stage it targets,\neven one the journey hasn't reached yet."},"WorkflowDetailView":{"properties":{"id":{"type":"string","title":"Id"},"workflow_type":{"type":"string","title":"Workflow Type"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"current_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Stage"},"cache_diverged":{"type":"boolean","title":"Cache Diverged","default":false},"stages":{"items":{"$ref":"#/components/schemas/StageView"},"type":"array","title":"Stages"},"next_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Stage","description":"The next positional stage after the active one, or null at the end / off_track."},"reached_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reached Stage"},"off_track_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Off Track Reason"},"awaiting_approval":{"type":"boolean","title":"Awaiting Approval","default":false},"jira_issue_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jira Issue Key"},"jira_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jira Url"},"devmate_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Devmate Run Id"},"pr_links":{"items":{"$ref":"#/components/schemas/WorkflowPrLinkView"},"type":"array","title":"Pr Links"},"gtm_links":{"items":{"$ref":"#/components/schemas/WorkflowGtmLinkView"},"type":"array","title":"Gtm Links"},"signoff":{"anyOf":[{"$ref":"#/components/schemas/WorkflowSignoffView"},{"type":"null"}]},"deploy_runs":{"items":{"$ref":"#/components/schemas/WorkflowDeployRunView"},"type":"array","title":"Deploy Runs"},"cicd_section":{"$ref":"#/components/schemas/WorkflowCicdSectionView"},"can_dispatch_cicd_fix":{"type":"boolean","title":"Can Dispatch Cicd Fix","default":false}},"type":"object","required":["id","workflow_type","stages"],"title":"WorkflowDetailView","description":"The full board payload: the workflow + its definition + per-stage state."},"WorkflowEndToEndRow":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"prd_to_merged":{"anyOf":[{"$ref":"#/components/schemas/Duration"},{"type":"null"}]}},"type":"object","required":["workflow_id"],"title":"WorkflowEndToEndRow","description":"One workflow's own end-to-end duration.\n\nThe Measurements tab's per-workflow table, and the destination of the\ndrill from a data-quality signal's named workflows — so ``workflow_id`` is\nthe SAME R2 identity the offender list uses, or the reader cannot match\nthe workflow they clicked.\n\n``prd_to_merged`` is ``null`` when that workflow has not reached\n``merged`` — absent, never a zero, which would render as \"merged\ninstantly\" (R25). Every cohort workflow appears, including the\nstill-running and the derailed: those are exactly the ones a drill from a\nsignal is most likely to land on."},"WorkflowGtmLinkView":{"properties":{"gtm_run_id":{"type":"string","title":"Gtm Run Id"},"state":{"type":"string","title":"State"},"publication_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publication Url"}},"type":"object","required":["gtm_run_id","state"],"title":"WorkflowGtmLinkView","description":"One GTM run launched off this delivery journey, as an outbound link.\n\n``state`` is ``GtmRun.state`` verbatim — ``generating``/``publishing``/\n``blocked``/``complete``/``error`` for live runs, or the legacy ``intake``/\n``awaiting_pmm`` on historic rows — shown as the link's hint, never\nre-labelled. ``publication_url`` (PDLC-310 U12, R23) is the Confluence\npage URL once the run has published (``GtmRun.publication.url``); null\notherwise — the board renders it as a distinct \"Published page\" link\nbeside the run link."},"WorkflowPrLinkView":{"properties":{"unit_id":{"type":"string","title":"Unit Id"},"pr_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pr Url"},"cursor_agent_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Agent Url"},"engine":{"type":"string","title":"Engine","default":"cursor"},"code_review_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Review Status"},"code_review_finding_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Code Review Finding Count"},"code_review_requeued":{"type":"boolean","title":"Code Review Requeued","default":false}},"type":"object","required":["unit_id"],"title":"WorkflowPrLinkView","description":"One unit of the latest DevMate run, as the board's outbound links.\n\n``unit_id`` doubles as the visible label — distinguishes fanned-out units\nwithout a second text field. ``engine`` names the unit's engine\n(PDLC-332): a Claude unit has no agent page (KTD19), so a dispatched one\nwith no PR yet is an entry with neither URL, and the board labels it.\nIt is serialized only for a non-Cursor unit, so a Cursor entry's wire\nshape is unchanged; absent reads as Cursor."},"WorkflowSignoffView":{"properties":{"verdict":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verdict"},"status":{"type":"string","title":"Status"},"devmate_armed":{"type":"boolean","title":"Devmate Armed"},"stale":{"type":"boolean","title":"Stale"},"trail_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trail Id"}},"type":"object","required":["verdict","status","devmate_armed","stale","trail_id"],"title":"WorkflowSignoffView","description":"The PRD sign-off gate's result for this workflow, as the board shows it.\n\nCaller-projected via ``signoff_status_for_trail`` — the same projection\napprovals screens use, so one Trail never means two things. ``status`` is\nthe verbatim human label; when ``stale`` (PRD overwritten after the gate\nran), ``status`` already reads \"Re-gate — PRD changed\" and ``verdict`` is\nwhat the last run found."},"WorkflowStageStatusView":{"properties":{"stage":{"type":"string","title":"Stage"},"label":{"type":"string","title":"Label"},"pipeline_label":{"type":"string","title":"Pipeline Label"},"order":{"type":"integer","title":"Order"},"status":{"type":"string","title":"Status"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","required":["stage","label","pipeline_label","order","status"],"title":"WorkflowStageStatusView","description":"One tracked ADO stage's status slot in the composite CI/CD section.\n\n``stage`` is the KTD3 pipeline-scoped composite identity — an open\nvocabulary (R7): the section generalizes to however many stages a\nworkflow's product has tracked, never assuming exactly three. ``label``/\n``order``/``pipeline_label`` come from whichever source built this view —\nsee ``from_live_slots``/``from_snapshot_entries`` below and\n``WorkflowCicdSectionView.build``'s live-vs-frozen branching (R16/KTD9)."},"WorkflowSummary":{"properties":{"id":{"type":"string","title":"Id"},"workflow_type":{"type":"string","title":"Workflow Type"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"current_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Stage","description":"Denormalized cache; the detail view re-folds authoritatively."},"product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"gtm_children":{"anyOf":[{"items":{"$ref":"#/components/schemas/WorkflowSummary"},"type":"array"},{"type":"null"}],"title":"Gtm Children","description":"This delivery row's GTM runs (original launch + reruns), latest first."},"gtm_run_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gtm Run Count","description":"Total GTM runs for this journey, including the original launch — len(gtm_children), carried explicitly so the frontend never recomputes it."}},"type":"object","required":["id","workflow_type"],"title":"WorkflowSummary","description":"A list row — cheap, uses the cached current_stage (list filtering only)."},"app__api__models__user__MessageResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"MessageResponse","description":"Generic success/error message response.","example":{"message":"Operation completed successfully"}},"app__api__routes__cursor_spend__FreshnessResponse":{"properties":{"last_successful_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Successful Sync At"},"data_through":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Data Through"},"age_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Age Seconds"},"is_stale":{"type":"boolean","title":"Is Stale"},"has_ever_synced":{"type":"boolean","title":"Has Ever Synced"},"sync_interval_seconds":{"type":"number","title":"Sync Interval Seconds"},"stale_after_seconds":{"type":"number","title":"Stale After Seconds"}},"type":"object","required":["last_successful_sync_at","data_through","age_seconds","is_stale","has_ever_synced","sync_interval_seconds","stale_after_seconds"],"title":"FreshnessResponse","description":"R17, R18. When the snapshot last refreshed — and whether it ever has.\n\n``has_ever_synced`` is the first thing the screen branches on. False means the\npanel says \"not yet synced\" instead of rendering zeroes, which would read as a\nsynced period in which nobody used Cursor. A missing sync row and a null\ntimestamp collapse to the same state, because both mean the same thing.\n\nNever-synced is never fresh, so ``is_stale`` is True there too — a surface\nreading only that flag warns rather than presenting an empty screen as\ncurrent."},"app__api__routes__cursor_spend__TrendPointResponse":{"properties":{"bucket_start":{"type":"string","format":"date","title":"Bucket Start"},"model":{"type":"string","title":"Model","description":"A top-8 model, or 'Other'."},"request_count":{"type":"integer","title":"Request Count"},"charged_cents":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Charged Cents","description":"Measures ALLOWANCE CONSUMPTION — the allowance this drew down, not cash billed."}},"type":"object","required":["bucket_start","model","request_count","charged_cents"],"title":"TrendPointResponse","description":"One model band's consumption in one bucket (B2).\n\nFlat, one row per (bucket, model): the browser pivots it into whatever shape\na chart wants, so a second chart over the same data is not a second endpoint.\n\nNO cost-per-request field, deliberately. That rate is\n``charged_cents / request_count`` over whatever range the reader is looking\nat; shipping it per row invites a consumer to average the averages, which is\nwrong whenever the buckets differ in size — and they always do."},"app__api__routes__endpoint_usage__CaptureStateResponse":{"properties":{"status":{"type":"string","title":"Status"},"excluded_paths":{"items":{"type":"string"},"type":"array","title":"Excluded Paths"},"earliest_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Earliest Event At"},"dropped_event_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dropped Event Count"},"rejected_client_view_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rejected Client View Count"},"window_from":{"type":"string","format":"date-time","title":"Window From"},"window_to":{"type":"string","format":"date-time","title":"Window To"},"window_starts_before_capture":{"type":"boolean","title":"Window Starts Before Capture"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["status","excluded_paths","earliest_event_at","dropped_event_count","rejected_client_view_count","window_from","window_to","window_starts_before_capture","warnings"],"title":"CaptureStateResponse"},"app__api__routes__endpoint_usage__TrendPointResponse":{"properties":{"bucket_start":{"type":"string","format":"date-time","title":"Bucket Start"},"call_count":{"type":"integer","title":"Call Count"},"p95_time_to_headers_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"P95 Time To Headers Ms"}},"type":"object","required":["bucket_start","call_count","p95_time_to_headers_ms"],"title":"TrendPointResponse"},"app__api__routes__integration_console__CaptureStateResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"capture_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Capture Enabled"},"capture_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capture Expires At"}},"type":"object","required":["slug","capture_enabled","capture_expires_at"],"title":"CaptureStateResponse","description":"Capture as the console reads it back.\n\n``capture_enabled`` comes from :func:`resolve_console_capture_enabled` — the\nsame helper ``/liveness/{slug}`` answers with — so a toggle and a page\nrefresh can never disagree about whether capture is on. It is ``bool |\nNone`` for the same reason it is there: \"nobody has said\" is a third state,\nnot a synonym for off."},"app__api__routes__launchdarkly__FreshnessResponse":{"properties":{"last_successful_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Successful Sync At"},"age_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Age Seconds"},"is_stale":{"type":"boolean","title":"Is Stale"},"has_ever_synced":{"type":"boolean","title":"Has Ever Synced"},"sync_interval_seconds":{"type":"number","title":"Sync Interval Seconds"},"stale_after_seconds":{"type":"number","title":"Stale After Seconds"}},"type":"object","required":["last_successful_sync_at","age_seconds","is_stale","has_ever_synced","sync_interval_seconds","stale_after_seconds"],"title":"FreshnessResponse"},"app__main__MessageResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"MessageResponse"},"app__schemas__quality__ProductOption":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"line":{"type":"string","title":"Line"}},"type":"object","required":["key","name","line"],"title":"ProductOption"},"app__schemas__sdlc_delivery__ProductOption":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The product's UUID, or null for the unassigned bucket."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The product's name, or null for the unassigned bucket."},"workflow_count":{"type":"integer","title":"Workflow Count","description":"Cohort-anchored workflows this product holds in this window, counted BEFORE any product filter — so the options do not collapse to the one already selected, and the counts sum to the unfiltered cohort."}},"type":"object","required":["id","name","workflow_count"],"title":"ProductOption","description":"One product the reader can scope the window to.\n\n``id`` and ``name`` are both null for the workflows with no product. The\nname is null rather than a phrase because ``name`` means \"the product's\nname\" and there is no product to have one — the panel owns that wording,\nthe same rule that keeps the exclusion-reason tokens off the screen.\n\nSend ``product_id=unassigned`` to select that bucket: the column is\nnullable and a UUID-typed parameter cannot express \"is null\"."}}}}