diff --git a/README.md b/README.md index 49f73a83..092ad0f0 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ This repository holds the BFF and client that sit in front of it. The table belo Throughout this README, "the API", "the BFF", and "the client" refer to those three. The browser only ever talks to the BFF, never directly to the API. -This UI targets **ContextForge API v1.0.11**, matching [`openapi.json`](./openapi.json) committed at repo root. +This UI targets **ContextForge API v1.1.0**, matching [`openapi.json`](./openapi.json) committed at repo root. ## Tech Stack @@ -159,7 +159,7 @@ npm run preview ## API Types -TypeScript types and fetch clients under `src/generated/` come from [`openapi.json`](./openapi.json) via [Orval](./orval.config.ts). That file is committed and pinned to API v1.0.11, not re-fetched at build time. +TypeScript types and fetch clients under `src/generated/` come from [`openapi.json`](./openapi.json) via [Orval](./orval.config.ts). That file is committed and pinned to API v1.1.0, not re-fetched at build time. ```bash npm run generate # regenerate src/generated/ from ./openapi.json diff --git a/openapi.json b/openapi.json index 2d35b953..1f2e32f4 100644 --- a/openapi.json +++ b/openapi.json @@ -3,7 +3,7 @@ "info": { "title": "ContextForge", "description": "ContextForge AI Gateway — an AI gateway, registry, and proxy for MCP, A2A, and REST/gRPC APIs. Exposes a unified control plane with centralized governance, discovery, and observability. Optimizes agent and tool calling, and supports plugins.", - "version": "1.0.11+9b2156" + "version": "1.1.0+42a06c" }, "paths": { "/metrics/prometheus": { @@ -62,7 +62,7 @@ "/health": { "get": { "summary": "Healthcheck", - "description": "Perform a basic health check to verify database connectivity.\n\nSync function so FastAPI runs it in a threadpool, avoiding event loop blocking.\nUses a dedicated session to avoid cross-thread issues and double-commit\nfrom get_db dependency. All DB operations happen in the same thread.\n\nArgs:\n response: Optional response object used to attach runtime-mode headers.\n\nReturns:\n A dictionary with the health status and optional error message.", + "description": "Perform a basic health check to verify database connectivity.\n\nSync function so FastAPI runs it in a threadpool, avoiding event loop blocking.\nUses a dedicated session to avoid cross-thread issues and double-commit\nfrom get_db dependency. All DB operations happen in the same thread.\n\nReturns:\n A dictionary with the health status and optional error message.", "operationId": "healthcheck_health_get", "responses": { "200": { @@ -7527,7 +7527,7 @@ "Observability" ], "summary": "Get Metrics Timeseries", - "description": "Get execution counts bucketed over time.\n\nArgs:\n request: FastAPI request object (required by the permission decorator)\n hours: Number of hours to look back (1-168)\n interval_minutes: Aggregation interval in minutes (5-1440)\n user: Authenticated user context (required by the permission decorator)\n db: Database session\n\nReturns:\n TimeseriesResponse: Sparse buckets with one execution count each. Empty\n series when observability is disabled.\n\nRaises:\n HTTPException: 500 if aggregation fails", + "description": "Get execution counts bucketed over time.\n\nArgs:\n request: FastAPI request object (required by the permission decorator)\n hours: Number of hours to look back (1-168)\n interval_minutes: Aggregation interval in minutes (5-1440)\n user: Authenticated user context (required by the permission decorator)\n db: Database session\n\nReturns:\n TimeseriesResponse: Sparse buckets with aligned execution, success, and\n error counts. Empty series when observability is disabled.\n\nRaises:\n HTTPException: 500 if aggregation fails", "operationId": "get_metrics_timeseries_v1_observability_metrics_timeseries_get", "security": [ { @@ -8936,9 +8936,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "additionalProperties": true, - "title": "Response Invoke A2A Agent V1 A2A Agent Name Invoke Post" + "$ref": "#/components/schemas/A2AInvokeResponse" } } } @@ -9003,9 +9001,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "additionalProperties": true, - "title": "Response Invoke A2A Agent By Id V1 A2A Invoke Post" + "$ref": "#/components/schemas/A2AInvokeResponse" } } } @@ -9081,9 +9077,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "additionalProperties": true, - "title": "Response Invoke A2A Agent Jsonrpc V1 A2A Agent Name Jsonrpc Post" + "$ref": "#/components/schemas/A2AJsonRpcResponse" } } } @@ -10529,54 +10523,91 @@ ] } }, - "/v1/teams/": { - "post": { + "/v1/auth/sso/providers": { + "get": { "tags": [ - "Teams" + "SSO Authentication", + "SSO Authentication" ], - "summary": "Create Team", - "description": "Create a new team, optionally seeding it with members.\n\nMembers supplied in the request are routed by the server: an address that\nbelongs to an active user is added to the team directly, anything else is\nsent an invitation. Team, memberships and invitations are written as one\ntransaction, so a bad row fails the whole request rather than leaving a\nhalf-populated team behind.\n\nArgs:\n request: Team creation request data\n background_tasks: Response-scoped background task scheduler\n current_user_ctx: Currently authenticated user context\n db: Database session\n\nReturns:\n TeamCreateResponse: Created team data, plus how each seeded member was resolved\n\nRaises:\n HTTPException 400: Active team with same name exists (platform admin callers).\n HTTPException 403: Team creation disabled; caller is not platform admin.\n HTTPException 409: Active team with same name exists (non-admin; generic message prevents name enumeration).\n HTTPException 500: Unexpected service error.\n\nExamples:\n >>> import asyncio\n >>> asyncio.iscoroutinefunction(create_team)\n True", - "operationId": "create_team_v1_teams__post", - "security": [ - { - "ConfigurableHTTPBearer": [] + "summary": "List Sso Providers", + "description": "List available SSO providers for login.\n\nArgs:\n db: Database session\n\nReturns:\n List of enabled SSO providers with basic information.\n\nRaises:\n HTTPException: If SSO authentication is disabled\n\nExamples:\n >>> import asyncio\n >>> asyncio.iscoroutinefunction(list_sso_providers)\n True", + "operationId": "list_sso_providers_v1_auth_sso_providers_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/SSOProviderResponse" + }, + "type": "array", + "title": "Response List Sso Providers V1 Auth Sso Providers Get" + } + } + } } + } + } + }, + "/v1/auth/sso/login/{provider_id}": { + "get": { + "tags": [ + "SSO Authentication", + "SSO Authentication" ], + "summary": "Initiate Sso Login", + "description": "Initiate SSO authentication flow.\n\nValidates the redirect_uri against a server-side allowlist to prevent open redirect attacks.\nOnly allows relative URIs, URIs matching app_domain, or URIs from configured allowed_origins.\nDoes NOT trust the Host header for validation.\n\nArgs:\n provider_id: SSO provider identifier (e.g., 'github', 'google')\n request: FastAPI request object\n response: FastAPI response object used to set session-binding cookie\n redirect_uri: Callback URI after successful authentication\n scopes: Optional custom OAuth scopes (space-separated)\n db: Database session\n\nReturns:\n Authorization URL and state parameter for redirect.\n\nRaises:\n HTTPException: If SSO is disabled, provider not found, or redirect_uri is invalid\n\nExamples:\n >>> import asyncio\n >>> asyncio.iscoroutinefunction(initiate_sso_login)\n True", + "operationId": "initiate_sso_login_v1_auth_sso_login__provider_id__get", "parameters": [ { - "name": "jwt_token", - "in": "cookie", + "name": "provider_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Provider Id" + } + }, + { + "name": "redirect_uri", + "in": "query", + "required": true, + "schema": { + "type": "string", + "maxLength": 2048, + "description": "Callback URI after authentication", + "title": "Redirect Uri" + }, + "description": "Callback URI after authentication" + }, + { + "name": "scopes", + "in": "query", "required": false, "schema": { "anyOf": [ { - "type": "string" + "type": "string", + "maxLength": 500 }, { "type": "null" } ], - "title": "Jwt Token" - } + "description": "Space-separated OAuth scopes", + "title": "Scopes" + }, + "description": "Space-separated OAuth scopes" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TeamCreateRequest" - } - } - } - }, "responses": { - "201": { + "200": { "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TeamCreateResponse" + "$ref": "#/components/schemas/SSOLoginResponse" } } } @@ -10592,81 +10623,87 @@ } } } - }, + } + }, + "/v1/auth/sso/callback/{provider_id}": { "get": { "tags": [ - "Teams" - ], - "summary": "List Teams", - "description": "List teams visible to the caller.\n\n- Administrators see all non-personal teams plus their own personal team (paginated)\n- Regular users see only teams they are a member of (paginated client-side)\n- search_query, when set, narrows either population to teams whose name, slug, or\n description contains it (case-insensitive)\n\nArgs:\n skip: Number of teams to skip for pagination\n limit: Maximum number of teams to return\n cursor: Pagination cursor\n include_pagination: Include pagination metadata\n search_query: Substring filter on name/slug/description\n current_user_ctx: Current user context with permissions and database session\n db: Database session\n\nReturns:\n Union[TeamListResponse, CursorPaginatedTeamsResponse]: List of teams\n\nRaises:\n HTTPException: If there's an error listing teams", - "operationId": "list_teams_v1_teams__get", - "security": [ - { - "ConfigurableHTTPBearer": [] - } + "SSO Authentication", + "SSO Authentication" ], + "summary": "Handle Sso Callback", + "description": "Handle SSO authentication callback.\n\nArgs:\n provider_id: SSO provider identifier\n code: Authorization code from provider (present on success)\n state: CSRF state parameter for validation\n error: OAuth error code (present on failure)\n error_description: OAuth error description (present on failure)\n request: FastAPI request object\n response: FastAPI response object\n db: Database session\n\nReturns:\n JWT access token and user information, or redirect to login with error.\n\nRaises:\n HTTPException: If SSO is disabled or authentication fails\n\nExamples:\n >>> import asyncio\n >>> asyncio.iscoroutinefunction(handle_sso_callback)\n True", + "operationId": "handle_sso_callback_v1_auth_sso_callback__provider_id__get", "parameters": [ { - "name": "skip", - "in": "query", - "required": false, + "name": "provider_id", + "in": "path", + "required": true, "schema": { - "type": "integer", - "minimum": 0, - "description": "Number of teams to skip", - "default": 0, - "title": "Skip" - }, - "description": "Number of teams to skip" + "type": "string", + "title": "Provider Id" + } }, { - "name": "limit", + "name": "code", "in": "query", "required": false, "schema": { - "type": "integer", - "maximum": 500, - "minimum": 1, - "description": "Number of teams to return", - "default": 50, - "title": "Limit" + "anyOf": [ + { + "type": "string", + "maxLength": 4096 + }, + { + "type": "null" + } + ], + "description": "Authorization code from SSO provider", + "title": "Code" }, - "description": "Number of teams to return" + "description": "Authorization code from SSO provider" }, { - "name": "cursor", + "name": "state", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", - "maxLength": 500, - "pattern": "^[a-zA-Z0-9_=+/-]+$" + "maxLength": 128 }, { "type": "null" } ], - "description": "Pagination cursor", - "title": "Cursor" + "description": "CSRF state parameter", + "title": "State" }, - "description": "Pagination cursor" + "description": "CSRF state parameter" }, { - "name": "include_pagination", + "name": "error", "in": "query", "required": false, "schema": { - "type": "boolean", - "description": "Include pagination metadata (cursor)", - "default": false, - "title": "Include Pagination" + "anyOf": [ + { + "type": "string", + "maxLength": 100, + "pattern": "^[a-zA-Z0-9_]+$" + }, + { + "type": "null" + } + ], + "description": "OAuth error code", + "title": "Error" }, - "description": "Include pagination metadata (cursor)" + "description": "OAuth error code" }, { - "name": "search_query", + "name": "error_description", "in": "query", "required": false, "schema": { @@ -10679,11 +10716,49 @@ "type": "null" } ], - "description": "Filter teams by a substring of name, slug, or description", - "title": "Search Query" + "description": "OAuth error description", + "title": "Error Description" }, - "description": "Filter teams by a substring of name, slug, or description" + "description": "OAuth error description" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v1/auth/sso/admin/providers": { + "post": { + "tags": [ + "SSO Authentication", + "SSO Authentication" + ], + "summary": "Create Sso Provider", + "description": "Create new SSO provider configuration (Admin only).\n\nArgs:\n provider_data: SSO provider configuration\n db: Database session\n user: Current authenticated user\n\nReturns:\n Created provider information.\n\nRaises:\n HTTPException: If provider already exists or creation fails", + "operationId": "create_sso_provider_v1_auth_sso_admin_providers_post", + "security": [ + { + "ConfigurableHTTPBearer": [] + } + ], + "parameters": [ { "name": "jwt_token", "in": "cookie", @@ -10701,21 +10776,25 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SSOProviderCreateRequest" + } + } + } + }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/TeamListResponse" - }, - { - "$ref": "#/components/schemas/CursorPaginatedTeamsResponse" - } - ], - "title": "Response List Teams V1 Teams Get" + "type": "object", + "additionalProperties": true, + "title": "Response Create Sso Provider V1 Auth Sso Admin Providers Post" } } } @@ -10731,49 +10810,21 @@ } } } - } - }, - "/v1/teams/discover": { + }, "get": { "tags": [ - "Teams" + "SSO Authentication", + "SSO Authentication" ], - "summary": "Discover Public Teams", - "description": "Discover public teams that can be joined.\n\nReturns public teams that are discoverable to all authenticated users.\nOnly shows teams where the current user is not already a member.\n\nArgs:\n skip: Number of teams to skip for pagination\n limit: Maximum number of teams to return\n current_user_ctx: Current user context with permissions and database session\n db: Database session\n\nReturns:\n List[TeamDiscoveryResponse]: List of discoverable public teams\n\nRaises:\n HTTPException: If there's an error discovering teams", - "operationId": "discover_public_teams_v1_teams_discover_get", + "summary": "List All Sso Providers", + "description": "List all SSO providers including disabled ones (Admin only).\n\nArgs:\n db: Database session\n user: Current authenticated user\n\nReturns:\n List of all SSO providers with configuration details.", + "operationId": "list_all_sso_providers_v1_auth_sso_admin_providers_get", "security": [ { "ConfigurableHTTPBearer": [] } ], "parameters": [ - { - "name": "skip", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 0, - "description": "Number of teams to skip", - "default": 0, - "title": "Skip" - }, - "description": "Number of teams to skip" - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 500, - "minimum": 1, - "description": "Number of teams to return", - "default": 50, - "title": "Limit" - }, - "description": "Number of teams to return" - }, { "name": "jwt_token", "in": "cookie", @@ -10799,9 +10850,10 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/TeamDiscoveryResponse" + "type": "object", + "additionalProperties": true }, - "title": "Response Discover Public Teams V1 Teams Discover Get" + "title": "Response List All Sso Providers V1 Auth Sso Admin Providers Get" } } } @@ -10819,14 +10871,15 @@ } } }, - "/v1/teams/{team_id}": { + "/v1/auth/sso/admin/providers/{provider_id}": { "get": { "tags": [ - "Teams" + "SSO Authentication", + "SSO Authentication" ], - "summary": "Get Team", - "description": "Get a specific team by ID.\n\nArgs:\n team_id: Team UUID\n current_user: Authenticated user context dict with email and permissions\n db: Database session\n\nReturns:\n TeamResponse: Team data\n\nRaises:\n HTTPException: If team not found or access denied", - "operationId": "get_team_v1_teams__team_id__get", + "summary": "Get Sso Provider", + "description": "Get SSO provider details (Admin only).\n\nArgs:\n provider_id: Provider identifier\n db: Database session\n user: Current authenticated user\n\nReturns:\n Provider configuration details.\n\nRaises:\n HTTPException: If provider not found", + "operationId": "get_sso_provider_v1_auth_sso_admin_providers__provider_id__get", "security": [ { "ConfigurableHTTPBearer": [] @@ -10834,12 +10887,12 @@ ], "parameters": [ { - "name": "team_id", + "name": "provider_id", "in": "path", "required": true, "schema": { "type": "string", - "title": "Team Id" + "title": "Provider Id" } }, { @@ -10865,7 +10918,9 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TeamResponse" + "type": "object", + "additionalProperties": true, + "title": "Response Get Sso Provider V1 Auth Sso Admin Providers Provider Id Get" } } } @@ -10884,11 +10939,12 @@ }, "put": { "tags": [ - "Teams" + "SSO Authentication", + "SSO Authentication" ], - "summary": "Update Team", - "description": "Update a team.\n\nArgs:\n team_id: Team UUID\n request: Team update request data\n current_user: Authenticated user context dict with email and permissions\n db: Database session\n\nReturns:\n TeamResponse: Updated team data\n\nRaises:\n HTTPException: If team not found, access denied, or update fails", - "operationId": "update_team_v1_teams__team_id__put", + "summary": "Update Sso Provider", + "description": "Update SSO provider configuration (Admin only).\n\nArgs:\n provider_id: Provider identifier\n provider_data: Updated provider configuration\n db: Database session\n user: Current authenticated user\n\nReturns:\n Updated provider information.\n\nRaises:\n HTTPException: If provider not found or update fails", + "operationId": "update_sso_provider_v1_auth_sso_admin_providers__provider_id__put", "security": [ { "ConfigurableHTTPBearer": [] @@ -10896,12 +10952,654 @@ ], "parameters": [ { - "name": "team_id", + "name": "provider_id", "in": "path", "required": true, "schema": { "type": "string", - "title": "Team Id" + "title": "Provider Id" + } + }, + { + "name": "jwt_token", + "in": "cookie", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Jwt Token" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SSOProviderUpdateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response Update Sso Provider V1 Auth Sso Admin Providers Provider Id Put" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": [ + "SSO Authentication", + "SSO Authentication" + ], + "summary": "Delete Sso Provider", + "description": "Delete SSO provider configuration (Admin only).\n\nArgs:\n provider_id: Provider identifier\n db: Database session\n user: Current authenticated user\n\nReturns:\n Deletion confirmation.\n\nRaises:\n HTTPException: If provider not found", + "operationId": "delete_sso_provider_v1_auth_sso_admin_providers__provider_id__delete", + "security": [ + { + "ConfigurableHTTPBearer": [] + } + ], + "parameters": [ + { + "name": "provider_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Provider Id" + } + }, + { + "name": "jwt_token", + "in": "cookie", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Jwt Token" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response Delete Sso Provider V1 Auth Sso Admin Providers Provider Id Delete" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v1/auth/sso/pending-approvals": { + "get": { + "tags": [ + "SSO Authentication", + "SSO Authentication" + ], + "summary": "List Pending Approvals", + "description": "List pending SSO user approval requests (Admin only).\n\nArgs:\n include_expired: Whether to include expired requests\n db: Database session\n user: Current authenticated admin user\n\nReturns:\n List of pending approval requests", + "operationId": "list_pending_approvals_v1_auth_sso_pending_approvals_get", + "security": [ + { + "ConfigurableHTTPBearer": [] + } + ], + "parameters": [ + { + "name": "include_expired", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Include expired approval requests", + "default": false, + "title": "Include Expired" + }, + "description": "Include expired approval requests" + }, + { + "name": "jwt_token", + "in": "cookie", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Jwt Token" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PendingUserApprovalResponse" + }, + "title": "Response List Pending Approvals V1 Auth Sso Pending Approvals Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v1/auth/sso/pending-approvals/{approval_id}/action": { + "post": { + "tags": [ + "SSO Authentication", + "SSO Authentication" + ], + "summary": "Handle Approval Request", + "description": "Approve or reject a pending SSO user registration (Admin only).\n\nArgs:\n approval_id: ID of the approval request\n request: Approval action (approve/reject) with optional reason/notes\n db: Database session\n user: Current authenticated admin user\n\nReturns:\n Action confirmation message\n\nRaises:\n HTTPException: If approval not found or invalid action", + "operationId": "handle_approval_request_v1_auth_sso_pending_approvals__approval_id__action_post", + "security": [ + { + "ConfigurableHTTPBearer": [] + } + ], + "parameters": [ + { + "name": "approval_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Approval Id" + } + }, + { + "name": "jwt_token", + "in": "cookie", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Jwt Token" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApprovalActionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response Handle Approval Request V1 Auth Sso Pending Approvals Approval Id Action Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v1/teams/": { + "post": { + "tags": [ + "Teams" + ], + "summary": "Create Team", + "description": "Create a new team, optionally seeding it with members.\n\nMembers supplied in the request are routed by the server: an address that\nbelongs to an active user is added to the team directly, anything else is\nsent an invitation. Team, memberships and invitations are written as one\ntransaction, so a bad row fails the whole request rather than leaving a\nhalf-populated team behind.\n\nArgs:\n request: Team creation request data\n background_tasks: Response-scoped background task scheduler\n current_user_ctx: Currently authenticated user context\n db: Database session\n\nReturns:\n TeamCreateResponse: Created team data, plus how each seeded member was resolved\n\nRaises:\n HTTPException 400: Active team with same name exists (platform admin callers).\n HTTPException 403: Team creation disabled; caller is not platform admin.\n HTTPException 409: Active team with same name exists (non-admin; generic message prevents name enumeration).\n HTTPException 500: Unexpected service error.\n\nExamples:\n >>> import asyncio\n >>> asyncio.iscoroutinefunction(create_team)\n True", + "operationId": "create_team_v1_teams__post", + "security": [ + { + "ConfigurableHTTPBearer": [] + } + ], + "parameters": [ + { + "name": "jwt_token", + "in": "cookie", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Jwt Token" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamCreateRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamCreateResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": [ + "Teams" + ], + "summary": "List Teams", + "description": "List teams visible to the caller.\n\n- Administrators see all non-personal teams plus their own personal team (paginated)\n- Regular users see only teams they are a member of (paginated client-side)\n- search_query, when set, narrows either population to teams whose name, slug, or\n description contains it (case-insensitive)\n\nArgs:\n skip: Number of teams to skip for pagination\n limit: Maximum number of teams to return\n cursor: Pagination cursor\n include_pagination: Include pagination metadata\n search_query: Substring filter on name/slug/description\n current_user_ctx: Current user context with permissions and database session\n db: Database session\n\nReturns:\n Union[TeamListResponse, CursorPaginatedTeamsResponse]: List of teams\n\nRaises:\n HTTPException: If there's an error listing teams", + "operationId": "list_teams_v1_teams__get", + "security": [ + { + "ConfigurableHTTPBearer": [] + } + ], + "parameters": [ + { + "name": "skip", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "description": "Number of teams to skip", + "default": 0, + "title": "Skip" + }, + "description": "Number of teams to skip" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 500, + "minimum": 1, + "description": "Number of teams to return", + "default": 50, + "title": "Limit" + }, + "description": "Number of teams to return" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "maxLength": 500, + "pattern": "^[a-zA-Z0-9_=+/-]+$" + }, + { + "type": "null" + } + ], + "description": "Pagination cursor", + "title": "Cursor" + }, + "description": "Pagination cursor" + }, + { + "name": "include_pagination", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Include pagination metadata (cursor)", + "default": false, + "title": "Include Pagination" + }, + "description": "Include pagination metadata (cursor)" + }, + { + "name": "search_query", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "maxLength": 500 + }, + { + "type": "null" + } + ], + "description": "Filter teams by a substring of name, slug, or description", + "title": "Search Query" + }, + "description": "Filter teams by a substring of name, slug, or description" + }, + { + "name": "jwt_token", + "in": "cookie", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Jwt Token" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/TeamListResponse" + }, + { + "$ref": "#/components/schemas/CursorPaginatedTeamsResponse" + } + ], + "title": "Response List Teams V1 Teams Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v1/teams/discover": { + "get": { + "tags": [ + "Teams" + ], + "summary": "Discover Public Teams", + "description": "Discover public teams that can be joined.\n\nReturns public teams that are discoverable to all authenticated users.\nOnly shows teams where the current user is not already a member.\n\nArgs:\n skip: Number of teams to skip for pagination\n limit: Maximum number of teams to return\n current_user_ctx: Current user context with permissions and database session\n db: Database session\n\nReturns:\n List[TeamDiscoveryResponse]: List of discoverable public teams\n\nRaises:\n HTTPException: If there's an error discovering teams", + "operationId": "discover_public_teams_v1_teams_discover_get", + "security": [ + { + "ConfigurableHTTPBearer": [] + } + ], + "parameters": [ + { + "name": "skip", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "description": "Number of teams to skip", + "default": 0, + "title": "Skip" + }, + "description": "Number of teams to skip" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 500, + "minimum": 1, + "description": "Number of teams to return", + "default": 50, + "title": "Limit" + }, + "description": "Number of teams to return" + }, + { + "name": "jwt_token", + "in": "cookie", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Jwt Token" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamDiscoveryResponse" + }, + "title": "Response Discover Public Teams V1 Teams Discover Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v1/teams/{team_id}": { + "get": { + "tags": [ + "Teams" + ], + "summary": "Get Team", + "description": "Get a specific team by ID.\n\nArgs:\n team_id: Team UUID\n current_user: Authenticated user context dict with email and permissions\n db: Database session\n\nReturns:\n TeamResponse: Team data\n\nRaises:\n HTTPException: If team not found or access denied", + "operationId": "get_team_v1_teams__team_id__get", + "security": [ + { + "ConfigurableHTTPBearer": [] + } + ], + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Team Id" + } + }, + { + "name": "jwt_token", + "in": "cookie", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Jwt Token" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "tags": [ + "Teams" + ], + "summary": "Update Team", + "description": "Update a team.\n\nArgs:\n team_id: Team UUID\n request: Team update request data\n current_user: Authenticated user context dict with email and permissions\n db: Database session\n\nReturns:\n TeamResponse: Updated team data\n\nRaises:\n HTTPException: If team not found, access denied, or update fails", + "operationId": "update_team_v1_teams__team_id__put", + "security": [ + { + "ConfigurableHTTPBearer": [] + } + ], + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Team Id" } }, { @@ -30556,347 +31254,7 @@ "schema": { "type": "object", "additionalProperties": true, - "title": "Response Track Query Usage V1 Admin Observability Queries Query Id Use Post" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v1/admin/observability/metrics/percentiles": { - "get": { - "tags": [ - "Admin UI" - ], - "summary": "Get Latency Percentiles", - "description": "Get latency percentiles (p50, p90, p95, p99) over time.\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n interval_minutes: Aggregation interval in minutes (5-1440)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Time-series data with percentiles\n\nRaises:\n HTTPException: 500 if calculation fails", - "operationId": "get_latency_percentiles_v1_admin_observability_metrics_percentiles_get", - "security": [ - { - "ConfigurableHTTPBearer": [] - } - ], - "parameters": [ - { - "name": "hours", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 168, - "minimum": 1, - "description": "Time range in hours", - "default": 24, - "title": "Hours" - }, - "description": "Time range in hours" - }, - { - "name": "interval_minutes", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 1440, - "minimum": 5, - "description": "Aggregation interval in minutes", - "default": 60, - "title": "Interval Minutes" - }, - "description": "Aggregation interval in minutes" - }, - { - "name": "jwt_token", - "in": "cookie", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Jwt Token" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": true, - "title": "Response Get Latency Percentiles V1 Admin Observability Metrics Percentiles Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v1/admin/observability/metrics/timeseries": { - "get": { - "tags": [ - "Admin UI" - ], - "summary": "Get Timeseries Metrics", - "description": "Get time-series metrics (request rate, error rate, throughput).\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n interval_minutes: Aggregation interval in minutes (5-1440)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Time-series data with request counts, error rates, and throughput\n\nRaises:\n HTTPException: 500 if calculation fails", - "operationId": "get_timeseries_metrics_v1_admin_observability_metrics_timeseries_get", - "security": [ - { - "ConfigurableHTTPBearer": [] - } - ], - "parameters": [ - { - "name": "hours", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 168, - "minimum": 1, - "description": "Time range in hours", - "default": 24, - "title": "Hours" - }, - "description": "Time range in hours" - }, - { - "name": "interval_minutes", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 1440, - "minimum": 5, - "description": "Aggregation interval in minutes", - "default": 60, - "title": "Interval Minutes" - }, - "description": "Aggregation interval in minutes" - }, - { - "name": "jwt_token", - "in": "cookie", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Jwt Token" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": true, - "title": "Response Get Timeseries Metrics V1 Admin Observability Metrics Timeseries Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v1/admin/observability/metrics/top-slow": { - "get": { - "tags": [ - "Admin UI" - ], - "summary": "Get Top Slow Endpoints", - "description": "Get top N slowest endpoints by average duration.\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Number of results to return (1-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: List of slowest endpoints with stats\n\nRaises:\n HTTPException: 500 if query fails", - "operationId": "get_top_slow_endpoints_v1_admin_observability_metrics_top_slow_get", - "security": [ - { - "ConfigurableHTTPBearer": [] - } - ], - "parameters": [ - { - "name": "hours", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 168, - "minimum": 1, - "description": "Time range in hours", - "default": 24, - "title": "Hours" - }, - "description": "Time range in hours" - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 500, - "minimum": 1, - "description": "Number of results", - "default": 10, - "title": "Limit" - }, - "description": "Number of results" - }, - { - "name": "jwt_token", - "in": "cookie", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Jwt Token" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": true, - "title": "Response Get Top Slow Endpoints V1 Admin Observability Metrics Top Slow Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v1/admin/observability/metrics/top-volume": { - "get": { - "tags": [ - "Admin UI" - ], - "summary": "Get Top Volume Endpoints", - "description": "Get top N highest volume endpoints by request count.\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Number of results to return (1-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: List of highest volume endpoints with stats\n\nRaises:\n HTTPException: 500 if query fails", - "operationId": "get_top_volume_endpoints_v1_admin_observability_metrics_top_volume_get", - "security": [ - { - "ConfigurableHTTPBearer": [] - } - ], - "parameters": [ - { - "name": "hours", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 168, - "minimum": 1, - "description": "Time range in hours", - "default": 24, - "title": "Hours" - }, - "description": "Time range in hours" - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 500, - "minimum": 1, - "description": "Number of results", - "default": 10, - "title": "Limit" - }, - "description": "Number of results" - }, - { - "name": "jwt_token", - "in": "cookie", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Jwt Token" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": true, - "title": "Response Get Top Volume Endpoints V1 Admin Observability Metrics Top Volume Get" + "title": "Response Track Query Usage V1 Admin Observability Queries Query Id Use Post" } } } @@ -30914,14 +31272,14 @@ } } }, - "/v1/admin/observability/metrics/top-errors": { + "/v1/admin/observability/metrics/percentiles": { "get": { "tags": [ "Admin UI" ], - "summary": "Get Top Error Endpoints", - "description": "Get top N error-prone endpoints by error count and rate.\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Number of results to return (1-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: List of error-prone endpoints with stats\n\nRaises:\n HTTPException: 500 if query fails", - "operationId": "get_top_error_endpoints_v1_admin_observability_metrics_top_errors_get", + "summary": "Get Latency Percentiles", + "description": "Get latency percentiles (p50, p90, p95, p99) over time.\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n interval_minutes: Aggregation interval in minutes (5-1440)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Time-series data with percentiles\n\nRaises:\n HTTPException: 500 if calculation fails", + "operationId": "get_latency_percentiles_v1_admin_observability_metrics_percentiles_get", "security": [ { "ConfigurableHTTPBearer": [] @@ -30943,18 +31301,18 @@ "description": "Time range in hours" }, { - "name": "limit", + "name": "interval_minutes", "in": "query", "required": false, "schema": { "type": "integer", - "maximum": 500, - "minimum": 1, - "description": "Number of results", - "default": 10, - "title": "Limit" + "maximum": 1440, + "minimum": 5, + "description": "Aggregation interval in minutes", + "default": 60, + "title": "Interval Minutes" }, - "description": "Number of results" + "description": "Aggregation interval in minutes" }, { "name": "jwt_token", @@ -30981,7 +31339,7 @@ "schema": { "type": "object", "additionalProperties": true, - "title": "Response Get Top Error Endpoints V1 Admin Observability Metrics Top Errors Get" + "title": "Response Get Latency Percentiles V1 Admin Observability Metrics Percentiles Get" } } } @@ -30999,14 +31357,14 @@ } } }, - "/v1/admin/observability/metrics/heatmap": { + "/v1/admin/observability/metrics/timeseries": { "get": { "tags": [ "Admin UI" ], - "summary": "Get Latency Heatmap", - "description": "Get latency distribution heatmap data.\n\nUses PostgreSQL SQL aggregation for efficient computation when available,\nfalls back to Python for SQLite.\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n time_buckets: Number of time buckets (10-100)\n latency_buckets: Number of latency buckets (5-50)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Heatmap data with time and latency dimensions\n\nRaises:\n HTTPException: 500 if calculation fails", - "operationId": "get_latency_heatmap_v1_admin_observability_metrics_heatmap_get", + "summary": "Get Timeseries Metrics", + "description": "Get time-series metrics (request rate, error rate, throughput).\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n interval_minutes: Aggregation interval in minutes (5-1440)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Time-series data with request counts, error rates, and throughput\n\nRaises:\n HTTPException: 500 if calculation fails", + "operationId": "get_timeseries_metrics_v1_admin_observability_metrics_timeseries_get", "security": [ { "ConfigurableHTTPBearer": [] @@ -31028,32 +31386,18 @@ "description": "Time range in hours" }, { - "name": "time_buckets", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 10, - "description": "Number of time buckets", - "default": 24, - "title": "Time Buckets" - }, - "description": "Number of time buckets" - }, - { - "name": "latency_buckets", + "name": "interval_minutes", "in": "query", "required": false, "schema": { "type": "integer", - "maximum": 50, + "maximum": 1440, "minimum": 5, - "description": "Number of latency buckets", - "default": 20, - "title": "Latency Buckets" + "description": "Aggregation interval in minutes", + "default": 60, + "title": "Interval Minutes" }, - "description": "Number of latency buckets" + "description": "Aggregation interval in minutes" }, { "name": "jwt_token", @@ -31080,7 +31424,7 @@ "schema": { "type": "object", "additionalProperties": true, - "title": "Response Get Latency Heatmap V1 Admin Observability Metrics Heatmap Get" + "title": "Response Get Timeseries Metrics V1 Admin Observability Metrics Timeseries Get" } } } @@ -31098,14 +31442,14 @@ } } }, - "/v1/admin/observability/tools/usage": { + "/v1/admin/observability/metrics/top-slow": { "get": { "tags": [ "Admin UI" ], - "summary": "Get Tool Usage", - "description": "Get tool usage frequency statistics.\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Maximum number of tools to return (5-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Tool usage statistics with counts and percentages\n\nRaises:\n HTTPException: 500 if calculation fails", - "operationId": "get_tool_usage_v1_admin_observability_tools_usage_get", + "summary": "Get Top Slow Endpoints", + "description": "Get top N slowest endpoints by average duration.\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Number of results to return (1-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: List of slowest endpoints with stats\n\nRaises:\n HTTPException: 500 if query fails", + "operationId": "get_top_slow_endpoints_v1_admin_observability_metrics_top_slow_get", "security": [ { "ConfigurableHTTPBearer": [] @@ -31133,12 +31477,12 @@ "schema": { "type": "integer", "maximum": 500, - "minimum": 5, - "description": "Number of tools to return", - "default": 20, + "minimum": 1, + "description": "Number of results", + "default": 10, "title": "Limit" }, - "description": "Number of tools to return" + "description": "Number of results" }, { "name": "jwt_token", @@ -31165,7 +31509,7 @@ "schema": { "type": "object", "additionalProperties": true, - "title": "Response Get Tool Usage V1 Admin Observability Tools Usage Get" + "title": "Response Get Top Slow Endpoints V1 Admin Observability Metrics Top Slow Get" } } } @@ -31183,14 +31527,14 @@ } } }, - "/v1/admin/observability/tools/performance": { + "/v1/admin/observability/metrics/top-volume": { "get": { "tags": [ "Admin UI" ], - "summary": "Get Tool Performance", - "description": "Get tool performance metrics (avg, min, max duration).\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Maximum number of tools to return (5-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Tool performance metrics\n\nRaises:\n HTTPException: 500 if calculation fails", - "operationId": "get_tool_performance_v1_admin_observability_tools_performance_get", + "summary": "Get Top Volume Endpoints", + "description": "Get top N highest volume endpoints by request count.\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Number of results to return (1-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: List of highest volume endpoints with stats\n\nRaises:\n HTTPException: 500 if query fails", + "operationId": "get_top_volume_endpoints_v1_admin_observability_metrics_top_volume_get", "security": [ { "ConfigurableHTTPBearer": [] @@ -31218,12 +31562,12 @@ "schema": { "type": "integer", "maximum": 500, - "minimum": 5, - "description": "Number of tools to return", - "default": 20, + "minimum": 1, + "description": "Number of results", + "default": 10, "title": "Limit" }, - "description": "Number of tools to return" + "description": "Number of results" }, { "name": "jwt_token", @@ -31250,7 +31594,7 @@ "schema": { "type": "object", "additionalProperties": true, - "title": "Response Get Tool Performance V1 Admin Observability Tools Performance Get" + "title": "Response Get Top Volume Endpoints V1 Admin Observability Metrics Top Volume Get" } } } @@ -31268,14 +31612,14 @@ } } }, - "/v1/admin/observability/tools/errors": { + "/v1/admin/observability/metrics/top-errors": { "get": { "tags": [ "Admin UI" ], - "summary": "Get Tool Errors", - "description": "Get tool error rates and statistics.\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Maximum number of tools to return (5-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Tool error statistics\n\nRaises:\n HTTPException: 500 if calculation fails", - "operationId": "get_tool_errors_v1_admin_observability_tools_errors_get", + "summary": "Get Top Error Endpoints", + "description": "Get top N error-prone endpoints by error count and rate.\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Number of results to return (1-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: List of error-prone endpoints with stats\n\nRaises:\n HTTPException: 500 if query fails", + "operationId": "get_top_error_endpoints_v1_admin_observability_metrics_top_errors_get", "security": [ { "ConfigurableHTTPBearer": [] @@ -31303,12 +31647,12 @@ "schema": { "type": "integer", "maximum": 500, - "minimum": 5, - "description": "Number of tools to return", - "default": 20, + "minimum": 1, + "description": "Number of results", + "default": 10, "title": "Limit" }, - "description": "Number of tools to return" + "description": "Number of results" }, { "name": "jwt_token", @@ -31335,7 +31679,7 @@ "schema": { "type": "object", "additionalProperties": true, - "title": "Response Get Tool Errors V1 Admin Observability Tools Errors Get" + "title": "Response Get Top Error Endpoints V1 Admin Observability Metrics Top Errors Get" } } } @@ -31353,14 +31697,14 @@ } } }, - "/v1/admin/observability/tools/chains": { + "/v1/admin/observability/metrics/heatmap": { "get": { "tags": [ "Admin UI" ], - "summary": "Get Tool Chains", - "description": "Get tool chain analysis (which tools are invoked together in the same trace).\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Maximum number of chains to return (5-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Tool chain statistics showing common tool sequences\n\nRaises:\n HTTPException: 500 if calculation fails", - "operationId": "get_tool_chains_v1_admin_observability_tools_chains_get", + "summary": "Get Latency Heatmap", + "description": "Get latency distribution heatmap data.\n\nUses PostgreSQL SQL aggregation for efficient computation when available,\nfalls back to Python for SQLite.\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n time_buckets: Number of time buckets (10-100)\n latency_buckets: Number of latency buckets (5-50)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Heatmap data with time and latency dimensions\n\nRaises:\n HTTPException: 500 if calculation fails", + "operationId": "get_latency_heatmap_v1_admin_observability_metrics_heatmap_get", "security": [ { "ConfigurableHTTPBearer": [] @@ -31382,18 +31726,32 @@ "description": "Time range in hours" }, { - "name": "limit", + "name": "time_buckets", "in": "query", "required": false, "schema": { "type": "integer", - "maximum": 500, + "maximum": 100, + "minimum": 10, + "description": "Number of time buckets", + "default": 24, + "title": "Time Buckets" + }, + "description": "Number of time buckets" + }, + { + "name": "latency_buckets", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 50, "minimum": 5, - "description": "Number of chains to return", + "description": "Number of latency buckets", "default": 20, - "title": "Limit" + "title": "Latency Buckets" }, - "description": "Number of chains to return" + "description": "Number of latency buckets" }, { "name": "jwt_token", @@ -31420,7 +31778,7 @@ "schema": { "type": "object", "additionalProperties": true, - "title": "Response Get Tool Chains V1 Admin Observability Tools Chains Get" + "title": "Response Get Latency Heatmap V1 Admin Observability Metrics Heatmap Get" } } } @@ -31438,20 +31796,48 @@ } } }, - "/v1/admin/observability/tools/partial": { + "/v1/admin/observability/tools/usage": { "get": { "tags": [ "Admin UI" ], - "summary": "Get Tools Partial", - "description": "Render the tool invocation metrics dashboard HTML partial.\n\nArgs:\n request: FastAPI request object\n _user: Authenticated user (required by dependency)\n _db: Database session for permission checks.\n\nReturns:\n HTMLResponse: Rendered tool metrics dashboard partial", - "operationId": "get_tools_partial_v1_admin_observability_tools_partial_get", + "summary": "Get Tool Usage", + "description": "Get tool usage frequency statistics.\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Maximum number of tools to return (5-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Tool usage statistics with counts and percentages\n\nRaises:\n HTTPException: 500 if calculation fails", + "operationId": "get_tool_usage_v1_admin_observability_tools_usage_get", "security": [ { "ConfigurableHTTPBearer": [] } ], "parameters": [ + { + "name": "hours", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 168, + "minimum": 1, + "description": "Time range in hours", + "default": 24, + "title": "Hours" + }, + "description": "Time range in hours" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 500, + "minimum": 5, + "description": "Number of tools to return", + "default": 20, + "title": "Limit" + }, + "description": "Number of tools to return" + }, { "name": "jwt_token", "in": "cookie", @@ -31473,9 +31859,11 @@ "200": { "description": "Successful Response", "content": { - "text/html": { + "application/json": { "schema": { - "type": "string" + "type": "object", + "additionalProperties": true, + "title": "Response Get Tool Usage V1 Admin Observability Tools Usage Get" } } } @@ -31493,14 +31881,14 @@ } } }, - "/v1/admin/observability/prompts/usage": { + "/v1/admin/observability/tools/performance": { "get": { "tags": [ "Admin UI" ], - "summary": "Get Prompt Usage", - "description": "Get prompt rendering frequency statistics.\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Maximum number of prompts to return (5-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Prompt usage statistics with counts and percentages\n\nRaises:\n HTTPException: 500 if calculation fails", - "operationId": "get_prompt_usage_v1_admin_observability_prompts_usage_get", + "summary": "Get Tool Performance", + "description": "Get tool performance metrics (avg, min, max duration).\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Maximum number of tools to return (5-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Tool performance metrics\n\nRaises:\n HTTPException: 500 if calculation fails", + "operationId": "get_tool_performance_v1_admin_observability_tools_performance_get", "security": [ { "ConfigurableHTTPBearer": [] @@ -31529,11 +31917,11 @@ "type": "integer", "maximum": 500, "minimum": 5, - "description": "Number of prompts to return", + "description": "Number of tools to return", "default": 20, "title": "Limit" }, - "description": "Number of prompts to return" + "description": "Number of tools to return" }, { "name": "jwt_token", @@ -31560,7 +31948,7 @@ "schema": { "type": "object", "additionalProperties": true, - "title": "Response Get Prompt Usage V1 Admin Observability Prompts Usage Get" + "title": "Response Get Tool Performance V1 Admin Observability Tools Performance Get" } } } @@ -31578,14 +31966,14 @@ } } }, - "/v1/admin/observability/prompts/performance": { + "/v1/admin/observability/tools/errors": { "get": { "tags": [ "Admin UI" ], - "summary": "Get Prompt Performance", - "description": "Get prompt performance metrics (avg, min, max duration).\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Maximum number of prompts to return (5-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Prompt performance metrics\n\nRaises:\n HTTPException: 500 if calculation fails", - "operationId": "get_prompt_performance_v1_admin_observability_prompts_performance_get", + "summary": "Get Tool Errors", + "description": "Get tool error rates and statistics.\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Maximum number of tools to return (5-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Tool error statistics\n\nRaises:\n HTTPException: 500 if calculation fails", + "operationId": "get_tool_errors_v1_admin_observability_tools_errors_get", "security": [ { "ConfigurableHTTPBearer": [] @@ -31614,11 +32002,11 @@ "type": "integer", "maximum": 500, "minimum": 5, - "description": "Number of prompts to return", + "description": "Number of tools to return", "default": 20, "title": "Limit" }, - "description": "Number of prompts to return" + "description": "Number of tools to return" }, { "name": "jwt_token", @@ -31645,7 +32033,7 @@ "schema": { "type": "object", "additionalProperties": true, - "title": "Response Get Prompt Performance V1 Admin Observability Prompts Performance Get" + "title": "Response Get Tool Errors V1 Admin Observability Tools Errors Get" } } } @@ -31663,14 +32051,14 @@ } } }, - "/v1/admin/observability/prompts/errors": { + "/v1/admin/observability/tools/chains": { "get": { "tags": [ "Admin UI" ], - "summary": "Get Prompts Errors", - "description": "Get prompt error rates.\n\nArgs:\n hours: Time range in hours to analyze\n limit: Maximum number of prompts to return\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Prompt error statistics", - "operationId": "get_prompts_errors_v1_admin_observability_prompts_errors_get", + "summary": "Get Tool Chains", + "description": "Get tool chain analysis (which tools are invoked together in the same trace).\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Maximum number of chains to return (5-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Tool chain statistics showing common tool sequences\n\nRaises:\n HTTPException: 500 if calculation fails", + "operationId": "get_tool_chains_v1_admin_observability_tools_chains_get", "security": [ { "ConfigurableHTTPBearer": [] @@ -31683,6 +32071,8 @@ "required": false, "schema": { "type": "integer", + "maximum": 168, + "minimum": 1, "description": "Time range in hours", "default": 24, "title": "Hours" @@ -31695,11 +32085,13 @@ "required": false, "schema": { "type": "integer", - "description": "Maximum number of results", + "maximum": 500, + "minimum": 5, + "description": "Number of chains to return", "default": 20, "title": "Limit" }, - "description": "Maximum number of results" + "description": "Number of chains to return" }, { "name": "jwt_token", @@ -31726,7 +32118,7 @@ "schema": { "type": "object", "additionalProperties": true, - "title": "Response Get Prompts Errors V1 Admin Observability Prompts Errors Get" + "title": "Response Get Tool Chains V1 Admin Observability Tools Chains Get" } } } @@ -31744,14 +32136,14 @@ } } }, - "/v1/admin/observability/prompts/partial": { + "/v1/admin/observability/tools/partial": { "get": { "tags": [ "Admin UI" ], - "summary": "Get Prompts Partial", - "description": "Render the prompt rendering metrics dashboard HTML partial.\n\nArgs:\n request: FastAPI request object\n _user: Authenticated user (required by dependency)\n _db: Database session for permission checks.\n\nReturns:\n HTMLResponse: Rendered prompt metrics dashboard partial", - "operationId": "get_prompts_partial_v1_admin_observability_prompts_partial_get", + "summary": "Get Tools Partial", + "description": "Render the tool invocation metrics dashboard HTML partial.\n\nArgs:\n request: FastAPI request object\n _user: Authenticated user (required by dependency)\n _db: Database session for permission checks.\n\nReturns:\n HTMLResponse: Rendered tool metrics dashboard partial", + "operationId": "get_tools_partial_v1_admin_observability_tools_partial_get", "security": [ { "ConfigurableHTTPBearer": [] @@ -31799,14 +32191,14 @@ } } }, - "/v1/admin/observability/resources/usage": { + "/v1/admin/observability/prompts/usage": { "get": { "tags": [ "Admin UI" ], - "summary": "Get Resource Usage", - "description": "Get resource fetch frequency statistics.\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Maximum number of resources to return (5-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Resource usage statistics with counts and percentages\n\nRaises:\n HTTPException: 500 if calculation fails", - "operationId": "get_resource_usage_v1_admin_observability_resources_usage_get", + "summary": "Get Prompt Usage", + "description": "Get prompt rendering frequency statistics.\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Maximum number of prompts to return (5-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Prompt usage statistics with counts and percentages\n\nRaises:\n HTTPException: 500 if calculation fails", + "operationId": "get_prompt_usage_v1_admin_observability_prompts_usage_get", "security": [ { "ConfigurableHTTPBearer": [] @@ -31835,11 +32227,11 @@ "type": "integer", "maximum": 500, "minimum": 5, - "description": "Number of resources to return", + "description": "Number of prompts to return", "default": 20, "title": "Limit" }, - "description": "Number of resources to return" + "description": "Number of prompts to return" }, { "name": "jwt_token", @@ -31866,7 +32258,7 @@ "schema": { "type": "object", "additionalProperties": true, - "title": "Response Get Resource Usage V1 Admin Observability Resources Usage Get" + "title": "Response Get Prompt Usage V1 Admin Observability Prompts Usage Get" } } } @@ -31884,14 +32276,14 @@ } } }, - "/v1/admin/observability/resources/performance": { + "/v1/admin/observability/prompts/performance": { "get": { "tags": [ "Admin UI" ], - "summary": "Get Resource Performance", - "description": "Get resource performance metrics (avg, min, max duration).\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Maximum number of resources to return (5-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Resource performance metrics\n\nRaises:\n HTTPException: 500 if calculation fails", - "operationId": "get_resource_performance_v1_admin_observability_resources_performance_get", + "summary": "Get Prompt Performance", + "description": "Get prompt performance metrics (avg, min, max duration).\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Maximum number of prompts to return (5-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Prompt performance metrics\n\nRaises:\n HTTPException: 500 if calculation fails", + "operationId": "get_prompt_performance_v1_admin_observability_prompts_performance_get", "security": [ { "ConfigurableHTTPBearer": [] @@ -31920,11 +32312,11 @@ "type": "integer", "maximum": 500, "minimum": 5, - "description": "Number of resources to return", + "description": "Number of prompts to return", "default": 20, "title": "Limit" }, - "description": "Number of resources to return" + "description": "Number of prompts to return" }, { "name": "jwt_token", @@ -31951,7 +32343,7 @@ "schema": { "type": "object", "additionalProperties": true, - "title": "Response Get Resource Performance V1 Admin Observability Resources Performance Get" + "title": "Response Get Prompt Performance V1 Admin Observability Prompts Performance Get" } } } @@ -31969,14 +32361,14 @@ } } }, - "/v1/admin/observability/resources/errors": { + "/v1/admin/observability/prompts/errors": { "get": { "tags": [ "Admin UI" ], - "summary": "Get Resources Errors", - "description": "Get resource error rates.\n\nArgs:\n hours: Time range in hours to analyze\n limit: Maximum number of resources to return\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Resource error statistics", - "operationId": "get_resources_errors_v1_admin_observability_resources_errors_get", + "summary": "Get Prompts Errors", + "description": "Get prompt error rates.\n\nArgs:\n hours: Time range in hours to analyze\n limit: Maximum number of prompts to return\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Prompt error statistics", + "operationId": "get_prompts_errors_v1_admin_observability_prompts_errors_get", "security": [ { "ConfigurableHTTPBearer": [] @@ -32032,7 +32424,7 @@ "schema": { "type": "object", "additionalProperties": true, - "title": "Response Get Resources Errors V1 Admin Observability Resources Errors Get" + "title": "Response Get Prompts Errors V1 Admin Observability Prompts Errors Get" } } } @@ -32050,14 +32442,14 @@ } } }, - "/v1/admin/observability/resources/partial": { + "/v1/admin/observability/prompts/partial": { "get": { "tags": [ "Admin UI" ], - "summary": "Get Resources Partial", - "description": "Render the resource fetch metrics dashboard HTML partial.\n\nArgs:\n request: FastAPI request object\n _user: Authenticated user (required by dependency)\n _db: Database session for permission checks.\n\nReturns:\n HTMLResponse: Rendered resource metrics dashboard partial", - "operationId": "get_resources_partial_v1_admin_observability_resources_partial_get", + "summary": "Get Prompts Partial", + "description": "Render the prompt rendering metrics dashboard HTML partial.\n\nArgs:\n request: FastAPI request object\n _user: Authenticated user (required by dependency)\n _db: Database session for permission checks.\n\nReturns:\n HTMLResponse: Rendered prompt metrics dashboard partial", + "operationId": "get_prompts_partial_v1_admin_observability_prompts_partial_get", "security": [ { "ConfigurableHTTPBearer": [] @@ -32105,20 +32497,48 @@ } } }, - "/v1/admin/performance/stats": { + "/v1/admin/observability/resources/usage": { "get": { "tags": [ "Admin UI" ], - "summary": "Get Performance Stats", - "description": "Get comprehensive performance metrics for the dashboard.\n\nReturns either an HTML partial for HTMX requests or JSON for API requests.\nIncludes system metrics, request metrics, worker status, and cache stats.\n\nArgs:\n request: FastAPI request object\n db: Database session dependency\n _user: Authenticated user (required by dependency)\n\nReturns:\n HTMLResponse or JSONResponse: Performance dashboard data\n\nRaises:\n HTTPException: 404 if performance tracking is disabled, 500 on retrieval error", - "operationId": "get_performance_stats_v1_admin_performance_stats_get", + "summary": "Get Resource Usage", + "description": "Get resource fetch frequency statistics.\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Maximum number of resources to return (5-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Resource usage statistics with counts and percentages\n\nRaises:\n HTTPException: 500 if calculation fails", + "operationId": "get_resource_usage_v1_admin_observability_resources_usage_get", "security": [ { "ConfigurableHTTPBearer": [] } ], "parameters": [ + { + "name": "hours", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 168, + "minimum": 1, + "description": "Time range in hours", + "default": 24, + "title": "Hours" + }, + "description": "Time range in hours" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 500, + "minimum": 5, + "description": "Number of resources to return", + "default": 20, + "title": "Limit" + }, + "description": "Number of resources to return" + }, { "name": "jwt_token", "in": "cookie", @@ -32140,9 +32560,11 @@ "200": { "description": "Successful Response", "content": { - "text/html": { + "application/json": { "schema": { - "type": "string" + "type": "object", + "additionalProperties": true, + "title": "Response Get Resource Usage V1 Admin Observability Resources Usage Get" } } } @@ -32160,20 +32582,48 @@ } } }, - "/v1/admin/performance/system": { + "/v1/admin/observability/resources/performance": { "get": { "tags": [ "Admin UI" ], - "summary": "Get Performance System", - "description": "Get current system resource metrics.\n\nArgs:\n db: Database session dependency\n _user: Authenticated user (required by dependency)\n\nReturns:\n JSONResponse: System metrics (CPU, memory, disk, network)\n\nRaises:\n HTTPException: 404 if performance tracking is disabled", - "operationId": "get_performance_system_v1_admin_performance_system_get", + "summary": "Get Resource Performance", + "description": "Get resource performance metrics (avg, min, max duration).\n\nArgs:\n request: FastAPI request object\n hours: Number of hours to look back (1-168)\n limit: Maximum number of resources to return (5-pagination_max_page_size)\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Resource performance metrics\n\nRaises:\n HTTPException: 500 if calculation fails", + "operationId": "get_resource_performance_v1_admin_observability_resources_performance_get", "security": [ { "ConfigurableHTTPBearer": [] } ], "parameters": [ + { + "name": "hours", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 168, + "minimum": 1, + "description": "Time range in hours", + "default": 24, + "title": "Hours" + }, + "description": "Time range in hours" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 500, + "minimum": 5, + "description": "Number of resources to return", + "default": 20, + "title": "Limit" + }, + "description": "Number of resources to return" + }, { "name": "jwt_token", "in": "cookie", @@ -32196,7 +32646,11 @@ "description": "Successful Response", "content": { "application/json": { - "schema": {} + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response Get Resource Performance V1 Admin Observability Resources Performance Get" + } } } }, @@ -32213,20 +32667,44 @@ } } }, - "/v1/admin/performance/workers": { + "/v1/admin/observability/resources/errors": { "get": { "tags": [ "Admin UI" ], - "summary": "Get Performance Workers", - "description": "Get metrics for all worker processes.\n\nArgs:\n db: Database session dependency\n _user: Authenticated user (required by dependency)\n\nReturns:\n JSONResponse: List of worker metrics\n\nRaises:\n HTTPException: 404 if performance tracking is disabled", - "operationId": "get_performance_workers_v1_admin_performance_workers_get", + "summary": "Get Resources Errors", + "description": "Get resource error rates.\n\nArgs:\n hours: Time range in hours to analyze\n limit: Maximum number of resources to return\n _user: Authenticated user (required by dependency)\n db: Database session for permission checks.\n\nReturns:\n dict: Resource error statistics", + "operationId": "get_resources_errors_v1_admin_observability_resources_errors_get", "security": [ { "ConfigurableHTTPBearer": [] } ], "parameters": [ + { + "name": "hours", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "description": "Time range in hours", + "default": 24, + "title": "Hours" + }, + "description": "Time range in hours" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "description": "Maximum number of results", + "default": 20, + "title": "Limit" + }, + "description": "Maximum number of results" + }, { "name": "jwt_token", "in": "cookie", @@ -32249,7 +32727,11 @@ "description": "Successful Response", "content": { "application/json": { - "schema": {} + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response Get Resources Errors V1 Admin Observability Resources Errors Get" + } } } }, @@ -32266,14 +32748,14 @@ } } }, - "/v1/admin/performance/requests": { + "/v1/admin/observability/resources/partial": { "get": { "tags": [ "Admin UI" ], - "summary": "Get Performance Requests", - "description": "Get HTTP request performance metrics.\n\nArgs:\n db: Database session dependency\n _user: Authenticated user (required by dependency)\n\nReturns:\n JSONResponse: Request metrics from Prometheus\n\nRaises:\n HTTPException: 404 if performance tracking is disabled", - "operationId": "get_performance_requests_v1_admin_performance_requests_get", + "summary": "Get Resources Partial", + "description": "Render the resource fetch metrics dashboard HTML partial.\n\nArgs:\n request: FastAPI request object\n _user: Authenticated user (required by dependency)\n _db: Database session for permission checks.\n\nReturns:\n HTMLResponse: Rendered resource metrics dashboard partial", + "operationId": "get_resources_partial_v1_admin_observability_resources_partial_get", "security": [ { "ConfigurableHTTPBearer": [] @@ -32301,8 +32783,10 @@ "200": { "description": "Successful Response", "content": { - "application/json": { - "schema": {} + "text/html": { + "schema": { + "type": "string" + } } } }, @@ -32319,14 +32803,14 @@ } } }, - "/v1/admin/performance/cache": { + "/v1/admin/performance/stats": { "get": { "tags": [ "Admin UI" ], - "summary": "Get Performance Cache", - "description": "Get Redis cache metrics.\n\nArgs:\n db: Database session dependency\n _user: Authenticated user (required by dependency)\n\nReturns:\n JSONResponse: Redis cache metrics\n\nRaises:\n HTTPException: 404 if performance tracking is disabled", - "operationId": "get_performance_cache_v1_admin_performance_cache_get", + "summary": "Get Performance Stats", + "description": "Get comprehensive performance metrics for the dashboard.\n\nReturns either an HTML partial for HTMX requests or JSON for API requests.\nIncludes system metrics, request metrics, worker status, and cache stats.\n\nArgs:\n request: FastAPI request object\n db: Database session dependency\n _user: Authenticated user (required by dependency)\n\nReturns:\n HTMLResponse or JSONResponse: Performance dashboard data\n\nRaises:\n HTTPException: 404 if performance tracking is disabled, 500 on retrieval error", + "operationId": "get_performance_stats_v1_admin_performance_stats_get", "security": [ { "ConfigurableHTTPBearer": [] @@ -32354,8 +32838,10 @@ "200": { "description": "Successful Response", "content": { - "application/json": { - "schema": {} + "text/html": { + "schema": { + "type": "string" + } } } }, @@ -32372,47 +32858,20 @@ } } }, - "/v1/admin/performance/history": { + "/v1/admin/performance/system": { "get": { "tags": [ "Admin UI" ], - "summary": "Get Performance History", - "description": "Get historical performance aggregates.\n\nArgs:\n period_type: Aggregation type (hourly, daily)\n hours: Hours of history to retrieve\n db: Database session dependency\n _user: Authenticated user (required by dependency)\n\nReturns:\n JSONResponse: Historical performance aggregates\n\nRaises:\n HTTPException: 404 if performance tracking is disabled", - "operationId": "get_performance_history_v1_admin_performance_history_get", + "summary": "Get Performance System", + "description": "Get current system resource metrics.\n\nArgs:\n db: Database session dependency\n _user: Authenticated user (required by dependency)\n\nReturns:\n JSONResponse: System metrics (CPU, memory, disk, network)\n\nRaises:\n HTTPException: 404 if performance tracking is disabled", + "operationId": "get_performance_system_v1_admin_performance_system_get", "security": [ { "ConfigurableHTTPBearer": [] } ], "parameters": [ - { - "name": "period_type", - "in": "query", - "required": false, - "schema": { - "type": "string", - "pattern": "^(hourly|daily)$", - "description": "Aggregation period: hourly or daily", - "default": "hourly", - "title": "Period Type" - }, - "description": "Aggregation period: hourly or daily" - }, - { - "name": "hours", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 168, - "minimum": 1, - "description": "Number of hours to look back", - "default": 24, - "title": "Hours" - }, - "description": "Number of hours to look back" - }, { "name": "jwt_token", "in": "cookie", @@ -32452,14 +32911,14 @@ } } }, - "/v1/admin/runtime/mcp-mode": { + "/v1/admin/performance/workers": { "get": { "tags": [ - "Runtime Admin" + "Admin UI" ], - "summary": "Get Mcp Mode", - "description": "Return the current MCP runtime mode and override state.\n\nArgs:\n user: Authenticated user context (must have ``admin.system_config``).\n\nReturns:\n State payload describing boot mode, effective mode, override state, and propagation status.", - "operationId": "get_mcp_mode_v1_admin_runtime_mcp_mode_get", + "summary": "Get Performance Workers", + "description": "Get metrics for all worker processes.\n\nArgs:\n db: Database session dependency\n _user: Authenticated user (required by dependency)\n\nReturns:\n JSONResponse: List of worker metrics\n\nRaises:\n HTTPException: 404 if performance tracking is disabled", + "operationId": "get_performance_workers_v1_admin_performance_workers_get", "security": [ { "ConfigurableHTTPBearer": [] @@ -32488,11 +32947,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "type": "object", - "additionalProperties": true, - "title": "Response Get Mcp Mode V1 Admin Runtime Mcp Mode Get" - } + "schema": {} } } }, @@ -32507,14 +32962,16 @@ } } } - }, - "patch": { + } + }, + "/v1/admin/performance/requests": { + "get": { "tags": [ - "Runtime Admin" + "Admin UI" ], - "summary": "Patch Mcp Mode", - "description": "Flip the public ``/mcp`` ingress between ``shadow`` and ``edge``.\n\nArgs:\n body: Request body containing the target mode.\n request: FastAPI request (used for reverse-proxy header detection).\n user: Authenticated user context (must have ``admin.system_config``).\n db: Request-scoped DB session for the audit write.\n\nReturns:\n Updated state payload after the flip is applied locally and published.", - "operationId": "patch_mcp_mode_v1_admin_runtime_mcp_mode_patch", + "summary": "Get Performance Requests", + "description": "Get HTTP request performance metrics.\n\nArgs:\n db: Database session dependency\n _user: Authenticated user (required by dependency)\n\nReturns:\n JSONResponse: Request metrics from Prometheus\n\nRaises:\n HTTPException: 404 if performance tracking is disabled", + "operationId": "get_performance_requests_v1_admin_performance_requests_get", "security": [ { "ConfigurableHTTPBearer": [] @@ -32538,26 +32995,12 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuntimeModeUpdate" - } - } - } - }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { - "schema": { - "type": "object", - "additionalProperties": true, - "title": "Response Patch Mcp Mode V1 Admin Runtime Mcp Mode Patch" - } + "schema": {} } } }, @@ -32574,14 +33017,14 @@ } } }, - "/v1/admin/runtime/a2a-mode": { + "/v1/admin/performance/cache": { "get": { "tags": [ - "Runtime Admin" + "Admin UI" ], - "summary": "Get A2A Mode", - "description": "Return the current A2A runtime mode and override state.\n\nArgs:\n user: Authenticated user context (must have ``admin.system_config``).\n\nReturns:\n State payload describing boot mode, effective mode, override state, and propagation status.", - "operationId": "get_a2a_mode_v1_admin_runtime_a2a_mode_get", + "summary": "Get Performance Cache", + "description": "Get Redis cache metrics.\n\nArgs:\n db: Database session dependency\n _user: Authenticated user (required by dependency)\n\nReturns:\n JSONResponse: Redis cache metrics\n\nRaises:\n HTTPException: 404 if performance tracking is disabled", + "operationId": "get_performance_cache_v1_admin_performance_cache_get", "security": [ { "ConfigurableHTTPBearer": [] @@ -32610,11 +33053,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - "type": "object", - "additionalProperties": true, - "title": "Response Get A2A Mode V1 Admin Runtime A2A Mode Get" - } + "schema": {} } } }, @@ -32629,20 +33068,49 @@ } } } - }, - "patch": { + } + }, + "/v1/admin/performance/history": { + "get": { "tags": [ - "Runtime Admin" + "Admin UI" ], - "summary": "Patch A2A Mode", - "description": "Flip the registered-A2A invocation path between Python and the Rust runtime.\n\nArgs:\n body: Request body containing the target mode.\n request: FastAPI request (used for reverse-proxy header detection).\n user: Authenticated user context (must have ``admin.system_config``).\n db: Request-scoped DB session for the audit write.\n\nReturns:\n Updated state payload after the flip is applied locally and published.", - "operationId": "patch_a2a_mode_v1_admin_runtime_a2a_mode_patch", + "summary": "Get Performance History", + "description": "Get historical performance aggregates.\n\nArgs:\n period_type: Aggregation type (hourly, daily)\n hours: Hours of history to retrieve\n db: Database session dependency\n _user: Authenticated user (required by dependency)\n\nReturns:\n JSONResponse: Historical performance aggregates\n\nRaises:\n HTTPException: 404 if performance tracking is disabled", + "operationId": "get_performance_history_v1_admin_performance_history_get", "security": [ { "ConfigurableHTTPBearer": [] } ], "parameters": [ + { + "name": "period_type", + "in": "query", + "required": false, + "schema": { + "type": "string", + "pattern": "^(hourly|daily)$", + "description": "Aggregation period: hourly or daily", + "default": "hourly", + "title": "Period Type" + }, + "description": "Aggregation period: hourly or daily" + }, + { + "name": "hours", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 168, + "minimum": 1, + "description": "Number of hours to look back", + "default": 24, + "title": "Hours" + }, + "description": "Number of hours to look back" + }, { "name": "jwt_token", "in": "cookie", @@ -32660,26 +33128,12 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuntimeModeUpdate" - } - } - } - }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { - "schema": { - "type": "object", - "additionalProperties": true, - "title": "Response Patch A2A Mode V1 Admin Runtime A2A Mode Patch" - } + "schema": {} } } }, @@ -35423,6 +35877,116 @@ } } }, + "/v1/admin/users/sso": { + "post": { + "tags": [ + "SSO User Provisioning" + ], + "summary": "Create Sso User", + "description": "Provision a passwordless user using an enabled, configured SSO provider.\n\nArgs:\n request: JSON request, parsed after authentication and authorization.\n current_user_ctx: Authenticated caller context.\n db: Request-scoped database session.\n\nReturns:\n The created user's public details.\n\nRaises:\n HTTPException: Unsupported media type, malformed JSON, password input,\n invalid provider/email, duplicate user, or unexpected service failure.\n RequestValidationError: JSON does not match the request schema.", + "operationId": "create_sso_user_v1_admin_users_sso_post", + "security": [ + { + "ConfigurableHTTPBearer": [] + } + ], + "parameters": [ + { + "name": "jwt_token", + "in": "cookie", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Jwt Token" + } + } + ], + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailUserResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "description": "Administrator-driven passwordless SSO user creation request.\n\nProviders are validated against enabled provider rows by the service. The\nendpoint rejects a password key before validating this schema.", + "properties": { + "email": { + "description": "User's email address", + "format": "email", + "title": "Email", + "type": "string" + }, + "auth_provider": { + "description": "Configured SSO provider ID; azure-ad is an alias for entra", + "title": "Auth Provider", + "type": "string" + }, + "full_name": { + "anyOf": [ + { + "maxLength": 255, + "type": "string" + }, + { + "type": "null" + } + ], + "description": "User's full name", + "title": "Full Name" + }, + "is_admin": { + "default": false, + "description": "Grant admin privileges to user", + "title": "Is Admin", + "type": "boolean" + }, + "is_active": { + "default": true, + "description": "Whether user account is active", + "title": "Is Active", + "type": "boolean" + } + }, + "required": [ + "email", + "auth_provider" + ], + "title": "AdminCreateSSOUserRequest", + "type": "object" + } + } + } + } + } + }, "/rpc": { "post": { "tags": [ @@ -36295,7 +36859,7 @@ "Utilities" ], "summary": "Handle Internal Mcp Tools List Authz", - "description": "Authorize trusted server-scoped tools/list requests for the Rust direct-DB path.\n\nArgs:\n request: Trusted internal MCP authz request.\n\nReturns:\n Empty success response when the request is authorized.", + "description": "Authorize trusted server-scoped tools/list requests for the Rust direct-DB path.\n\nArgs:\n request: Trusted internal MCP authz request.\n\nReturns:\n Catalog visibility when the list request is authorized.", "operationId": "handle_internal_mcp_tools_list_authz__internal_mcp_tools_list_authz_post", "responses": { "200": { @@ -36315,7 +36879,7 @@ "Utilities" ], "summary": "Handle Internal Mcp Tools List Authz", - "description": "Authorize trusted server-scoped tools/list requests for the Rust direct-DB path.\n\nArgs:\n request: Trusted internal MCP authz request.\n\nReturns:\n Empty success response when the request is authorized.", + "description": "Authorize trusted server-scoped tools/list requests for the Rust direct-DB path.\n\nArgs:\n request: Trusted internal MCP authz request.\n\nReturns:\n Catalog visibility when the list request is authorized.", "operationId": "handle_internal_mcp_tools_list_authz__internal_mcp_tools_list_authz__post", "responses": { "200": { @@ -36335,7 +36899,7 @@ "Utilities" ], "summary": "Handle Internal Mcp Resources List Authz", - "description": "Authorize trusted server-scoped resources/list requests for Rust direct-path execution.\n\nArgs:\n request: Trusted internal MCP authz request.\n\nReturns:\n Empty success response when the request is authorized.", + "description": "Authorize trusted server-scoped resources/list requests for Rust direct-path execution.\n\nArgs:\n request: Trusted internal MCP authz request.\n\nReturns:\n Catalog visibility when the list request is authorized.", "operationId": "handle_internal_mcp_resources_list_authz__internal_mcp_resources_list_authz_post", "responses": { "200": { @@ -36355,7 +36919,7 @@ "Utilities" ], "summary": "Handle Internal Mcp Resources List Authz", - "description": "Authorize trusted server-scoped resources/list requests for Rust direct-path execution.\n\nArgs:\n request: Trusted internal MCP authz request.\n\nReturns:\n Empty success response when the request is authorized.", + "description": "Authorize trusted server-scoped resources/list requests for Rust direct-path execution.\n\nArgs:\n request: Trusted internal MCP authz request.\n\nReturns:\n Catalog visibility when the list request is authorized.", "operationId": "handle_internal_mcp_resources_list_authz__internal_mcp_resources_list_authz__post", "responses": { "200": { @@ -36415,7 +36979,7 @@ "Utilities" ], "summary": "Handle Internal Mcp Resource Templates List Authz", - "description": "Authorize trusted server-scoped resources/templates/list requests for Rust direct-path execution.\n\nArgs:\n request: Trusted internal MCP authz request.\n\nReturns:\n Empty success response when the request is authorized.", + "description": "Authorize trusted server-scoped resources/templates/list requests for Rust direct-path execution.\n\nArgs:\n request: Trusted internal MCP authz request.\n\nReturns:\n Catalog visibility when the list request is authorized.", "operationId": "handle_internal_mcp_resource_templates_list_authz__internal_mcp_resources_templates_list_authz_post", "responses": { "200": { @@ -36435,7 +36999,7 @@ "Utilities" ], "summary": "Handle Internal Mcp Resource Templates List Authz", - "description": "Authorize trusted server-scoped resources/templates/list requests for Rust direct-path execution.\n\nArgs:\n request: Trusted internal MCP authz request.\n\nReturns:\n Empty success response when the request is authorized.", + "description": "Authorize trusted server-scoped resources/templates/list requests for Rust direct-path execution.\n\nArgs:\n request: Trusted internal MCP authz request.\n\nReturns:\n Catalog visibility when the list request is authorized.", "operationId": "handle_internal_mcp_resource_templates_list_authz__internal_mcp_resources_templates_list_authz__post", "responses": { "200": { @@ -36455,7 +37019,7 @@ "Utilities" ], "summary": "Handle Internal Mcp Prompts List Authz", - "description": "Authorize trusted server-scoped prompts/list requests for Rust direct-path execution.\n\nArgs:\n request: Trusted internal MCP authz request.\n\nReturns:\n Empty success response when the request is authorized.", + "description": "Authorize trusted server-scoped prompts/list requests for Rust direct-path execution.\n\nArgs:\n request: Trusted internal MCP authz request.\n\nReturns:\n Catalog visibility when the list request is authorized.", "operationId": "handle_internal_mcp_prompts_list_authz__internal_mcp_prompts_list_authz_post", "responses": { "200": { @@ -36475,7 +37039,7 @@ "Utilities" ], "summary": "Handle Internal Mcp Prompts List Authz", - "description": "Authorize trusted server-scoped prompts/list requests for Rust direct-path execution.\n\nArgs:\n request: Trusted internal MCP authz request.\n\nReturns:\n Empty success response when the request is authorized.", + "description": "Authorize trusted server-scoped prompts/list requests for Rust direct-path execution.\n\nArgs:\n request: Trusted internal MCP authz request.\n\nReturns:\n Catalog visibility when the list request is authorized.", "operationId": "handle_internal_mcp_prompts_list_authz__internal_mcp_prompts_list_authz__post", "responses": { "200": { @@ -37368,46 +37932,6 @@ } } }, - "/_internal/mcp/tools/call/resolve": { - "post": { - "tags": [ - "Utilities" - ], - "summary": "Handle Internal Mcp Tools Call Resolve", - "description": "Resolve a Rust-direct MCP tools/call execution plan without executing the tool.\n\nArgs:\n request: Trusted internal MCP tools/call resolve request.\n\nReturns:\n ORJSONResponse: JSON-RPC response containing execution plan on success,\n or JSON-RPC error on validation/permission/plugin failures.\n All errors returned as structured JSON-RPC (never re-raised)\n since this is an internal Rust↔Python interface.\n\nRaises:\n Exception: Propagated after best-effort rollback when unexpected failures occur.", - "operationId": "handle_internal_mcp_tools_call_resolve__internal_mcp_tools_call_resolve_post", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "/_internal/mcp/tools/call/resolve/": { - "post": { - "tags": [ - "Utilities" - ], - "summary": "Handle Internal Mcp Tools Call Resolve", - "description": "Resolve a Rust-direct MCP tools/call execution plan without executing the tool.\n\nArgs:\n request: Trusted internal MCP tools/call resolve request.\n\nReturns:\n ORJSONResponse: JSON-RPC response containing execution plan on success,\n or JSON-RPC error on validation/permission/plugin failures.\n All errors returned as structured JSON-RPC (never re-raised)\n since this is an internal Rust↔Python interface.\n\nRaises:\n Exception: Propagated after best-effort rollback when unexpected failures occur.", - "operationId": "handle_internal_mcp_tools_call_resolve__internal_mcp_tools_call_resolve__post", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, "/_internal/mcp/tools/call/metric": { "post": { "tags": [ @@ -41555,6 +42079,54 @@ "description": "Schema for updating an existing A2A agent.\n\nSimilar to A2AAgentCreate but all fields are optional to allow partial updates.", "nullable": true }, + "A2AInvokeResponse": { + "properties": { + "jsonrpc": { + "title": "Jsonrpc", + "description": "JSON-RPC protocol version echoed by the agent" + }, + "result": { + "title": "Result", + "description": "Result payload forwarded from the agent" + }, + "error": { + "title": "Error", + "description": "Error forwarded from the agent" + }, + "id": { + "title": "Id", + "description": "Request id this response correlates to, omitted for notifications" + } + }, + "additionalProperties": true, + "type": "object", + "title": "A2AInvokeResponse", + "description": "Schema for ``POST /v1/a2a/{agent_name}/invoke`` and ``POST /v1/a2a/invoke``.\n\nBoth routes hand the agent's document to the caller after ContextForge governance\n(auth, RBAC, rate limiting, metrics) without reshaping it. When the gateway has\nnothing to forward, ``error`` carries a plain message string rather than a JSON-RPC\nerror object and the remaining keys are absent.\n\nIts fields deliberately match :class:`A2AJsonRpcResponse`, while the two class\nnames provide distinct OpenAPI components for the corresponding routes." + }, + "A2AJsonRpcResponse": { + "properties": { + "jsonrpc": { + "title": "Jsonrpc", + "description": "JSON-RPC protocol version echoed by the agent" + }, + "result": { + "title": "Result", + "description": "Result payload forwarded from the agent" + }, + "error": { + "title": "Error", + "description": "Error forwarded from the agent" + }, + "id": { + "title": "Id", + "description": "Request id this response correlates to, omitted for notifications" + } + }, + "additionalProperties": true, + "type": "object", + "title": "A2AJsonRpcResponse", + "description": "Schema for ``POST /v1/a2a/{agent_name}/jsonrpc``.\n\nThis passthrough always answers with a JSON-RPC envelope: an agent document that\nalready carries ``jsonrpc`` is returned unchanged, otherwise the agent's response is\nwrapped as ``{\"jsonrpc\": \"2.0\", \"result\": ...}``. ``id`` is only present when the\nrequest had one. The gateway's own JSON-RPC error replies are returned as explicit\nresponses with a non-2xx status, so they bypass this model.\n\nIts fields deliberately match :class:`A2AInvokeResponse`; the separate class\nname provides a distinct OpenAPI component for this route." + }, "ActivityItem": { "properties": { "id": { @@ -41822,6 +42394,42 @@ "title": "Annotations", "description": "Optional annotations for client rendering hints (MCP spec-compliant).\n\nAttributes:\n audience (Optional[List[Role]]): Describes who the intended customer of this\n object or data is. Can include multiple entries\n (e.g., [\"user\", \"assistant\"]).\n priority (Optional[float]): Describes how important this data is for operating\n the server. 1 = most important (effectively required),\n 0 = least important (entirely optional).\n last_modified (Optional[str]): ISO 8601 timestamp of last modification.\n Serialized as 'lastModified' in JSON." }, + "ApprovalActionRequest": { + "properties": { + "action": { + "type": "string", + "title": "Action" + }, + "reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Reason" + }, + "notes": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Notes" + } + }, + "type": "object", + "required": [ + "action" + ], + "title": "ApprovalActionRequest", + "description": "Request model for approval actions." + }, "AuditTrailResponse": { "properties": { "id": { @@ -45007,7 +45615,7 @@ } ], "title": "Gatewayid", - "description": "Exact registered gateway to use for transport and connection settings" + "description": "Exact registered gateway to use for transport, TLS, and stored-credential settings; combined with credential_mode to control whether stored credentials are applied" }, "credentialMode": { "type": "string", @@ -45016,7 +45624,7 @@ "candidate_only" ], "title": "Credentialmode", - "description": "Whether the handshake may use stored gateway credentials", + "description": "Credential handling mode. 'stored_with_override' applies stored gateway credentials; form headers take precedence. 'candidate_only' suppresses all stored credentials so only the supplied headers are tested.", "default": "stored_with_override" } }, @@ -47294,12 +47902,6 @@ "type": "array", "title": "Status Items", "description": "List of component health statuses" - }, - "mcp_runtime": { - "additionalProperties": true, - "type": "object", - "title": "Mcp Runtime", - "description": "MCP runtime diagnostics and configuration" } }, "type": "object", @@ -48841,15 +49443,6 @@ "title": "MetricsStatsResponse", "description": "Response model for metrics stats." }, - "OverrideMode": { - "type": "string", - "enum": [ - "shadow", - "edge" - ], - "title": "OverrideMode", - "description": "Modes that the runtime override can flip between at runtime." - }, "PaginatedResponse": { "properties": { "data": { @@ -49083,6 +49676,62 @@ "title": "PasswordResetTokenValidationResponse", "description": "Response schema for reset-token validation." }, + "PendingUserApprovalResponse": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "email": { + "type": "string", + "title": "Email" + }, + "full_name": { + "type": "string", + "title": "Full Name" + }, + "auth_provider": { + "type": "string", + "title": "Auth Provider" + }, + "requested_at": { + "type": "string", + "title": "Requested At" + }, + "expires_at": { + "type": "string", + "title": "Expires At" + }, + "status": { + "type": "string", + "title": "Status" + }, + "sso_metadata": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Sso Metadata" + } + }, + "type": "object", + "required": [ + "id", + "email", + "full_name", + "auth_provider", + "requested_at", + "expires_at", + "status" + ], + "title": "PendingUserApprovalResponse", + "description": "Response model for pending user approval." + }, "PercentilesResponse": { "properties": { "buckets": { @@ -52113,19 +52762,391 @@ "description": "Management-only schema for root updates.", "nullable": true }, - "RuntimeModeUpdate": { + "SSOLoginResponse": { "properties": { - "mode": { - "$ref": "#/components/schemas/OverrideMode", - "description": "Target override mode. Only shadow and edge are supported at runtime." + "authorization_url": { + "type": "string", + "title": "Authorization Url" + }, + "state": { + "type": "string", + "title": "State" } }, "type": "object", "required": [ - "mode" + "authorization_url", + "state" ], - "title": "RuntimeModeUpdate", - "description": "Request body for ``PATCH /admin/runtime/{runtime}-mode``." + "title": "SSOLoginResponse", + "description": "SSO login initiation response." + }, + "SSOProviderCreateRequest": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "display_name": { + "type": "string", + "title": "Display Name" + }, + "provider_type": { + "type": "string", + "title": "Provider Type" + }, + "client_id": { + "type": "string", + "title": "Client Id" + }, + "client_secret": { + "type": "string", + "title": "Client Secret" + }, + "authorization_url": { + "type": "string", + "title": "Authorization Url" + }, + "token_url": { + "type": "string", + "title": "Token Url" + }, + "userinfo_url": { + "type": "string", + "title": "Userinfo Url" + }, + "issuer": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Issuer" + }, + "jwks_uri": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Jwks Uri" + }, + "scope": { + "type": "string", + "title": "Scope", + "default": "openid profile email" + }, + "trusted_domains": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Trusted Domains", + "default": [] + }, + "auto_create_users": { + "type": "boolean", + "title": "Auto Create Users", + "default": true + }, + "team_mapping": { + "additionalProperties": true, + "type": "object", + "title": "Team Mapping", + "default": {} + }, + "provider_metadata": { + "additionalProperties": true, + "type": "object", + "title": "Provider Metadata", + "default": {} + }, + "trusted_for_api_auth": { + "type": "boolean", + "title": "Trusted For Api Auth", + "default": false + }, + "api_audience": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Api Audience" + } + }, + "type": "object", + "required": [ + "id", + "name", + "display_name", + "provider_type", + "client_id", + "client_secret", + "authorization_url", + "token_url", + "userinfo_url" + ], + "title": "SSOProviderCreateRequest", + "description": "Request to create SSO provider." + }, + "SSOProviderResponse": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "display_name": { + "type": "string", + "title": "Display Name" + }, + "authorization_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization Url" + } + }, + "type": "object", + "required": [ + "id", + "name", + "display_name" + ], + "title": "SSOProviderResponse", + "description": "SSO provider information for client." + }, + "SSOProviderUpdateRequest": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "display_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Display Name" + }, + "provider_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Provider Type" + }, + "client_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Client Id" + }, + "client_secret": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Client Secret" + }, + "authorization_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization Url" + }, + "token_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Token Url" + }, + "userinfo_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Userinfo Url" + }, + "issuer": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Issuer" + }, + "jwks_uri": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Jwks Uri" + }, + "scope": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Scope" + }, + "trusted_domains": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Trusted Domains" + }, + "auto_create_users": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Auto Create Users" + }, + "team_mapping": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Team Mapping" + }, + "provider_metadata": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Provider Metadata" + }, + "is_enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Is Enabled" + }, + "trusted_for_api_auth": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Trusted For Api Auth" + }, + "api_audience": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Api Audience" + } + }, + "type": "object", + "title": "SSOProviderUpdateRequest", + "description": "Request to update SSO provider." }, "SecurityEventResponse": { "properties": { @@ -54398,15 +55419,31 @@ }, "type": "array", "title": "Values" + }, + "success_count": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "Success Count" + }, + "error_count": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "Error Count" } }, "type": "object", "required": [ "buckets", - "values" + "values", + "success_count", + "error_count" ], "title": "TimeseriesResponse", - "description": "Execution counts bucketed over time." + "description": "Index-aligned execution and status counts.\n\n``values`` counts every trace. ``success_count`` and ``error_count`` count\nonly explicit ``ok`` and ``error`` statuses. Other statuses, including\n``unset``, are included only in ``values``." }, "TokenCreateRequest": { "properties": {