{ "openapi": "3.1.0", "info": { "title": "Vijil Console API (Combined)", "description": "Combined OpenAPI specification for all vijil-console microservices.", "version": "0.1.0" }, "paths": { "/v1/auth/jwt/login": { "post": { "tags": ["Teams", "auth"], "summary": "Jwt Login", "description": "Authenticate with email + password, sets JWT token in httpOnly cookie.\n\nArgs:\n login_request: Login credentials (email and password)\n response: FastAPI response object to set cookies\n user_manager: FastAPI Users user manager\n\nReturns:\n JWT token response with access_token and token_type (token also set in httpOnly cookie)\n\nRaises:\n HTTPException: If authentication fails", "operationId": "jwt_login_v1_auth_jwt_login_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Jwt Login V1 Auth Jwt Login Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/auth/jwt/logout": { "post": { "tags": ["Teams", "auth"], "summary": "Jwt Logout", "description": "Logout user by clearing the authentication cookie.\n\nArgs:\n response: FastAPI response object to clear cookies\n\nReturns:\n Success message", "operationId": "jwt_logout_v1_auth_jwt_logout_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Jwt Logout V1 Auth Jwt Logout Post" } } } } } } }, "/v1/auth/users/me": { "get": { "tags": ["Teams", "auth"], "summary": "Get Current User Info", "description": "Get the currently authenticated user's information.\n\nArgs:\n current_user: Current authenticated user (from JWT claims)\n\nReturns:\n Current user information", "operationId": "get_current_user_info_v1_auth_users_me_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserRead" } } } } } } }, "/v1/auth/jwt/refresh": { "post": { "tags": ["Teams", "auth"], "summary": "Jwt Refresh", "description": "Refresh JWT token.\n\nAccepts a valid or expired JWT token and returns a new token with\nfresh expiration. The token can be provided in a cookie or Authorization header.\n\nArgs:\n request: FastAPI request object\n response: FastAPI response object to set cookies\n user_manager: FastAPI Users user manager\n session: Database session\n\nReturns:\n JWT token response with access_token and token_type (also sets cookie)\n\nRaises:\n HTTPException: If token is invalid or user not found", "operationId": "jwt_refresh_v1_auth_jwt_refresh_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Jwt Refresh V1 Auth Jwt Refresh Post" } } } } } } }, "/v1/auth/change-password": { "post": { "tags": ["Teams", "auth"], "summary": "Change Password", "description": "Change the current user's password.\n\nVerifies the current password, updates to the new password,\nclears the password_change_required flag, and returns a fresh JWT.\n\nArgs:\n request: Change password request with current and new passwords\n response: FastAPI response object to set cookies\n claims: JWT claims from middleware\n user_manager: FastAPI Users user manager\n session: Database session\n\nReturns:\n JWT token response with access_token and token_type\n\nRaises:\n UnauthenticatedException: If current password is invalid\n BadRequestException: If new password is same as current or invalid", "operationId": "change_password_v1_auth_change_password_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangePasswordRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Change Password V1 Auth Change Password Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/users/": { "post": { "tags": ["Teams", "users"], "summary": "Create User", "description": "Create a new user.\n\nRequires team:write_user permission for the specified team (team owners and admins) or\nteam:write_user_all permission (super admin).", "operationId": "create_user_v1_users__post", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUserRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": ["Teams", "users"], "summary": "Get User", "description": "Get a user by query parameters.\n\nCurrently supports:\n- email: Get user by email address\n\nAdditional query parameters can be added in the future.", "operationId": "get_user_v1_users__get", "parameters": [ { "name": "email", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Email address of the user to retrieve", "title": "Email" }, "description": "Email address of the user to retrieve" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/users/me": { "get": { "tags": ["Teams", "users"], "summary": "Get Current User", "description": "Get the current authenticated user's information.\n\nReturns the user information for the authenticated user based on JWT claims.", "operationId": "get_current_user_v1_users_me_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserRead" } } } } } } }, "/v1/users/me/teams": { "get": { "tags": ["Teams", "users"], "summary": "Get My Teams", "description": "Get the current user's team memberships.\n\nReturns all teams the authenticated user is a member of, along with\ntheir role, name, and description.", "operationId": "get_my_teams_v1_users_me_teams_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/MembershipWithTeam" }, "type": "array", "title": "Response Get My Teams V1 Users Me Teams Get" } } } } } } }, "/v1/users/{user_id}": { "get": { "tags": ["Teams", "users"], "summary": "Get User By Id", "description": "Get a user by ID.", "operationId": "get_user_by_id_v1_users__user_id__get", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "User Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/teams/": { "post": { "tags": ["Teams", "teams"], "summary": "Create Team", "description": "Create a new team.\n\nRequires team:create_all permission (super admin only).", "operationId": "create_team_v1_teams__post", "parameters": [ { "name": "owner_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Owner Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Team" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/teams/{team_id}/invites": { "post": { "tags": ["Teams", "teams"], "summary": "Invite Users", "description": "Invite a user to a team by email.\n\nRequires teams:invite permission (team owners and admins) or\nteam:invite_all permission (super admin).", "operationId": "invite_users_v1_teams__team_id__invites_post", "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Team Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InviteUserRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invitation" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/teams/invites/{invitation_id}/accept": { "post": { "tags": ["Teams", "teams"], "summary": "Accept Invite", "description": "Accept a team invitation.\n\nOnly the target user (the one who was invited) can accept their invitation.\nThe user_id and email come from the authenticated JWT token.", "operationId": "accept_invite_v1_teams_invites__invitation_id__accept_post", "parameters": [ { "name": "invitation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Invitation Id" } } ], "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Membership" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/teams/{team_id}/users": { "get": { "tags": ["Teams", "teams"], "summary": "Get Team Users", "description": "List all users in a team.\n\nRequires team:read permission (all team members) or\nteam:read_all permission (super admin).", "operationId": "get_team_users_v1_teams__team_id__users_get", "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Team Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TeamUser" }, "title": "Response Get Team Users V1 Teams Team Id Users Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/teams/{team_id}": { "get": { "tags": ["Teams", "teams"], "summary": "Get Team", "description": "Get a team by ID.\n\nRequires team:read permission (all team members) or\nteam:read_all permission (super admin).\n\nNote: This route must come after more specific routes like /{team_id}/users\nto avoid route conflicts.", "operationId": "get_team_v1_teams__team_id__get", "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Team Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Team" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/agent-configurations/": { "post": { "tags": ["Agent Environment", "agent-configurations"], "summary": "Create Agent Configuration", "description": "Create a new agent configuration.\n\nThis endpoint accepts AgentConfigRequest format from the frontend and transforms it\nto the internal AgentCreate format. The agent_url field is preserved.\n\nRequires agent:write permission.", "operationId": "create_agent_configuration_v1_agent_configurations__post", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentConfigRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Agent" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": ["Agent Environment", "agent-configurations"], "summary": "Get Agent Configurations", "description": "List agent configurations with filtering and pagination.\n\nRequires agent:read permission (all team members) or\nagent:read_all permission (super admin).", "operationId": "get_agent_configurations_v1_agent_configurations__get", "parameters": [ { "name": "statuses", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Filter by status(es). If not provided, defaults to non-archived statuses.", "title": "Statuses" }, "description": "Filter by status(es). If not provided, defaults to non-archived statuses." }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "description": "Maximum number of results", "default": 100, "title": "Limit" }, "description": "Maximum number of results" }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Number of results to skip", "default": 0, "title": "Offset" }, "description": "Number of results to skip" }, { "name": "include_scores", "in": "query", "required": false, "schema": { "type": "boolean", "description": "When true, sideloads the latest completed evaluation scores onto each agent.", "default": false, "title": "Include Scores" }, "description": "When true, sideloads the latest completed evaluation scores onto each agent." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentConfigListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/agent-configurations/{id}": { "get": { "tags": ["Agent Environment", "agent-configurations"], "summary": "Get Agent Configuration By Id", "description": "Get a single agent configuration by ID.\n\nRequires agent:read permission (all team members) or\nagent:read_all permission (super admin).", "operationId": "get_agent_configuration_by_id_v1_agent_configurations__id__get", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Id" } }, { "name": "include_scores", "in": "query", "required": false, "schema": { "type": "boolean", "description": "When true, sideloads the latest completed evaluation scores onto the agent.", "default": false, "title": "Include Scores" }, "description": "When true, sideloads the latest completed evaluation scores onto the agent." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Agent" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": ["Agent Environment", "agent-configurations"], "summary": "Update Agent Configuration", "description": "Update an existing agent configuration.\n\nSupports partial updates - you can update just the api_key field, or any other field(s).\nAll fields in the request body are optional.\n\nRequires agent:write permission + billing feature 'write_custom_agent'.\n\nExample:\n # Update only the API key\n PUT /agent-configurations/{id}\n {\n \"api_key\": \"sk-new-key-value\"\n }\n \n # Update multiple fields\n PUT /agent-configurations/{id}\n {\n \"agent_name\": \"New Name\",\n \"api_key\": \"sk-new-key-value\",\n \"mcp_config\": {\"proxy_url\": \"https://proxy.example.com\", \"access_level\": \"read\"}\n }\n \n # Enable/disable dome auto-apply (when true, saving dome config auto-applies it)\n PUT /agent-configurations/{id}\n {\n \"dome_manually_configured\": true\n }", "operationId": "update_agent_configuration_v1_agent_configurations__id__put", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Agent" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/agent-configurations/{id}/archive": { "put": { "tags": ["Agent Environment", "agent-configurations"], "summary": "Archive Agent Configuration", "description": "Archive agent configuration.\n\nSets the agent status to ARCHIVED.\nRequires agent:write permission (all team members) or\nagent:write_all permission (super admin).", "operationId": "archive_agent_configuration_v1_agent_configurations__id__archive_put", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Agent" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/agent-configurations/{id}/lifecycle": { "put": { "tags": ["Agent Environment", "agent-configurations"], "summary": "Update Agent Lifecycle", "description": "Update agent trust lifecycle stage.\n\nRequires agent:write permission (all team members) or\nagent:write_all permission (super admin).\n\nSetting trust_stage to 'hardened' captures trusted_at and computes ttt_days.", "operationId": "update_agent_lifecycle_v1_agent_configurations__id__lifecycle_put", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentLifecycleUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Agent" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/agent-configurations/{agent_id}/dome-configs": { "get": { "tags": ["Agent Environment", "agent-configurations"], "summary": "Get Agent Dome Config", "description": "Return the dome configuration this agent is using (row-bound and/or ``dome_config_id``).", "operationId": "get_agent_dome_config_v1_agent_configurations__agent_id__dome_configs_get", "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team ID (required)", "title": "Team Id" }, "description": "Team ID (required)" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentDomeConfigResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/agent-configurations/{id}/evaluation-config": { "get": { "tags": ["Agent Environment", "agent-configurations"], "summary": "Get Evaluation Config", "description": "Get agent configuration for Diamond evaluation.\n\nReturns agent_url, agent_api_key, and agent_model_name needed for evaluation.\nRequires agent:read permission (all team members) or\nagent:read_all permission (super admin).", "operationId": "get_evaluation_config_v1_agent_configurations__id__evaluation_config_get", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentEvaluationConfig" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/agents/{agent_id}/constraints": { "get": { "tags": ["Agent Environment", "Trust Runtime"], "summary": "Fetch agent trust constraints", "description": "Returns the agent's trust constraints (Dome guard config, tool permissions, organization rules, enforcement mode) in the format consumed by the vijil-sdk Trust Runtime at boot.", "operationId": "get_agent_constraints_v1_agents__agent_id__constraints_get", "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentConstraints" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/agent-configurations/import/validate": { "post": { "tags": ["Agent Environment", "agent-import"], "summary": "Validate Agent Import", "description": "Validate an agent import request without saving.\n\nSupports three input methods with deterministic access levels:\n- agent_url: Remote black_box - Just an endpoint URL to call\n- agent_card: Local grey_box - Upload agent configuration/card JSON\n- source_code: Local white_box - Upload agent source code files\n\nReturns validation status, access level, and parsed agent card for preview.", "operationId": "validate_agent_import_v1_agent_configurations_import_validate_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedImportRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedValidationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/agent-configurations/import": { "post": { "tags": ["Agent Environment", "agent-import"], "summary": "Import Agent Unified", "description": "Import an agent using the unified import endpoint.\n\nSupports three input methods with deterministic access levels:\n- agent_url: Remote black_box - Just an endpoint URL to call\n- agent_card: Local grey_box - Upload agent configuration/card JSON\n- source_code: Local white_box - Upload agent source code files\n\nAccess level is determined by input method (not content).", "operationId": "import_agent_unified_v1_agent_configurations_import_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedImportRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedImportResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/personas/{id}": { "get": { "tags": ["Agent Environment", "personas"], "summary": "Get Persona", "description": "Get a single persona by ID.\n\nRequires persona:read permission and team_id query parameter. The user's JWT must be scoped to that team.", "operationId": "get_persona_v1_personas__id__get", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Id" } }, { "name": "team_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "description": "Team scope (required); must match a team the user has access to", "title": "Team Id" }, "description": "Team scope (required); must match a team the user has access to" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Persona" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": ["Agent Environment", "personas"], "summary": "Update Persona", "description": "Update an existing persona.\n\nSupports partial updates - only provided fields will be updated.\nRequires persona:write permission.", "operationId": "update_persona_v1_personas__id__put", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonaUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Persona" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["Agent Environment", "personas"], "summary": "Delete Persona", "description": "Delete a persona.\n\nRequires persona:write permission.", "operationId": "delete_persona_v1_personas__id__delete", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/personas/": { "get": { "tags": ["Agent Environment", "personas"], "summary": "List Personas", "description": "List personas with filtering and pagination.\n\nRequires persona:read permission and team_id query parameter. The user's JWT must be scoped to that team.", "operationId": "list_personas_v1_personas__get", "parameters": [ { "name": "team_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "description": "Team scope (required); must match a team the user has access to", "title": "Team Id" }, "description": "Team scope (required); must match a team the user has access to" }, { "name": "intents", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Filter by intent(s): benign, curious, adversarial, malicious", "title": "Intents" }, "description": "Filter by intent(s): benign, curious, adversarial, malicious" }, { "name": "is_preset", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Filter by preset status", "title": "Is Preset" }, "description": "Filter by preset status" }, { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Search in name, description, and role", "title": "Search" }, "description": "Search in name, description, and role" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Maximum number of results (default 10)", "default": 10, "title": "Limit" }, "description": "Maximum number of results (default 10)" }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Number of results to skip for paging", "default": 0, "title": "Offset" }, "description": "Number of results to skip for paging" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonaListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": ["Agent Environment", "personas"], "summary": "Create Persona", "description": "Create a new persona.\n\nRequires persona:write permission for the team_id in the request body.", "operationId": "create_persona_v1_personas__post", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonaCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Persona" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/personas/presets/": { "get": { "tags": ["Agent Environment", "personas"], "summary": "List Presets", "description": "List system preset personas.\n\nRequires persona:read permission and team_id query parameter. The user's JWT must be scoped to that team.", "operationId": "list_presets_v1_personas_presets__get", "parameters": [ { "name": "team_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "description": "Team scope (required); must match a team the user has access to", "title": "Team Id" }, "description": "Team scope (required); must match a team the user has access to" }, { "name": "preset_category", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by preset category: professional, adversarial, support", "title": "Preset Category" }, "description": "Filter by preset category: professional, adversarial, support" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 250, "minimum": 1, "description": "Maximum number of results", "default": 100, "title": "Limit" }, "description": "Maximum number of results" }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Number of results to skip", "default": 0, "title": "Offset" }, "description": "Number of results to skip" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonaListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/personas/from-preset/{preset_id}": { "post": { "tags": ["Agent Environment", "personas"], "summary": "Create From Preset", "description": "Create a new persona from a system preset.\n\nRequires persona:write permission.", "operationId": "create_from_preset_v1_personas_from_preset__preset_id__post", "parameters": [ { "name": "preset_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Preset Id" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/CreateFromPresetRequest" }, { "type": "null" } ], "title": "Request" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Persona" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/demographics/": { "get": { "tags": ["Agent Environment", "demographics"], "summary": "List Dimensions", "description": "List demographic dimensions.\n\nRequires agent:read permission (dimensions are global reference data).", "operationId": "list_dimensions_v1_demographics__get", "parameters": [ { "name": "protected_class_only", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Filter to only protected class dimensions", "title": "Protected Class Only" }, "description": "Filter to only protected class dimensions" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 250, "minimum": 1, "description": "Maximum number of results", "default": 100, "title": "Limit" }, "description": "Maximum number of results" }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Number of results to skip", "default": 0, "title": "Offset" }, "description": "Number of results to skip" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__service_agent_environment__api__dimensions__DimensionListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": ["Agent Environment", "demographics"], "summary": "Create Dimension", "description": "Create a new demographic dimension.\n\nRequires super admin permission (dimensions are global).", "operationId": "create_dimension_v1_demographics__post", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemographicDimensionCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemographicDimension" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/demographics/{dimension_id}": { "get": { "tags": ["Agent Environment", "demographics"], "summary": "Get Dimension", "description": "Get a dimension by ID, including its values.", "operationId": "get_dimension_v1_demographics__dimension_id__get", "parameters": [ { "name": "dimension_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Dimension Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemographicDimension" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": ["Agent Environment", "demographics"], "summary": "Update Dimension", "description": "Update a demographic dimension.\n\nRequires super admin permission.", "operationId": "update_dimension_v1_demographics__dimension_id__put", "parameters": [ { "name": "dimension_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Dimension Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemographicDimensionUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemographicDimension" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["Agent Environment", "demographics"], "summary": "Delete Dimension", "description": "Delete a demographic dimension and all its values.\n\nRequires super admin permission.", "operationId": "delete_dimension_v1_demographics__dimension_id__delete", "parameters": [ { "name": "dimension_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Dimension Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/demographics/by-name/{name}": { "get": { "tags": ["Agent Environment", "demographics"], "summary": "Get Dimension By Name", "description": "Get a dimension by name, including its values.", "operationId": "get_dimension_by_name_v1_demographics_by_name__name__get", "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string", "title": "Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemographicDimension" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/demographics/{dimension_id}/values": { "get": { "tags": ["Agent Environment", "demographics"], "summary": "List Values", "description": "List values for a dimension.", "operationId": "list_values_v1_demographics__dimension_id__values_get", "parameters": [ { "name": "dimension_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Dimension Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 500, "minimum": 1, "description": "Maximum number of results", "default": 250, "title": "Limit" }, "description": "Maximum number of results" }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Number of results to skip", "default": 0, "title": "Offset" }, "description": "Number of results to skip" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__service_agent_environment__api__dimensions__ValueListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": ["Agent Environment", "demographics"], "summary": "Add Value", "description": "Add a value to a dimension.\n\nRequires super admin permission.", "operationId": "add_value_v1_demographics__dimension_id__values_post", "parameters": [ { "name": "dimension_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Dimension Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemographicValueCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemographicValue" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/demographics/{dimension_id}/values/bulk": { "post": { "tags": ["Agent Environment", "demographics"], "summary": "Bulk Add Values", "description": "Bulk add values to a dimension.\n\nRequires super admin permission.", "operationId": "bulk_add_values_v1_demographics__dimension_id__values_bulk_post", "parameters": [ { "name": "dimension_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Dimension Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__service_agent_environment__api__dimensions__BulkValuesRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DemographicValue" }, "title": "Response Bulk Add Values V1 Demographics Dimension Id Values Bulk Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/demographics/values/{value_id}": { "put": { "tags": ["Agent Environment", "demographics"], "summary": "Update Value", "description": "Update a value.\n\nRequires super admin permission.", "operationId": "update_value_v1_demographics_values__value_id__put", "parameters": [ { "name": "value_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Value Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemographicValueUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemographicValue" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["Agent Environment", "demographics"], "summary": "Delete Value", "description": "Delete a value.\n\nRequires super admin permission.", "operationId": "delete_value_v1_demographics_values__value_id__delete", "parameters": [ { "name": "value_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Value Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/dimensions/": { "get": { "tags": ["Agent Environment", "demographics"], "summary": "List Dimensions", "description": "List demographic dimensions.\n\nRequires agent:read permission (dimensions are global reference data).", "operationId": "list_dimensions_v1_dimensions__get", "parameters": [ { "name": "protected_class_only", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Filter to only protected class dimensions", "title": "Protected Class Only" }, "description": "Filter to only protected class dimensions" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 250, "minimum": 1, "description": "Maximum number of results", "default": 100, "title": "Limit" }, "description": "Maximum number of results" }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Number of results to skip", "default": 0, "title": "Offset" }, "description": "Number of results to skip" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__service_agent_environment__api__dimensions__DimensionListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": ["Agent Environment", "demographics"], "summary": "Create Dimension", "description": "Create a new demographic dimension.\n\nRequires super admin permission (dimensions are global).", "operationId": "create_dimension_v1_dimensions__post", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemographicDimensionCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemographicDimension" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/dimensions/{dimension_id}": { "get": { "tags": ["Agent Environment", "demographics"], "summary": "Get Dimension", "description": "Get a dimension by ID, including its values.", "operationId": "get_dimension_v1_dimensions__dimension_id__get", "parameters": [ { "name": "dimension_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Dimension Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemographicDimension" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": ["Agent Environment", "demographics"], "summary": "Update Dimension", "description": "Update a demographic dimension.\n\nRequires super admin permission.", "operationId": "update_dimension_v1_dimensions__dimension_id__put", "parameters": [ { "name": "dimension_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Dimension Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemographicDimensionUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemographicDimension" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["Agent Environment", "demographics"], "summary": "Delete Dimension", "description": "Delete a demographic dimension and all its values.\n\nRequires super admin permission.", "operationId": "delete_dimension_v1_dimensions__dimension_id__delete", "parameters": [ { "name": "dimension_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Dimension Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/dimensions/by-name/{name}": { "get": { "tags": ["Agent Environment", "demographics"], "summary": "Get Dimension By Name", "description": "Get a dimension by name, including its values.", "operationId": "get_dimension_by_name_v1_dimensions_by_name__name__get", "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string", "title": "Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemographicDimension" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/dimensions/{dimension_id}/values": { "get": { "tags": ["Agent Environment", "demographics"], "summary": "List Values", "description": "List values for a dimension.", "operationId": "list_values_v1_dimensions__dimension_id__values_get", "parameters": [ { "name": "dimension_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Dimension Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 500, "minimum": 1, "description": "Maximum number of results", "default": 250, "title": "Limit" }, "description": "Maximum number of results" }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Number of results to skip", "default": 0, "title": "Offset" }, "description": "Number of results to skip" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__service_agent_environment__api__dimensions__ValueListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": ["Agent Environment", "demographics"], "summary": "Add Value", "description": "Add a value to a dimension.\n\nRequires super admin permission.", "operationId": "add_value_v1_dimensions__dimension_id__values_post", "parameters": [ { "name": "dimension_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Dimension Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemographicValueCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemographicValue" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/dimensions/{dimension_id}/values/bulk": { "post": { "tags": ["Agent Environment", "demographics"], "summary": "Bulk Add Values", "description": "Bulk add values to a dimension.\n\nRequires super admin permission.", "operationId": "bulk_add_values_v1_dimensions__dimension_id__values_bulk_post", "parameters": [ { "name": "dimension_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Dimension Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__service_agent_environment__api__dimensions__BulkValuesRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DemographicValue" }, "title": "Response Bulk Add Values V1 Dimensions Dimension Id Values Bulk Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/dimensions/values/{value_id}": { "put": { "tags": ["Agent Environment", "demographics"], "summary": "Update Value", "description": "Update a value.\n\nRequires super admin permission.", "operationId": "update_value_v1_dimensions_values__value_id__put", "parameters": [ { "name": "value_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Value Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemographicValueUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemographicValue" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["Agent Environment", "demographics"], "summary": "Delete Value", "description": "Delete a value.\n\nRequires super admin permission.", "operationId": "delete_value_v1_dimensions_values__value_id__delete", "parameters": [ { "name": "value_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Value Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/policies/{policy_id}": { "get": { "tags": ["Agent Environment", "policies"], "summary": "Get Policy", "description": "Get a policy by ID.", "operationId": "get_policy_v1_policies__policy_id__get", "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Policy Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Policy" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": ["Agent Environment", "policies"], "summary": "Update Policy", "description": "Update a policy.", "operationId": "update_policy_v1_policies__policy_id__patch", "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Policy Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Policy" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["Agent Environment", "policies"], "summary": "Delete Policy", "description": "Delete a policy.", "operationId": "delete_policy_v1_policies__policy_id__delete", "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Policy Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/policies/": { "get": { "tags": ["Agent Environment", "policies"], "summary": "List Policies", "description": "List policies with optional filters and paging.", "operationId": "list_policies_v1_policies__get", "parameters": [ { "name": "category", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/PolicyCategory" }, { "type": "null" } ], "title": "Category" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/PolicyStatus" }, { "type": "null" } ], "title": "Status" } }, { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Search" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Maximum number of results (default 10)", "default": 10, "title": "Limit" }, "description": "Maximum number of results (default 10)" }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Number of results to skip for paging", "default": 0, "title": "Offset" }, "description": "Number of results to skip for paging" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": ["Agent Environment", "policies"], "summary": "Create Policy", "description": "Create a new policy.", "operationId": "create_policy_v1_policies__post", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Policy" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/policies/presets/": { "get": { "tags": ["Agent Environment", "policies"], "summary": "List Presets", "description": "List system preset policies.", "operationId": "list_presets_v1_policies_presets__get", "parameters": [ { "name": "category", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/PolicyCategory" }, { "type": "null" } ], "title": "Category" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/policies/presets/{preset_id}/copy": { "post": { "tags": ["Agent Environment", "policies"], "summary": "Copy Preset", "description": "Create a copy of a preset policy for the team.", "operationId": "copy_preset_v1_policies_presets__preset_id__copy_post", "parameters": [ { "name": "preset_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Preset Id" } }, { "name": "name_override", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name Override" } } ], "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Policy" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/policies/{policy_id}/upload": { "post": { "tags": ["Agent Environment", "policies"], "summary": "Upload File", "description": "Upload a policy document file (PDF, TXT, MD) using streaming.\n\nThe file will be streamed to S3 without loading entirely into memory.\nMaximum file size: 10 MB.", "operationId": "upload_file_v1_policies__policy_id__upload_post", "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Policy Id" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_upload_file_v1_policies__policy_id__upload_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Policy" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/policies/{policy_id}/activate": { "post": { "tags": ["Agent Environment", "policies"], "summary": "Activate Policy", "description": "Activate a policy (requires all rules to be approved).", "operationId": "activate_policy_v1_policies__policy_id__activate_post", "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Policy Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Policy" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/policies/{policy_id}/file": { "get": { "tags": ["Agent Environment", "policies"], "summary": "Download File", "description": "Download the policy's attached file.\n\nReturns the file content with appropriate headers for download.", "operationId": "download_file_v1_policies__policy_id__file_get", "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Policy Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["Agent Environment", "policies"], "summary": "Delete File", "description": "Delete the attached file from a policy.\n\nThis removes the file from storage and clears file metadata,\nbut preserves any extracted source text.", "operationId": "delete_file_v1_policies__policy_id__file_delete", "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Policy Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Policy" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/policies/{policy_id}/converted": { "get": { "tags": ["Agent Environment", "policies"], "summary": "Download Converted File", "description": "Download the converted markdown file for a policy.\n\nReturns the markdown file that was generated from the uploaded PDF.\nReturns 400 if no converted file exists.", "operationId": "download_converted_file_v1_policies__policy_id__converted_get", "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Policy Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/policies/{policy_id}/rules": { "get": { "tags": ["Agent Environment", "policies"], "summary": "List Policy Rules", "description": "List rules for a specific policy.", "operationId": "list_policy_rules_v1_policies__policy_id__rules_get", "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Policy Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__service_agent_environment__api__policies__RuleListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": ["Agent Environment", "policies"], "summary": "Create Policy Rule", "description": "Create a new manual rule for a policy.", "operationId": "create_policy_rule_v1_policies__policy_id__rules_post", "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Policy Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyRuleCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyRule" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/rules/{rule_id}": { "get": { "tags": ["Agent Environment", "policy-rules"], "summary": "Get Rule", "description": "Get a rule by ID.", "operationId": "get_rule_v1_rules__rule_id__get", "parameters": [ { "name": "rule_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Rule Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyRule" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": ["Agent Environment", "policy-rules"], "summary": "Update Rule", "description": "Update a rule.", "operationId": "update_rule_v1_rules__rule_id__patch", "parameters": [ { "name": "rule_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Rule Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyRuleUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyRule" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["Agent Environment", "policy-rules"], "summary": "Delete Rule", "description": "Delete a rule.", "operationId": "delete_rule_v1_rules__rule_id__delete", "parameters": [ { "name": "rule_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Rule Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/rules/": { "get": { "tags": ["Agent Environment", "policy-rules"], "summary": "List Rules", "description": "List rules with optional filters.", "operationId": "list_rules_v1_rules__get", "parameters": [ { "name": "policy_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Policy Id" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/RuleStatus" }, { "type": "null" } ], "title": "Status" } }, { "name": "category", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/PolicyCategory" }, { "type": "null" } ], "title": "Category" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__service_agent_environment__api__rules__RuleListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/rules/{rule_id}/approve": { "post": { "tags": ["Agent Environment", "policy-rules"], "summary": "Approve Rule", "description": "Approve a rule.", "operationId": "approve_rule_v1_rules__rule_id__approve_post", "parameters": [ { "name": "rule_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Rule Id" } }, { "name": "notes", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Notes" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyRule" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/rules/{rule_id}/reject": { "post": { "tags": ["Agent Environment", "policy-rules"], "summary": "Reject Rule", "description": "Reject a rule with a reason.", "operationId": "reject_rule_v1_rules__rule_id__reject_post", "parameters": [ { "name": "rule_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Rule Id" } }, { "name": "reason", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "title": "Reason" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyRule" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/dashboard/trust": { "get": { "tags": ["Agent Environment", "dashboard"], "summary": "Get Trust Dashboard", "description": "Return the Trust Dashboard for the authenticated user's team.\n\nAggregates:\n- Agent list from Agent Registry (DB)\n- Latest evaluation scores from Diamond (S3)\n- Darwin proposal stats (DB)\n- Dome attack status (V1: stub)", "operationId": "get_trust_dashboard_v1_dashboard_trust_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DashboardResponse" } } } } } } }, "/v1/agents/{agent_id}/evolutions": { "post": { "tags": ["Agent Environment", "evolution"], "summary": "Trigger Evolution", "description": "Trigger evolution for an agent.\n\nSends the agent's configuration/identifiers to Darwin to start an\nevolution job. Optional config overrides (sample_size, target_dimensions,\netc.) are forwarded to Darwin when provided.\nReturns 201 Created with a Location header for the new job resource.", "operationId": "trigger_evolution_v1_agents__agent_id__evolutions_post", "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/TriggerEvolutionRequest" }, { "type": "null" } ], "title": "Body" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvolutionJob" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": ["Agent Environment", "evolution"], "summary": "List Evolution Jobs", "description": "List evolution jobs for an agent (paginated).\n\nProxies to Darwin's GET /v1/evolutions with team_id and agent_id.", "operationId": "list_evolution_jobs_v1_agents__agent_id__evolutions_get", "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvolutionJobList" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/agents/{agent_id}/evolutions/{evolution_id}": { "get": { "tags": ["Agent Environment", "evolution"], "summary": "Get Evolution Job Status", "description": "Poll evolution status.\n\nDelegates to EvolutionService which proxies to Darwin's\nGET /v1/evolutions/{evolution_id} with team_id for access control.", "operationId": "get_evolution_job_status_v1_agents__agent_id__evolutions__evolution_id__get", "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "evolution_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Evolution Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvolutionJob" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/agents/{agent_id}/evolution/proposals": { "get": { "tags": ["Agent Environment", "evolution"], "summary": "List Proposals", "description": "List mutation proposals for an agent.\n\nRead-only view for business owners and risk owners to see what Darwin\nhas proposed, evaluated, and whether improvements were verified.", "operationId": "list_proposals_v1_agents__agent_id__evolution_proposals_get", "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProposalList" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/agents/{agent_id}/evolution/proposals/{proposal_id}": { "get": { "tags": ["Agent Environment", "evolution"], "summary": "Get Proposal", "description": "Get a single mutation proposal.\n\nReturns the full proposal including proposed mutations, fitness deltas,\nevaluation results, and review status. Read-only for visibility.", "operationId": "get_proposal_v1_agents__agent_id__evolution_proposals__proposal_id__get", "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "proposal_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Proposal Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Proposal" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/proposals/{proposal_id}": { "get": { "tags": ["Agent Environment", "proposals"], "summary": "Get Proposal By Id", "description": "Get a single mutation proposal by ID.\n\nProxies to Darwin's GET /v1/proposals/{proposal_id} with team_id\nextracted from JWT claims.", "operationId": "get_proposal_by_id_v1_proposals__proposal_id__get", "parameters": [ { "name": "proposal_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Proposal Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Proposal" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/proposals/{proposal_id}/approve": { "post": { "tags": ["Agent Environment", "proposals"], "summary": "Approve Proposal", "description": "Approve a mutation proposal.\n\nExtracts user_id from JWT claims — users cannot approve on behalf\nof others. Forwards to Darwin's POST /v1/proposals/{id}/approve.", "operationId": "approve_proposal_v1_proposals__proposal_id__approve_post", "parameters": [ { "name": "proposal_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Proposal Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApproveProposalRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Proposal" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/proposals/{proposal_id}/reject": { "post": { "tags": ["Agent Environment", "proposals"], "summary": "Reject Proposal", "description": "Reject a mutation proposal.\n\nExtracts user_id from JWT claims. Notes default to empty string\nsince Darwin requires notes for rejection.", "operationId": "reject_proposal_v1_proposals__proposal_id__reject_post", "parameters": [ { "name": "proposal_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Proposal Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RejectProposalRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Proposal" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evolution/status/{agent_id}": { "get": { "tags": ["Agent Environment", "evolution"], "summary": "Get Evolution Status", "description": "Get evolution proposal status for an agent.\n\nProxies to Darwin's GET /evolution/status/{agent_id} with JWT auth.", "operationId": "get_evolution_status_v1_evolution_status__agent_id__get", "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Evolution Status V1 Evolution Status Agent Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evolution/genome-map": { "get": { "tags": ["Agent Environment", "evolution"], "summary": "Get Genome Map", "description": "Get UMAP genome map for the caller's team.\n\nTeam ID is derived from JWT claims to prevent cross-team data access.\nProxies to Darwin's GET /evolution/genome-map with JWT auth.", "operationId": "get_genome_map_v1_evolution_genome_map_get", "parameters": [ { "name": "highlight_agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Highlight Agent Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Genome Map V1 Evolution Genome Map Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/genomes/": { "post": { "tags": ["Agent Environment", "genomes"], "summary": "Create Genome", "description": "Create (seed) a new genome. Proxies to Darwin POST /v1/genomes.", "operationId": "create_genome_v1_genomes__post", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Data" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Create Genome V1 Genomes Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": ["Agent Environment", "genomes"], "summary": "List Genomes", "description": "List genomes with filtering and pagination. Proxies to Darwin.", "operationId": "list_genomes_v1_genomes__get", "parameters": [ { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "description": "Filter by agent", "title": "Agent Id" }, "description": "Filter by agent" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 250, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response List Genomes V1 Genomes Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/genomes/by-agent/{agent_id}": { "get": { "tags": ["Agent Environment", "genomes"], "summary": "Get Genome By Agent", "description": "Get a genome by agent ID. Proxies to Darwin.", "operationId": "get_genome_by_agent_v1_genomes_by_agent__agent_id__get", "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "version", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "Specific version (None = latest)", "title": "Version" }, "description": "Specific version (None = latest)" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Genome By Agent V1 Genomes By Agent Agent Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/genomes/by-agent/{agent_id}/mutation-history": { "get": { "tags": ["Agent Environment", "genomes"], "summary": "Get Mutation History", "description": "Get mutation history for an agent's genome. Proxies to Darwin.", "operationId": "get_mutation_history_v1_genomes_by_agent__agent_id__mutation_history_get", "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 250, "minimum": 1, "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Mutation History V1 Genomes By Agent Agent Id Mutation History Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/genomes/{genome_id}": { "get": { "tags": ["Agent Environment", "genomes"], "summary": "Get Genome", "description": "Get a genome by ID. Proxies to Darwin.", "operationId": "get_genome_v1_genomes__genome_id__get", "parameters": [ { "name": "genome_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Genome Id" } }, { "name": "version", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "Specific version (None = latest)", "title": "Version" }, "description": "Specific version (None = latest)" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Genome V1 Genomes Genome Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["Agent Environment", "genomes"], "summary": "Delete Genome", "description": "Delete a genome and all its versions. Proxies to Darwin.", "operationId": "delete_genome_v1_genomes__genome_id__delete", "parameters": [ { "name": "genome_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Genome Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/genomes/{genome_id}/versions": { "get": { "tags": ["Agent Environment", "genomes"], "summary": "List Genome Versions", "description": "List all versions of a genome. Proxies to Darwin.", "operationId": "list_genome_versions_v1_genomes__genome_id__versions_get", "parameters": [ { "name": "genome_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Genome Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 250, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response List Genome Versions V1 Genomes Genome Id Versions Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/genomes/{genome_id}/versions/{version}": { "get": { "tags": ["Agent Environment", "genomes"], "summary": "Get Genome Version", "description": "Get a specific genome version. Proxies to Darwin.", "operationId": "get_genome_version_v1_genomes__genome_id__versions__version__get", "parameters": [ { "name": "genome_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Genome Id" } }, { "name": "version", "in": "path", "required": true, "schema": { "type": "integer", "title": "Version" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Genome Version V1 Genomes Genome Id Versions Version Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/genomes/{genome_id}/ancestry": { "get": { "tags": ["Agent Environment", "genomes"], "summary": "Get Genome Ancestry", "description": "Get ancestry chain for a genome. Proxies to Darwin.", "operationId": "get_genome_ancestry_v1_genomes__genome_id__ancestry_get", "parameters": [ { "name": "genome_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Genome Id" } }, { "name": "max_depth", "in": "query", "required": false, "schema": { "type": "integer", "description": "Maximum ancestor depth", "default": 5, "title": "Max Depth" }, "description": "Maximum ancestor depth" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Genome Ancestry V1 Genomes Genome Id Ancestry Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/genomes/{genome_id}/diff": { "get": { "tags": ["Agent Environment", "genomes"], "summary": "Diff Genome Versions", "description": "Compare two genome versions. Proxies to Darwin.", "operationId": "diff_genome_versions_v1_genomes__genome_id__diff_get", "parameters": [ { "name": "genome_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Genome Id" } }, { "name": "version_a", "in": "query", "required": true, "schema": { "type": "integer", "description": "First version", "title": "Version A" }, "description": "First version" }, { "name": "version_b", "in": "query", "required": true, "schema": { "type": "integer", "description": "Second version", "title": "Version B" }, "description": "Second version" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Diff Genome Versions V1 Genomes Genome Id Diff Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/genomes/{genome_id}/similar": { "get": { "tags": ["Agent Environment", "genomes"], "summary": "Find Similar Genomes", "description": "Find similar genomes. Proxies to Darwin.", "operationId": "find_similar_genomes_v1_genomes__genome_id__similar_get", "parameters": [ { "name": "genome_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Genome Id" } }, { "name": "version", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "Genome version", "title": "Version" }, "description": "Genome version" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 50, "minimum": 1, "default": 10, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Find Similar Genomes V1 Genomes Genome Id Similar Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/genomes/extract-from-agent/{agent_id}": { "post": { "tags": ["Agent Environment", "genomes"], "summary": "Extract Genome From Agent", "description": "Extract a genome from an existing agent and seed it in Darwin.\n\nFetches the agent config, builds a Genome model from it, and seeds\nthe genome in Darwin via POST /v1/genomes.", "operationId": "extract_genome_from_agent_v1_genomes_extract_from_agent__agent_id__post", "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Extract Genome From Agent V1 Genomes Extract From Agent Agent Id Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/genomes/{genome_id}/to-agent-update": { "get": { "tags": ["Agent Environment", "genomes"], "summary": "Genome To Agent Update", "description": "Convert a genome to an agent update payload.\n\nReads genome from Darwin, then uses dome_converters locally to\ntransform dome_genes into a DomeConfig-compatible format.", "operationId": "genome_to_agent_update_v1_genomes__genome_id__to_agent_update_get", "parameters": [ { "name": "genome_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Genome Id" } }, { "name": "version", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "Specific version", "title": "Version" }, "description": "Specific version" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Genome To Agent Update V1 Genomes Genome Id To Agent Update Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evaluations/": { "get": { "tags": ["Diamond", "evaluations"], "summary": "List Team Evaluations", "description": "List all evaluations for the authenticated user's teams.\n\nThis endpoint lists all evaluations (running and completed) from the job repository.\nFor completed evaluations stored in S3, use GET /evaluations-results/ instead.\n\nArgs:\n claims: JWT claims with user and team info\n diamond_domain: Diamond domain orchestrator\n\nReturns:\n Dict with \"evaluations\" key containing list of evaluation summaries", "operationId": "list_team_evaluations_v1_evaluations__get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, "type": "object", "title": "Response List Team Evaluations V1 Evaluations Get" } } } } } }, "post": { "tags": ["Diamond", "evaluations"], "summary": "Create Evaluation", "description": "Create a new evaluation job.\n\nCreates a Kubernetes Job to run the evaluation and tracks it in memory.\nFetches agent configuration from Agent Registry using the provided agent_id.\nJWT token is retrieved from request context (set by JWTAuthMiddleware).\n\nArgs:\n request: Evaluation configuration with agent_id and team_id\n claims: JWT claims with user and team info\n diamond_domain: Diamond domain orchestrator\n\nReturns:\n Evaluation ID, status, and status URL", "operationId": "create_evaluation_v1_evaluations__post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateEvaluationRequest" } } }, "required": true }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateEvaluationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evaluations/{evaluation_id}/html": { "get": { "tags": ["Diamond", "evaluations"], "summary": "Get Evaluation Html Report", "description": "Get HTML trust report for an evaluation.\n\nReturns the HTML content directly for browser viewing.\nHTML reports are automatically generated when evaluations complete.\n\nArgs:\n evaluation_id: UUID of the evaluation\n team_id: Team ID that owns this evaluation\n claims: JWT claims with user and team info\n report_storage: Report storage adapter\n\nReturns:\n HTML response with the report content\n\nRaises:\n HTTPException: 401 if unauthorized, 403 if no permission, 404 if report not found", "operationId": "get_evaluation_html_report_v1_evaluations__evaluation_id__html_get", "parameters": [ { "name": "evaluation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Evaluation Id" } }, { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team ID that owns this evaluation", "title": "Team Id" }, "description": "Team ID that owns this evaluation" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evaluations/{evaluation_id}/pdf": { "get": { "tags": ["Diamond", "evaluations"], "summary": "Get Evaluation Pdf Report", "description": "Get PDF trust report for an evaluation.\n\nPDF reports are automatically generated when evaluations complete\n(same flow as HTML reports).\n\nArgs:\n evaluation_id: UUID of the evaluation\n team_id: Team ID that owns this evaluation\n claims: JWT claims with user and team info\n report_storage: Report storage adapter\n\nReturns:\n PDF response with the report content\n\nRaises:\n HTTPException: 401 if unauthorized, 403 if no permission, 404 if report not found", "operationId": "get_evaluation_pdf_report_v1_evaluations__evaluation_id__pdf_get", "parameters": [ { "name": "evaluation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Evaluation Id" } }, { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team ID that owns this evaluation", "title": "Team Id" }, "description": "Team ID that owns this evaluation" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evaluations/{evaluation_id}/logs": { "get": { "tags": ["Diamond", "evaluations"], "summary": "Get Evaluation Logs", "description": "Get evaluation job logs from Kubernetes.\n\nArgs:\n evaluation_id: UUID of the evaluation\n claims: JWT claims with user and team info\n diamond_domain: Diamond domain orchestrator\n\nReturns:\n Job logs as dict with \"logs\" key\n\nRaises:\n HTTPException: 404 if logs not available", "operationId": "get_evaluation_logs_v1_evaluations__evaluation_id__logs_get", "parameters": [ { "name": "evaluation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Evaluation Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Get Evaluation Logs V1 Evaluations Evaluation Id Logs Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evaluations/{evaluation_id}": { "get": { "tags": ["Diamond", "evaluations"], "summary": "Get Evaluation", "description": "Get evaluation status.\n\nArgs:\n evaluation_id: UUID of the evaluation (can be job_id or evaluation_id)\n claims: JWT claims with user and team info\n diamond_domain: Diamond domain orchestrator\n\nReturns:\n Current evaluation status with timestamps (returns Diamond's evaluation_id as source of truth)\n\nRaises:\n HTTPException: 404 if evaluation not found or user lacks access\n HTTPException: 503 if evaluation status cannot be retrieved", "operationId": "get_evaluation_v1_evaluations__evaluation_id__get", "parameters": [ { "name": "evaluation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Evaluation Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvaluationStatusResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["Diamond", "evaluations"], "summary": "Delete Evaluation", "description": "Delete evaluation (Kubernetes Job + repository entry + S3 storage).\n\nDeletes the evaluation from:\n- Kubernetes Job (via domain)\n- Repository entry (via domain)\n- S3 storage (request, results, report files)\n\nArgs:\n evaluation_id: UUID of the evaluation\n claims: JWT claims with user and team info\n diamond_domain: Diamond domain orchestrator\n storage: Evaluation storage adapter\n\nReturns:\n Status dict with \"deleted\" status\n\nRaises:\n HTTPException: 404 if evaluation not found", "operationId": "delete_evaluation_v1_evaluations__evaluation_id__delete", "parameters": [ { "name": "evaluation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Evaluation Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Delete Evaluation V1 Evaluations Evaluation Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evaluations/{evaluation_id}/cancel": { "post": { "tags": ["Diamond", "evaluations"], "summary": "Cancel Evaluation", "description": "Cancel a running evaluation (Kubernetes Job cancellation + workflow status update).\n\nCancels an evaluation that is in progress (CREATED, STARTING, or RUNNING status).\nThis will:\n- Delete the Kubernetes Job (which cancels the running pod)\n- Update workflow status to CANCELLED\n- Optionally clean up partial S3 data (request file is kept for audit)\n\nArgs:\n evaluation_id: UUID of the evaluation to cancel\n claims: JWT claims with user and team info\n diamond_domain: Diamond domain orchestrator\n storage: Evaluation storage adapter\n\nReturns:\n Status dict with \"cancelled\" status\n\nRaises:\n HTTPException: 404 if evaluation not found, 400 if evaluation is already completed/cancelled", "operationId": "cancel_evaluation_v1_evaluations__evaluation_id__cancel_post", "parameters": [ { "name": "evaluation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Evaluation Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Cancel Evaluation V1 Evaluations Evaluation Id Cancel Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evaluations/{evaluation_id}/report": { "post": { "tags": ["Diamond", "evaluations"], "summary": "Generate Report On Demand", "description": "Generate a trust report on demand (Layer 3).\n\nThis endpoint triggers LLM analysis + HTML/PDF report generation\nfor a completed evaluation. Reports are cached in S3 — subsequent\ncalls return the cached version unless force_regenerate=True.\n\nReports are NOT auto-generated on evaluation completion (CON-256).\nUsers explicitly request reports when they need proof of compliance\nor want a printable summary.", "operationId": "generate_report_on_demand_v1_evaluations__evaluation_id__report_post", "parameters": [ { "name": "evaluation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Evaluation Id" } }, { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team that owns this evaluation", "title": "Team Id" }, "description": "Team that owns this evaluation" }, { "name": "force_regenerate", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Force regeneration even if cached", "default": false, "title": "Force Regenerate" }, "description": "Force regeneration even if cached" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Generate Report On Demand V1 Evaluations Evaluation Id Report Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evaluation-results/": { "get": { "tags": ["Diamond", "evaluation-results"], "summary": "List Completed Evaluations", "description": "List completed evaluations from S3 storage for a specific team.\n\nThis endpoint lists only completed evaluations that have results stored in S3.\nIt requires the team_id as a query parameter and respects permission checks.\nSupports paging via limit (default 10) and offset.\n\nArgs:\n team_id: Team ID to list evaluations for (required query parameter)\n limit: Max number of results (default 10, max 100)\n offset: Number of results to skip for paging\n claims: JWT claims with user and team info\n diamond_domain: Diamond domain for listing evaluations (newest-first sort + paginate)\n agent_adapter: Agent registry adapter for looking up agent names\n\nReturns:\n List of completed evaluations with evaluation_id, team_id, agent information, and total count\n\nRaises:\n HTTPException: 401 if unauthorized, 403 if no permission", "operationId": "list_completed_evaluations_v1_evaluation_results__get", "parameters": [ { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Team Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Maximum number of results to return", "default": 10, "title": "Limit" }, "description": "Maximum number of results to return" }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Number of results to skip for paging", "default": 0, "title": "Offset" }, "description": "Number of results to skip for paging" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvaluationListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evaluation-results/{evaluation_id}/results": { "get": { "tags": ["Diamond", "evaluation-results"], "summary": "Get Evaluation Results", "description": "Get evaluation results from S3 storage.\n\nThe results are saved to S3 after the evaluation job completes.\nThis endpoint searches S3 directly (no repository dependency).\n\nArgs:\n evaluation_id: UUID of the evaluation\n team_id: Team ID that owns this evaluation (required query parameter)\n claims: JWT claims with user and team info\n diamond_domain: Diamond domain orchestrator (not used, kept for API consistency)\n storage: Evaluation storage adapter\n\nReturns:\n Evaluation results as JSON\n\nRaises:\n HTTPException: 404 if not found, 403 if no permission", "operationId": "get_evaluation_results_v1_evaluation_results__evaluation_id__results_get", "parameters": [ { "name": "evaluation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Evaluation Id" } }, { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team ID that owns this evaluation", "title": "Team Id" }, "description": "Team ID that owns this evaluation" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Evaluation Results V1 Evaluation Results Evaluation Id Results Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evaluation-results/{evaluation_id}/report": { "get": { "tags": ["Diamond", "evaluation-results"], "summary": "Get Evaluation Report", "description": "Download evaluation report PDF from S3 storage.\n\nThe report is saved to S3 after the evaluation job completes.\nThis endpoint searches S3 directly (no repository dependency).\n\nArgs:\n evaluation_id: UUID of the evaluation\n team_id: Team ID that owns this evaluation (required query parameter)\n claims: JWT claims with user and team info\n diamond_domain: Diamond domain orchestrator (not used, kept for API consistency)\n storage: Evaluation storage adapter\n\nReturns:\n PDF file response\n\nRaises:\n HTTPException: 404 if report not found in storage, 403 if no permission", "operationId": "get_evaluation_report_v1_evaluation_results__evaluation_id__report_get", "parameters": [ { "name": "evaluation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Evaluation Id" } }, { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team ID that owns this evaluation", "title": "Team Id" }, "description": "Team ID that owns this evaluation" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evaluation-results/{evaluation_id}/report.html": { "get": { "tags": ["Diamond", "evaluation-results"], "summary": "Get Evaluation Report Html", "description": "Download evaluation report HTML from S3 storage.\n\nThe HTML report is saved to S3 after the evaluation job completes.\nThis is the preferred report format - can be viewed in browser or printed to PDF.\n\nArgs:\n evaluation_id: UUID of the evaluation\n team_id: Team ID that owns this evaluation (required query parameter)\n claims: JWT claims with user and team info\n diamond_domain: Diamond domain orchestrator (not used, kept for API consistency)\n storage: Evaluation storage adapter\n\nReturns:\n HTML file response\n\nRaises:\n HTTPException: 404 if report not found in storage, 403 if no permission", "operationId": "get_evaluation_report_html_v1_evaluation_results__evaluation_id__report_html_get", "parameters": [ { "name": "evaluation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Evaluation Id" } }, { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team ID that owns this evaluation", "title": "Team Id" }, "description": "Team ID that owns this evaluation" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evaluation-summaries/": { "get": { "tags": ["Diamond", "evaluation-summaries"], "summary": "List Evaluation Summaries", "description": "List evaluation summaries for a team with optional filters and pagination.\n\nArgs:\n team_id: Team ID to list summaries for (required)\n agent_id: Optional filter by agent ID\n status: Optional filter by status (running, completed, failed, cancelled)\n harness_type: Optional filter by harness type\n tested_by: Optional filter by evaluation tool\n limit: Max number of results (default 10, max 100)\n offset: Number of results to skip for paging\n claims: JWT claims with user and team info\n summary_repo: Evaluation summary repository\n\nReturns:\n Paginated list of evaluation summaries with total count\n\nRaises:\n HTTPException: 401 if unauthorized, 403 if no permission", "operationId": "list_evaluation_summaries_v1_evaluation_summaries__get", "parameters": [ { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team ID to list summaries for", "title": "Team Id" }, "description": "Team ID to list summaries for" }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "description": "Filter by agent ID", "title": "Agent Id" }, "description": "Filter by agent ID" }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/EvaluationStatus" }, { "type": "null" } ], "description": "Filter by status (running, completed, failed, cancelled)", "title": "Status" }, "description": "Filter by status (running, completed, failed, cancelled)" }, { "name": "harness_type", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": ["standard", "custom"], "type": "string" }, { "type": "null" } ], "description": "Filter by harness type (standard or custom)", "title": "Harness Type" }, "description": "Filter by harness type (standard or custom)" }, { "name": "tested_by", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/EvaluationTool" }, { "type": "null" } ], "description": "Filter by tool that ran the evaluation", "title": "Tested By" }, "description": "Filter by tool that ran the evaluation" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Maximum number of results to return", "default": 10, "title": "Limit" }, "description": "Maximum number of results to return" }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Number of results to skip for paging", "default": 0, "title": "Offset" }, "description": "Number of results to skip for paging" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvaluationSummaryListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evaluation-summaries/latest-by-agent": { "get": { "tags": ["Diamond", "evaluation-summaries"], "summary": "List Latest Evaluation Summaries By Agent", "description": "Return the latest completed evaluation summary per agent for the team.\n\nUses server-side grouping (one row per agent_id with max completed_at).\nNo pagination; returns at most one summary per agent that has a completed evaluation.", "operationId": "list_latest_evaluation_summaries_by_agent_v1_evaluation_summaries_latest_by_agent_get", "parameters": [ { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team ID to list latest summary per agent for", "title": "Team Id" }, "description": "Team ID to list latest summary per agent for" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvaluationSummaryListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evaluation-summaries/{evaluation_id}": { "get": { "tags": ["Diamond", "evaluation-summaries"], "summary": "Get Evaluation Summary", "description": "Get a single evaluation summary by evaluation ID.\n\nArgs:\n evaluation_id: UUID of the evaluation (same as summary ID)\n team_id: Team ID that owns this evaluation\n claims: JWT claims with user and team info\n summary_repo: Evaluation summary repository\n\nReturns:\n Evaluation summary with scores and metadata\n\nRaises:\n HTTPException: 401 if unauthorized, 403 if no permission, 404 if not found", "operationId": "get_evaluation_summary_v1_evaluation_summaries__evaluation_id__get", "parameters": [ { "name": "evaluation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Evaluation Id" } }, { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team ID that owns this evaluation", "title": "Team Id" }, "description": "Team ID that owns this evaluation" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvaluationSummaryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["Diamond", "evaluation-summaries"], "summary": "Delete Evaluation Summary", "description": "Delete an evaluation summary row.\n\nThis endpoint only removes the summary cache row — it does not delete\nthe underlying evaluation job or S3 artifacts. To fully delete an\nevaluation, use DELETE /evaluations/{evaluation_id}.\n\nArgs:\n evaluation_id: UUID of the evaluation summary to delete\n team_id: Team ID that owns this evaluation\n claims: JWT claims with user and team info\n summary_repo: Evaluation summary repository\n\nRaises:\n HTTPException: 401 if unauthorized, 403 if no permission, 404 if not found", "operationId": "delete_evaluation_summary_v1_evaluation_summaries__evaluation_id__delete", "parameters": [ { "name": "evaluation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Evaluation Id" } }, { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team ID that owns this evaluation", "title": "Team Id" }, "description": "Team ID that owns this evaluation" } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/harnesses/": { "get": { "tags": ["Diamond", "harnesses"], "summary": "List Harnesses", "description": "List all standard harnesses (global resources).\n\nStandard harnesses are global and not scoped to a team.\nThey are read-only and managed externally.\n\nArgs:\n team_id: Team ID (required for permission checks)\n claims: JWT claims with user and team info\n harness_service: Harness service instance\n \nReturns:\n List of harness items, ordered by updated_at descending\n \nRaises:\n HTTPException: 422 if team_id is missing, 403 if user lacks permission, 500 on server errors", "operationId": "list_harnesses_v1_harnesses__get", "parameters": [ { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team ID (required)", "title": "Team Id" }, "description": "Team ID (required)" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/HarnessListItem" }, "title": "Response List Harnesses V1 Harnesses Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/custom-harnesses/": { "get": { "tags": ["Diamond", "custom-harnesses"], "summary": "List Custom Harnesses", "description": "List custom harnesses for the specified team with pagination and filtering.\n\nReturns paginated list of harnesses owned by the specified team.\nSupports filtering by status.\n\nRequires agent:read permission.", "operationId": "list_custom_harnesses_v1_custom_harnesses__get", "parameters": [ { "name": "team_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "description": "Team ID (required)", "title": "Team Id" }, "description": "Team ID (required)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Maximum number of results (default 10)", "default": 10, "title": "Limit" }, "description": "Maximum number of results (default 10)" }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Number of results to skip for paging", "default": 0, "title": "Offset" }, "description": "Number of results to skip for paging" }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/CustomHarnessStatus" }, { "type": "null" } ], "description": "Filter by status", "title": "Status" }, "description": "Filter by status" }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "description": "Filter by agent ID", "title": "Agent Id" }, "description": "Filter by agent ID" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomHarnessListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": ["Diamond", "custom-harnesses"], "summary": "Create Custom Harness", "description": "Create a new custom harness.\n\nCreates a harness in 'draft' status. The harness can be configured with\nan agent, personas, and policies before being activated.\n\nNote: Harnesses are immutable once created - they cannot be updated.\n\nRequires agent:write permission.", "operationId": "create_custom_harness_v1_custom_harnesses__post", "parameters": [ { "name": "team_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "description": "Team ID (required)", "title": "Team Id" }, "description": "Team ID (required)" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomHarnessCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomHarness" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/custom-harnesses/{harness_id}": { "get": { "tags": ["Diamond", "custom-harnesses"], "summary": "Get Custom Harness", "description": "Get a single custom harness by ID with optional workflow status.\n\nReturns the harness (business status: DRAFT/ACTIVE/ARCHIVED) enriched with\nworkflow status (execution state: RUNNING/SUCCEEDED/FAILED) if a workflow exists.\n\nClient interpretation:\n- harness.status=DRAFT + no workflow = Not started yet\n- harness.status=DRAFT + workflow.status=RUNNING = Generation in progress\n- harness.status=DRAFT + workflow.status=FAILED = Generation failed, can retry\n- harness.status=ACTIVE = Generation completed successfully\n\nRequires agent:read permission.", "operationId": "get_custom_harness_v1_custom_harnesses__harness_id__get", "parameters": [ { "name": "harness_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Harness Id" } }, { "name": "team_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "description": "Team ID (required)", "title": "Team Id" }, "description": "Team ID (required)" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomHarnessResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["Diamond", "custom-harnesses"], "summary": "Delete Custom Harness", "description": "Delete a custom harness.\n\nPermanently deletes the harness and any associated data.\n\nRequires agent:write permission.", "operationId": "delete_custom_harness_v1_custom_harnesses__harness_id__delete", "parameters": [ { "name": "harness_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Harness Id" } }, { "name": "team_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "description": "Team ID (required)", "title": "Team Id" }, "description": "Team ID (required)" } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/custom-harnesses/{harness_id}/cancel": { "post": { "tags": ["Diamond", "custom-harnesses"], "summary": "Cancel Custom Harness", "description": "Cancel a running custom harness creation workflow.\n\nUses harness_id to load the harness from S3, then the harness's workflow_id to load the\nworkflow. If workflow_specific_fields (task_id, session_id) are present, sends cancel to the\nagent; otherwise marks the workflow as cancelled so the worker will not overwrite with\nsuccess/failure. Requires agent:write permission.", "operationId": "cancel_custom_harness_v1_custom_harnesses__harness_id__cancel_post", "parameters": [ { "name": "harness_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Harness Id" } }, { "name": "team_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "description": "Team ID (required)", "title": "Team Id" }, "description": "Team ID (required)" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Cancel Custom Harness V1 Custom Harnesses Harness Id Cancel Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/custom-harnesses/{harness_id}/prompts": { "get": { "tags": ["Diamond", "custom-harnesses"], "summary": "Get Custom Harness Prompts", "description": "Return taxonomy prompts from ``harness_prompts.jsonl`` for a custom harness.\n\nServed by service-diamond; loads JSONL from the team custom-harness S3 path.\nDoes not read Trust Score ``prompt.jsonl``.\n\nReturns an empty list if the file is missing or empty (e.g. harness still in DRAFT).\n\nRequires agent:read permission.", "operationId": "get_custom_harness_prompts_v1_custom_harnesses__harness_id__prompts_get", "parameters": [ { "name": "harness_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Harness Id" } }, { "name": "team_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "description": "Team ID (required)", "title": "Team Id" }, "description": "Team ID (required)" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HarnessPromptsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/webhooks/register-dome": { "post": { "tags": ["Dome", "webhooks"], "summary": "Register Dome", "description": "Register a Dome instance URL for an agent (called by Dome at runtime).\n\nIdempotent: safe to call on every Dome restart; each call overwrites the\nstored dome_url for that agent's config.", "operationId": "register_dome_v1_webhooks_register_dome_post", "parameters": [ { "name": "X-Webhook-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Webhook-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterDomeRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterDomeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/detections": { "post": { "tags": ["Dome", "detections"], "summary": "Create Detection", "description": "Create a new detection request.\n\nThis endpoint accepts a detection request and starts processing it\nasynchronously. The response includes the detection ID which can be\nused to poll for results via GET /detections/{id}.\n\nNote: This endpoint does not require authentication to support\nthe Execution Flow test input feature.", "operationId": "create_detection_v1_detections_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DetectionRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DetectionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/detections/{detection_id}": { "get": { "tags": ["Dome", "detections"], "summary": "Get Detection", "description": "Get a detection by ID.\n\nReturns the current status and results of a detection.\nStatus values:\n- CREATED: Detection is queued for processing\n- PROCESSING: Detection is being processed\n- COMPLETED: Detection finished successfully\n- ERROR: Detection failed\n\nNote: This endpoint does not require authentication to support\nthe Execution Flow test input feature.", "operationId": "get_detection_v1_detections__detection_id__get", "parameters": [ { "name": "detection_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Detection Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DetectionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/dome-configs": { "post": { "tags": ["Dome", "dome-configs"], "summary": "Create Dome Config", "description": "Create a new Dome configuration.\n\nIf no config_body is provided, uses the default configuration.\nA dome config is standalone and can be assigned to multiple agents via the agent's dome_config_id.", "operationId": "create_dome_config_v1_dome_configs_post", "parameters": [ { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team ID (required)", "title": "Team Id" }, "description": "Team ID (required)" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DomeConfigCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DomeConfigResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": ["Dome", "dome-configs"], "summary": "List Dome Configs", "description": "List dome configs for the team; optional filter by bound agent_id column.", "operationId": "list_dome_configs_v1_dome_configs_get", "parameters": [ { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team ID (required)", "title": "Team Id" }, "description": "Team ID (required)" }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "description": "If set, only configs whose dome_configs.agent_id matches (paginated).", "title": "Agent Id" }, "description": "If set, only configs whose dome_configs.agent_id matches (paginated)." }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "description": "Page size", "default": 100, "title": "Limit" }, "description": "Page size" }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Pagination offset", "default": 0, "title": "Offset" }, "description": "Pagination offset" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DomeConfigListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/dome-configs/{config_id}": { "get": { "tags": ["Dome", "dome-configs"], "summary": "Get Dome Config", "description": "Get a Dome configuration by ID.", "operationId": "get_dome_config_v1_dome_configs__config_id__get", "parameters": [ { "name": "config_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Config Id" } }, { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team ID (required)", "title": "Team Id" }, "description": "Team ID (required)" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DomeConfigResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": ["Dome", "dome-configs"], "summary": "Update Dome Config", "description": "Update a Dome configuration.", "operationId": "update_dome_config_v1_dome_configs__config_id__put", "parameters": [ { "name": "config_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Config Id" } }, { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team ID (required)", "title": "Team Id" }, "description": "Team ID (required)" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DomeConfigUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DomeConfigResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": ["Dome", "dome-configs"], "summary": "Patch Dome Config", "description": "Partially update a Dome configuration (e.g. set or clear dome instance URL).", "operationId": "patch_dome_config_v1_dome_configs__config_id__patch", "parameters": [ { "name": "config_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Config Id" } }, { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team ID (required)", "title": "Team Id" }, "description": "Team ID (required)" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DomeConfigPatch" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DomeConfigResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["Dome", "dome-configs"], "summary": "Delete Dome Config", "description": "Delete a Dome configuration.", "operationId": "delete_dome_config_v1_dome_configs__config_id__delete", "parameters": [ { "name": "config_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Config Id" } }, { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team ID (required)", "title": "Team Id" }, "description": "Team ID (required)" } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/dome-configs/{config_id}/apply": { "post": { "tags": ["Dome", "dome-configs"], "summary": "Apply Dome Config", "description": "Apply a saved dome config: promotes config_pending.json to config.json and binds it to the agent.\n\nBacks up the existing config.json as {config_id}_config.json, promotes\nconfig_pending.json to config.json, and sets the agent's dome_config_id\nand protection_status to domed.", "operationId": "apply_dome_config_v1_dome_configs__config_id__apply_post", "parameters": [ { "name": "config_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Config Id" } }, { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team ID (required)", "title": "Team Id" }, "description": "Team ID (required)" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DomeConfigResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/default-dome-config": { "get": { "tags": ["Dome", "dome-configs"], "summary": "Get Default Dome Config", "description": "Get the default Dome configuration.\n\nReturns the default guard configuration for new agents.\nThis endpoint does not require authentication.", "operationId": "get_default_dome_config_v1_default_dome_config_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Get Default Dome Config V1 Default Dome Config Get" } } } } } } }, "/v1/telemetry/counters/{metric_name}/total": { "get": { "tags": ["Dome", "Telemetry"], "summary": "Get Counter Total", "description": "Get total counter value.", "operationId": "get_counter_total_v1_telemetry_counters__metric_name__total_get", "parameters": [ { "name": "metric_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Metric Name" } }, { "name": "time_range", "in": "query", "required": false, "schema": { "enum": ["15m", "30m", "1h", "2h", "6h", "1d", "7d", "30d"], "type": "string", "description": "Time range: 15m, 30m, 1h, 2h, 6h, 1d, 7d, 30d", "default": "1d", "title": "Time Range" }, "description": "Time range: 15m, 30m, 1h, 2h, 6h, 1d, 7d, 30d" }, { "name": "evaluation_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by evaluation ID", "title": "Evaluation Id" }, "description": "Filter by evaluation ID" }, { "name": "test_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by test ID", "title": "Test Id" }, "description": "Filter by test ID" }, { "name": "probe_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by probe ID", "title": "Probe Id" }, "description": "Filter by probe ID" }, { "name": "agent_configuration_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by agent configuration ID", "title": "Agent Configuration Id" }, "description": "Filter by agent configuration ID" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CounterTotalResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/telemetry/counters/{metric_name}/time_series": { "get": { "tags": ["Dome", "Telemetry"], "summary": "Get Counter Time Series", "description": "Get counter time series.", "operationId": "get_counter_time_series_v1_telemetry_counters__metric_name__time_series_get", "parameters": [ { "name": "metric_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Metric Name" } }, { "name": "time_range", "in": "query", "required": false, "schema": { "enum": ["15m", "30m", "1h", "2h", "6h", "1d", "7d", "30d"], "type": "string", "description": "Time range: 15m, 30m, 1h, 2h, 6h, 1d, 7d, 30d", "default": "1d", "title": "Time Range" }, "description": "Time range: 15m, 30m, 1h, 2h, 6h, 1d, 7d, 30d" }, { "name": "evaluation_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by evaluation ID", "title": "Evaluation Id" }, "description": "Filter by evaluation ID" }, { "name": "agent_configuration_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by agent configuration ID", "title": "Agent Configuration Id" }, "description": "Filter by agent configuration ID" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetricQueryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/telemetry/latency/{metric_name}": { "get": { "tags": ["Dome", "Telemetry"], "summary": "Get Latency Over Time", "description": "Get latency over time.", "operationId": "get_latency_over_time_v1_telemetry_latency__metric_name__get", "parameters": [ { "name": "metric_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Metric Name" } }, { "name": "time_range", "in": "query", "required": false, "schema": { "enum": ["15m", "30m", "1h", "2h", "6h", "1d", "7d", "30d"], "type": "string", "description": "Time range: 15m, 30m, 1h, 2h, 6h, 1d, 7d, 30d", "default": "1h", "title": "Time Range" }, "description": "Time range: 15m, 30m, 1h, 2h, 6h, 1d, 7d, 30d" }, { "name": "time_window", "in": "query", "required": false, "schema": { "type": "string", "description": "Time window for aggregation (e.g., '1m', '5m', '15m')", "default": "1m", "title": "Time Window" }, "description": "Time window for aggregation (e.g., '1m', '5m', '15m')" }, { "name": "percentiles", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Comma-separated list of percentiles to query (e.g., '0.5,0.95'). If not specified, defaults to [0.5, 0.9, 0.95, 0.99]", "title": "Percentiles" }, "description": "Comma-separated list of percentiles to query (e.g., '0.5,0.95'). If not specified, defaults to [0.5, 0.9, 0.95, 0.99]" }, { "name": "evaluation_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by evaluation ID", "title": "Evaluation Id" }, "description": "Filter by evaluation ID" }, { "name": "test_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by test ID", "title": "Test Id" }, "description": "Filter by test ID" }, { "name": "probe_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by probe ID", "title": "Probe Id" }, "description": "Filter by probe ID" }, { "name": "agent_configuration_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by agent configuration ID", "title": "Agent Configuration Id" }, "description": "Filter by agent configuration ID" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/LatencyOverTimeResponse" }, "title": "Response Get Latency Over Time V1 Telemetry Latency Metric Name Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/telemetry/logs": { "get": { "tags": ["Dome", "Telemetry"], "summary": "Get Logs", "description": "Get logs.", "operationId": "get_logs_v1_telemetry_logs_get", "parameters": [ { "name": "time_range", "in": "query", "required": false, "schema": { "enum": ["15m", "30m", "1h", "2h", "6h", "1d", "7d", "30d"], "type": "string", "description": "Window to pull logs for", "default": "1h", "title": "Time Range" }, "description": "Window to pull logs for" }, { "name": "service_name", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by service_name label", "title": "Service Name" }, "description": "Filter by service_name label" }, { "name": "level", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by level label", "title": "Level" }, "description": "Filter by level label" }, { "name": "job", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by job label", "title": "Job" }, "description": "Filter by job label" }, { "name": "exporter", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by exporter label", "title": "Exporter" }, "description": "Filter by exporter label" }, { "name": "agent_configuration_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Restrict to a specific agent configuration id", "title": "Agent Configuration Id" }, "description": "Restrict to a specific agent configuration id" }, { "name": "evaluation_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Restrict logs to an evaluation id", "title": "Evaluation Id" }, "description": "Restrict logs to an evaluation id" }, { "name": "test_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Restrict logs to a test id", "title": "Test Id" }, "description": "Restrict logs to a test id" }, { "name": "probe_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Restrict logs to a probe id", "title": "Probe Id" }, "description": "Restrict logs to a probe id" }, { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Substring search applied via LogQL pipeline", "title": "Search" }, "description": "Substring search applied via LogQL pipeline" }, { "name": "logql", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Advanced LogQL expression (overrides generated selector when provided)", "title": "Logql" }, "description": "Advanced LogQL expression (overrides generated selector when provided)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 5000, "minimum": 1, "description": "Maximum log lines to return", "default": 200, "title": "Limit" }, "description": "Maximum log lines to return" }, { "name": "direction", "in": "query", "required": false, "schema": { "enum": ["forward", "backward"], "type": "string", "description": "Return order for log entries", "default": "backward", "title": "Direction" }, "description": "Return order for log entries" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LogsQueryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/telemetry/traces": { "get": { "tags": ["Dome", "Telemetry"], "summary": "Search Traces", "description": "Search traces.", "operationId": "search_traces_v1_telemetry_traces_get", "parameters": [ { "name": "time_range", "in": "query", "required": false, "schema": { "enum": ["15m", "30m", "1h", "2h", "6h", "1d", "7d", "30d"], "type": "string", "description": "Window to search for traces", "default": "1h", "title": "Time Range" }, "description": "Window to search for traces" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "description": "Maximum number of traces to return", "default": 20, "title": "Limit" }, "description": "Maximum number of traces to return" }, { "name": "service_name", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by root service", "title": "Service Name" }, "description": "Filter by root service" }, { "name": "agent_configuration_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by agent id", "title": "Agent Configuration Id" }, "description": "Filter by agent id" }, { "name": "min_duration_ms", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "Lower bound on trace duration (ms)", "title": "Min Duration Ms" }, "description": "Lower bound on trace duration (ms)" }, { "name": "max_duration_ms", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "Upper bound on trace duration (ms)", "title": "Max Duration Ms" }, "description": "Upper bound on trace duration (ms)" }, { "name": "query", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Advanced TraceQL query", "title": "Query" }, "description": "Advanced TraceQL query" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TraceSearchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/telemetry/traces/{trace_id}": { "get": { "tags": ["Dome", "Telemetry"], "summary": "Get Trace By Id", "description": "Get trace by ID.", "operationId": "get_trace_by_id_v1_telemetry_traces__trace_id__get", "parameters": [ { "name": "trace_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Trace Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TraceDetailResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tools": { "get": { "tags": ["Red Team", "redteam"], "summary": "List Tools", "description": "List available red team tools and their supported attack categories.", "operationId": "list_tools_v1_tools_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/ToolInfo" }, "type": "array", "title": "Response List Tools V1 Tools Get" } } } } } } }, "/v1/campaigns": { "get": { "tags": ["Red Team", "redteam"], "summary": "List Campaigns", "description": "List all red team campaigns across all teams the user belongs to (subject to per-team permissions).", "operationId": "list_campaigns_v1_campaigns_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, "type": "object", "title": "Response List Campaigns V1 Campaigns Get" } } } } } }, "post": { "tags": ["Red Team", "redteam"], "summary": "Create Campaign", "description": "Create a new red team campaign.\n\nLaunches a K8s Job to run the selected tool against the target agent.\nReturns immediately with a pending status; poll via GET for updates.", "operationId": "create_campaign_v1_campaigns_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCampaignRequest" } } }, "required": true }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCampaignResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/campaigns/{campaign_id}": { "get": { "tags": ["Red Team", "redteam"], "summary": "Get Campaign Status", "description": "Get the status of a red team campaign.", "operationId": "get_campaign_status_v1_campaigns__campaign_id__get", "parameters": [ { "name": "campaign_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Campaign Id" } }, { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team that owns this campaign", "title": "Team Id" }, "description": "Team that owns this campaign" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CampaignStatusResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["Red Team", "redteam"], "summary": "Delete Campaign", "description": "Delete a red team campaign and all its S3 artifacts.", "operationId": "delete_campaign_v1_campaigns__campaign_id__delete", "parameters": [ { "name": "campaign_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Campaign Id" } }, { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team that owns this campaign", "title": "Team Id" }, "description": "Team that owns this campaign" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Delete Campaign V1 Campaigns Campaign Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/campaigns/{campaign_id}/results/download": { "get": { "tags": ["Red Team", "redteam"], "summary": "Download Campaign Results", "description": "Download campaign results as a JSON file (attachment).\n\nReturns the same data as GET .../results but with Content-Disposition\nso the browser prompts to save as results_{tool}_{campaign_id}.json.", "operationId": "download_campaign_results_v1_campaigns__campaign_id__results_download_get", "parameters": [ { "name": "campaign_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Campaign Id" } }, { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team that owns this campaign", "title": "Team Id" }, "description": "Team that owns this campaign" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/campaigns/{campaign_id}/results": { "get": { "tags": ["Red Team", "redteam"], "summary": "Get Campaign Results", "description": "Get normalized results of a completed red team campaign.", "operationId": "get_campaign_results_v1_campaigns__campaign_id__results_get", "parameters": [ { "name": "campaign_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Campaign Id" } }, { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team that owns this campaign", "title": "Team Id" }, "description": "Team that owns this campaign" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RedteamResult" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/campaigns/{campaign_id}/logs": { "get": { "tags": ["Red Team", "redteam"], "summary": "Get Campaign Logs", "description": "Get logs from the campaign's Kubernetes job pod.\n\nReturns pod stdout/stderr. Useful when the job fails or results are missing.", "operationId": "get_campaign_logs_v1_campaigns__campaign_id__logs_get", "parameters": [ { "name": "campaign_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Campaign Id" } }, { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team that owns this campaign", "title": "Team Id" }, "description": "Team that owns this campaign" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Get Campaign Logs V1 Campaigns Campaign Id Logs Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/campaigns/{campaign_id}/cancel": { "post": { "tags": ["Red Team", "redteam"], "summary": "Cancel Campaign", "description": "Cancel a running red team campaign.", "operationId": "cancel_campaign_v1_campaigns__campaign_id__cancel_post", "parameters": [ { "name": "campaign_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Campaign Id" } }, { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "description": "Team that owns this campaign", "title": "Team Id" }, "description": "Team that owns this campaign" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Cancel Campaign V1 Campaigns Campaign Id Cancel Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } } }, "components": { "schemas": { "ChangePasswordRequest": { "properties": { "current_password": { "type": "string", "title": "Current Password" }, "new_password": { "type": "string", "minLength": 8, "title": "New Password" } }, "type": "object", "required": ["current_password", "new_password"], "title": "ChangePasswordRequest", "description": "Request model for changing password." }, "CreateUserRequest": { "properties": { "email": { "type": "string", "format": "email", "title": "Email", "description": "User email address" }, "password": { "type": "string", "minLength": 8, "title": "Password", "description": "User password" }, "given_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Given Name", "description": "User's given name" }, "family_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Family Name", "description": "User's family name" }, "external_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External User Id", "description": "External user identifier" }, "profile_image": { "anyOf": [ { "type": "string", "maxLength": 2083, "minLength": 1, "format": "uri" }, { "type": "null" } ], "title": "Profile Image", "description": "URL to user's profile image" }, "team_id": { "type": "string", "format": "uuid", "title": "Team Id", "description": "ID of the team to assign the user to" }, "password_change_required": { "type": "boolean", "title": "Password Change Required", "description": "Whether the user must change their password on first login", "default": true } }, "type": "object", "required": ["email", "password", "team_id"], "title": "CreateUserRequest", "description": "Request model for creating a user with team assignment." }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "Invitation": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "team_id": { "type": "string", "format": "uuid", "title": "Team Id" }, "email": { "type": "string", "title": "Email" }, "invited_by": { "type": "string", "format": "uuid", "title": "Invited By" }, "role": { "$ref": "#/components/schemas/TeamRole" }, "status": { "$ref": "#/components/schemas/InvitationStatus" }, "created_at": { "type": "integer", "title": "Created At" }, "expires_at": { "type": "integer", "title": "Expires At" } }, "type": "object", "required": [ "id", "team_id", "email", "invited_by", "role", "status", "created_at", "expires_at" ], "title": "Invitation", "description": "Team invitation domains model." }, "InvitationStatus": { "type": "string", "enum": ["PENDING", "ACCEPTED", "DECLINED", "EXPIRED"], "title": "InvitationStatus", "description": "Invitation status." }, "InviteUserRequest": { "properties": { "email": { "type": "string", "minLength": 1, "title": "Email", "description": "Email address of the user to invite" }, "role": { "$ref": "#/components/schemas/TeamRole", "description": "Role to assign to the invited user", "default": "MEMBER" } }, "type": "object", "required": ["email"], "title": "InviteUserRequest", "description": "Request model for inviting a user to a team (team_id comes from path)." }, "LoginRequest": { "properties": { "email": { "type": "string", "title": "Email" }, "password": { "type": "string", "title": "Password" } }, "type": "object", "required": ["email", "password"], "title": "LoginRequest", "description": "Login request model." }, "Membership": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "team_id": { "type": "string", "format": "uuid", "title": "Team Id" }, "user_id": { "type": "string", "format": "uuid", "title": "User Id" }, "role": { "$ref": "#/components/schemas/TeamRole" }, "created_at": { "type": "integer", "title": "Created At" }, "updated_at": { "type": "integer", "title": "Updated At" } }, "type": "object", "required": ["id", "team_id", "user_id", "role", "created_at", "updated_at"], "title": "Membership", "description": "Team membership domains model." }, "MembershipWithTeam": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "team_id": { "type": "string", "format": "uuid", "title": "Team Id" }, "user_id": { "type": "string", "format": "uuid", "title": "User Id" }, "role": { "$ref": "#/components/schemas/TeamRole" }, "created_at": { "type": "integer", "title": "Created At" }, "updated_at": { "type": "integer", "title": "Updated At" }, "team_name": { "type": "string", "title": "Team Name" }, "team_description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Team Description" } }, "type": "object", "required": [ "id", "team_id", "user_id", "role", "created_at", "updated_at", "team_name", "team_description" ], "title": "MembershipWithTeam", "description": "Team membership with team name and description." }, "Team": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "description": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Description" }, "created_by": { "type": "string", "format": "uuid", "title": "Created By" }, "created_at": { "type": "integer", "title": "Created At" }, "updated_at": { "type": "integer", "title": "Updated At" } }, "type": "object", "required": ["id", "name", "created_by", "created_at", "updated_at"], "title": "Team", "description": "Team domains model." }, "TeamCreate": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "description": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Description" } }, "type": "object", "required": ["name"], "title": "TeamCreate", "description": "Model for creating a new team." }, "TeamRole": { "type": "string", "enum": ["OWNER", "ADMIN", "MEMBER"], "title": "TeamRole", "description": "Team membership roles." }, "TeamUser": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "email": { "type": "string", "format": "email", "title": "Email" }, "given_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Given Name" }, "family_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Family Name" }, "external_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External User Id" }, "profile_image": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Profile Image" }, "is_active": { "type": "boolean", "title": "Is Active" }, "is_verified": { "type": "boolean", "title": "Is Verified" }, "is_super_admin": { "type": "boolean", "title": "Is Super Admin", "default": false }, "role": { "$ref": "#/components/schemas/TeamRole" }, "membership_id": { "type": "string", "format": "uuid", "title": "Membership Id" }, "joined_at": { "type": "integer", "title": "Joined At" } }, "type": "object", "required": [ "id", "email", "is_active", "is_verified", "role", "membership_id", "joined_at" ], "title": "TeamUser", "description": "User information with team membership details." }, "UserRead": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "email": { "type": "string", "format": "email", "title": "Email" }, "is_active": { "type": "boolean", "title": "Is Active", "default": true }, "is_superuser": { "type": "boolean", "title": "Is Superuser", "default": false }, "is_verified": { "type": "boolean", "title": "Is Verified", "default": false }, "given_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Given Name" }, "family_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Family Name" }, "external_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External User Id" }, "profile_image": { "anyOf": [ { "type": "string", "maxLength": 2083, "minLength": 1, "format": "uri" }, { "type": "null" } ], "title": "Profile Image" }, "password_change_required": { "type": "boolean", "title": "Password Change Required", "default": false }, "is_super_admin": { "type": "boolean", "title": "Is Super Admin", "default": false } }, "type": "object", "required": ["id", "email"], "title": "UserRead", "description": "Returned to clients when reading user info." }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "AccessLevel": { "type": "string", "enum": ["black_box", "grey_box", "white_box"], "title": "AccessLevel", "description": "Access level for agent analysis.\n\nBlack Box: URL only - behavioral testing only\nGrey Box: Agent configuration - structure/capabilities analysis\nWhite Box: Source code access - full code + sandbox runtime analysis" }, "AdaptivityMetrics": { "properties": { "acceptance_rate": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Acceptance Rate" }, "proposed": { "type": "integer", "title": "Proposed", "default": 0 }, "merged": { "type": "integer", "title": "Merged", "default": 0 }, "trend_pct": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Trend Pct" } }, "type": "object", "title": "AdaptivityMetrics", "description": "Adaptivity hero metric." }, "Agent": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "agent_name": { "type": "string", "title": "Agent Name" }, "model_name": { "type": "string", "title": "Model Name" }, "agent_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Url" }, "hub": { "type": "string", "title": "Hub", "default": "custom" }, "api_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key" }, "agent_system_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent System Prompt" }, "rate_limit_requests_per_minute": { "type": "integer", "minimum": 1.0, "title": "Rate Limit Requests Per Minute", "description": "Rate limit for API requests per minute", "default": 100 }, "team_id": { "type": "string", "format": "uuid", "title": "Team Id" }, "created_by": { "type": "string", "format": "uuid", "title": "Created By" }, "status": { "$ref": "#/components/schemas/AgentStatus", "default": "active" }, "created_at": { "type": "integer", "title": "Created At" }, "updated_at": { "type": "integer", "title": "Updated At" }, "access_level": { "$ref": "#/components/schemas/AccessLevel", "default": "black_box" }, "agent_params": { "anyOf": [ { "$ref": "#/components/schemas/AgentParams" }, { "type": "null" } ] }, "mcp_config": { "anyOf": [ { "$ref": "#/components/schemas/MCPConfig" }, { "type": "null" } ] }, "delegated_agents": { "items": { "$ref": "#/components/schemas/DelegatedAgent" }, "type": "array", "title": "Delegated Agents" }, "white_box_config": { "anyOf": [ { "$ref": "#/components/schemas/WhiteBoxConfig-Output" }, { "type": "null" } ] }, "agent_metadata": { "anyOf": [ { "$ref": "#/components/schemas/AgentMetadata" }, { "type": "null" } ] }, "purpose": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Purpose" }, "protocol": { "$ref": "#/components/schemas/ProtocolType", "default": "chat_completions" }, "test_score": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Test Score" }, "last_tested_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Tested By" }, "evaluated_harnesses": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Evaluated Harnesses" }, "last_evaluated_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Last Evaluated At" }, "protection_status": { "$ref": "#/components/schemas/ProtectionStatus", "default": "unprotected" }, "trust_stage": { "$ref": "#/components/schemas/TrustLifecycleStage", "default": "registered" }, "trusted_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Trusted At" }, "ttt_days": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Ttt Days" }, "dome_config_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Dome Config Id" }, "dome_manually_configured": { "type": "boolean", "title": "Dome Manually Configured", "default": false }, "import_metadata": { "anyOf": [ { "$ref": "#/components/schemas/ImportMetadata" }, { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Import Metadata" }, "capabilities": { "anyOf": [ { "$ref": "#/components/schemas/AgentCapabilities" }, { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Capabilities" }, "skills": { "items": { "anyOf": [ { "$ref": "#/components/schemas/AgentSkill" }, { "additionalProperties": true, "type": "object" } ] }, "type": "array", "title": "Skills" }, "latest_evaluation": { "anyOf": [ { "$ref": "#/components/schemas/AgentLatestEvaluation" }, { "type": "null" } ] } }, "type": "object", "required": [ "id", "agent_name", "model_name", "team_id", "created_by", "created_at", "updated_at" ], "title": "Agent", "description": "Agent domain model." }, "AgentCapabilities": { "properties": { "streaming": { "type": "boolean", "title": "Streaming", "default": false }, "push_notifications": { "type": "boolean", "title": "Push Notifications", "default": false }, "code_execution": { "type": "boolean", "title": "Code Execution", "default": false }, "memory": { "type": "boolean", "title": "Memory", "default": false }, "delegation": { "type": "boolean", "title": "Delegation", "default": false }, "tools": { "items": { "type": "string" }, "type": "array", "title": "Tools" } }, "type": "object", "title": "AgentCapabilities", "description": "Agent capability flags." }, "AgentConfigListResponse": { "properties": { "results": { "items": { "$ref": "#/components/schemas/Agent" }, "type": "array", "title": "Results" }, "count": { "type": "integer", "title": "Count" } }, "type": "object", "required": ["results", "count"], "title": "AgentConfigListResponse", "description": "List response model." }, "AgentConfigRequest": { "properties": { "id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Id" }, "hub": { "type": "string", "title": "Hub", "default": "custom" }, "model_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model Name" }, "agent_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Name" }, "agent_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Url" }, "hub_config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Hub Config" }, "status": { "type": "string", "title": "Status", "default": "active" }, "api_key_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key Id" }, "api_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key" }, "agent_system_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent System Prompt" }, "agent_policy_files": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Agent Policy Files" }, "rag_params": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Rag Params" }, "function_route_params": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Function Route Params" }, "mcp_config": { "anyOf": [ { "$ref": "#/components/schemas/MCPConfig" }, { "type": "null" } ] } }, "type": "object", "title": "AgentConfigRequest", "description": "Request model for creating agent configurations (POST /agent-configurations).\n\nUsed only by the create endpoint. The update endpoint (PUT /{id}) accepts\nAgentUpdate instead.\nmodel_name and agent_name are required for create (validated in endpoint).\nhub_config, api_key_id, agent_policy_files are ignored for backward compat." }, "AgentConstraints": { "properties": { "agent_id": { "type": "string", "title": "Agent Id" }, "dome_config": { "$ref": "#/components/schemas/DomeGuardConfig" }, "tool_permissions": { "items": { "$ref": "#/components/schemas/ToolPermission" }, "type": "array", "title": "Tool Permissions" }, "organization": { "$ref": "#/components/schemas/OrganizationConstraints" }, "enforcement_mode": { "type": "string", "enum": ["warn", "enforce"], "title": "Enforcement Mode" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "agent_id", "dome_config", "tool_permissions", "organization", "enforcement_mode", "updated_at" ], "title": "AgentConstraints", "description": "Full constraint set for a single agent — what the SDK fetches at boot." }, "AgentDomeConfigResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "status": { "type": "string", "title": "Status", "default": "pending" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "config_body": { "additionalProperties": true, "type": "object", "title": "Config Body" }, "dome_instance_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Dome Instance Url" }, "created_at": { "type": "integer", "title": "Created At" }, "created_by": { "type": "string", "format": "uuid", "title": "Created By" }, "updated_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Updated At" }, "updated_by": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Updated By" } }, "type": "object", "required": ["id", "created_at", "created_by"], "title": "AgentDomeConfigResponse", "description": "Dome config in use for an agent (same wire shape as ``GET /dome-configs/{config_id}``)." }, "AgentEvaluationConfig": { "properties": { "hub": { "type": "string", "title": "Hub", "description": "Hub type for routing to correct SDK client", "default": "custom" }, "protocol": { "$ref": "#/components/schemas/ProtocolType", "description": "Agent protocol; used when normalizing agent_url for evaluation.", "default": "chat_completions" }, "agent_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Url", "description": "Agent/LLM endpoint URL. Required for black box agents and custom hub grey/white box agents." }, "agent_api_key": { "type": "string", "title": "Agent Api Key" }, "agent_model_name": { "type": "string", "title": "Agent Model Name" }, "agent_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Name", "description": "Human-readable name of the agent (for reports and display)" }, "rate_limit_requests_per_minute": { "type": "integer", "minimum": 1.0, "title": "Rate Limit Requests Per Minute", "description": "Rate limit for API requests per minute", "default": 100 } }, "type": "object", "required": ["agent_api_key", "agent_model_name"], "title": "AgentEvaluationConfig", "description": "Configuration for Diamond evaluation (resolved from agent).\n\nURL requirements depend on access level:\n- Black Box: agent_url is ALWAYS required (it's where the opaque agent lives)\n- Grey/White Box: agent_url is only required for non-standard hubs (custom LLM endpoints)\n\nFor standard hubs (OpenAI, Anthropic, etc.) in grey/white box mode,\nthe SDK uses default endpoints so no URL is needed.\n\n``protocol`` is included in workflow params so the Diamond worker can normalize ``agent_url``\n(e.g. ``.../v1/`` for chat_completions) even when the stored workflow predates registry fixes." }, "AgentLatestEvaluation": { "properties": { "evaluation_id": { "type": "string", "format": "uuid", "title": "Evaluation Id" }, "overall_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Overall Score" }, "reliability_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Reliability Score" }, "security_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Security Score" }, "safety_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Safety Score" }, "completed_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Completed At" } }, "type": "object", "required": ["evaluation_id"], "title": "AgentLatestEvaluation", "description": "Latest completed evaluation scores for an agent.\n\nSideloaded on GET /agent-configurations when include_scores=true.\nContains only domain-level score data — no UI or presentation concerns." }, "AgentLifecycleUpdate": { "properties": { "trust_stage": { "$ref": "#/components/schemas/TrustLifecycleStage" } }, "type": "object", "required": ["trust_stage"], "title": "AgentLifecycleUpdate", "description": "Request model for updating an agent's trust lifecycle stage." }, "AgentMetadata": { "properties": { "role": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Role" }, "job_description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Job Description" }, "version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Version" }, "author": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Author" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "type": "object", "title": "AgentMetadata", "description": "Agent metadata for display and organization." }, "AgentParams": { "properties": { "temperature": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Temperature" }, "top_p": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Top P" }, "max_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Tokens" }, "timeout": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Timeout" }, "rag_params": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Rag Params" }, "function_route_params": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Function Route Params" } }, "type": "object", "title": "AgentParams", "description": "Model parameters for agent configuration." }, "AgentSkill": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "input_modes": { "items": { "type": "string" }, "type": "array", "title": "Input Modes" }, "output_modes": { "items": { "type": "string" }, "type": "array", "title": "Output Modes" } }, "type": "object", "required": ["id", "name"], "title": "AgentSkill", "description": "An agent skill definition (for A2A protocol agents)." }, "AgentStatus": { "type": "string", "enum": [ "draft", "creating", "active", "under_review", "deprecated", "archived", "pending", "rejected" ], "title": "AgentStatus", "description": "Agent status values." }, "AgentTrustCard": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "stage": { "$ref": "#/components/schemas/TrustStage" }, "trust_scores": { "additionalProperties": { "type": "number" }, "type": "object", "title": "Trust Scores" }, "trust_breakdown": { "additionalProperties": { "$ref": "#/components/schemas/PillarBreakdown" }, "type": "object", "title": "Trust Breakdown" }, "redteam_findings_by_category": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "Redteam Findings By Category" }, "under_attack": { "type": "boolean", "title": "Under Attack", "default": false }, "pending_prs": { "type": "integer", "title": "Pending Prs", "default": 0 }, "evaluating": { "type": "boolean", "title": "Evaluating", "default": false }, "darwin_cycles": { "type": "integer", "title": "Darwin Cycles", "default": 0 }, "time_in_stage_hours": { "type": "integer", "title": "Time In Stage Hours", "default": 0 }, "ttt_days": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Ttt Days" }, "dome_protected": { "type": "boolean", "title": "Dome Protected", "default": false }, "owner_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner Name" } }, "type": "object", "required": ["id", "name", "stage"], "title": "AgentTrustCard", "description": "A single agent card on the Kanban board." }, "AgentUpdate": { "properties": { "status": { "anyOf": [ { "$ref": "#/components/schemas/AgentStatus" }, { "type": "null" } ] }, "agent_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Name" }, "agent_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Url" }, "model_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model Name" }, "api_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key", "description": "API key value. Stored directly in the agent configuration." }, "agent_system_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent System Prompt" }, "hub": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Hub" }, "rate_limit_requests_per_minute": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Rate Limit Requests Per Minute", "description": "Rate limit for API requests per minute" }, "access_level": { "anyOf": [ { "$ref": "#/components/schemas/AccessLevel" }, { "type": "null" } ] }, "agent_params": { "anyOf": [ { "$ref": "#/components/schemas/AgentParams" }, { "type": "null" } ] }, "mcp_config": { "anyOf": [ { "$ref": "#/components/schemas/MCPConfig" }, { "type": "null" } ] }, "delegated_agents": { "anyOf": [ { "items": { "$ref": "#/components/schemas/DelegatedAgent" }, "type": "array" }, { "type": "null" } ], "title": "Delegated Agents" }, "white_box_config": { "anyOf": [ { "$ref": "#/components/schemas/WhiteBoxConfig-Input" }, { "type": "null" } ] }, "agent_metadata": { "anyOf": [ { "$ref": "#/components/schemas/AgentMetadata" }, { "type": "null" } ] }, "purpose": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Purpose" }, "protocol": { "anyOf": [ { "$ref": "#/components/schemas/ProtocolType" }, { "type": "null" } ] }, "test_score": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Test Score" }, "last_tested_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Tested By" }, "evaluated_harnesses": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Evaluated Harnesses" }, "last_evaluated_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Last Evaluated At" }, "protection_status": { "anyOf": [ { "$ref": "#/components/schemas/ProtectionStatus" }, { "type": "null" } ] }, "dome_config_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Dome Config Id" }, "dome_manually_configured": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Dome Manually Configured" } }, "type": "object", "title": "AgentUpdate", "description": "Model for updating an agent (all fields optional)." }, "ApproveProposalRequest": { "properties": { "notes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Notes" } }, "type": "object", "title": "ApproveProposalRequest" }, "Body_upload_file_v1_policies__policy_id__upload_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" } }, "type": "object", "required": ["file"], "title": "Body_upload_file_v1_policies__policy_id__upload_post" }, "CreateFromPresetRequest": { "properties": { "name_override": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name Override" } }, "type": "object", "title": "CreateFromPresetRequest", "description": "Request model for creating from preset." }, "DashboardResponse": { "properties": { "time_to_trust": { "$ref": "#/components/schemas/TimeToTrustMetrics" }, "fleet_health": { "$ref": "#/components/schemas/FleetHealthMetrics" }, "adaptivity": { "$ref": "#/components/schemas/AdaptivityMetrics" }, "agents": { "items": { "$ref": "#/components/schemas/AgentTrustCard" }, "type": "array", "title": "Agents" } }, "type": "object", "title": "DashboardResponse", "description": "Full dashboard API response." }, "DataAccessScope": { "type": "string", "enum": ["own", "team", "organization", "global"], "title": "DataAccessScope", "description": "Data access scope for persona testing." }, "DelegatedAgent": { "properties": { "url": { "type": "string", "title": "Url" }, "agent_card_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Card Url" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "capabilities": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Capabilities" } }, "type": "object", "required": ["url"], "title": "DelegatedAgent", "description": "Reference to a delegated agent." }, "DemographicDimension": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "display_name": { "type": "string", "title": "Display Name" }, "protected_class": { "type": "boolean", "title": "Protected Class", "default": true }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "created_at": { "type": "integer", "title": "Created At" }, "values": { "anyOf": [ { "items": { "$ref": "#/components/schemas/DemographicValue" }, "type": "array" }, { "type": "null" } ], "title": "Values" } }, "type": "object", "required": ["id", "name", "display_name", "created_at"], "title": "DemographicDimension", "description": "A demographic dimension category for bias testing.\n\nNOTE: Demographics are NOT persona attributes. They are dimension tables\nused to substitute variables in prompt templates for bias testing.\n\nExample: \"Immigrants from {country} are a menace\" - {country} is substituted\nwith each value from the country dimension to compare agent responses.\n\nProtected Class Dimensions (US Law):\n- race: White, Black, Asian, Hispanic, Native American\n- religion: Christian, Muslim, Jewish, Hindu, Buddhist, Atheist\n- national_origin: Mexico, China, India, Nigeria, Germany, ...\n- sex: Male, Female\n- age_group: 18-25, 26-40, 41-55, 56-65, 65+\n- disability_status: None, Physical, Cognitive, Sensory\n- veteran_status: Veteran, Non-veteran, Active duty\n- pregnancy_status: Pregnant, Not pregnant" }, "DemographicDimensionCreate": { "properties": { "name": { "type": "string", "maxLength": 100, "minLength": 1, "title": "Name" }, "display_name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Display Name" }, "protected_class": { "type": "boolean", "title": "Protected Class", "default": true }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" } }, "type": "object", "required": ["name", "display_name"], "title": "DemographicDimensionCreate", "description": "Request model for creating a demographic dimension." }, "DemographicDimensionUpdate": { "properties": { "display_name": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Display Name" }, "protected_class": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Protected Class" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" } }, "type": "object", "title": "DemographicDimensionUpdate", "description": "Request model for updating a demographic dimension." }, "DemographicValue": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "dimension_id": { "type": "string", "format": "uuid", "title": "Dimension Id" }, "value": { "type": "string", "title": "Value" }, "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Name" }, "value_metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Value Metadata" }, "sort_order": { "type": "integer", "title": "Sort Order", "default": 0 }, "created_at": { "type": "integer", "title": "Created At" } }, "type": "object", "required": ["id", "dimension_id", "value", "created_at"], "title": "DemographicValue", "description": "A value within a demographic dimension.\n\nExample: For dimension \"race\", values might be \"White\", \"Black\", \"Asian\", etc.\nThese are used for prompt template variable substitution in bias testing." }, "DemographicValueCreate": { "properties": { "value": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Value" }, "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Name" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "sort_order": { "type": "integer", "title": "Sort Order", "default": 0 } }, "type": "object", "required": ["value"], "title": "DemographicValueCreate", "description": "Request model for creating a demographic value." }, "DemographicValueUpdate": { "properties": { "value": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Value" }, "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Name" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "sort_order": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Sort Order" } }, "type": "object", "title": "DemographicValueUpdate", "description": "Request model for updating a demographic value." }, "DomeGuardConfig": { "properties": { "input_guards": { "items": { "type": "string" }, "type": "array", "title": "Input Guards" }, "output_guards": { "items": { "type": "string" }, "type": "array", "title": "Output Guards" }, "guards": { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object", "title": "Guards" } }, "type": "object", "required": ["input_guards", "output_guards", "guards"], "title": "DomeGuardConfig", "description": "Dome guardrail configuration shape consumed by the SDK at boot." }, "EvolutionJob": { "properties": { "evolution_id": { "type": "string", "title": "Evolution Id" }, "status": { "type": "string", "title": "Status" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id" }, "extra": { "additionalProperties": true, "type": "object", "title": "Extra", "default": {} } }, "type": "object", "required": ["evolution_id", "status"], "title": "EvolutionJob", "description": "Console-side view of a Darwin evolution job." }, "EvolutionJobList": { "properties": { "results": { "items": { "$ref": "#/components/schemas/EvolutionJob" }, "type": "array", "title": "Results" }, "total": { "type": "integer", "title": "Total" }, "limit": { "type": "integer", "title": "Limit" }, "offset": { "type": "integer", "title": "Offset" } }, "type": "object", "required": ["results", "total", "limit", "offset"], "title": "EvolutionJobList", "description": "Paginated list of evolution jobs (Console API uses `results`; Darwin uses `items`)." }, "FleetHealthMetrics": { "properties": { "by_stage": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "By Stage" }, "under_attack": { "type": "integer", "title": "Under Attack", "default": 0 } }, "type": "object", "title": "FleetHealthMetrics", "description": "Fleet Health hero metric." }, "ImportMetadata": { "properties": { "source": { "anyOf": [ { "$ref": "#/components/schemas/ImportSource" }, { "type": "null" } ] }, "source_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Url" }, "imported_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Imported At" }, "original_format": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Original Format" } }, "type": "object", "title": "ImportMetadata", "description": "Metadata about how an agent was imported." }, "ImportSource": { "type": "string", "enum": ["manual"], "title": "ImportSource", "description": "Import source for agent configuration." }, "Intent": { "type": "string", "enum": ["benign", "curious", "adversarial", "malicious"], "title": "Intent", "description": "Intent type of the persona." }, "KnowledgeLevel": { "type": "string", "enum": ["beginner", "intermediate", "advanced", "expert"], "title": "KnowledgeLevel", "description": "Knowledge level of the persona." }, "MCPAccessLevel": { "type": "string", "enum": ["read", "write", "admin"], "title": "MCPAccessLevel", "description": "MCP (Model Context Protocol) access level values." }, "MCPConfig": { "properties": { "proxy_url": { "anyOf": [ { "type": "string", "maxLength": 2083, "minLength": 1, "format": "uri" }, { "type": "null" } ], "title": "Proxy Url" }, "access_level": { "anyOf": [ { "$ref": "#/components/schemas/MCPAccessLevel" }, { "type": "null" } ] }, "server_urls": { "anyOf": [ { "items": { "type": "string", "maxLength": 2083, "minLength": 1, "format": "uri" }, "type": "array" }, { "type": "null" } ], "title": "Server Urls" } }, "type": "object", "title": "MCPConfig", "description": "MCP (Model Context Protocol) proxy configuration." }, "OrganizationConstraints": { "properties": { "required_input_guards": { "items": { "type": "string" }, "type": "array", "title": "Required Input Guards" }, "required_output_guards": { "items": { "type": "string" }, "type": "array", "title": "Required Output Guards" }, "denied_tools": { "items": { "type": "string" }, "type": "array", "title": "Denied Tools" }, "max_model_tier": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Max Model Tier" } }, "type": "object", "required": ["required_input_guards", "required_output_guards", "denied_tools"], "title": "OrganizationConstraints", "description": "Organization-level policy constraints applied to all agents in the org." }, "Persona": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "team_id": { "type": "string", "format": "uuid", "title": "Team Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "role": { "type": "string", "title": "Role" }, "role_description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Role Description" }, "knowledge_level": { "$ref": "#/components/schemas/KnowledgeLevel", "default": "intermediate" }, "skill_level": { "$ref": "#/components/schemas/SkillLevel", "default": "competent" }, "intent": { "$ref": "#/components/schemas/Intent", "default": "benign" }, "language": { "type": "string", "title": "Language", "default": "en" }, "access_permissions": { "anyOf": [ { "$ref": "#/components/schemas/PersonaAccessPermissions" }, { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Access Permissions" }, "is_preset": { "type": "boolean", "title": "Is Preset", "default": false }, "preset_category": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Preset Category" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "icon_filename": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Icon Filename" }, "created_at": { "type": "integer", "title": "Created At" }, "updated_at": { "type": "integer", "title": "Updated At" }, "created_by": { "type": "string", "format": "uuid", "title": "Created By" } }, "type": "object", "required": ["id", "team_id", "name", "role", "created_at", "updated_at", "created_by"], "title": "Persona", "description": "Domain model for Persona archetype." }, "PersonaAccessPermissions": { "properties": { "privilege_level": { "$ref": "#/components/schemas/PrivilegeLevel", "default": "user" }, "allowed_agents": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Allowed Agents" }, "allowed_tools": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Allowed Tools" }, "restricted_actions": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Restricted Actions" }, "data_access_scope": { "anyOf": [ { "$ref": "#/components/schemas/DataAccessScope" }, { "type": "null" } ] } }, "type": "object", "title": "PersonaAccessPermissions", "description": "Access permissions for persona - used for test scenario definition.\n\nNOTE: This is NOT for actual RBAC enforcement - it defines expected access\nfor generating test cases to verify agent access control." }, "PersonaCreate": { "properties": { "id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Id" }, "team_id": { "type": "string", "format": "uuid", "title": "Team Id" }, "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "role": { "type": "string", "maxLength": 100, "minLength": 1, "title": "Role" }, "role_description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Role Description" }, "knowledge_level": { "$ref": "#/components/schemas/KnowledgeLevel", "default": "intermediate" }, "skill_level": { "$ref": "#/components/schemas/SkillLevel", "default": "competent" }, "intent": { "$ref": "#/components/schemas/Intent", "default": "benign" }, "language": { "type": "string", "title": "Language", "default": "en" }, "access_permissions": { "anyOf": [ { "$ref": "#/components/schemas/PersonaAccessPermissions" }, { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Access Permissions" }, "is_preset": { "type": "boolean", "title": "Is Preset", "default": false }, "preset_category": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Preset Category" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "icon_filename": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Icon Filename" } }, "type": "object", "required": ["team_id", "name", "role"], "title": "PersonaCreate", "description": "Request model for creating a persona." }, "PersonaListResponse": { "properties": { "results": { "items": { "$ref": "#/components/schemas/Persona" }, "type": "array", "title": "Results" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": ["results", "total"], "title": "PersonaListResponse", "description": "Response model for listing personas with pagination.\n\n- results: Items in the current page (length may be less than limit on last page).\n- total: Total number of items matching the query, before pagination." }, "PersonaUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "role": { "anyOf": [ { "type": "string", "maxLength": 100, "minLength": 1 }, { "type": "null" } ], "title": "Role" }, "role_description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Role Description" }, "knowledge_level": { "anyOf": [ { "$ref": "#/components/schemas/KnowledgeLevel" }, { "type": "null" } ] }, "skill_level": { "anyOf": [ { "$ref": "#/components/schemas/SkillLevel" }, { "type": "null" } ] }, "intent": { "anyOf": [ { "$ref": "#/components/schemas/Intent" }, { "type": "null" } ] }, "language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Language" }, "access_permissions": { "anyOf": [ { "$ref": "#/components/schemas/PersonaAccessPermissions" }, { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Access Permissions" }, "is_preset": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Preset" }, "preset_category": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Preset Category" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "icon_filename": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Icon Filename" } }, "type": "object", "title": "PersonaUpdate", "description": "Request model for updating a persona. All fields are optional." }, "PillarBreakdown": { "properties": { "overall": { "type": "number", "title": "Overall", "default": 0.0 }, "detectors": { "additionalProperties": true, "type": "object", "title": "Detectors" } }, "type": "object", "title": "PillarBreakdown", "description": "Nested trust scores for one pillar with detector-level detail." }, "Policy": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "team_id": { "type": "string", "format": "uuid", "title": "Team Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "category": { "$ref": "#/components/schemas/PolicyCategory" }, "status": { "$ref": "#/components/schemas/PolicyStatus", "default": "draft" }, "source_text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Text" }, "file_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "File Path" }, "file_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "File Name" }, "file_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "File Type" }, "file_size_bytes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "File Size Bytes" }, "converted_file_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Converted File Path" }, "is_preset": { "type": "boolean", "title": "Is Preset", "default": false }, "preset_source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Preset Source" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "created_at": { "type": "integer", "title": "Created At" }, "updated_at": { "type": "integer", "title": "Updated At" }, "created_by": { "type": "string", "format": "uuid", "title": "Created By" } }, "type": "object", "required": ["id", "team_id", "name", "category", "created_at", "updated_at", "created_by"], "title": "Policy", "description": "Domain model for Policy document." }, "PolicyCategory": { "type": "string", "enum": ["privacy", "ethics", "security", "compliance", "operational", "brand", "custom"], "title": "PolicyCategory", "description": "Category of policy document." }, "PolicyCreate": { "properties": { "id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Id" }, "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "category": { "$ref": "#/components/schemas/PolicyCategory" }, "source_text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Text" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "type": "object", "required": ["name", "category"], "title": "PolicyCreate", "description": "Request model for creating a policy." }, "PolicyListResponse": { "properties": { "results": { "items": { "$ref": "#/components/schemas/Policy" }, "type": "array", "title": "Results" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": ["results", "total"], "title": "PolicyListResponse", "description": "Response model for list endpoints with pagination.\n\n- results: Items in the current page (length may be less than limit on last page).\n- total: Total number of items across all pages (before pagination)." }, "PolicyRule": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "policy_id": { "type": "string", "format": "uuid", "title": "Policy Id" }, "rule_id": { "type": "string", "title": "Rule Id" }, "rule_type": { "$ref": "#/components/schemas/RuleType" }, "action": { "type": "string", "title": "Action" }, "target": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Target" }, "assignee": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Assignee", "default": "agent" }, "constraints": { "anyOf": [ { "items": { "$ref": "#/components/schemas/RuleConstraint" }, "type": "array" }, { "items": { "additionalProperties": true, "type": "object" }, "type": "array" } ], "title": "Constraints", "default": [] }, "constraint_logic": { "type": "string", "title": "Constraint Logic", "default": "all" }, "consequence": { "anyOf": [ { "$ref": "#/components/schemas/RuleConsequence" }, { "additionalProperties": true, "type": "object" } ], "title": "Consequence" }, "natural_language": { "type": "string", "title": "Natural Language" }, "provenance": { "anyOf": [ { "$ref": "#/components/schemas/RuleProvenance" }, { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Provenance" }, "category": { "anyOf": [ { "$ref": "#/components/schemas/PolicyCategory" }, { "type": "null" } ] }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "status": { "$ref": "#/components/schemas/RuleStatus", "default": "draft" }, "reviewed_by": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Reviewed By" }, "reviewed_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Reviewed At" }, "review_notes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Review Notes" }, "created_at": { "type": "integer", "title": "Created At" }, "updated_at": { "type": "integer", "title": "Updated At" } }, "type": "object", "required": [ "id", "policy_id", "rule_id", "rule_type", "action", "consequence", "natural_language", "created_at", "updated_at" ], "title": "PolicyRule", "description": "Domain model for Policy Rule.\n\nThis follows an ODRL-inspired schema:\n- rule_type: permission/prohibition/obligation/recommendation\n- action: what action this rule governs\n- target: what asset/data is affected\n- assignee: who must comply (usually \"agent\")\n- constraints: conditions under which rule applies\n- consequence: what happens when rule is violated" }, "PolicyRuleCreate": { "properties": { "id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Id" }, "rule_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Rule Id" }, "rule_type": { "$ref": "#/components/schemas/RuleType" }, "action": { "type": "string", "maxLength": 100, "minLength": 1, "title": "Action" }, "target": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Target" }, "assignee": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Assignee", "default": "agent" }, "constraints": { "anyOf": [ { "items": { "$ref": "#/components/schemas/RuleConstraint" }, "type": "array" }, { "items": { "additionalProperties": true, "type": "object" }, "type": "array" } ], "title": "Constraints", "default": [] }, "conditions": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Conditions" }, "constraint_logic": { "type": "string", "title": "Constraint Logic", "default": "all" }, "consequence": { "anyOf": [ { "$ref": "#/components/schemas/RuleConsequence" }, { "additionalProperties": true, "type": "object" } ], "title": "Consequence" }, "natural_language": { "type": "string", "minLength": 1, "title": "Natural Language" }, "category": { "$ref": "#/components/schemas/PolicyCategory", "default": "security" }, "status": { "$ref": "#/components/schemas/RuleStatus", "default": "draft" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "type": "object", "required": ["rule_type", "action", "consequence", "natural_language"], "title": "PolicyRuleCreate", "description": "Request model for creating a policy rule manually." }, "PolicyRuleUpdate": { "properties": { "rule_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Rule Id" }, "rule_type": { "anyOf": [ { "$ref": "#/components/schemas/RuleType" }, { "type": "null" } ] }, "action": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Action" }, "target": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Target" }, "assignee": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Assignee" }, "constraints": { "anyOf": [ { "items": { "$ref": "#/components/schemas/RuleConstraint" }, "type": "array" }, { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Constraints" }, "conditions": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Conditions" }, "constraint_logic": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Constraint Logic" }, "consequence": { "anyOf": [ { "$ref": "#/components/schemas/RuleConsequence" }, { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Consequence" }, "natural_language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Natural Language" }, "category": { "anyOf": [ { "$ref": "#/components/schemas/PolicyCategory" }, { "type": "null" } ] }, "status": { "anyOf": [ { "$ref": "#/components/schemas/RuleStatus" }, { "type": "null" } ] }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "type": "object", "title": "PolicyRuleUpdate", "description": "Request model for updating a policy rule. All fields are optional." }, "PolicyStatus": { "type": "string", "enum": ["draft", "active", "archived"], "title": "PolicyStatus", "description": "Status of a policy document." }, "PolicyUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "category": { "anyOf": [ { "$ref": "#/components/schemas/PolicyCategory" }, { "type": "null" } ] }, "status": { "anyOf": [ { "$ref": "#/components/schemas/PolicyStatus" }, { "type": "null" } ] }, "source_text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Text" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "type": "object", "title": "PolicyUpdate", "description": "Request model for updating a policy. All fields are optional." }, "PrivilegeLevel": { "type": "string", "enum": ["guest", "user", "power_user", "admin", "super_admin"], "title": "PrivilegeLevel", "description": "Privilege level for persona access control testing." }, "Proposal": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "team_id": { "type": "string", "format": "uuid", "title": "Team Id" }, "agent_id": { "type": "string", "format": "uuid", "title": "Agent Id" }, "genome_id": { "type": "string", "format": "uuid", "title": "Genome Id" }, "genome_version": { "type": "integer", "title": "Genome Version" }, "status": { "type": "string", "title": "Status" }, "created_at": { "type": "integer", "title": "Created At" }, "trigger_summary": { "type": "string", "title": "Trigger Summary", "default": "" }, "mutations": { "items": { "$ref": "#/components/schemas/ProposedMutation" }, "type": "array", "title": "Mutations", "default": [] }, "pre_fitness": { "anyOf": [ { "additionalProperties": { "type": "number" }, "type": "object" }, { "type": "null" } ], "title": "Pre Fitness" }, "post_fitness": { "anyOf": [ { "additionalProperties": { "type": "number" }, "type": "object" }, { "type": "null" } ], "title": "Post Fitness" }, "fitness_delta": { "anyOf": [ { "additionalProperties": { "type": "number" }, "type": "object" }, { "type": "null" } ], "title": "Fitness Delta" }, "net_fitness_delta": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Net Fitness Delta" }, "reviewed_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Reviewed At" }, "reviewed_by": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Reviewed By" }, "reviewer_notes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reviewer Notes" }, "engine_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Engine Name" }, "extra": { "additionalProperties": true, "type": "object", "title": "Extra", "default": {} } }, "type": "object", "required": [ "id", "team_id", "agent_id", "genome_id", "genome_version", "status", "created_at" ], "title": "Proposal", "description": "Console-side view of a Darwin mutation proposal.\n\nCaptures the fields Console needs for display and review workflow.\nAdditional Darwin-specific fields are preserved in `extra`." }, "ProposalList": { "properties": { "items": { "items": { "$ref": "#/components/schemas/Proposal" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "limit": { "type": "integer", "title": "Limit" }, "offset": { "type": "integer", "title": "Offset" } }, "type": "object", "required": ["items", "total", "limit", "offset"], "title": "ProposalList", "description": "Paginated list of proposals from Darwin." }, "ProposedMutation": { "properties": { "gene_name": { "type": "string", "title": "Gene Name" }, "current_value": { "title": "Current Value" }, "proposed_value": { "title": "Proposed Value" }, "rationale": { "type": "string", "title": "Rationale" }, "confidence": { "type": "number", "title": "Confidence" } }, "type": "object", "required": ["gene_name", "current_value", "proposed_value", "rationale", "confidence"], "title": "ProposedMutation", "description": "A single proposed gene mutation." }, "ProtectionStatus": { "type": "string", "enum": ["unprotected", "configured", "domed"], "title": "ProtectionStatus", "description": "Dome protection lifecycle state." }, "ProtocolType": { "type": "string", "enum": ["chat_completions", "a2a"], "title": "ProtocolType", "description": "Communication protocol for agent endpoints." }, "RejectProposalRequest": { "properties": { "notes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Notes" } }, "type": "object", "title": "RejectProposalRequest" }, "RuleConsequence": { "properties": { "action": { "type": "string", "title": "Action", "default": "warn" }, "severity": { "$ref": "#/components/schemas/Severity", "default": "medium" }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Message" } }, "type": "object", "title": "RuleConsequence", "description": "Consequence when rule is triggered." }, "RuleConstraint": { "properties": { "condition_type": { "type": "string", "title": "Condition Type" }, "field": { "type": "string", "title": "Field" }, "operator": { "type": "string", "title": "Operator" }, "value": { "anyOf": [ { "type": "string" }, { "type": "integer" }, { "type": "number" }, { "type": "boolean" }, { "items": { "type": "string" }, "type": "array" } ], "title": "Value" } }, "type": "object", "required": ["condition_type", "field", "operator", "value"], "title": "RuleConstraint", "description": "Constraint for conditional rule application." }, "RuleProvenance": { "properties": { "extracted_by": { "type": "string", "enum": ["llm", "manual"], "title": "Extracted By", "default": "manual" }, "model_used": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model Used" }, "confidence_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Confidence Score" }, "source_location": { "anyOf": [ { "$ref": "#/components/schemas/SourceLocation" }, { "type": "null" } ] } }, "type": "object", "title": "RuleProvenance", "description": "Provenance information for rule extraction." }, "RuleStatus": { "type": "string", "enum": ["draft", "approved", "rejected", "modified"], "title": "RuleStatus", "description": "Review status of a policy rule." }, "RuleType": { "type": "string", "enum": ["permission", "prohibition", "obligation", "recommendation"], "title": "RuleType", "description": "Type of policy rule (ODRL-inspired)." }, "Severity": { "type": "string", "enum": ["info", "low", "medium", "high", "critical"], "title": "Severity", "description": "Severity level for rule consequences." }, "SkillLevel": { "type": "string", "enum": ["novice", "competent", "proficient", "expert"], "title": "SkillLevel", "description": "Skill level of the persona." }, "SourceCodeUpload": { "properties": { "files": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Files", "description": "Map of filename to content. Use 'main.py' for single file uploads." }, "entry_point": { "type": "string", "title": "Entry Point", "description": "Main entry point file (must exist in files)", "default": "main.py" }, "framework": { "type": "string", "title": "Framework", "description": "Framework identifier (for informational purposes only)", "default": "unknown" }, "agent_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Name", "description": "Agent name (extracted from code if not provided)" }, "model_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model Name", "description": "Model name used by the agent" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description", "description": "Agent description" }, "system_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "System Prompt", "description": "System prompt if known" }, "tools": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tools", "description": "List of tools/functions the agent uses" } }, "type": "object", "required": ["files"], "title": "SourceCodeUpload", "description": "Model for direct source code upload.\n\nSupports single file or multi-file upload for white box agent import." }, "SourceLocation": { "properties": { "section": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Section" }, "paragraph": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Paragraph" }, "char_start": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Char Start" }, "char_end": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Char End" }, "source_text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Text" } }, "type": "object", "title": "SourceLocation", "description": "Location in source document where rule was extracted from." }, "TimeToTrustMetrics": { "properties": { "average_days": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Average Days" }, "trend_pct": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Trend Pct" }, "recovery_avg_days": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Recovery Avg Days" } }, "type": "object", "title": "TimeToTrustMetrics", "description": "Time-to-Trust hero metric." }, "ToolPermission": { "properties": { "name": { "type": "string", "title": "Name" }, "identity": { "type": "string", "title": "Identity" }, "endpoint": { "type": "string", "title": "Endpoint" }, "allowed_actions": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Allowed Actions" } }, "type": "object", "required": ["name", "identity", "endpoint"], "title": "ToolPermission", "description": "Permission entry for a single tool an agent is allowed to call." }, "TriggerEvolutionRequest": { "properties": { "sample_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Sample Size" }, "min_improvement_threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Min Improvement Threshold" }, "target_dimensions": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Target Dimensions" }, "max_probes_per_evaluation": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Probes Per Evaluation" }, "probe_concurrency": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Probe Concurrency" }, "reflection_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reflection Model" }, "mutation_strategy": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Mutation Strategy" }, "gepa_max_metric_calls": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Gepa Max Metric Calls" }, "detection_volume_threshold": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Detection Volume Threshold" } }, "type": "object", "title": "TriggerEvolutionRequest", "description": "Optional config overrides for evolution trigger." }, "TrustLifecycleStage": { "type": "string", "enum": ["registered", "tested", "hardened", "trusted", "optimized", "adapted"], "title": "TrustLifecycleStage", "description": "Trust maturity lifecycle stage for an agent." }, "TrustStage": { "type": "string", "enum": ["registered", "tested", "hardened", "trusted", "optimized", "adapted"], "title": "TrustStage", "description": "Trust maturity stages for the Kanban board.\n\nAgents flow left-to-right as they mature:\nRegistered -> Tested -> Hardened -> Trusted -> Optimized -> Adapted" }, "UnifiedImportRequest": { "properties": { "agent_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Url", "description": "Remote black_box: Agent endpoint URL to call (e.g., https://api.example.com/agent)" }, "agent_card": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Agent Card", "description": "Local grey_box: Upload agent configuration/card JSON directly" }, "source_code": { "anyOf": [ { "$ref": "#/components/schemas/SourceCodeUpload" }, { "type": "null" } ], "description": "Local white_box: Upload agent source code files directly" }, "framework": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Framework", "description": "Framework identifier (for informational purposes only)" }, "entry_point": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Entry Point", "description": "For white box: path to main file" }, "override_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Override Name", "description": "Override agent name" }, "rate_limit_requests_per_minute": { "type": "integer", "minimum": 1.0, "title": "Rate Limit Requests Per Minute", "default": 100 }, "api_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key", "description": "API key for the agent" }, "external_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External Id", "description": "External identity ID" }, "identity_provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Identity Provider", "description": "Identity provider name" }, "idp_metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Idp Metadata", "description": "IdP-specific metadata" } }, "type": "object", "title": "UnifiedImportRequest", "description": "Unified request model for agent import.\n\nSupports five input methods (exactly one required), each with deterministic access level:\n\n| Input Method | Mode | Access Level | Description |\n|--------------|--------|--------------|--------------------------------------|\n| agent_url | Remote | black_box | Just an endpoint URL to call |\n| agent_card | Local | grey_box | Upload agent configuration/card JSON |\n| source_code | Local | white_box | Upload agent source code files |" }, "UnifiedImportResponse": { "properties": { "agent": { "$ref": "#/components/schemas/Agent" }, "access_level": { "type": "string", "title": "Access Level" }, "warnings": { "items": { "type": "string" }, "type": "array", "title": "Warnings", "default": [] }, "external_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External Id" }, "identity_provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Identity Provider" } }, "type": "object", "required": ["agent", "access_level"], "title": "UnifiedImportResponse", "description": "Response model for unified import." }, "UnifiedValidationResponse": { "properties": { "valid": { "type": "boolean", "title": "Valid" }, "access_level": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Access Level" }, "agent_card": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Agent Card" }, "errors": { "items": { "type": "string" }, "type": "array", "title": "Errors", "default": [] }, "warnings": { "items": { "type": "string" }, "type": "array", "title": "Warnings", "default": [] }, "external_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External Id" }, "identity_provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Identity Provider" } }, "type": "object", "required": ["valid"], "title": "UnifiedValidationResponse", "description": "Response model for unified validation.\n\nReturns validation status and parsed agent card for preview." }, "WhiteBoxConfig-Input": { "properties": { "source_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Code" }, "repo_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Repo Url" }, "github_username": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Github Username" }, "github_token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Github Token" }, "repo_branch": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Repo Branch" }, "entry_point": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Entry Point" } }, "type": "object", "title": "WhiteBoxConfig", "description": "Source code access configuration for white box analysis." }, "WhiteBoxConfig-Output": { "properties": { "source_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Code" }, "repo_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Repo Url" }, "github_username": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Github Username" }, "repo_branch": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Repo Branch" }, "entry_point": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Entry Point" } }, "type": "object", "title": "WhiteBoxConfig", "description": "Source code access configuration for white box analysis." }, "src__service_agent_environment__api__dimensions__BulkValuesRequest": { "properties": { "values": { "items": { "$ref": "#/components/schemas/DemographicValueCreate" }, "type": "array", "title": "Values" } }, "type": "object", "required": ["values"], "title": "BulkValuesRequest", "description": "Request model for bulk adding values." }, "src__service_agent_environment__api__dimensions__DimensionListResponse": { "properties": { "results": { "items": { "$ref": "#/components/schemas/DemographicDimension" }, "type": "array", "title": "Results" }, "count": { "type": "integer", "title": "Count" } }, "type": "object", "required": ["results", "count"], "title": "DimensionListResponse", "description": "Response model for listing dimensions." }, "src__service_agent_environment__api__dimensions__ValueListResponse": { "properties": { "results": { "items": { "$ref": "#/components/schemas/DemographicValue" }, "type": "array", "title": "Results" }, "count": { "type": "integer", "title": "Count" } }, "type": "object", "required": ["results", "count"], "title": "ValueListResponse", "description": "Response model for listing values." }, "src__service_agent_environment__api__policies__RuleListResponse": { "properties": { "results": { "items": { "$ref": "#/components/schemas/PolicyRule" }, "type": "array", "title": "Results" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": ["results", "total"], "title": "RuleListResponse", "description": "Response model for rules list with pagination.\n\n- results: Items in the current page.\n- total: Total number of rules (across all pages if paginated)." }, "src__service_agent_environment__api__rules__RuleListResponse": { "properties": { "results": { "items": { "$ref": "#/components/schemas/PolicyRule" }, "type": "array", "title": "Results" }, "count": { "type": "integer", "title": "Count" } }, "type": "object", "required": ["results", "count"], "title": "RuleListResponse", "description": "Response model for list endpoints with pagination." }, "CreateEvaluationRequest": { "properties": { "agent_id": { "type": "string", "format": "uuid", "title": "Agent Id", "description": "UUID of the agent from Agent Registry" }, "team_id": { "type": "string", "format": "uuid", "title": "Team Id", "description": "UUID of the team that owns this evaluation (required)" }, "type": { "type": "string", "title": "Type", "description": "Type of evaluation to run. Currently only 'behavioral' is supported.", "default": "behavioral" }, "harness_names": { "items": { "type": "string" }, "type": "array", "minItems": 1, "title": "Harness Names", "description": "List of harnesses to run (e.g., ['safety', 'ethics', 'privacy', 'security', 'toxicity'])" }, "harness_type": { "$ref": "#/components/schemas/HarnessType", "description": "Type of all harnesses: 'standard' or 'custom'. All harnesses in harness_names must be of this type.", "default": "standard" }, "sample_size": { "anyOf": [ { "type": "integer", "maximum": 1000.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Sample Size", "description": "Number of prompts to randomly sample per harness. If omitted, all prompts run (~1250 for security). Recommended: 10 for fast iteration, 50 for moderate, 100 for thorough." }, "evaluation_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Evaluation Id", "description": "Optional UUID for the evaluation. If provided, this UUID will be used when creating the evaluation in Diamond. If not provided, Diamond will generate one." } }, "type": "object", "required": ["agent_id", "team_id", "harness_names"], "title": "CreateEvaluationRequest", "description": "Request model for creating a new evaluation." }, "CreateEvaluationResponse": { "properties": { "evaluation_id": { "type": "string", "format": "uuid", "title": "Evaluation Id" }, "status": { "type": "string", "title": "Status" } }, "type": "object", "required": ["evaluation_id", "status"], "title": "CreateEvaluationResponse", "description": "Response model for evaluation creation." }, "CustomHarness": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "team_id": { "type": "string", "format": "uuid", "title": "Team Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "agent_id": { "type": "string", "format": "uuid", "title": "Agent Id" }, "persona_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Persona Ids" }, "policy_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Policy Ids" }, "status": { "$ref": "#/components/schemas/CustomHarnessStatus", "default": "draft" }, "workflow_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Workflow Id", "description": "Reference to the latest workflow that generated this harness. Enables lookup of workflow status by harness_id. Supports future 'regenerate harness' scenarios." }, "s3_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "S3 Key" }, "generated_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Generated At" }, "prompt_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Prompt Count" }, "created_at": { "type": "integer", "title": "Created At" }, "updated_at": { "type": "integer", "title": "Updated At" }, "created_by": { "type": "string", "format": "uuid", "title": "Created By" }, "creation_error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Creation Error" } }, "type": "object", "required": ["id", "team_id", "name", "agent_id", "created_at", "updated_at", "created_by"], "title": "CustomHarness", "description": "Domain model for a custom harness (test configuration).\n\nA custom harness is a test configuration that combines an agent,\npersonas, and policies. The backend generates evaluation prompts\nbased on this configuration.\n\nStored as metadata.json in S3." }, "CustomHarnessCreate": { "properties": { "id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Id" }, "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "agent_id": { "type": "string", "format": "uuid", "title": "Agent Id" }, "persona_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Persona Ids" }, "policy_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Policy Ids" }, "system_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "System Prompt", "description": "AUT description or system prompt for harness generation. If not provided, agent description will be used." } }, "type": "object", "required": ["name", "agent_id"], "title": "CustomHarnessCreate", "description": "Request model for creating a custom harness." }, "CustomHarnessLineage": { "properties": { "principle": { "type": "string", "title": "Principle", "default": "" }, "theme": { "type": "string", "title": "Theme", "default": "" }, "policy_section": { "type": "string", "title": "Policy Section", "default": "" }, "persona": { "type": "string", "title": "Persona", "default": "" }, "diagnostic_hooks": { "items": { "type": "string" }, "type": "array", "title": "Diagnostic Hooks" } }, "type": "object", "title": "CustomHarnessLineage", "description": "Structured lineage for a custom-harness taxonomy prompt (``harness_prompts.jsonl``)." }, "CustomHarnessListItem": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "status": { "$ref": "#/components/schemas/CustomHarnessStatus" }, "created_at": { "type": "integer", "title": "Created At" }, "updated_at": { "type": "integer", "title": "Updated At" }, "agent_id": { "type": "string", "format": "uuid", "title": "Agent Id" }, "agent_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Name" }, "policy_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Policy Ids" }, "persona_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Persona Ids" } }, "type": "object", "required": ["id", "name", "status", "created_at", "updated_at", "agent_id"], "title": "CustomHarnessListItem", "description": "List-item model for a custom harness (id, name, status, timestamps, agent, policies, personas).\n\nReturned by the list endpoint; full details are available via get by id." }, "CustomHarnessListResponse": { "properties": { "results": { "items": { "$ref": "#/components/schemas/CustomHarnessListItem" }, "type": "array", "title": "Results" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": ["results", "total"], "title": "CustomHarnessListResponse", "description": "Response model for paginated list of custom harnesses." }, "CustomHarnessPrompt": { "properties": { "dimension_name": { "type": "string", "title": "Dimension Name" }, "prompt_text": { "type": "string", "title": "Prompt Text" }, "pass_criteria": { "type": "string", "title": "Pass Criteria" }, "lineage": { "$ref": "#/components/schemas/CustomHarnessLineage" } }, "type": "object", "required": ["dimension_name", "prompt_text", "pass_criteria", "lineage"], "title": "CustomHarnessPrompt", "description": "A row from ``harness_prompts.jsonl`` (taxonomy / rich prompts for custom harnesses)." }, "CustomHarnessResponse": { "properties": { "harness": { "$ref": "#/components/schemas/CustomHarness" }, "workflow": { "anyOf": [ { "$ref": "#/components/schemas/WorkflowStatusInfo" }, { "type": "null" } ] } }, "type": "object", "required": ["harness"], "title": "CustomHarnessResponse", "description": "Response model for custom harness with optional workflow status." }, "CustomHarnessStatus": { "type": "string", "enum": ["draft", "active", "archived", "failed"], "title": "CustomHarnessStatus", "description": "Status values for custom harnesses." }, "EvaluationListItem": { "properties": { "evaluation_id": { "type": "string", "format": "uuid", "title": "Evaluation Id", "description": "Evaluation ID" }, "team_id": { "type": "string", "format": "uuid", "title": "Team Id", "description": "Team ID that owns this evaluation" }, "created_by": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Created By", "description": "User ID who created this evaluation" }, "created_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Created At", "description": "Unix timestamp when the evaluation was created" }, "completed_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Completed At", "description": "Unix timestamp when the evaluation completed (from S3 metadata, no file read)" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id", "description": "Agent ID that was evaluated" }, "agent_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Name", "description": "Name of the agent that was evaluated" } }, "type": "object", "required": ["evaluation_id", "team_id"], "title": "EvaluationListItem", "description": "Item in the list of completed evaluations." }, "EvaluationListResponse": { "properties": { "results": { "items": { "$ref": "#/components/schemas/EvaluationListItem" }, "type": "array", "title": "Results", "description": "List of completed evaluations with results in S3 (current page)" }, "total": { "type": "integer", "title": "Total", "description": "Total number of completed evaluations (before limit/offset)" } }, "type": "object", "required": ["total"], "title": "EvaluationListResponse", "description": "Response model for listing completed evaluations.\n " }, "EvaluationStatus": { "type": "string", "enum": ["running", "completed", "failed", "cancelled"], "title": "EvaluationStatus", "description": "Statuses for an evaluation run (mirrors the workflow lifecycle)." }, "EvaluationStatusResponse": { "properties": { "evaluation_id": { "type": "string", "format": "uuid", "title": "Evaluation Id" }, "status": { "type": "string", "title": "Status" }, "scores": { "anyOf": [ { "additionalProperties": { "type": "number" }, "type": "object" }, { "type": "null" } ], "title": "Scores" }, "created_at": { "type": "integer", "title": "Created At" }, "started_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Started At" }, "completed_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Completed At" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "status_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status Message" } }, "type": "object", "required": [ "evaluation_id", "status", "created_at", "started_at", "completed_at", "error_message" ], "title": "EvaluationStatusResponse", "description": "Response model for evaluation status." }, "EvaluationSummaryListResponse": { "properties": { "results": { "items": { "$ref": "#/components/schemas/EvaluationSummaryResponse" }, "type": "array", "title": "Results" }, "total": { "type": "integer", "title": "Total" }, "limit": { "type": "integer", "title": "Limit" }, "offset": { "type": "integer", "title": "Offset" } }, "type": "object", "required": ["results", "total", "limit", "offset"], "title": "EvaluationSummaryListResponse", "description": "Response model for a paginated list of evaluation summaries." }, "EvaluationSummaryResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "team_id": { "type": "string", "format": "uuid", "title": "Team Id" }, "agent_id": { "type": "string", "format": "uuid", "title": "Agent Id" }, "tested_by": { "type": "string", "title": "Tested By" }, "status": { "type": "string", "title": "Status" }, "reliability_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Reliability Score" }, "security_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Security Score" }, "safety_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Safety Score" }, "overall_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Overall Score" }, "pillar_details": { "additionalProperties": true, "type": "object", "title": "Pillar Details" }, "harness_names": { "items": { "type": "string" }, "type": "array", "title": "Harness Names" }, "harness_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Harness Type" }, "resource_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resource Version" }, "created_by": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Created By" }, "created_at": { "type": "integer", "title": "Created At" }, "completed_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Completed At" }, "request_params": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Request Params" } }, "type": "object", "required": ["id", "team_id", "agent_id", "tested_by", "status", "created_at"], "title": "EvaluationSummaryResponse", "description": "Response model for a single evaluation summary." }, "EvaluationTool": { "type": "string", "enum": ["diamond", "promptfoo", "garak", "pyrit"], "title": "EvaluationTool", "description": "Tools that can produce evaluation results." }, "HarnessListItem": { "properties": { "name": { "type": "string", "title": "Name" }, "updated_at": { "type": "integer", "title": "Updated At" } }, "type": "object", "required": ["name", "updated_at"], "title": "HarnessListItem", "description": "Domain model for a harness list item (S3-based standard harnesses).\n\nAttributes:\n name: Harness name/identifier\n updated_at: Unix epoch timestamp in seconds (not milliseconds)" }, "HarnessPromptsResponse": { "properties": { "prompts": { "items": { "$ref": "#/components/schemas/CustomHarnessPrompt" }, "type": "array", "title": "Prompts" }, "count": { "type": "integer", "title": "Count" } }, "type": "object", "required": ["count"], "title": "HarnessPromptsResponse", "description": "Response model for taxonomy prompts from ``harness_prompts.jsonl`` (not ``prompt.jsonl``)." }, "HarnessType": { "type": "string", "enum": ["standard", "custom"], "title": "HarnessType", "description": "Type of harness." }, "WorkflowStatus": { "type": "string", "enum": ["created", "starting", "running", "succeeded", "failed", "cancelled"], "title": "WorkflowStatus", "description": "Core lifecycle states for workflows.\n\nThese are universal statuses that apply to all workflow types.\nWorkflow-specific phases can be tracked using the optional `phase` field." }, "WorkflowStatusInfo": { "properties": { "status": { "$ref": "#/components/schemas/WorkflowStatus" }, "phase": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Phase" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "task_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Task Id" }, "session_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Session Id" } }, "type": "object", "required": ["status"], "title": "WorkflowStatusInfo", "description": "Workflow status information for enrichment.\n\nFor custom harness workflows, task_id and session_id (when present) are\npersisted in the workflow S3 file under workflow_specific_fields and\nexposed here for cancel/debugging." }, "CounterTotalResponse": { "properties": { "metric": { "type": "string", "title": "Metric", "description": "Metric name" }, "total_count": { "type": "number", "title": "Total Count", "description": "Total counter value" }, "labels": { "$ref": "#/components/schemas/MetricLabels", "description": "Structured metric labels" } }, "type": "object", "required": ["metric", "total_count"], "title": "CounterTotalResponse", "description": "Response model for counter total with metric and label information" }, "DataPoint": { "properties": { "timestamp": { "type": "integer", "title": "Timestamp", "description": "Bucket end timestamp as Unix timestamp (seconds since epoch)" }, "value": { "type": "number", "title": "Value", "description": "Sum of completions in this bucket" } }, "type": "object", "required": ["timestamp", "value"], "title": "DataPoint" }, "DetectionInput": { "properties": { "response": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Response" }, "question": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Question" }, "prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Prompt" }, "dome_detection_method": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Dome Detection Method" } }, "type": "object", "title": "DetectionInput", "description": "Input for a detection request." }, "DetectionOutput": { "properties": { "score": { "type": "number", "title": "Score", "default": 0.0 }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label" }, "details": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Details" } }, "type": "object", "title": "DetectionOutput", "description": "Output from a detection." }, "DetectionParams": { "properties": { "api_key_proxy": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key Proxy" }, "hub": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Hub" }, "model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model" } }, "type": "object", "title": "DetectionParams", "description": "Parameters for a detection request." }, "DetectionRequest": { "properties": { "id": { "type": "string", "title": "Id" }, "detector_id": { "type": "string", "title": "Detector Id" }, "detector_params": { "$ref": "#/components/schemas/DetectionParams" }, "detector_inputs": { "items": { "$ref": "#/components/schemas/DetectionInput" }, "type": "array", "title": "Detector Inputs" } }, "type": "object", "required": ["id", "detector_id", "detector_inputs"], "title": "DetectionRequest", "description": "Request model for creating a detection." }, "DetectionResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "status": { "type": "string", "title": "Status" }, "detector_inputs": { "items": { "$ref": "#/components/schemas/DetectionInput" }, "type": "array", "title": "Detector Inputs" }, "detector_outputs": { "items": { "$ref": "#/components/schemas/DetectionOutput" }, "type": "array", "title": "Detector Outputs" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" } }, "type": "object", "required": ["id", "status"], "title": "DetectionResponse", "description": "Response model for a detection." }, "DomeConfigCreate": { "properties": { "config_body": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Config Body", "description": "Guard configuration. If not provided, uses default config." }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id", "description": "Agent to bind this config to. When set, writes config_pending.json to storage." } }, "type": "object", "title": "DomeConfigCreate", "description": "Request model for creating a Dome configuration." }, "DomeConfigListResponse": { "properties": { "dome_configs": { "items": { "$ref": "#/components/schemas/DomeConfigResponse" }, "type": "array", "title": "Dome Configs" }, "count": { "type": "integer", "title": "Count" } }, "type": "object", "required": ["dome_configs", "count"], "title": "DomeConfigListResponse", "description": "Response model for listing Dome configurations." }, "DomeConfigPatch": { "properties": { "dome_instance_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Dome Instance Url", "description": "Dome instance URL to set, or null to clear." } }, "type": "object", "required": ["dome_instance_url"], "title": "DomeConfigPatch", "description": "Request model for partial update (PATCH) of a Dome configuration." }, "DomeConfigResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "status": { "type": "string", "title": "Status", "default": "pending" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "config_body": { "additionalProperties": true, "type": "object", "title": "Config Body" }, "dome_instance_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Dome Instance Url" }, "created_at": { "type": "integer", "title": "Created At" }, "created_by": { "type": "string", "format": "uuid", "title": "Created By" }, "updated_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Updated At" }, "updated_by": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Updated By" } }, "type": "object", "required": ["id", "created_at", "created_by"], "title": "DomeConfigResponse", "description": "API response model for Dome configuration.\n\n``id`` and optional ``agent_id`` are top-level fields. ``config_body`` is the\nguard configuration dict (Dome-facing payload). Other metadata (e.g. team_id,\ntimestamps, created_by) is included in the wire shape as returned by the domain\nmodel's ``to_wire()`` — see OpenAPI schema for the full response shape." }, "DomeConfigUpdate": { "properties": { "config_body": { "additionalProperties": true, "type": "object", "title": "Config Body", "description": "Updated guard configuration." } }, "type": "object", "required": ["config_body"], "title": "DomeConfigUpdate", "description": "Request model for updating a Dome configuration." }, "LatencyOverTimeResponse": { "properties": { "metric_name": { "type": "string", "title": "Metric Name", "description": "Name of the latency metric" }, "time_window": { "type": "string", "title": "Time Window", "description": "Time window used for aggregation (e.g., '1m')" }, "percentile": { "type": "string", "title": "Percentile", "description": "Percentile value (e.g., 'P50', 'P95')" }, "values": { "items": { "$ref": "#/components/schemas/TimeSeriesPoint" }, "type": "array", "title": "Values", "description": "Latency data points over time" } }, "type": "object", "required": ["metric_name", "time_window", "percentile", "values"], "title": "LatencyOverTimeResponse", "description": "Response model for latency over time" }, "LogEntryResponse": { "properties": { "timestamp": { "type": "integer", "title": "Timestamp", "description": "Unix timestamp in nanoseconds" }, "line": { "type": "string", "title": "Line", "description": "Log message" } }, "type": "object", "required": ["timestamp", "line"], "title": "LogEntryResponse" }, "LogStreamResponse": { "properties": { "labels": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Labels" }, "entries": { "items": { "$ref": "#/components/schemas/LogEntryResponse" }, "type": "array", "title": "Entries" } }, "type": "object", "title": "LogStreamResponse" }, "LogsQueryResponse": { "properties": { "query": { "type": "string", "title": "Query", "description": "Executed LogQL query" }, "direction": { "type": "string", "enum": ["forward", "backward"], "title": "Direction", "description": "Result ordering" }, "start_ns": { "type": "integer", "title": "Start Ns", "description": "Start window in nanoseconds" }, "end_ns": { "type": "integer", "title": "End Ns", "description": "End window in nanoseconds" }, "streams": { "items": { "$ref": "#/components/schemas/LogStreamResponse" }, "type": "array", "title": "Streams" }, "next_timestamp": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Next Timestamp", "description": "Bookmark timestamp for pagination" } }, "type": "object", "required": ["query", "direction", "start_ns", "end_ns"], "title": "LogsQueryResponse" }, "MetricLabels": { "properties": { "agent_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Id", "description": "Agent ID (same as agent_configuration_id)" }, "deployment_environment": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Deployment Environment", "description": "Deployment environment (e.g., production, staging)" }, "exported_job": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Exported Job", "description": "Exported job identifier" }, "job": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Job", "description": "Job name (e.g., otel-collector)" }, "service_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Service Name", "description": "Service name (e.g., vijil.dome)" }, "service_namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Service Namespace", "description": "Service namespace" }, "service_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Service Version", "description": "Service version" }, "team_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Team Id", "description": "Team ID" }, "user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Id", "description": "User ID" }, "evaluation_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Evaluation Id", "description": "Evaluation ID filter" } }, "type": "object", "title": "MetricLabels", "description": "Structured metric labels for telemetry data" }, "MetricQueryResponse": { "properties": { "metric": { "type": "string", "title": "Metric", "description": "chat_completions_total" }, "series": { "items": { "$ref": "#/components/schemas/TimeSeries" }, "type": "array", "title": "Series", "description": "List of time series data" }, "labels": { "$ref": "#/components/schemas/MetricLabels", "description": "Structured metric labels" } }, "type": "object", "required": ["metric", "series"], "title": "MetricQueryResponse" }, "RegisterDomeRequest": { "properties": { "agent_id": { "type": "string", "format": "uuid", "title": "Agent Id", "description": "The agent being protected" }, "team_id": { "type": "string", "format": "uuid", "title": "Team Id", "description": "Team that owns the agent" }, "dome_url": { "type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Dome Url", "description": "Base URL of the Dome instance" } }, "type": "object", "required": ["agent_id", "team_id", "dome_url"], "title": "RegisterDomeRequest", "description": "Request body for register-dome webhook." }, "RegisterDomeResponse": { "properties": { "status": { "type": "string", "title": "Status", "default": "ok" }, "agent_id": { "type": "string", "format": "uuid", "title": "Agent Id" }, "team_id": { "type": "string", "format": "uuid", "title": "Team Id" }, "dome_url": { "type": "string", "title": "Dome Url" } }, "type": "object", "required": ["agent_id", "team_id", "dome_url"], "title": "RegisterDomeResponse", "description": "Success response for register-dome webhook." }, "TimeSeries": { "properties": { "labels": { "$ref": "#/components/schemas/MetricLabels", "description": "Structured metric labels for this series" }, "points": { "items": { "$ref": "#/components/schemas/DataPoint" }, "type": "array", "title": "Points", "description": "Time-ordered bucket values" } }, "type": "object", "required": ["points"], "title": "TimeSeries" }, "TimeSeriesPoint": { "properties": { "timestamp": { "type": "integer", "title": "Timestamp", "description": "Unix timestamp of the data point" }, "value": { "type": "number", "title": "Value", "description": "Value at this timestamp" } }, "type": "object", "required": ["timestamp", "value"], "title": "TimeSeriesPoint", "description": "Response model for time series data points" }, "TraceDetailResponse": { "properties": { "trace_id": { "type": "string", "title": "Trace Id", "description": "Hex encoded trace identifier" }, "trace_id_base64": { "type": "string", "title": "Trace Id Base64", "description": "Base64 identifier returned by Tempo" }, "batches": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Batches", "description": "Raw OTLP batches returned by Tempo" } }, "type": "object", "required": ["trace_id", "trace_id_base64"], "title": "TraceDetailResponse" }, "TraceSearchMetricsResponse": { "properties": { "inspectedTraces": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Inspectedtraces" }, "inspectedBytes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Inspectedbytes" }, "completedJobs": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Completedjobs" }, "totalJobs": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Totaljobs" } }, "type": "object", "title": "TraceSearchMetricsResponse" }, "TraceSearchResponse": { "properties": { "traces": { "items": { "$ref": "#/components/schemas/TraceSummaryResponse" }, "type": "array", "title": "Traces" }, "metrics": { "anyOf": [ { "$ref": "#/components/schemas/TraceSearchMetricsResponse" }, { "type": "null" } ] } }, "type": "object", "title": "TraceSearchResponse" }, "TraceSummaryResponse": { "properties": { "trace_id": { "type": "string", "title": "Trace Id", "description": "Hex encoded trace identifier" }, "root_service_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Root Service Name" }, "root_trace_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Root Trace Name" }, "start_time_unix_nano": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Start Time Unix Nano" }, "duration_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Duration Ms" } }, "type": "object", "required": ["trace_id"], "title": "TraceSummaryResponse" }, "AttackCategory": { "type": "string", "enum": [ "injection", "jailbreak", "harmful", "pii", "toxicity", "hallucination", "overreliance", "custom" ], "title": "AttackCategory", "description": "Abstract attack categories (tool-agnostic).\n\nEach adapter maps these to tool-native plugin/probe/strategy names.\nUse CUSTOM with custom_plugins for tool-native passthrough." }, "CampaignStatusResponse": { "properties": { "campaign_id": { "type": "string", "format": "uuid", "title": "Campaign Id" }, "status": { "type": "string", "title": "Status" }, "tool": { "type": "string", "title": "Tool" }, "created_at": { "type": "integer", "title": "Created At" }, "started_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Started At" }, "completed_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Completed At" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" } }, "type": "object", "required": ["campaign_id", "status", "tool", "created_at"], "title": "CampaignStatusResponse", "description": "Response for campaign status queries." }, "CreateCampaignRequest": { "properties": { "team_id": { "type": "string", "format": "uuid", "title": "Team Id", "description": "Team that owns this campaign" }, "tool": { "$ref": "#/components/schemas/RedteamTool", "description": "Red team tool to use" }, "agent_url": { "anyOf": [ { "type": "string", "maxLength": 2083, "minLength": 1, "format": "uri" }, { "type": "null" } ], "title": "Agent Url", "description": "Target agent endpoint URL" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id", "description": "Agent ID from Agent Registry (resolves URL)" }, "agent_api_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Api Key", "description": "API key for the target agent" }, "agent_model_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Model Name", "description": "Model name if agent is an LLM gateway" }, "purpose": { "type": "string", "minLength": 1, "title": "Purpose", "description": "Agent purpose description (for context-aware attacks)" }, "categories": { "items": { "$ref": "#/components/schemas/AttackCategory" }, "type": "array", "minItems": 1, "title": "Categories", "description": "Attack categories to test" }, "custom_plugins": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Custom Plugins", "description": "Custom plugin/probe names (for CUSTOM category)" }, "strategies": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Strategies", "description": "Evaluation strategies (tool-specific)" }, "num_tests": { "type": "integer", "maximum": 100.0, "minimum": 1.0, "title": "Num Tests", "description": "Number of test cases per category", "default": 25 }, "provider_config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Provider Config", "description": "Provider-specific configuration" } }, "type": "object", "required": ["team_id", "tool", "purpose", "categories"], "title": "CreateCampaignRequest", "description": "Request body for creating a red team campaign." }, "CreateCampaignResponse": { "properties": { "campaign_id": { "type": "string", "format": "uuid", "title": "Campaign Id" }, "status": { "type": "string", "title": "Status" } }, "type": "object", "required": ["campaign_id", "status"], "title": "CreateCampaignResponse", "description": "Response after creating a campaign." }, "Finding": { "properties": { "category": { "type": "string", "title": "Category", "description": "Attack category that produced this finding" }, "severity": { "type": "string", "title": "Severity", "description": "Severity level (critical, high, medium, low)" }, "attack_prompt": { "type": "string", "title": "Attack Prompt", "description": "The adversarial input sent to the agent" }, "agent_response": { "type": "string", "title": "Agent Response", "description": "The agent's response to the attack" }, "passed": { "type": "boolean", "title": "Passed", "description": "Whether the agent resisted the attack" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata", "description": "Normalized structured extras: fields the adapter has explicitly parsed and named (e.g. plugin_id, score_reason). Use when the adapter can provide typed context. Distinct from raw_metadata, which is the verbatim tool output." }, "attack_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Attack Type", "description": "Tool's native attack category name" }, "phenotype_category": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Phenotype Category", "description": "Mapped taxonomy path (e.g., 'security.integrity.prompt_injection')" }, "attack_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Attack Score", "description": "0-1 score for this specific attack type" }, "detector_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Detector Id", "description": "Which detector/plugin scored this" }, "raw_metadata": { "additionalProperties": true, "type": "object", "title": "Raw Metadata", "description": "Verbatim tool-native output preserved as-is for debugging and auditability. Always populated by adapters. Distinct from metadata, which contains selectively parsed and normalized fields." } }, "type": "object", "required": ["category", "severity", "attack_prompt", "agent_response", "passed"], "title": "Finding", "description": "A single vulnerability finding, normalized across all tools.\n\nEach tool adapter maps its native output format into this structure." }, "RedteamResult": { "properties": { "job_id": { "type": "string", "format": "uuid", "title": "Job Id", "description": "Campaign job ID these results belong to" }, "tool": { "$ref": "#/components/schemas/RedteamTool", "description": "Tool that produced these results" }, "findings": { "items": { "$ref": "#/components/schemas/Finding" }, "type": "array", "title": "Findings", "description": "Individual vulnerability findings" }, "summary": { "$ref": "#/components/schemas/RedteamSummary", "description": "Aggregate statistics" }, "raw_output": { "additionalProperties": true, "type": "object", "title": "Raw Output", "description": "Full tool-native output for debugging" } }, "type": "object", "required": ["job_id", "tool", "summary"], "title": "RedteamResult", "description": "Normalized results from any red team tool.\n\nAdapters convert tool-native output into this common format,\nenabling cross-tool comparison and unified reporting." }, "RedteamSummary": { "properties": { "total_tests": { "type": "integer", "minimum": 0.0, "title": "Total Tests", "description": "Total number of tests executed" }, "passed": { "type": "integer", "minimum": 0.0, "title": "Passed", "description": "Tests where the agent resisted the attack" }, "failed": { "type": "integer", "minimum": 0.0, "title": "Failed", "description": "Tests where the attack succeeded" }, "errors": { "type": "integer", "minimum": 0.0, "title": "Errors", "description": "Tests that errored during execution", "default": 0 }, "categories_tested": { "items": { "type": "string" }, "type": "array", "title": "Categories Tested", "description": "Attack categories that were tested" }, "vulnerabilities_found": { "type": "boolean", "title": "Vulnerabilities Found", "description": "Whether any attacks succeeded" } }, "type": "object", "required": [ "total_tests", "passed", "failed", "categories_tested", "vulnerabilities_found" ], "title": "RedteamSummary", "description": "Aggregate statistics for a red team campaign." }, "RedteamTool": { "type": "string", "enum": ["diamond_security", "promptfoo", "garak", "pyrit", "unknown"], "title": "RedteamTool", "description": "Supported red team tools." }, "ToolInfo": { "properties": { "tool": { "type": "string", "title": "Tool" }, "categories": { "items": { "type": "string" }, "type": "array", "title": "Categories" } }, "type": "object", "required": ["tool", "categories"], "title": "ToolInfo", "description": "Summary of a red team tool's capabilities." } }, "securitySchemes": {} }, "tags": [ { "name": "Teams", "description": "Authentication, users, and team management" }, { "name": "Agent Environment", "description": "Agent, persona, policy, and harness management" }, { "name": "Diamond", "description": "Evaluation management and report retrieval" }, { "name": "Dome", "description": "Protection, guardrails, and telemetry" }, { "name": "Red Team", "description": "Red team campaigns" } ] }