{"openapi":"3.1.0","info":{"title":"Mise API","version":"0.1.0"},"paths":{"/api/v1/file/{file_path}":{"get":{"tags":["Flows"],"summary":"Get File Endpoint","description":"Retrieve a file from the storage bucket.\n\nStorage paths are collection-prefixed (e.g. returned in a trajectory's\n``results_files`` / ``primary_files``), so the first path segment must be\na collection the bearer token can access.\n\nArgs:\n    file_path: The path/key of the file in the storage bucket\n\nReturns:\n    The file content as a response with appropriate content type\n\nRaises:\n    HTTPException: If file not found or other storage errors","operationId":"get_file_endpoint_api_v1_file__file_path__get","parameters":[{"name":"file_path","in":"path","required":true,"schema":{"type":"string","title":"File Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/file-info/{file_path}":{"get":{"tags":["Flows"],"summary":"Get File Info Endpoint","description":"Get information about a file without downloading it.\n\nArgs:\n    file_path: The path/key of the file in the storage bucket\n\nReturns:\n    File information including existence, size, and content type\n\nRaises:\n    HTTPException: If storage errors occur","operationId":"get_file_info_endpoint_api_v1_file_info__file_path__get","parameters":[{"name":"file_path","in":"path","required":true,"schema":{"type":"string","title":"File Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/list-files":{"get":{"tags":["Flows"],"summary":"List Files Endpoint","description":"List files in the storage bucket with optional prefix filter.\n\nArgs:\n    prefix: Optional prefix to filter files (e.g., \"folder/subfolder\")\n\nReturns:\n    List of file paths matching the prefix\n\nRaises:\n    HTTPException: If storage errors occur","operationId":"list_files_endpoint_api_v1_list_files_get","parameters":[{"name":"prefix","in":"query","required":false,"schema":{"type":"string","default":"","title":"Prefix"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/run/{collection_name}/{task_name}":{"post":{"tags":["Flows"],"summary":"Run Bakery Flow With File Endpoint","description":"Start a workflow by fetching a task definition from a bakery host.\nAccepts JSON or multipart form data.\n\nArgs:\n    task_name: Name of the task to fetch from bakery\n    collection_name: Collection name in bakery\n    bakery_host: URL of the bakery host\n    init_params: Initialization parameters (dict for JSON, JSON string for multipart)\n    authorization: Bearer token for bakery authentication (via Authorization header)\n    files: Optional file uploads (multipart only)\n    webhook_url: Optional URL to call when workflow completes or fails\n    webhook_secret: Secret for HMAC-SHA256 signing of webhook payloads","operationId":"run_bakery_flow_with_file_endpoint_api_v1_run__collection_name___task_name__post","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"task_name","in":"path","required":true,"schema":{"type":"string","title":"Task Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"bakery_host":{"type":"string","default":""},"init_params":{"type":"object","default":{}},"webhook_url":{"type":"string"},"webhook_secret":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"bakery_host":{"type":"string","default":""},"init_params":{"type":"string","default":"{}","description":"JSON-encoded init parameters"},"files":{"type":"array","items":{"type":"string","format":"binary"}},"webhook_url":{"type":"string"},"webhook_secret":{"type":"string"}}}}}}}},"/api/v1/run-sync/{collection_name}/{task_name}":{"post":{"tags":["Flows"],"summary":"Run Bakery Flow Sync With File Endpoint","description":"Start a workflow by fetching a task definition from a bakery host and wait for completion.\nAccepts JSON or multipart form data.\n\nArgs:\n    task_name: Name of the task to fetch from bakery\n    collection_name: Collection name in bakery\n    bakery_host: URL of the bakery host\n    init_params: Initialization parameters (dict for JSON, JSON string for multipart)\n    authorization: Bearer token for bakery authentication (via Authorization header)\n    files: Optional file uploads (multipart only)\n\nReturns:\n    Workflow response with trajectory result after completion","operationId":"run_bakery_flow_sync_with_file_endpoint_api_v1_run_sync__collection_name___task_name__post","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"task_name","in":"path","required":true,"schema":{"type":"string","title":"Task Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"bakery_host":{"type":"string","default":""},"init_params":{"type":"object","default":{}},"webhook_url":{"type":"string"},"webhook_secret":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"bakery_host":{"type":"string","default":""},"init_params":{"type":"string","default":"{}","description":"JSON-encoded init parameters"},"files":{"type":"array","items":{"type":"string","format":"binary"}},"webhook_url":{"type":"string"},"webhook_secret":{"type":"string"}}}}}}}},"/api/v1/run-litellm/{collection_name}/{task_name}/chat/completions":{"post":{"tags":["Flows"],"summary":"Run Litellm Workflow","description":"Start a workflow using LiteLLM-compatible format.\nOnly works with flow_workflows that contain litellm_chat activity.\n\nArgs:\n    collection_name: Collection name in bakery\n    task_name: Name of the task to fetch from bakery\n    body: LiteLLM chat request in OpenAI format\n    bakery_host: URL of the bakery host (via header or env)\n    authorization: Bearer token for bakery authentication (via Authorization header)\n    x_webhook_url: Optional URL to call when workflow completes or fails\n    x_webhook_secret: Secret for HMAC-SHA256 signing of webhook payloads\n\nReturns:\n    WorkflowResponse with workflow_id for tracking","operationId":"run_litellm_workflow_api_v1_run_litellm__collection_name___task_name__chat_completions_post","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"task_name","in":"path","required":true,"schema":{"type":"string","title":"Task Name"}},{"name":"x-bakery-host","in":"header","required":false,"schema":{"type":"string","default":"https://flows-api.jetty.io","title":"X-Bakery-Host"}},{"name":"x-webhook-url","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Webhook-Url"}},{"name":"x-webhook-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Webhook-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiteLLMWorkflowRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/run-litellm-sync/{collection_name}/{task_name}/chat/completions":{"post":{"tags":["Flows"],"summary":"Run Litellm Workflow Sync","description":"Start a workflow using LiteLLM-compatible format and wait for completion.\nOnly works with flow_workflows that contain litellm_chat activity.\n\nArgs:\n    collection_name: Collection name in bakery\n    task_name: Name of the task to fetch from bakery\n    body: LiteLLM chat request in OpenAI format\n    bakery_host: URL of the bakery host (via header or env)\n    authorization: Bearer token for bakery authentication (via Authorization header)\n\nReturns:\n    LiteLLMWorkflowResponse in OpenAI-compatible format","operationId":"run_litellm_workflow_sync_api_v1_run_litellm_sync__collection_name___task_name__chat_completions_post","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"task_name","in":"path","required":true,"schema":{"type":"string","title":"Task Name"}},{"name":"x-bakery-host","in":"header","required":false,"schema":{"type":"string","default":"https://flows-api.jetty.io","title":"X-Bakery-Host"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiteLLMWorkflowRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiteLLMWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cancel/{workflow_id}":{"post":{"tags":["Flows"],"summary":"Cancel Workflow","description":"Cancel a running workflow.\n\nSends a cancellation request to the Temporal workflow, which will\nstop execution after the current step completes and save the\ntrajectory with a 'cancelled' status.\n\nArgs:\n    workflow_id: The workflow execution ID returned from the run endpoint.\n    authorization: Bearer token for authentication (via Authorization header).\n\nReturns:\n    Status of the cancellation request.","operationId":"cancel_workflow_api_v1_cancel__workflow_id__post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflows-logs/{workflow_id}":{"get":{"tags":["Flows"],"summary":"Get Workflow Logs","operationId":"get_workflow_logs_api_v1_workflows_logs__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"from_index","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"From Index"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflows-logs-stream/{workflow_id}":{"get":{"tags":["Flows"],"summary":"Stream Workflow Logs","operationId":"stream_workflow_logs_api_v1_workflows_logs_stream__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"from_index","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"From Index"}},{"name":"poll_interval_ms","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Poll Interval Ms"}},{"name":"heartbeat_interval_ms","in":"query","required":false,"schema":{"type":"integer","default":10000,"title":"Heartbeat Interval Ms"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/trajectory/{collection}/{name}/statuses":{"post":{"tags":["Trajectories","Trajectories"],"summary":"Batch update trajectory statuses","description":"Updates the status for multiple trajectories by id by searching across numbered folders. Request body should be a dictionary mapping trajectory_id -> status.","operationId":"batch_update_trajectory_statuses_api_v1_trajectory__collection___name__statuses_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string","description":"The collection where the trajectories are located","title":"Collection"},"description":"The collection where the trajectories are located"},{"name":"name","in":"path","required":true,"schema":{"type":"string","description":"The name of the flow","title":"Name"},"description":"The name of the flow"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"enum":["pending","completed","failed","cancelled","archived"],"type":"string"},"description":"Dictionary of trajectory_id -> new status","title":"Statuses"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/mise__api__endpoints__trajectory__BatchStatusUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/trajectories/{collection}/{name}":{"get":{"tags":["Trajectories","Trajectories"],"summary":"List trajectories","description":"Lists all trajectories for a given collection and flow name with pagination support","operationId":"list_trajectories_api_v1_trajectories__collection___name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string","description":"The collection where the trajectories are located","title":"Collection"},"description":"The collection where the trajectories are located"},{"name":"name","in":"path","required":true,"schema":{"type":"string","description":"The name of the flow","title":"Name"},"description":"The name of the flow"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Maximum number of trajectories to return","default":500,"title":"Limit"},"description":"Maximum number of trajectories to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of trajectories to skip for pagination","default":0,"title":"Offset"},"description":"Number of trajectories to skip for pagination"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/mise__api__endpoints__trajectory__TrajectoryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/trajectories/{collection}/{name}/{folder}/{trajectory_id}":{"get":{"tags":["Trajectories","Trajectories"],"summary":"Get a trajectory","description":"Gets a trajectory by its ID","operationId":"get_trajectory_by_id_api_v1_trajectories__collection___name___folder___trajectory_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string","description":"The collection where the trajectory is located","title":"Collection"},"description":"The collection where the trajectory is located"},{"name":"name","in":"path","required":true,"schema":{"type":"string","description":"The name of the flow","title":"Name"},"description":"The name of the flow"},{"name":"folder","in":"path","required":true,"schema":{"type":"string","description":"The folder where the trajectory is located","title":"Folder"},"description":"The folder where the trajectory is located"},{"name":"trajectory_id","in":"path","required":true,"schema":{"type":"string","description":"The unique identifier for the trajectory","title":"Trajectory Id"},"description":"The unique identifier for the trajectory"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trajectory"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/trajectory/{collection}/{name}/{trajectory_id}":{"get":{"tags":["Trajectories","Trajectories"],"summary":"Get a trajectory without folder","description":"Gets a trajectory by its ID by searching across numbered folders","operationId":"get_trajectory_by_id_no_folder_api_v1_trajectory__collection___name___trajectory_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string","description":"The collection where the trajectory is located","title":"Collection"},"description":"The collection where the trajectory is located"},{"name":"name","in":"path","required":true,"schema":{"type":"string","description":"The name of the flow","title":"Name"},"description":"The name of the flow"},{"name":"trajectory_id","in":"path","required":true,"schema":{"type":"string","description":"The unique identifier for the trajectory","title":"Trajectory Id"},"description":"The unique identifier for the trajectory"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trajectory"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/trajectories/{collection}/{name}/ingest":{"post":{"tags":["Trajectories","Trajectories"],"summary":"Ingest an external eval run as a trajectory","description":"Persists a finished, externally-produced eval run (input, output, scores, labels, cost) as a durable trajectory — no workflow execution. Supply `trajectory_id` for idempotent re-pushes. Used by external eval reporters (e.g. a Vercel eve eval reporter) to record graded runs in Jetty.","operationId":"ingest_trajectory_api_v1_trajectories__collection___name__ingest_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string","description":"The collection to write the trajectory under","title":"Collection"},"description":"The collection to write the trajectory under"},{"name":"name","in":"path","required":true,"schema":{"type":"string","description":"The flow/task name to record the run under","title":"Name"},"description":"The flow/task name to record the run under"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestTrajectoryRequest","description":"The finished eval run to persist"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestTrajectoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/trajectories/{collection}/{name}/{folder}/{trajectory_id}/labels":{"post":{"tags":["Trajectories","Trajectories"],"summary":"Add a label to a trajectory","description":"Adds a new label to the specified trajectory. Errors if a label with the same key already exists.","operationId":"add_label_to_trajectory_api_v1_trajectories__collection___name___folder___trajectory_id__labels_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string","description":"The collection where the trajectory is located","title":"Collection"},"description":"The collection where the trajectory is located"},{"name":"name","in":"path","required":true,"schema":{"type":"string","description":"The name of the flow","title":"Name"},"description":"The name of the flow"},{"name":"folder","in":"path","required":true,"schema":{"type":"string","description":"The folder where the trajectory is located","title":"Folder"},"description":"The folder where the trajectory is located"},{"name":"trajectory_id","in":"path","required":true,"schema":{"type":"string","description":"The unique identifier for the trajectory","title":"Trajectory Id"},"description":"The unique identifier for the trajectory"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelRequestData","description":"The key and value for the new label"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Label"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/trajectories/{collection}/{name}/{folder}/{trajectory_id}/labels/{key}":{"delete":{"tags":["Trajectories","Trajectories"],"summary":"Delete a label from a trajectory","description":"Deletes a label with the given key from the specified trajectory.","operationId":"delete_label_from_trajectory_api_v1_trajectories__collection___name___folder___trajectory_id__labels__key__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string","description":"The collection where the trajectory is located","title":"Collection"},"description":"The collection where the trajectory is located"},{"name":"name","in":"path","required":true,"schema":{"type":"string","description":"The name of the flow","title":"Name"},"description":"The name of the flow"},{"name":"folder","in":"path","required":true,"schema":{"type":"string","description":"The folder where the trajectory is located","title":"Folder"},"description":"The folder where the trajectory is located"},{"name":"trajectory_id","in":"path","required":true,"schema":{"type":"string","description":"The unique identifier for the trajectory","title":"Trajectory Id"},"description":"The unique identifier for the trajectory"},{"name":"key","in":"path","required":true,"schema":{"type":"string","description":"The label key to delete","title":"Key"},"description":"The label key to delete"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Label"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/trajectory/{collection}/{name}/{trajectory_id}/labels/{key}":{"delete":{"tags":["Trajectories","Trajectories"],"summary":"Delete a label from a trajectory without folder","description":"Deletes a label by searching across numbered folders to locate the trajectory.","operationId":"delete_label_from_trajectory_no_folder_api_v1_trajectory__collection___name___trajectory_id__labels__key__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string","description":"The collection where the trajectory is located","title":"Collection"},"description":"The collection where the trajectory is located"},{"name":"name","in":"path","required":true,"schema":{"type":"string","description":"The name of the flow","title":"Name"},"description":"The name of the flow"},{"name":"trajectory_id","in":"path","required":true,"schema":{"type":"string","description":"The unique identifier for the trajectory","title":"Trajectory Id"},"description":"The unique identifier for the trajectory"},{"name":"key","in":"path","required":true,"schema":{"type":"string","description":"The label key to delete","title":"Key"},"description":"The label key to delete"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Label"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/trajectory/{collection}/{name}/{trajectory_id}/labels":{"post":{"tags":["Trajectories","Trajectories"],"summary":"Add a label to a trajectory without folder","description":"Adds a label to the specified trajectory by searching across numbered folders.","operationId":"add_label_to_trajectory_no_folder_api_v1_trajectory__collection___name___trajectory_id__labels_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string","description":"The collection where the trajectory is located","title":"Collection"},"description":"The collection where the trajectory is located"},{"name":"name","in":"path","required":true,"schema":{"type":"string","description":"The name of the flow","title":"Name"},"description":"The name of the flow"},{"name":"trajectory_id","in":"path","required":true,"schema":{"type":"string","description":"The unique identifier for the trajectory","title":"Trajectory Id"},"description":"The unique identifier for the trajectory"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelRequestData","description":"The key and value for the new label"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Label"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/trajectory/{collection}/{name}/{trajectory_id}/download":{"get":{"tags":["Trajectories","Trajectories"],"summary":"Download trajectory assets as zip","description":"Downloads all assets related to a trajectory as a self-contained zip file.","operationId":"download_trajectory_zip_api_v1_trajectory__collection___name___trajectory_id__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string","description":"The collection where the trajectory is located","title":"Collection"},"description":"The collection where the trajectory is located"},{"name":"name","in":"path","required":true,"schema":{"type":"string","description":"The name of the flow/task","title":"Name"},"description":"The name of the flow/task"},{"name":"trajectory_id","in":"path","required":true,"schema":{"type":"string","description":"The unique identifier for the trajectory","title":"Trajectory Id"},"description":"The unique identifier for the trajectory"}],"responses":{"200":{"description":"A zip file containing all trajectory assets","content":{"application/json":{"schema":{}},"application/zip":{}}},"404":{"description":"Trajectory not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/metering/{collection_name}":{"get":{"tags":["Metering"],"summary":"Get Collection Metering","description":"Retrieve usage metering information for a specific collection.\n\nArgs:\n    collection_name: Name of the collection to get metering data for\n    \nReturns:\n    Dictionary containing activity counts, jetty API key usage, and timestamps\n    \nRaises:\n    HTTPException: If authentication fails or storage errors occur","operationId":"get_collection_metering_api_v1_metering__collection_name__get","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/step-templates":{"get":{"tags":["Step Templates"],"summary":"List step templates","description":"Returns all available step templates with optional filtering by category, tag, or search term.","operationId":"list_step_templates_api_v1_step_templates_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/StepCategory"},{"type":"null"}],"description":"Filter by category (e.g., 'ai_models', 'control_flow')","title":"Category"},"description":"Filter by category (e.g., 'ai_models', 'control_flow')"},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by tag (case-insensitive)","title":"Tag"},"description":"Filter by tag (case-insensitive)"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search in activity name, display name, description, and tags","title":"Search"},"description":"Search in activity name, display name, description, and tags"},{"name":"include_deprecated","in":"query","required":false,"schema":{"type":"boolean","description":"Include deprecated templates in results","default":false,"title":"Include Deprecated"},"description":"Include deprecated templates in results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepTemplateListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/step-templates/categories":{"get":{"tags":["Step Templates"],"summary":"List categories","description":"Returns all categories with their associated activity names.","operationId":"list_categories_api_v1_step_templates_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryListResponse"}}}}}}},"/api/v1/step-templates/path-expressions":{"get":{"tags":["Step Templates"],"summary":"Path expression reference","description":"Returns documentation for path expression syntax used in step parameters.","operationId":"get_path_expression_info_api_v1_step_templates_path_expressions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PathExpressionInfo"}}}}}}},"/api/v1/step-templates/{activity_name}":{"get":{"tags":["Step Templates"],"summary":"Get step template","description":"Returns detailed information about a specific step template.","operationId":"get_step_template_api_v1_step_templates__activity_name__get","parameters":[{"name":"activity_name","in":"path","required":true,"schema":{"type":"string","title":"Activity Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepTemplateSchema"}}}},"404":{"description":"Template not found","content":{"application/json":{"example":{"detail":"Step template 'unknown_activity' not found"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/models":{"get":{"tags":["Models"],"summary":"List LiteLLM models","description":"Returns all available LiteLLM-compatible models with optional filtering.","operationId":"list_models_api_v1_models_get","parameters":[{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by provider name (e.g., 'OpenAI', 'Anthropic')","title":"Provider"},"description":"Filter by provider name (e.g., 'OpenAI', 'Anthropic')"},{"name":"mode","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by mode (e.g., 'chat', 'embedding', 'image_generation')","title":"Mode"},"description":"Filter by mode (e.g., 'chat', 'embedding', 'image_generation')"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search term to match against model IDs","title":"Search"},"description":"Search term to match against model IDs"},{"name":"supports_vision","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by vision support capability","title":"Supports Vision"},"description":"Filter by vision support capability"},{"name":"supports_function_calling","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by function calling support","title":"Supports Function Calling"},"description":"Filter by function calling support"},{"name":"include_retired","in":"query","required":false,"schema":{"type":"boolean","description":"Include model ids the provider has already retired. Off by default: a listing that mixes retired ids in with live ones reads as 'none of these work' when one of them does.","default":false,"title":"Include Retired"},"description":"Include model ids the provider has already retired. Off by default: a listing that mixes retired ids in with live ones reads as 'none of these work' when one of them does."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/models/providers":{"get":{"tags":["Models"],"summary":"List providers","description":"Returns all providers with their model counts.","operationId":"list_providers_api_v1_models_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderListResponse"}}}}}}},"/api/v1/models/modes":{"get":{"tags":["Models"],"summary":"List modes","description":"Returns all model modes with their counts.","operationId":"list_modes_api_v1_models_modes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModeListResponse"}}}}}}},"/api/v1/models/{model_id}":{"get":{"tags":["Models"],"summary":"Get model","description":"Returns detailed information about a specific model.","operationId":"get_model_api_v1_models__model_id__get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiteLLMModelSchema"}}}},"404":{"description":"Model not found","content":{"application/json":{"example":{"detail":"Model 'unknown-model' not found"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/models/refresh":{"post":{"tags":["Models"],"summary":"Refresh model cache","description":"Forces a refresh of the model cache from LiteLLM's database.","operationId":"refresh_models_api_v1_models_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Refresh Models Api V1 Models Refresh Post"}}}}}}},"/api/v1/llm/registry":{"get":{"tags":["LLM Registry"],"summary":"List LLM providers and agent runners","description":"Returns the live registry of model providers (Anthropic, OpenAI, Bedrock, OpenRouter, Google, vLLM, Cloudflare AI Gateway) and agent runners (claude-code, codex, gemini-cli, goose, antigravity, opencode, hermes, pi), including each provider's credential schema and each runner's compatibility row.","operationId":"get_llm_registry_api_v1_llm_registry_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMRegistryResponse"}}}}}}},"/api/v1/chat/completions":{"post":{"tags":["Chat"],"summary":"Chat Completions","description":"OpenAI-compatible chat completions endpoint.\n\nRoutes to passthrough (direct LLM) or runbook (Temporal workflow)\nbased on the jetty extension in the request body.","operationId":"chat_completions_api_v1_chat_completions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat/completions":{"post":{"tags":["Chat v1"],"summary":"Chat Completions","description":"OpenAI-compatible chat completions endpoint.\n\nRoutes to passthrough (direct LLM) or runbook (Temporal workflow)\nbased on the jetty extension in the request body.","operationId":"chat_completions_v1_chat_completions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sandbox/upload":{"post":{"tags":["Sandbox"],"summary":"Sandbox Upload","description":"Upload files for use in sandbox / chat completions.\n\nReturns a list of storage paths that can be passed as\n``jetty.file_paths`` in a subsequent ``/chat/completions`` request.\n\nRequires a valid Authorization header (API key or JWT).","operationId":"sandbox_upload_api_v1_sandbox_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_sandbox_upload_api_v1_sandbox_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sandbox/presign":{"post":{"tags":["Sandbox"],"summary":"Sandbox Presign","description":"Generate a presigned URL for direct file upload to cloud storage.\n\nReturns a presigned URL that the client can use to PUT a file\ndirectly to the storage backend, bypassing the API server.\n\nRequires a valid Authorization header (API key or JWT).","operationId":"sandbox_presign_api_v1_sandbox_presign_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files":{"post":{"tags":["Files"],"summary":"Upload File","description":"Upload a file that can be referenced in chat completions.\n\nReturns an OpenAI-compatible file object with an opaque ``id``\n(e.g. ``file-abc123``) that can be passed in ``jetty.files``\non subsequent ``/chat/completions`` requests.","operationId":"upload_file_api_v1_files_post","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_api_v1_files_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Files"],"summary":"List Files","description":"List uploaded files for the authenticated user's collection.","operationId":"list_files_api_v1_files_get","parameters":[{"name":"purpose","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purpose"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/{file_id}":{"get":{"tags":["Files"],"summary":"Retrieve File","description":"Retrieve metadata for a single uploaded file.","operationId":"retrieve_file_api_v1_files__file_id__get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Files"],"summary":"Delete File","description":"Delete an uploaded file.","operationId":"delete_file_api_v1_files__file_id__delete","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/{file_id}/content":{"get":{"tags":["Files"],"summary":"Retrieve File Content","description":"Download the content of an uploaded file.","operationId":"retrieve_file_content_api_v1_files__file_id__content_get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/files":{"post":{"tags":["Files v1"],"summary":"Upload File","description":"Upload a file that can be referenced in chat completions.\n\nReturns an OpenAI-compatible file object with an opaque ``id``\n(e.g. ``file-abc123``) that can be passed in ``jetty.files``\non subsequent ``/chat/completions`` requests.","operationId":"upload_file_v1_files_post","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_v1_files_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Files v1"],"summary":"List Files","description":"List uploaded files for the authenticated user's collection.","operationId":"list_files_v1_files_get","parameters":[{"name":"purpose","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purpose"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/files/{file_id}":{"get":{"tags":["Files v1"],"summary":"Retrieve File","description":"Retrieve metadata for a single uploaded file.","operationId":"retrieve_file_v1_files__file_id__get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Files v1"],"summary":"Delete File","description":"Delete an uploaded file.","operationId":"delete_file_v1_files__file_id__delete","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/files/{file_id}/content":{"get":{"tags":["Files v1"],"summary":"Retrieve File Content","description":"Download the content of an uploaded file.","operationId":"retrieve_file_content_v1_files__file_id__content_get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/db/health":{"get":{"tags":["Trajectory Database","Trajectory Database"],"summary":"Database health check","description":"Check if the database connection is healthy.","operationId":"database_health_api_v1_db_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/api/v1/db/flows/{collection}":{"get":{"tags":["Trajectory Database","Trajectory Database"],"summary":"List flows with trajectory counts","description":"List all flows in a collection with trajectory counts.","operationId":"list_flows_db_api_v1_db_flows__collection__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string","description":"Collection name","title":"Collection"},"description":"Collection name"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Results per page","default":100,"title":"Limit"},"description":"Results per page"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/db/trajectories/{collection}/recent":{"get":{"tags":["Trajectory Database","Trajectory Database"],"summary":"List recent trajectories across all flows","description":"List the most recent trajectories across all flows in a collection.","operationId":"list_recent_trajectories_db_api_v1_db_trajectories__collection__recent_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string","description":"Collection name","title":"Collection"},"description":"Collection name"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum results","default":10,"title":"Limit"},"description":"Maximum results"},{"name":"fields","in":"query","required":false,"schema":{"enum":["full","summary"],"type":"string","description":"'summary' omits the heavy per-trajectory payloads (steps, init_params, step_configs, attributes.params) for fast listings","default":"full","title":"Fields"},"description":"'summary' omits the heavy per-trajectory payloads (steps, init_params, step_configs, attributes.params) for fast listings"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/mise__api__endpoints__trajectory_db__TrajectoryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/db/admin/trajectories/pivot":{"get":{"tags":["Trajectory Database","Trajectory Database"],"summary":"Pivot trajectory counts by collection × flow (admin)","description":"Aggregate trajectories created in the given window grouped by collection/flow, with status counts. Admin only.","operationId":"admin_trajectory_pivot_api_v1_db_admin_trajectories_pivot_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"window","in":"query","required":false,"schema":{"type":"string","description":"Time window: 1d|7d|30d|90d","default":"7d","title":"Window"},"description":"Time window: 1d|7d|30d|90d"},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","description":"Include archived trajectories","default":false,"title":"Include Archived"},"description":"Include archived trajectories"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPivotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/db/admin/runbooks/pivot":{"get":{"tags":["Trajectory Database","Trajectory Database"],"summary":"Pivot runbook trajectory counts by collection × task (admin)","description":"Aggregate runbook trajectories (any step with activity == 'runbook', or an inline `instruction` init param) grouped by collection/task. 'worked' = status completed and no step output reporting success == false. Metadata (title, agent, model, size) comes from the latest worked run. Admin only.","operationId":"admin_runbook_pivot_api_v1_db_admin_runbooks_pivot_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"window","in":"query","required":false,"schema":{"type":"string","description":"Time window: 1d|7d|30d|90d|all","default":"30d","title":"Window"},"description":"Time window: 1d|7d|30d|90d|all"},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","description":"Include archived trajectories","default":false,"title":"Include Archived"},"description":"Include archived trajectories"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRunbookPivotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/db/admin/trajectories/summary":{"get":{"tags":["Trajectory Database","Trajectory Database"],"summary":"Summary stats for one flow over a time window (admin)","description":"Status histogram, duration percentiles, top error strings, and the last 20 trajectories for a single collection/flow. Pure PG aggregation — no cloud storage reads. Admin only.","operationId":"admin_trajectory_summary_api_v1_db_admin_trajectories_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"query","required":true,"schema":{"type":"string","description":"Collection name","title":"Collection"},"description":"Collection name"},{"name":"flow","in":"query","required":true,"schema":{"type":"string","description":"Flow name","title":"Flow"},"description":"Flow name"},{"name":"window","in":"query","required":false,"schema":{"type":"string","description":"Time window: 1d|7d|30d|90d","default":"7d","title":"Window"},"description":"Time window: 1d|7d|30d|90d"},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminFlowSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/db/admin/orgs/activity-summary":{"get":{"tags":["Trajectory Database","Trajectory Database"],"summary":"Per-org trajectory + authoring-session activity (admin)","description":"For a list of Clerk org IDs, return run_count / last_run_at / session_count / last_session_at over the given window. Used to identify orgs that signed up but never engaged. Pure PG aggregation. Admin only.","operationId":"admin_org_activity_summary_api_v1_db_admin_orgs_activity_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"},"description":"Clerk org IDs (repeat the query param)","title":"Org Ids"},"description":"Clerk org IDs (repeat the query param)"},{"name":"window","in":"query","required":false,"schema":{"type":"string","description":"Time window: 1d|7d|30d|90d","default":"30d","title":"Window"},"description":"Time window: 1d|7d|30d|90d"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrgActivitySummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/db/admin/trajectories/recent":{"get":{"tags":["Trajectory Database","Trajectory Database"],"summary":"List recent trajectories across ALL collections (admin)","description":"List the most recent trajectories across every collection and flow. Requires the admin bearer token (ADMIN_AUTH_TOKEN); intended for the platform-wide admin dashboard, not per-tenant UIs.","operationId":"list_recent_trajectories_all_db_api_v1_db_admin_trajectories_recent_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum results","default":10,"title":"Limit"},"description":"Maximum results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/mise__api__endpoints__trajectory_db__TrajectoryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/db/trajectories/{collection}/{flow_name}":{"get":{"tags":["Trajectory Database","Trajectory Database"],"summary":"List trajectories from database","description":"List trajectories for a flow with pagination.","operationId":"list_trajectories_db_api_v1_db_trajectories__collection___flow_name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string","description":"Collection name","title":"Collection"},"description":"Collection name"},{"name":"flow_name","in":"path","required":true,"schema":{"type":"string","description":"Flow name","title":"Flow Name"},"description":"Flow name"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Results per page","default":200,"title":"Limit"},"description":"Results per page"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","description":"Include archived trajectories","default":false,"title":"Include Archived"},"description":"Include archived trajectories"},{"name":"fields","in":"query","required":false,"schema":{"enum":["full","summary"],"type":"string","description":"'summary' omits the heavy per-trajectory payloads (steps, init_params, step_configs, attributes.params) for fast listings","default":"full","title":"Fields"},"description":"'summary' omits the heavy per-trajectory payloads (steps, init_params, step_configs, attributes.params) for fast listings"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/mise__api__endpoints__trajectory_db__TrajectoryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/db/trajectories/{collection}/{flow_name}/query":{"post":{"tags":["Trajectory Database","Trajectory Database"],"summary":"Query trajectories with filters","description":"Query trajectories with complex filters.","operationId":"query_trajectories_db_api_v1_db_trajectories__collection___flow_name__query_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string","description":"Collection name","title":"Collection"},"description":"Collection name"},{"name":"flow_name","in":"path","required":true,"schema":{"type":"string","description":"Flow name","title":"Flow Name"},"description":"Flow name"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Results per page","default":200,"title":"Limit"},"description":"Results per page"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryFilters","description":"Query filters"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/mise__api__endpoints__trajectory_db__TrajectoryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/db/trajectory/{collection}/{flow_name}/{trajectory_id}":{"get":{"tags":["Trajectory Database","Trajectory Database"],"summary":"Get trajectory from database","description":"Get a single trajectory by ID from the database.","operationId":"get_trajectory_db_api_v1_db_trajectory__collection___flow_name___trajectory_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string","description":"Collection name","title":"Collection"},"description":"Collection name"},{"name":"flow_name","in":"path","required":true,"schema":{"type":"string","description":"Flow name","title":"Flow Name"},"description":"Flow name"},{"name":"trajectory_id","in":"path","required":true,"schema":{"type":"string","description":"Trajectory ID","title":"Trajectory Id"},"description":"Trajectory ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/db/trajectory/{collection}/{flow_name}/{trajectory_id}/status":{"patch":{"tags":["Trajectory Database","Trajectory Database"],"summary":"Update trajectory status","description":"Update the status of a single trajectory.","operationId":"update_trajectory_status_db_api_v1_db_trajectory__collection___flow_name___trajectory_id__status_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string","description":"Collection name","title":"Collection"},"description":"Collection name"},{"name":"flow_name","in":"path","required":true,"schema":{"type":"string","description":"Flow name","title":"Flow Name"},"description":"Flow name"},{"name":"trajectory_id","in":"path","required":true,"schema":{"type":"string","description":"Trajectory ID","title":"Trajectory Id"},"description":"Trajectory ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_update_trajectory_status_db_api_v1_db_trajectory__collection___flow_name___trajectory_id__status_patch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/db/trajectories/{collection}/{flow_name}/statuses":{"post":{"tags":["Trajectory Database","Trajectory Database"],"summary":"Batch update trajectory statuses","description":"Update statuses for multiple trajectories at once.","operationId":"batch_update_statuses_db_api_v1_db_trajectories__collection___flow_name__statuses_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string","description":"Collection name","title":"Collection"},"description":"Collection name"},{"name":"flow_name","in":"path","required":true,"schema":{"type":"string","description":"Flow name","title":"Flow Name"},"description":"Flow name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchStatusUpdate","description":"Status updates"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/mise__api__endpoints__trajectory_db__BatchStatusUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/db/stats/{collection}/{flow_name}":{"get":{"tags":["Trajectory Database","Trajectory Database"],"summary":"Get trajectory statistics","description":"Get statistics about trajectories in a flow.","operationId":"get_trajectory_stats_db_api_v1_db_stats__collection___flow_name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string","description":"Collection name","title":"Collection"},"description":"Collection name"},{"name":"flow_name","in":"path","required":true,"schema":{"type":"string","description":"Flow name","title":"Flow Name"},"description":"Flow name"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/db/stats/{collection}":{"get":{"tags":["Trajectory Database","Trajectory Database"],"summary":"Get collection statistics","description":"Get statistics about all trajectories in a collection.","operationId":"get_collection_stats_db_api_v1_db_stats__collection__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string","description":"Collection name","title":"Collection"},"description":"Collection name"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/whoami":{"get":{"tags":["Auth"],"summary":"Whoami","description":"Return the caller's resolved authentication context.\n\nUseful for agents and SDK consumers to confirm what identity and\nscope their token resolves to.","operationId":"whoami_api_v1_auth_whoami_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthInfo"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/collections/{collection_name}/check-availability":{"get":{"tags":["Collections"],"summary":"Check Collection Availability","description":"Check if a collection name is available. No auth required.","operationId":"check_collection_availability_api_v1_collections__collection_name__check_availability_get","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/":{"post":{"tags":["Collections"],"summary":"Create Collection","description":"Create a new collection.","operationId":"create_collection_api_v1_collections__post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Collections"],"summary":"List Collections","description":"List collections with pagination.","operationId":"list_collections_api_v1_collections__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CollectionResponse"},"title":"Response List Collections Api V1 Collections  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/{collection_name}":{"get":{"tags":["Collections"],"summary":"Get Collection","description":"Get a collection by name.","operationId":"get_collection_api_v1_collections__collection_name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Collections"],"summary":"Delete Collection","description":"Delete a collection (admin only).","operationId":"delete_collection_api_v1_collections__collection_name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/{collection_name}/storage":{"get":{"tags":["Collections"],"summary":"Get Collection Storage Info","description":"Get storage info for a collection.","operationId":"get_collection_storage_info_api_v1_collections__collection_name__storage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionStorageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Collections"],"summary":"Update Collection Storage Info","description":"Update storage info for a collection.","operationId":"update_collection_storage_info_api_v1_collections__collection_name__storage_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Storage Info"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionStorageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/{collection_name}/environment":{"get":{"tags":["Collections"],"summary":"Get Collection Environment Variables","description":"Get environment variables for a collection.","operationId":"get_collection_environment_variables_api_v1_collections__collection_name__environment_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Collections"],"summary":"Update Collection Environment Variables","description":"Update environment variables for a collection (merge semantics).","operationId":"update_collection_environment_variables_api_v1_collections__collection_name__environment_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Environment Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/{collection_name}/authoring-settings":{"get":{"tags":["Collections"],"summary":"Get Collection Authoring Settings","description":"Read the org-wide authoring defaults for ``collection_name``.\n\nUsed by the spot ``/settings/authoring`` page to populate the\npicker, and by the authoring session-create endpoint to resolve\nthe agent when the request body doesn't pin one explicitly.","operationId":"get_collection_authoring_settings_api_v1_collections__collection_name__authoring_settings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionAuthoringSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Collections"],"summary":"Update Collection Authoring Settings","description":"Merge-update the authoring defaults for ``collection_name``.\n\nBody shape: ``{\"authoring_settings\": {\"default_agent\": \"...\",\n\"default_model\": \"...\"}}``. ``null`` value for a key removes it;\nomitted keys keep their current value. Unknown keys are rejected\nso a typo can't silently shadow a real setting.\n\nThe merge mirrors ``update_collection_environment_variables`` —\nsame shape, same null-deletes-key semantics.","operationId":"update_collection_authoring_settings_api_v1_collections__collection_name__authoring_settings_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Settings Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionAuthoringSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/{collection_name}/demo/attach-email":{"post":{"tags":["Collections"],"summary":"Attach Email To Demo Collection","description":"Record the email a demo visitor gave, so a later signup with that\nemail can claim the collection (system admin only).\n\nAllowed only while the collection is ``demo-unclaimed``, or already\nattached to *this same* email (idempotent replay). A collection attached\nto a different email is someone else's pending workspace and one owned by\nan org is settled: both are 409, so a leaked or replayed run id cannot\nre-point a claim.","operationId":"attach_email_to_demo_collection_api_v1_collections__collection_name__demo_attach_email_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoAttachEmailRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/{collection_name}/demo/claim":{"post":{"tags":["Collections"],"summary":"Claim Demo Collection","description":"Settle a demo collection onto the Clerk org created at signup\n(system admin only). This is the moment ``auth_org_id`` is first set.\n\nAllowed only while the collection is ``demo-unclaimed`` or attached to an\nemail; replaying the claim for the same org is a no-op for ownership. Any\ncollection already owned by an org — this one or another — is 409:\nownership is final and cannot be transferred between organizations.\n\n``claimed_by_user_id`` names the person completing the signup. This is the\none place a key's attribution changes after minting: the demo's API key\nwas minted before a Clerk user existed, so the claim stamps it (every\nstill-unattributed key on the collection, active or not — at this point\nthe collection holds only what the demo pipeline minted, and the claimer\nis exact, not a guess). The same-org replay path stamps too, so a claim\nthat landed before the caller sent the field heals on replay; the NULL\nguard makes any later replay a no-op.","operationId":"claim_demo_collection_api_v1_collections__collection_name__demo_claim_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoClaimRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/{collection_name}/owner":{"patch":{"tags":["Collections"],"summary":"Update Collection Owner","description":"Deprecated shim over the two demo endpoints above, kept only until spot\n(``attachEmailAndMintKey``, ``createOrganizationWithCollection``) moves to\nthem so mise can deploy first. Same rules: system admin only; an\n``email:<addr>`` owner is an attach-email, an ``org_…`` owner is a claim,\nanything else is 422. Remove once spot no longer calls it.","operationId":"update_collection_owner_api_v1_collections__collection_name__owner_patch","deprecated":true,"security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Owner Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/{collection_name}/agents/":{"get":{"tags":["Collections"],"summary":"List Agents By Collection","description":"List agents in a collection.","operationId":"list_agents_by_collection_api_v1_collections__collection_name__agents__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentResponse"},"title":"Response List Agents By Collection Api V1 Collections  Collection Name  Agents  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/":{"get":{"tags":["Tasks (Registry)"],"summary":"List Tasks","description":"List all tasks accessible to the user.","operationId":"list_tasks_api_v1_tasks__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TaskListResponse"},"title":"Response List Tasks Api V1 Tasks  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{collection_name}/":{"get":{"tags":["Tasks (Registry)"],"summary":"List Tasks By Collection","description":"List tasks in a specific collection.","operationId":"list_tasks_by_collection_api_v1_tasks__collection_name___get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TaskListResponse"},"title":"Response List Tasks By Collection Api V1 Tasks  Collection Name   Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{collection_name}/{task_name}/init-params-schema":{"get":{"tags":["Tasks (Registry)"],"summary":"Get Task Init Params Schema","description":"List declared ``init_params`` keys for a task.\n\nUsed by the Spot routine override editor and the MCP ``create-routine``\ntool's pre-validation. See TDD-scheduled-routines §8.","operationId":"get_task_init_params_schema_api_v1_tasks__collection_name___task_name__init_params_schema_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"task_name","in":"path","required":true,"schema":{"type":"string","title":"Task Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{collection_name}/{task_name}":{"get":{"tags":["Tasks (Registry)"],"summary":"Get Task By Name","description":"Get a task by collection and name. Public tasks need no auth.","operationId":"get_task_by_name_api_v1_tasks__collection_name___task_name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"task_name","in":"path","required":true,"schema":{"type":"string","title":"Task Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Tasks (Registry)"],"summary":"Update Task By Name","description":"Update a task.","operationId":"update_task_by_name_api_v1_tasks__collection_name___task_name__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"task_name","in":"path","required":true,"schema":{"type":"string","title":"Task Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Tasks (Registry)"],"summary":"Delete Task","description":"Delete a task.","operationId":"delete_task_api_v1_tasks__collection_name___task_name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"task_name","in":"path","required":true,"schema":{"type":"string","title":"Task Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{collection_name}":{"post":{"tags":["Tasks (Registry)"],"summary":"Create Task By Name","description":"Create a new task in a collection.","operationId":"create_task_by_name_api_v1_tasks__collection_name__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/task-details/{collection_name}/{task_name}":{"get":{"tags":["Tasks (Registry)"],"summary":"Get Task Details","description":"Get task details with collection environment variables and storage info.","operationId":"get_task_details_api_v1_task_details__collection_name___task_name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"task_name","in":"path","required":true,"schema":{"type":"string","title":"Task Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agents/{collection_name}/":{"get":{"tags":["Agents"],"summary":"List Agents By Collection","description":"List agents in a collection.","operationId":"list_agents_by_collection_api_v1_agents__collection_name___get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentListResponse"},"title":"Response List Agents By Collection Api V1 Agents  Collection Name   Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agents/{collection_name}/{agent_name}":{"get":{"tags":["Agents"],"summary":"Get Agent By Name","description":"Get an agent by collection and name.","operationId":"get_agent_by_name_api_v1_agents__collection_name___agent_name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"agent_name","in":"path","required":true,"schema":{"type":"string","title":"Agent Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Agents"],"summary":"Update Agent By Name","description":"Update an agent.","operationId":"update_agent_by_name_api_v1_agents__collection_name___agent_name__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"agent_name","in":"path","required":true,"schema":{"type":"string","title":"Agent Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Agents"],"summary":"Delete Agent By Name","description":"Delete an agent.","operationId":"delete_agent_by_name_api_v1_agents__collection_name___agent_name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"agent_name","in":"path","required":true,"schema":{"type":"string","title":"Agent Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agents/{collection_name}":{"post":{"tags":["Agents"],"summary":"Create Agent By Name","description":"Create a new agent in a collection.","operationId":"create_agent_by_name_api_v1_agents__collection_name__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api-keys/":{"post":{"tags":["API Keys"],"summary":"Create Api Key","description":"Create a new API key for a collection.","operationId":"create_api_key_api_v1_api_keys__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/api-keys/collection/{collection_name}":{"get":{"tags":["API Keys"],"summary":"List Api Keys For Collection","description":"List API keys for a collection.","operationId":"list_api_keys_for_collection_api_v1_api_keys_collection__collection_name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyResponse"},"title":"Response List Api Keys For Collection Api V1 Api Keys Collection  Collection Name  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api-keys/{api_key_id}":{"get":{"tags":["API Keys"],"summary":"Get Api Key","description":"Get an API key by ID.","operationId":"get_api_key_api_v1_api_keys__api_key_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"integer","title":"Api Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["API Keys"],"summary":"Update Api Key","description":"Update an API key.","operationId":"update_api_key_api_v1_api_keys__api_key_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"integer","title":"Api Key Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["API Keys"],"summary":"Delete Api Key","description":"Delete an API key.","operationId":"delete_api_key_api_v1_api_keys__api_key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"integer","title":"Api Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/trial/{collection_name}":{"get":{"tags":["Trial"],"summary":"Get Trial Status","description":"Get trial budget status for a collection.","operationId":"get_trial_status_api_v1_trial__collection_name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/trial/{collection_name}/activate":{"post":{"tags":["Trial"],"summary":"Activate Trial For Collection","description":"Activate trial for a collection. Idempotent — returns existing if already active.","operationId":"activate_trial_for_collection_api_v1_trial__collection_name__activate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/trials":{"get":{"tags":["Trial"],"summary":"List Trial Budgets","description":"List all collections on trial with their usage. Admin only.","operationId":"list_trial_budgets_api_v1_admin_trials_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/trial/{collection_name}/grant-runs":{"post":{"tags":["Trial"],"summary":"Admin Grant Trial Runs","description":"Grant additional trial runs to a collection. Admin only.\n\nTwo modes, keyed on whether ``runs`` is supplied:\n\n- **Bare manual grant** (``runs`` omitted): grants 10 runs, and 404s if\n  the collection has no trial budget — the same guard as before, so an\n  admin can't silently materialize trial state on a non-trial collection.\n- **Explicit grant** (``runs`` provided, e.g. the Stripe coupon flow):\n  grants that amount, auto-activating a zero-limit budget first when the\n  collection has none (e.g. a paid org that never activated a trial), so\n  the grant lands.","operationId":"admin_grant_trial_runs_api_v1_admin_trial__collection_name__grant_runs_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"runs","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Number of trial runs to grant. Defaults to 10 for a bare manual grant. Pass an explicit value (e.g. from the discount-code flow) to also auto-activate a budget for a collection that has none.","title":"Runs"},"description":"Number of trial runs to grant. Defaults to 10 for a bare manual grant. Pass an explicit value (e.g. from the discount-code flow) to also auto-activate a budget for a collection that has none."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/referrals/me":{"get":{"tags":["Referrals"],"summary":"Get My Referral","description":"Return the caller's referral code + invitee summary.\n\nIdempotent — mints a code lazily on first call.","operationId":"get_my_referral_api_v1_referrals_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralView"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/referrals/signup-attribution":{"post":{"tags":["Referrals"],"summary":"Post Signup Attribution","description":"Annotate a referral that a referee has signed up (pre-org).\n\nAuth is required so a curl with a random Clerk user_id can't poison\na referrer's invitee list. The bonus grant happens at /redeem, not here.","operationId":"post_signup_attribution_api_v1_referrals_signup_attribution_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupAttributionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupAttributionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/referrals/redeem":{"post":{"tags":["Referrals"],"summary":"Post Redeem","description":"Convert a referral and grant +20 runs to both sides where eligible.\n\nIdempotent on ``referee_collection_id`` — see referral_service.redeem().\nReturns 200 with a status discriminator for both grant and no-grant\noutcomes; only infrastructure failures bubble up as 5xx.","operationId":"post_redeem_api_v1_referrals_redeem_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/referrals/{referral_id}/disqualify":{"post":{"tags":["Referrals"],"summary":"Admin Disqualify","description":"Flip a referral to disqualified. Admin only.\n\nDecrements ``successful_referrals_count`` and optionally claws back the\n+20 grant on both sides (best-effort, never goes negative).","operationId":"admin_disqualify_api_v1_admin_referrals__referral_id__disqualify_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"referral_id","in":"path","required":true,"schema":{"type":"integer","title":"Referral Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DisqualifyRequest"},{"type":"null"}],"title":"Req"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/{collection_name}/dashboard":{"get":{"tags":["Dashboard"],"summary":"Get Collection Dashboard","description":"Return the dashboard view model for a collection.\n\nThe view model holds everything spot's ``/flows/<collection>`` page\nrenders, built on the fly for the whole collection (not per user): over\nthe last 30 days, the most-used model, agent and runbook and the mean cost\nper priced run; all-time runbook and run counts; the most recent run with\nits status and evaluation verdict; and the number of environment\nvariables configured (never a name or a value). Cards with nothing to\nshow are ``null``. The response shape is published as\n``contracts/dashboard-view-model.schema.json``.\n\nRequires read access. ``collection_name`` is matched case-insensitively.\nResponds 401 without a token, 403 for an API key bound to another\ncollection, and 404 when the collection does not exist or the caller's\norganization does not own it.","operationId":"get_collection_dashboard_api_v1_collections__collection_name__dashboard_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardViewModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/{collection_name}/runbooks":{"get":{"tags":["Dashboard"],"summary":"Get Collection Runbooks","description":"Return the runbook collection view model for a collection.\n\nEverything spot's ``/flows/<collection>/runbooks`` page renders: every\nlive runbook task in the collection with its description, version,\nwhether it takes file uploads, its all-time run count, and its most\nrecent run's status and evaluation verdict (``null`` when it never ran),\nnewest run first and never-run last by name. Chat flows and other\nnon-runbook tasks are not listed. The response shape is published as\n``contracts/runbook-collection-view-model.schema.json``.\n\nRequires read access. ``collection_name`` is matched case-insensitively.\nResponds 401 without a token, 403 for an API key bound to another\ncollection, and 404 when the collection does not exist or the caller's\norganization does not own it.","operationId":"get_collection_runbooks_api_v1_collections__collection_name__runbooks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunbookCollectionViewModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/state":{"get":{"tags":["Onboarding","Onboarding"],"summary":"Get State","description":"Return the caller's onboarding state.\n\nThe concierge calls this on turn 1 to decide between first-run and\nreturning-user greetings (see TDD §6.5).","operationId":"get_state_api_v1_onboarding_state_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStateSchema"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/onboarding/templates":{"get":{"tags":["Onboarding","Onboarding"],"summary":"List Templates","description":"List curated onboarding templates.","operationId":"list_templates_api_v1_onboarding_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TemplateSummarySchema"},"type":"array","title":"Response List Templates Api V1 Onboarding Templates Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/onboarding/templates/{template_id}/defaults":{"get":{"tags":["Onboarding","Onboarding"],"summary":"Get Template Defaults","description":"Return default template-variable values + sample dataset path.","operationId":"get_template_defaults_api_v1_onboarding_templates__template_id__defaults_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateDefaultsSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/collections/{collection_name}/tasks/from-template":{"post":{"tags":["Onboarding","Onboarding"],"summary":"Clone Template Into Collection","description":"Clone a template runbook into a user's collection as a new task.\n\nCalled by the concierge's ``clone_template`` tool. Returns the new\ntask's id and its initial runbook markdown so the preview pane can\nrender it immediately.","operationId":"clone_template_into_collection_api_v1_onboarding_collections__collection_name__tasks_from_template_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloneTemplateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/tasks/{task_id}/sections":{"patch":{"tags":["Onboarding","Onboarding"],"summary":"Update Task Section","description":"Partial update of a draft runbook section.\n\nSchema-validated: only known sections are accepted. Prevents the\nconcierge from mutating runbook markdown into arbitrary shapes.","operationId":"update_task_section_api_v1_onboarding_tasks__task_id__sections_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/tasks/{task_id}":{"get":{"tags":["Onboarding","Onboarding"],"summary":"Get Onboarding Task","description":"Fetch a task by id for the onboarding preview pane.\n\nSpot's draft-runbook pane keys off ``task_id`` (from\n``clone_template``'s result), but the global tasks API is keyed on\n``/tasks/{collection}/{name}``. This endpoint bridges the gap —\nsame ownership check as the other onboarding writes.","operationId":"get_onboarding_task_api_v1_onboarding_tasks__task_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/trial/activate":{"post":{"tags":["Onboarding","Onboarding"],"summary":"Activate User Budgets","description":"Ensure the caller has concierge_turn + sandbox_run budgets. Idempotent.","operationId":"activate_user_budgets_api_v1_onboarding_trial_activate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/onboarding/trial/status":{"get":{"tags":["Onboarding","Onboarding"],"summary":"User Trial Status","operationId":"user_trial_status_api_v1_onboarding_trial_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/onboarding/complete":{"post":{"tags":["Onboarding","Onboarding"],"summary":"Onboarding Complete","description":"Record the terminal outcome of an onboarding session.\n\nIdempotent. v1 is a logging stub — wiring to analytics events\nlands in Phase 4 per TDD §11.","operationId":"onboarding_complete_api_v1_onboarding_complete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCompleteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/onboarding/concierge/session":{"post":{"tags":["Onboarding Concierge","Onboarding Concierge"],"summary":"Create Session","description":"Mint a scoped API key and spawn the caller's MCP subprocess.","operationId":"create_session_api_v1_onboarding_concierge_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/mise__onboarding__concierge__CreateSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/onboarding/concierge/session/{session_id}":{"delete":{"tags":["Onboarding Concierge","Onboarding Concierge"],"summary":"End Session","operationId":"end_session_api_v1_onboarding_concierge_session__session_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/concierge/chat":{"post":{"tags":["Onboarding Concierge","Onboarding Concierge"],"summary":"Concierge Chat","operationId":"concierge_chat_api_v1_onboarding_concierge_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConciergeChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/onboarding/concierge/sessions/sweep":{"post":{"tags":["Onboarding Concierge","Onboarding Concierge"],"summary":"Sweep Sessions","description":"Deactivate stale ``concierge-session-*`` keys. Admin-only.\n\nTODO(concierge): wire to a Temporal schedule so this runs on its own.\nFor now operators invoke it manually (or a cron hits the endpoint).","operationId":"sweep_sessions_api_v1_onboarding_concierge_sessions_sweep_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"max_age_hours","in":"query","required":false,"schema":{"type":"integer","default":24,"title":"Max Age Hours"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SweepResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/kick-off-sandbox":{"post":{"tags":["Onboarding Sandbox","Onboarding Sandbox"],"summary":"Kick Off Sandbox","description":"Launch a Daytona sandbox run for a drafted runbook task.\n\nFlow:\n\n1. Resolve the task, verify the caller owns its collection.\n2. Pass the concierge's concrete ``template_variables`` straight\n   through as ``init_params`` — the bakery task definition's\n   defaults will be merged on top by ``validate_and_merge_task_config``.\n3. If a ``sample_dataset_id`` is provided, read the committed\n   sample file and attach it to ``files_data`` so the launcher\n   stages it in the workflow's storage bucket.\n4. Start the workflow via Temporal and return the run id.\n5. Advisory ``sandbox_run`` budget decrement (never blocks).","operationId":"kick_off_sandbox_api_v1_onboarding_kick_off_sandbox_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KickOffSandboxRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KickOffSandboxResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/authoring/sessions":{"post":{"tags":["Authoring","Authoring"],"summary":"Create Session","operationId":"create_session_api_v1_authoring_sessions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CreateModeRequest"},{"$ref":"#/components/schemas/OptimizeModeRequest"}],"title":"Request"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/mise__authoring__schemas__CreateSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Authoring","Authoring"],"summary":"List Sessions","operationId":"list_sessions_api_v1_authoring_sessions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"statuses","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated","title":"Statuses"},"description":"Comma-separated"},{"name":"collection_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collection Name"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSessionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/authoring/sessions/{session_id}":{"get":{"tags":["Authoring","Authoring"],"summary":"Get Session","operationId":"get_session_api_v1_authoring_sessions__session_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Authoring","Authoring"],"summary":"Cancel Session","operationId":"cancel_session_api_v1_authoring_sessions__session_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/authoring/sessions/{session_id}/messages":{"post":{"tags":["Authoring","Authoring"],"summary":"Send Message","description":"Persist the user message and signal the workflow.\n\nPer TDD §9.2 the endpoint is a thin shim:\n  1. Validate session is in ``active`` or ``idle_paused``.\n  2. Allocate next ``sequence`` from the row-locked allocator.\n  3. Insert ``authoring_messages`` row with ``role='user'``.\n  4. Send ``user_message`` signal to the Temporal workflow.\n  5. Return immediately — the agent's response arrives over SSE.","operationId":"send_message_api_v1_authoring_sessions__session_id__messages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/authoring/sessions/{session_id}/stream":{"get":{"tags":["Authoring","Authoring"],"summary":"Stream Session","description":"SSE stream of live events for a session.\n\nPolls ``authoring_events`` every ~250ms — durable, survives pod\nrestart, and reconnects pick up via the ``Last-Event-ID`` header\n(TDD §9.1). Closes with the standard ``data: [DONE]`` sentinel\nwhen the session reaches a terminal status.\n\nOwnership is enforced once at attach (the session must belong to\nthe caller); subsequent polls trust the cursor and don't re-check.","operationId":"stream_session_api_v1_authoring_sessions__session_id__stream_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"Last-Event-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last-Event-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/authoring/sessions/{session_id}/files/{file_path}":{"get":{"tags":["Authoring","Authoring"],"summary":"Get Session File","description":"Read a file out of the live sandbox under ``/app``.\n\nPowers the Spot UI's RUNBOOK.md preview pane. Returns the file\nbody verbatim with ``text/markdown`` for ``.md`` paths and\n``application/octet-stream`` for everything else. Path is\nconstrained to ``/app`` — absolute paths and ``..`` segments are\nrejected.","operationId":"get_session_file_api_v1_authoring_sessions__session_id__files__file_path__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"file_path","in":"path","required":true,"schema":{"type":"string","title":"File Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/authoring/sessions/{session_id}/files":{"post":{"tags":["Authoring","Authoring"],"summary":"Upload Session Files","description":"Multipart upload of pre-flight examples into the sandbox.\n\nThe wizard collects example inputs/outputs in step 3 and ships them\nhere once the sandbox is provisioned. Files land under\n``/app/inputs/<sanitized-name>``; the first-turn preamble points\nthe agent at that directory.\n\nConstraints (all 400/413):\n  - At most ``_INPUTS_MAX_FILES`` files per call.\n  - Each file ≤ ``_INPUTS_MAX_FILE_BYTES``.\n  - Total ≤ ``_INPUTS_MAX_TOTAL_BYTES``.\n\nState requirements:\n  - Session must be owned by the caller.\n  - Session must not be terminal.\n  - Session must already have a ``sandbox_id`` (caller polls\n    ``GET /sessions/{id}`` until ready).","operationId":"upload_session_files_api_v1_authoring_sessions__session_id__files_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_session_files_api_v1_authoring_sessions__session_id__files_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/authoring/sessions/{session_id}/finalize":{"post":{"tags":["Authoring","Authoring"],"summary":"Finalize Session","description":"Read ``/app/RUNBOOK.md`` and persist the result.\n\nDispatches on session mode:\n  - **create**: build a new Task at version=1.\n  - **optimize**: bump the existing Task's version, snapshot the\n    pre-finalize workflow for ``/revert``, kick off one candidate\n    run on the baseline trajectory's ``init_params`` for the\n    compare view.","operationId":"finalize_session_api_v1_authoring_sessions__session_id__finalize_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CreateModeFinalize"},{"$ref":"#/components/schemas/OptimizeModeFinalize"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/authoring/sessions/{session_id}/revert":{"post":{"tags":["Authoring","Authoring"],"summary":"Revert Session","description":"Restore the pre-finalize Task workflow for an optimize session.\n\nAvailable only after an optimize session has finalized — that's\nwhen the pre-session snapshot is captured. The revert is itself a\nversion bump (history stays linear), and writes an\n``optimize:reverted`` label on the baseline trajectory.","operationId":"revert_session_api_v1_authoring_sessions__session_id__revert_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevertResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/routines/{collection_name}/{task_name}":{"post":{"tags":["Routines"],"summary":"Create Routine","operationId":"create_routine_api_v1_routines__collection_name___task_name__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"task_name","in":"path","required":true,"schema":{"type":"string","title":"Task Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutineCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutineRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Routines"],"summary":"List Routines For Task","operationId":"list_routines_for_task_api_v1_routines__collection_name___task_name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"task_name","in":"path","required":true,"schema":{"type":"string","title":"Task Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RoutineRead"},"title":"Response List Routines For Task Api V1 Routines  Collection Name   Task Name  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/routines/{collection_name}":{"get":{"tags":["Routines"],"summary":"List Routines In Collection","operationId":"list_routines_in_collection_api_v1_routines__collection_name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RoutineRead"},"title":"Response List Routines In Collection Api V1 Routines  Collection Name  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/routines/{collection_name}/{task_name}/{name}":{"get":{"tags":["Routines"],"summary":"Get Routine","operationId":"get_routine_api_v1_routines__collection_name___task_name___name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"task_name","in":"path","required":true,"schema":{"type":"string","title":"Task Name"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutineRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Routines"],"summary":"Update Routine","operationId":"update_routine_api_v1_routines__collection_name___task_name___name__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"task_name","in":"path","required":true,"schema":{"type":"string","title":"Task Name"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutineUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutineRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Routines"],"summary":"Delete Routine","operationId":"delete_routine_api_v1_routines__collection_name___task_name___name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"task_name","in":"path","required":true,"schema":{"type":"string","title":"Task Name"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/routines/{collection_name}/{task_name}/{name}/pause":{"post":{"tags":["Routines"],"summary":"Pause Routine","operationId":"pause_routine_api_v1_routines__collection_name___task_name___name__pause_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"task_name","in":"path","required":true,"schema":{"type":"string","title":"Task Name"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutineRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/routines/{collection_name}/{task_name}/{name}/resume":{"post":{"tags":["Routines"],"summary":"Resume Routine","operationId":"resume_routine_api_v1_routines__collection_name___task_name___name__resume_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"task_name","in":"path","required":true,"schema":{"type":"string","title":"Task Name"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutineRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/routines/{collection_name}/{task_name}/{name}/run-now":{"post":{"tags":["Routines"],"summary":"Run Routine Now","operationId":"run_routine_now_api_v1_routines__collection_name___task_name___name__run_now_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"task_name","in":"path","required":true,"schema":{"type":"string","title":"Task Name"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/routines/{collection_name}/{task_name}/{name}/runs":{"get":{"tags":["Routines"],"summary":"List Routine Runs","operationId":"list_routine_runs_api_v1_routines__collection_name___task_name___name__runs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"task_name","in":"path","required":true,"schema":{"type":"string","title":"Task Name"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connected-accounts/connectors":{"get":{"tags":["Connected Accounts"],"summary":"List Available Connectors","description":"Providers the vault can currently link (drives the UI tiles).","operationId":"list_available_connectors_api_v1_connected_accounts_connectors_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConnectorInfo"},"type":"array","title":"Response List Available Connectors Api V1 Connected Accounts Connectors Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/connected-accounts/{provider}/begin":{"post":{"tags":["Connected Accounts"],"summary":"Begin Link","operationId":"begin_link_api_v1_connected_accounts__provider__begin_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BeginLinkRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BeginLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connected-accounts/{provider}/link":{"post":{"tags":["Connected Accounts"],"summary":"Manual Link","description":"Link a provider that has no third-party OAuth client by pasting a refresh\ntoken (Nous: from `hermes setup --portal` → ~/.hermes/auth.json).","operationId":"manual_link_api_v1_connected_accounts__provider__link_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualLinkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connected-accounts/{provider}/complete":{"post":{"tags":["Connected Accounts"],"summary":"Complete Link","description":"Spot-popup flow: spot captured ?code&state and POSTs them here.","operationId":"complete_link_api_v1_connected_accounts__provider__complete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteLinkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connected-accounts/{provider}/callback":{"get":{"tags":["Connected Accounts"],"summary":"Connected Account Callback","description":"Provider redirect target (unauthenticated — trusts the sealed state).","operationId":"connected_account_callback_api_v1_connected_accounts__provider__callback_get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connected-accounts":{"get":{"tags":["Connected Accounts"],"summary":"List Connected Accounts","operationId":"list_connected_accounts_api_v1_connected_accounts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConnectedAccountResponse"},"type":"array","title":"Response List Connected Accounts Api V1 Connected Accounts Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/connected-accounts/{link_id}":{"delete":{"tags":["Connected Accounts"],"summary":"Disconnect","operationId":"disconnect_api_v1_connected_accounts__link_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"integer","title":"Link Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health":{"get":{"summary":"Health Check","description":"Basic health check endpoint.","operationId":"health_check_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/health/full":{"get":{"summary":"Full Health Check","description":"Full health check including database status.\n\nReturns health status for all components.","operationId":"full_health_check_api_v1_health_full_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AdminFlowSummaryResponse":{"properties":{"collection":{"type":"string","title":"Collection"},"flow":{"type":"string","title":"Flow"},"name":{"type":"string","title":"Name"},"window":{"type":"string","title":"Window"},"total":{"type":"integer","title":"Total"},"by_status":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Status"},"avg_duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Duration Seconds"},"p50_duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P50 Duration Seconds"},"p95_duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P95 Duration Seconds"},"duration_sample_size":{"type":"integer","title":"Duration Sample Size"},"top_errors":{"items":{"$ref":"#/components/schemas/AdminTopError"},"type":"array","title":"Top Errors"},"recent":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Recent"}},"type":"object","required":["collection","flow","name","window","total","by_status","avg_duration_seconds","p50_duration_seconds","p95_duration_seconds","duration_sample_size","top_errors","recent"],"title":"AdminFlowSummaryResponse"},"AdminOrgActivity":{"properties":{"org_id":{"type":"string","title":"Org Id"},"run_count":{"type":"integer","title":"Run Count","default":0},"last_run_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Run At"},"session_count":{"type":"integer","title":"Session Count","default":0},"last_session_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Session At"}},"type":"object","required":["org_id"],"title":"AdminOrgActivity"},"AdminOrgActivitySummaryResponse":{"properties":{"window":{"type":"string","title":"Window"},"orgs":{"items":{"$ref":"#/components/schemas/AdminOrgActivity"},"type":"array","title":"Orgs"}},"type":"object","required":["window","orgs"],"title":"AdminOrgActivitySummaryResponse"},"AdminPivotResponse":{"properties":{"window":{"type":"string","title":"Window"},"rows":{"items":{"$ref":"#/components/schemas/AdminPivotRow"},"type":"array","title":"Rows"}},"type":"object","required":["window","rows"],"title":"AdminPivotResponse"},"AdminPivotRow":{"properties":{"collection":{"type":"string","title":"Collection"},"flow":{"type":"string","title":"Flow"},"name":{"type":"string","title":"Name"},"total":{"type":"integer","title":"Total"},"completed":{"type":"integer","title":"Completed"},"failed":{"type":"integer","title":"Failed"},"running":{"type":"integer","title":"Running"},"pending":{"type":"integer","title":"Pending"},"cancelled":{"type":"integer","title":"Cancelled"},"error_count":{"type":"integer","title":"Error Count"},"last_run_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Run At"}},"type":"object","required":["collection","flow","name","total","completed","failed","running","pending","cancelled","error_count","last_run_at"],"title":"AdminPivotRow"},"AdminRunbookPivotResponse":{"properties":{"window":{"type":"string","title":"Window"},"rows":{"items":{"$ref":"#/components/schemas/AdminRunbookRow"},"type":"array","title":"Rows"}},"type":"object","required":["window","rows"],"title":"AdminRunbookPivotResponse"},"AdminRunbookRow":{"properties":{"collection":{"type":"string","title":"Collection"},"task":{"type":"string","title":"Task"},"name":{"type":"string","title":"Name"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"total":{"type":"integer","title":"Total"},"worked":{"type":"integer","title":"Worked"},"completed":{"type":"integer","title":"Completed"},"failed":{"type":"integer","title":"Failed"},"running":{"type":"integer","title":"Running"},"pending":{"type":"integer","title":"Pending"},"cancelled":{"type":"integer","title":"Cancelled"},"success_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Success Rate"},"last_run_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Run At"},"last_worked_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Worked At"},"distinct_versions":{"type":"integer","title":"Distinct Versions"},"agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"instruction_chars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Instruction Chars"}},"type":"object","required":["collection","task","name","title","total","worked","completed","failed","running","pending","cancelled","success_rate","last_run_at","last_worked_at","distinct_versions","agent","model","instruction_chars"],"title":"AdminRunbookRow"},"AdminTopError":{"properties":{"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["error","count"],"title":"AdminTopError"},"AgentCreate":{"properties":{"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","required":["name"],"title":"AgentCreate"},"AgentListResponse":{"properties":{"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"collection_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Collection Id"},"id":{"type":"integer","title":"Id"},"collection_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collection Name"}},"type":"object","required":["name","id"],"title":"AgentListResponse"},"AgentResponse":{"properties":{"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"collection_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Collection Id"},"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["name","id","created_at"],"title":"AgentResponse"},"AgentUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","title":"AgentUpdate"},"ApiKeyCreate":{"properties":{"name":{"type":"string","title":"Name"},"collection_name":{"type":"string","title":"Collection Name"},"created_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By User Id"}},"type":"object","required":["name","collection_name"],"title":"ApiKeyCreate"},"ApiKeyCreatedResponse":{"properties":{"id":{"type":"integer","title":"Id"},"collection_id":{"type":"integer","title":"Collection Id"},"collection_name":{"type":"string","title":"Collection Name"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"created_by_agent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By Agent Id"},"created_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By User Id"},"is_active":{"type":"boolean","title":"Is Active"},"api_key":{"type":"string","title":"Api Key"}},"type":"object","required":["id","collection_id","collection_name","name","key_prefix","created_at","is_active","api_key"],"title":"ApiKeyCreatedResponse"},"ApiKeyRequirement":{"properties":{"key_name":{"type":"string","title":"Key Name","description":"Environment variable name (e.g., 'OPENAI_API_KEY')"},"provider":{"type":"string","title":"Provider","description":"Provider name (e.g., 'OpenAI', 'Anthropic')"},"required":{"type":"boolean","title":"Required","description":"Whether this key is required vs optional","default":true},"description":{"type":"string","title":"Description","description":"What this API key is used for"}},"type":"object","required":["key_name","provider","description"],"title":"ApiKeyRequirement","description":"Describes an API key requirement for a step."},"ApiKeyResponse":{"properties":{"id":{"type":"integer","title":"Id"},"collection_id":{"type":"integer","title":"Collection Id"},"collection_name":{"type":"string","title":"Collection Name"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"created_by_agent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By Agent Id"},"created_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By User Id"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","collection_id","collection_name","name","key_prefix","created_at","is_active"],"title":"ApiKeyResponse"},"ApiKeyUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"ApiKeyUpdate"},"AuthInfo":{"properties":{"auth_type":{"type":"string","title":"Auth Type"},"access_level":{"type":"string","title":"Access Level"},"access_type":{"type":"string","title":"Access Type"},"identifier":{"type":"string","title":"Identifier"},"collection_scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collection Scope"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"attributed_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attributed User Id"}},"type":"object","required":["auth_type","access_level","access_type","identifier"],"title":"AuthInfo","description":"Public view of the caller's authentication context."},"BatchStatusUpdate":{"properties":{"statuses":{"additionalProperties":{"type":"string","enum":["pending","running","completed","failed","cancelled","archived"]},"type":"object","title":"Statuses"}},"type":"object","required":["statuses"],"title":"BatchStatusUpdate","description":"Request body for batch status updates."},"BatchStatusUpdateItem":{"properties":{"trajectory_id":{"type":"string","title":"Trajectory Id"},"new_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Status"},"updated":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated"},"storage_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Path"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["trajectory_id"],"title":"BatchStatusUpdateItem","description":"Per-trajectory result for a batch status update."},"BeginLinkRequest":{"properties":{"redirect_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"}},"type":"object","title":"BeginLinkRequest"},"BeginLinkResponse":{"properties":{"provider":{"type":"string","title":"Provider"},"authorize_url":{"type":"string","title":"Authorize Url"},"state":{"type":"string","title":"State"}},"type":"object","required":["provider","authorize_url","state"],"title":"BeginLinkResponse"},"Body_sandbox_upload_api_v1_sandbox_upload_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_sandbox_upload_api_v1_sandbox_upload_post"},"Body_update_trajectory_status_db_api_v1_db_trajectory__collection___flow_name___trajectory_id__status_patch":{"properties":{"status":{"type":"string","enum":["pending","running","completed","failed","cancelled","archived"],"title":"Status","description":"New status"}},"type":"object","required":["status"],"title":"Body_update_trajectory_status_db_api_v1_db_trajectory__collection___flow_name___trajectory_id__status_patch"},"Body_upload_file_api_v1_files_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"purpose":{"type":"string","title":"Purpose","default":"user_data"}},"type":"object","required":["file"],"title":"Body_upload_file_api_v1_files_post"},"Body_upload_file_v1_files_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"purpose":{"type":"string","title":"Purpose","default":"user_data"}},"type":"object","required":["file"],"title":"Body_upload_file_v1_files_post"},"Body_upload_session_files_api_v1_authoring_sessions__session_id__files_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"}},"type":"object","title":"Body_upload_session_files_api_v1_authoring_sessions__session_id__files_post"},"BudgetStatusOut":{"properties":{"meter":{"type":"string","title":"Meter"},"used":{"type":"integer","title":"Used"},"limit":{"type":"integer","title":"Limit"},"remaining":{"type":"integer","title":"Remaining"},"is_exhausted":{"type":"boolean","title":"Is Exhausted"}},"type":"object","required":["meter","used","limit","remaining","is_exhausted"],"title":"BudgetStatusOut"},"BudgetStatusSchema":{"properties":{"meter":{"type":"string","title":"Meter"},"used":{"type":"integer","title":"Used"},"limit":{"type":"integer","title":"Limit"},"remaining":{"type":"integer","title":"Remaining"},"is_exhausted":{"type":"boolean","title":"Is Exhausted"}},"type":"object","required":["meter","used","limit","remaining","is_exhausted"],"title":"BudgetStatusSchema"},"CadenceConfig":{"properties":{"type":{"type":"string","enum":["manual","hourly","daily","weekdays","weekly"],"title":"Type"},"hour_utc":{"anyOf":[{"type":"integer","maximum":23.0,"minimum":0.0},{"type":"null"}],"title":"Hour Utc"},"minute_utc":{"type":"integer","maximum":59.0,"minimum":0.0,"title":"Minute Utc","default":0},"day_of_week":{"anyOf":[{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]},{"type":"null"}],"title":"Day Of Week"}},"type":"object","required":["type"],"title":"CadenceConfig","description":"Cadence specification for a routine."},"CategoryListResponse":{"properties":{"categories":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Categories"}},"type":"object","required":["categories"],"title":"CategoryListResponse","description":"Response model for listing categories with their steps."},"ChatCompletionRequest":{"properties":{"model":{"type":"string","title":"Model"},"messages":{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array","title":"Messages"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"max_completion_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Completion Tokens"},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P"},"n":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N"},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stream","default":false},"stop":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stop"},"presence_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Presence Penalty"},"frequency_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Frequency Penalty"},"logit_bias":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Logit Bias"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed"},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User"},"response_format":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Format"},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools"},"tool_choice":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Choice"},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Effort"},"jetty":{"anyOf":[{"$ref":"#/components/schemas/JettyExtension"},{"type":"null"}]}},"type":"object","required":["model","messages"],"title":"ChatCompletionRequest"},"ChatMessage":{"properties":{"role":{"type":"string","enum":["system","developer","user","assistant","tool","function"],"title":"Role"},"content":{"anyOf":[{"type":"string"},{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Content"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"tool_calls":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tool Calls"},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id"},"refusal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refusal"}},"type":"object","required":["role"],"title":"ChatMessage"},"CloneTemplateRequest":{"properties":{"template_id":{"type":"string","title":"Template Id"},"template_version":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Template Version"},"task_name":{"type":"string","maxLength":64,"minLength":2,"title":"Task Name"},"template_variables":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Template Variables"}},"type":"object","required":["template_id","task_name"],"title":"CloneTemplateRequest"},"CollectionAuthoringSettingsResponse":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"type":"integer","title":"Id"},"auth_org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Org Id"},"redacted_param_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Redacted Param Keys"},"owner_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Identifier"},"authoring_settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Authoring Settings"}},"type":"object","required":["name","id"],"title":"CollectionAuthoringSettingsResponse","description":"Org-wide authoring defaults read by the session-create path.\n\nToday's keys: ``default_agent`` (\"claude-code\" | \"codex\"),\n``default_model`` (string, optional). The shape is intentionally\nopen — Pydantic validates the dict only at the endpoint layer so\na future agent-specific field can land without a schema bump."},"CollectionCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"storage_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Storage Info"},"storage_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Provider","default":"default"},"environment_variables":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Environment Variables"},"redacted_param_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Redacted Param Keys"},"owner_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Identifier"},"auth_org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Org Id"}},"type":"object","required":["name"],"title":"CollectionCreate"},"CollectionEnvironmentResponse":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"type":"integer","title":"Id"},"auth_org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Org Id"},"redacted_param_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Redacted Param Keys"},"owner_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Identifier"},"environment_variables":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Environment Variables"}},"type":"object","required":["name","id"],"title":"CollectionEnvironmentResponse"},"CollectionResponse":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"type":"integer","title":"Id"},"auth_org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Org Id"},"redacted_param_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Redacted Param Keys"},"owner_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Identifier"}},"type":"object","required":["name","id"],"title":"CollectionResponse"},"CollectionStorageResponse":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"type":"integer","title":"Id"},"auth_org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Org Id"},"redacted_param_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Redacted Param Keys"},"owner_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Identifier"},"storage_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Storage Info"},"storage_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Provider"}},"type":"object","required":["name","id"],"title":"CollectionStorageResponse"},"CompleteLinkRequest":{"properties":{"code":{"type":"string","title":"Code"},"state":{"type":"string","title":"State"},"redirect_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"}},"type":"object","required":["code","state"],"title":"CompleteLinkRequest"},"ConciergeChatRequest":{"properties":{"session_id":{"type":"string","title":"Session Id"},"messages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Messages"},"entry_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entry Mode"}},"type":"object","required":["session_id","messages"],"title":"ConciergeChatRequest"},"ConnectedAccountResponse":{"properties":{"id":{"type":"integer","title":"Id"},"provider":{"type":"string","title":"Provider"},"account_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Label"},"subscription_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Tier"},"status":{"type":"string","title":"Status"},"status_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Detail"},"access_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Access Expires At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","provider","status"],"title":"ConnectedAccountResponse"},"ConnectorInfo":{"properties":{"name":{"type":"string","title":"Name"},"label":{"type":"string","title":"Label"},"experimental":{"type":"boolean","title":"Experimental"},"manual":{"type":"boolean","title":"Manual","default":false}},"type":"object","required":["name","label","experimental"],"title":"ConnectorInfo"},"CreateModeFinalize":{"properties":{"mode":{"type":"string","const":"create","title":"Mode","default":"create"},"task_name":{"type":"string","maxLength":64,"minLength":2,"title":"Task Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"confirm_template_blanks":{"type":"boolean","title":"Confirm Template Blanks","description":"Save even though the runbook's Code Checks or Checklist still have template blanks ({primary_output}, {TODO: …}); without it finalize refuses with 409 code template_blanks.","default":false}},"type":"object","required":["task_name"],"title":"CreateModeFinalize","description":"Create-mode finalize — saves /app/RUNBOOK.md as a new Task."},"CreateModeRequest":{"properties":{"mode":{"type":"string","const":"create","title":"Mode","default":"create"},"collection_name":{"type":"string","maxLength":255,"minLength":1,"title":"Collection Name"},"mission":{"type":"string","maxLength":8000,"minLength":1,"title":"Mission"},"title":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Title"},"seed_runbook_md":{"anyOf":[{"type":"string","maxLength":1048576},{"type":"null"}],"title":"Seed Runbook Md"},"agent":{"anyOf":[{"type":"string","enum":["claude-code","claude-code-openrouter","codex","opencode","pi"]},{"type":"null"}],"title":"Agent"},"model":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Model"}},"type":"object","required":["collection_name","mission"],"title":"CreateModeRequest","description":"Authoring create — author a runbook from a free-text mission.\n\nThe historical authoring body shape; legacy clients omit ``mode``\nentirely and the discriminator defaults them here."},"CreateSessionRequest":{"properties":{"collection_name":{"type":"string","title":"Collection Name"}},"type":"object","required":["collection_name"],"title":"CreateSessionRequest"},"DashboardAverageCost":{"properties":{"usd":{"type":"number","minimum":0.0,"title":"Usd","description":"Mean of `attributes.metrics.cost_usd` over priced runs."},"priced_run_count":{"type":"integer","minimum":1.0,"title":"Priced Run Count","description":"Runs in the window with a non-null cost; the denominator of `usd`."},"cost_confidence":{"type":"string","enum":["estimated","unknown","mixed","measured"],"title":"Cost Confidence","description":"`measured` or `estimated` when every priced run agrees, `mixed` otherwise. `unknown` is reserved and never produced for a priced average."}},"type":"object","required":["usd","priced_run_count","cost_confidence"],"title":"DashboardAverageCost","description":"Mean cost per priced run inside the window."},"DashboardEnvironment":{"properties":{"configured_key_count":{"type":"integer","minimum":0.0,"title":"Configured Key Count","description":"Number of environment variables configured. Names and values are never sent."}},"type":"object","required":["configured_key_count"],"title":"DashboardEnvironment","description":"What the collection has configured under Settings > Integrations."},"DashboardLastRun":{"properties":{"trajectory_id":{"type":"string","title":"Trajectory Id","description":"The run's trajectory id."},"status":{"type":"string","enum":["pending","running","completed","failed","cancelled"],"title":"Status","description":"Run status. Archived runs never appear here."},"verdict":{"type":"string","enum":["pass","fail","unknown"],"title":"Verdict","description":"The run's evaluation verdict. Evals-v2 runs store it; for older runs a completed run with no step reporting failure is `pass`, a failed run is `fail`, anything else is `unknown`."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the run was created (UTC)."},"name":{"type":"string","title":"Name","description":"The run's full name, \"<collection>/<task>\"."},"task_name":{"type":"string","title":"Task Name","description":"The runbook (task) name: the part of `name` after the first slash. The task may since have been deleted; runs keep their name."}},"type":"object","required":["trajectory_id","status","verdict","created_at","name","task_name"],"title":"DashboardLastRun","description":"The most recent non-archived run in the collection, with its name."},"DashboardMostUsed":{"properties":{"value":{"type":"string","title":"Value","description":"The model id, agent name or task name that led."},"run_count":{"type":"integer","minimum":0.0,"title":"Run Count","description":"Runs in the window carrying this value."}},"type":"object","required":["value","run_count"],"title":"DashboardMostUsed","description":"The leader of one usage leaderboard inside the window."},"DashboardTotals":{"properties":{"runbook_count":{"type":"integer","minimum":0.0,"title":"Runbook Count","description":"Live tasks in the collection whose workflow has a runbook step."},"run_count":{"type":"integer","minimum":0.0,"title":"Run Count","description":"Non-archived runs ever, including runs of tasks that have since been deleted."}},"type":"object","required":["runbook_count","run_count"],"title":"DashboardTotals","description":"All-time counts."},"DashboardViewModel":{"properties":{"schema_version":{"type":"integer","const":1,"title":"Schema Version","description":"Shape version of this document. Bumped only on a breaking change."},"collection_name":{"type":"string","title":"Collection Name","description":"The collection's stored name (its stored casing, not the path's)."},"generated_at":{"type":"string","format":"date-time","title":"Generated At","description":"When this view model was built (UTC). The window ends here."},"window_days":{"type":"integer","minimum":1.0,"title":"Window Days","description":"Length of the rolling window used by `window`."},"window":{"$ref":"#/components/schemas/DashboardWindowStats"},"totals":{"$ref":"#/components/schemas/DashboardTotals"},"last_run":{"anyOf":[{"$ref":"#/components/schemas/DashboardLastRun"},{"type":"null"}],"description":"The most recent run, or null when the collection has none."},"environment":{"$ref":"#/components/schemas/DashboardEnvironment"}},"type":"object","required":["schema_version","collection_name","generated_at","window_days","window","totals","last_run","environment"],"title":"DashboardViewModel","description":"Everything the `/flows/<collection>` dashboard renders, in one response."},"DashboardWindowStats":{"properties":{"run_count":{"type":"integer","minimum":0.0,"title":"Run Count","description":"Non-archived runs created inside the window."},"most_used_model":{"anyOf":[{"$ref":"#/components/schemas/DashboardMostUsed"},{"type":"null"}],"description":"The model run most often in the window, or null when no run named a model."},"most_used_agent":{"anyOf":[{"$ref":"#/components/schemas/DashboardMostUsed"},{"type":"null"}],"description":"The agent run most often in the window, or null when no run named an agent."},"most_used_runbook":{"anyOf":[{"$ref":"#/components/schemas/DashboardMostUsed"},{"type":"null"}],"description":"The runbook run most often in the window (`value` is the task name), or null when no runbook ran."},"average_cost_per_run":{"anyOf":[{"$ref":"#/components/schemas/DashboardAverageCost"},{"type":"null"}],"description":"Mean cost per priced run in the window, or null when no run in the window was priced."}},"type":"object","required":["run_count","most_used_model","most_used_agent","most_used_runbook","average_cost_per_run"],"title":"DashboardWindowStats","description":"Stats over the last `window_days` days only."},"DemoAttachEmailRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"DemoAttachEmailRequest","description":"Body for ``POST /collections/{name}/demo/attach-email``."},"DemoClaimRequest":{"properties":{"org_id":{"type":"string","title":"Org Id"},"claimed_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claimed By User Id"}},"type":"object","required":["org_id"],"title":"DemoClaimRequest","description":"Body for ``POST /collections/{name}/demo/claim``."},"DisqualifyRequest":{"properties":{"claw_back":{"type":"boolean","title":"Claw Back","default":false}},"type":"object","title":"DisqualifyRequest"},"EndSessionResponse":{"properties":{"ended":{"type":"boolean","title":"Ended"}},"type":"object","required":["ended"],"title":"EndSessionResponse"},"EvaluationSummary":{"properties":{"report_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Report Version"},"report_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Path"},"verdict":{"type":"string","enum":["pass","fail","unknown"],"title":"Verdict","default":"unknown"},"strict":{"type":"boolean","title":"Strict","default":false},"counts":{"additionalProperties":{"$ref":"#/components/schemas/KindCount"},"propertyNames":{"enum":["step","code_check","checklist","judge"]},"type":"object","title":"Counts"},"checks_total":{"type":"integer","title":"Checks Total","default":0},"failed_checks":{"items":{"$ref":"#/components/schemas/FailedCheck"},"type":"array","title":"Failed Checks"},"failed_checks_truncated":{"type":"boolean","title":"Failed Checks Truncated","default":false},"iterations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Iterations"},"overall_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overall Score"},"pass_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pass Threshold"},"parse_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parse Error"}},"type":"object","title":"EvaluationSummary","description":"The projection of a parsed report that rides on ``attributes``.\n\nEverything :class:`mise.evaluation.report.Evaluation` carries except\n``checks[]``, plus the failed checks' identity. ``attributes`` is the one\nJSONB column trajectory listings do not defer, and a report may carry up to\n``report.MAX_CHECKS`` checks with kilobyte-sized messages and details, so\nthe full ``checks[]`` stays in the step's outputs, which listings do defer.\n\nBuilt by :func:`mise.evaluation.summary.slim_evaluation`."},"FailedCheck":{"properties":{"kind":{"anyOf":[{"type":"string","enum":["step","code_check","checklist","judge"]},{"type":"null"}],"title":"Kind"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"status":{"anyOf":[{"type":"string","enum":["pass","fail","skipped","error"]},{"type":"null"}],"title":"Status"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold"}},"type":"object","title":"FailedCheck","description":"A failed check's identity — who failed, not why.\n\nThe ``message`` and ``details`` that say why stay in the step's outputs\n(see :class:`EvaluationSummary`)."},"FieldSchema":{"properties":{"key":{"type":"string","title":"Key","description":"Env var name, e.g. AWS_ACCESS_KEY_ID"},"secret":{"type":"boolean","title":"Secret","description":"Whether the value should be masked in the UI"},"required":{"type":"boolean","title":"Required","description":"Whether save is blocked when empty"},"default":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default","description":"Default value, if any"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Human label; falls back to key"},"help_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Help Text","description":"Optional inline help"}},"type":"object","required":["key","secret","required"],"title":"FieldSchema","description":"One credential field on a provider — drives the spot AI-Providers form."},"FinalizeResponse":{"properties":{"mode":{"type":"string","enum":["create","optimize"],"title":"Mode","default":"create"},"task_id":{"type":"integer","title":"Task Id"},"task_name":{"type":"string","title":"Task Name"},"collection_name":{"type":"string","title":"Collection Name"},"runbook_markdown":{"type":"string","title":"Runbook Markdown"},"new_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Version"},"baseline_trajectory_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Baseline Trajectory Id"},"candidate_trajectory_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Candidate Trajectory Id"}},"type":"object","required":["task_id","task_name","collection_name","runbook_markdown"],"title":"FinalizeResponse","description":"Unified finalize response.\n\n``mode`` discriminates so clients can branch on the shape. Create\nfields stay populated for create flows; optimize-only fields\n(``new_version``, ``baseline_trajectory_id``,\n``candidate_trajectory_id``) are populated only for optimize."},"FlowListResponse":{"properties":{"flows":{"items":{"$ref":"#/components/schemas/FlowSummary"},"type":"array","title":"Flows"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"limit":{"type":"integer","title":"Limit"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["flows","total","page","limit","has_more"],"title":"FlowListResponse","description":"Response model for flow listing."},"FlowSummary":{"properties":{"name":{"type":"string","title":"Name"},"full_name":{"type":"string","title":"Full Name"},"trajectory_count":{"type":"integer","title":"Trajectory Count"},"last_activity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Activity"}},"type":"object","required":["name","full_name","trajectory_count"],"title":"FlowSummary","description":"Summary of a flow with trajectory count."},"GrantView":{"properties":{"runs_added":{"type":"integer","title":"Runs Added"},"new_runs_limit":{"type":"integer","title":"New Runs Limit"},"capped":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Capped"}},"type":"object","required":["runs_added","new_runs_limit"],"title":"GrantView"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"healthy":{"type":"boolean","title":"Healthy"},"message":{"type":"string","title":"Message"},"latency_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latency Ms"}},"type":"object","required":["healthy","message"],"title":"HealthResponse","description":"Response for database health check."},"IngestTrajectoryRequest":{"properties":{"input":{"title":"Input","description":"The eval input / case the agent was run on."},"output":{"title":"Output","description":"The output produced under test."},"status":{"type":"string","title":"Status","description":"Terminal status to record (e.g. completed/failed).","default":"completed"},"scores":{"additionalProperties":{"type":"number"},"type":"object","title":"Scores","description":"Named scores; stored as `score.<name>` labels."},"labels":{"additionalProperties":{"type":"string"},"type":"object","title":"Labels","description":"Arbitrary string labels stored verbatim."},"cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Usd","description":"Estimated run cost; stored as a `cost_est_usd` label."},"trajectory_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trajectory Id","description":"Supply for idempotent re-push; overwrites in place if it exists."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Producer of the run, e.g. 'eve'. Stored in attributes.params."},"eval_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eval Id","description":"External eval identifier. Stored in attributes.params."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Extra fields merged into attributes.params."},"author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author","description":"Author recorded on the trajectory and labels."},"created":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created","description":"ISO start timestamp; defaults to now."},"completed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed","description":"ISO completion timestamp; defaults to now."}},"type":"object","title":"IngestTrajectoryRequest","description":"A finished, externally-produced eval run to persist as a trajectory.\n\nThis is the seam an external eval harness (e.g. a Vercel ``eve`` eval\nreporter) uses to push a graded run into Jetty without Jetty re-executing\nanything. Scores and labels land on the trajectory's labels — the durable,\nqueryable record of the grade."},"IngestTrajectoryResponse":{"properties":{"trajectory_id":{"type":"string","title":"Trajectory Id"},"name":{"type":"string","title":"Name"},"storage_path":{"type":"string","title":"Storage Path"},"status":{"type":"string","title":"Status"},"labels":{"items":{"$ref":"#/components/schemas/Label"},"type":"array","title":"Labels"}},"type":"object","required":["trajectory_id","name","storage_path","status","labels"],"title":"IngestTrajectoryResponse","description":"Result of ingesting a trajectory."},"InviteeView":{"properties":{"status":{"type":"string","title":"Status"},"email_masked":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Masked"},"signed_up_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Signed Up At"},"converted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Converted At"}},"type":"object","required":["status"],"title":"InviteeView"},"JettyExtension":{"properties":{"runbook":{"type":"boolean","title":"Runbook","default":false},"collection":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collection"},"task":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task"},"agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent"},"model_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Provider"},"snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot"},"timeout_sec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Timeout Sec"},"cpus":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cpus"},"memory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory"},"template_variables":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Template Variables"},"agent_env":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Agent Env"},"mcp_servers":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Mcp Servers"},"file_paths":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"File Paths"},"files":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Files"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"},"webhook_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Secret"},"timeout_hint":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Timeout Hint"},"notify_on_completion":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Notify On Completion"}},"type":"object","title":"JettyExtension"},"KickOffSandboxRequest":{"properties":{"runbook_task_id":{"type":"integer","title":"Runbook Task Id"},"template_variables":{"additionalProperties":true,"type":"object","title":"Template Variables"},"sample_dataset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sample Dataset Id"}},"type":"object","required":["runbook_task_id"],"title":"KickOffSandboxRequest"},"KickOffSandboxResponse":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"message":{"type":"string","title":"Message"},"sandbox_run_status":{"anyOf":[{"$ref":"#/components/schemas/BudgetStatusOut"},{"type":"null"}]}},"type":"object","required":["workflow_id","message"],"title":"KickOffSandboxResponse"},"KindCount":{"properties":{"passed":{"type":"integer","title":"Passed","default":0},"failed":{"type":"integer","title":"Failed","default":0},"total":{"type":"integer","title":"Total","default":0}},"type":"object","title":"KindCount"},"LLMRegistryResponse":{"properties":{"providers":{"items":{"$ref":"#/components/schemas/ProviderSchema"},"type":"array","title":"Providers"},"runners":{"items":{"$ref":"#/components/schemas/RunnerSchema"},"type":"array","title":"Runners"}},"type":"object","required":["providers","runners"],"title":"LLMRegistryResponse","description":"Response shape for GET /api/v1/llm/registry."},"Label":{"properties":{"key":{"type":"string","title":"Key","default":"none"},"value":{"type":"string","title":"Value","default":"none"},"created":{"type":"string","title":"Created"},"author":{"type":"string","title":"Author","default":"mise@jetty.io"}},"type":"object","title":"Label"},"LabelRequestData":{"properties":{"key":{"type":"string","title":"Key"},"value":{"type":"string","title":"Value"},"author":{"type":"string","title":"Author"}},"type":"object","required":["key","value"],"title":"LabelRequestData","description":"Request body for adding a label."},"ListSessionsResponse":{"properties":{"sessions":{"items":{"$ref":"#/components/schemas/SessionSummary"},"type":"array","title":"Sessions"}},"type":"object","required":["sessions"],"title":"ListSessionsResponse"},"LiteLLMModelSchema":{"properties":{"model_id":{"type":"string","title":"Model Id","description":"Model identifier (e.g., 'gpt-4o', 'claude-3-opus-20240229')"},"provider":{"type":"string","title":"Provider","description":"Provider name (e.g., 'OpenAI', 'Anthropic')"},"mode":{"type":"string","title":"Mode","description":"Model mode: chat, embedding, image_generation, audio_transcription, etc."},"max_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Input Tokens","description":"Maximum input context length"},"max_output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Output Tokens","description":"Maximum output tokens"},"supports_vision":{"type":"boolean","title":"Supports Vision","description":"Whether the model supports vision/image inputs","default":false},"supports_function_calling":{"type":"boolean","title":"Supports Function Calling","description":"Whether the model supports function/tool calling","default":false},"supports_parallel_function_calling":{"type":"boolean","title":"Supports Parallel Function Calling","description":"Whether the model supports parallel function calls","default":false},"supports_response_schema":{"type":"boolean","title":"Supports Response Schema","description":"Whether the model supports response schema (JSON mode)","default":false},"input_cost_per_token":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Input Cost Per Token","description":"Cost per input token in USD"},"output_cost_per_token":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Output Cost Per Token","description":"Cost per output token in USD"},"deprecation_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deprecation Date","description":"ISO date on which the provider retires this id, when known. A future date still serves; a past date does not (see is_retired)."},"is_retired":{"type":"boolean","title":"Is Retired","description":"Whether the retirement date has already passed. Retired ids are excluded from /models listings unless include_retired=true, but remain retrievable by exact id so the reason is discoverable.","default":false}},"type":"object","required":["model_id","provider","mode"],"title":"LiteLLMModelSchema","description":"Schema for a LiteLLM-compatible model.","example":{"input_cost_per_token":2.5e-06,"max_input_tokens":128000,"max_output_tokens":16384,"mode":"chat","model_id":"gpt-4o","output_cost_per_token":1e-05,"provider":"OpenAI","supports_function_calling":true,"supports_parallel_function_calling":true,"supports_response_schema":true,"supports_vision":true}},"LiteLLMWorkflowChoice":{"properties":{"index":{"type":"integer","title":"Index"},"message":{"$ref":"#/components/schemas/LiteLLMWorkflowMessage"},"finish_reason":{"type":"string","title":"Finish Reason"}},"type":"object","required":["index","message","finish_reason"],"title":"LiteLLMWorkflowChoice","description":"OpenAI-compatible response choice format for LiteLLM SDK responses.\n\nPart of the adapter layer that transforms Mise's trajectory output\ninto the format that LiteLLM SDK expects to receive."},"LiteLLMWorkflowMessage":{"properties":{"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"}},"type":"object","required":["role","content"],"title":"LiteLLMWorkflowMessage","description":"OpenAI-compatible message format for LiteLLM SDK requests.\n\nThis is a direct mapping of the standard OpenAI chat message format\nthat the LiteLLM SDK sends when making requests."},"LiteLLMWorkflowRequest":{"properties":{"model":{"type":"string","title":"Model"},"messages":{"items":{"$ref":"#/components/schemas/LiteLLMWorkflowMessage"},"type":"array","title":"Messages"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P"},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stream","default":false},"n":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N"},"stop":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stop"},"presence_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Presence Penalty"},"frequency_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Frequency Penalty"},"logit_bias":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Logit Bias"},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed"}},"type":"object","required":["model","messages"],"title":"LiteLLMWorkflowRequest","description":"Adapter model that receives OpenAI-format requests from the LiteLLM SDK.\n\nThis model captures the standard parameters that LiteLLM sends when making\nchat completion requests. The endpoint converts these parameters into Mise's\ninternal workflow format for execution.\n\nRequirements:\n- The target workflow MUST have exactly one step\n- That step MUST be of type 'litellm_chat'\n\nLimitations:\n- Streaming is not currently supported (stream parameter is ignored)\n- Function calling/tools are not currently supported"},"LiteLLMWorkflowResponse":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","title":"Object","default":"chat.completion"},"created":{"type":"integer","title":"Created"},"model":{"type":"string","title":"Model"},"choices":{"items":{"$ref":"#/components/schemas/LiteLLMWorkflowChoice"},"type":"array","title":"Choices"},"usage":{"anyOf":[{"$ref":"#/components/schemas/LiteLLMWorkflowUsage"},{"type":"null"}]}},"type":"object","required":["id","created","model","choices"],"title":"LiteLLMWorkflowResponse","description":"Adapter model that returns OpenAI-format responses to the LiteLLM SDK.\n\nThis model transforms Mise's trajectory execution results into the\nstandard OpenAI chat completion response format that LiteLLM SDK expects.\nThis allows LiteLLM users to use Mise as a transparent proxy while\ngaining trajectory storage and monitoring capabilities."},"LiteLLMWorkflowUsage":{"properties":{"prompt_tokens":{"type":"integer","title":"Prompt Tokens"},"completion_tokens":{"type":"integer","title":"Completion Tokens"},"total_tokens":{"type":"integer","title":"Total Tokens"}},"type":"object","required":["prompt_tokens","completion_tokens","total_tokens"],"title":"LiteLLMWorkflowUsage","description":"OpenAI-compatible token usage information for LiteLLM SDK responses.\n\nProvides token count estimates that LiteLLM SDK uses for tracking\nusage and costs across different LLM providers."},"ManualLinkRequest":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"},"account_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Label"}},"type":"object","required":["refresh_token"],"title":"ManualLinkRequest"},"MessageOut":{"properties":{"sequence":{"type":"integer","title":"Sequence"},"role":{"type":"string","enum":["user","agent","system"],"title":"Role"},"content":{"type":"string","title":"Content"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["sequence","role","content","created_at"],"title":"MessageOut"},"ModeListResponse":{"properties":{"modes":{"additionalProperties":{"type":"integer"},"type":"object","title":"Modes","description":"Mode types mapped to model counts"}},"type":"object","required":["modes"],"title":"ModeListResponse","description":"Response for listing modes.","example":{"modes":{"audio_transcription":2,"chat":45,"embedding":10,"image_generation":3}}},"ModelListResponse":{"properties":{"models":{"items":{"$ref":"#/components/schemas/LiteLLMModelSchema"},"type":"array","title":"Models","description":"List of models"},"total_count":{"type":"integer","title":"Total Count","description":"Total number of models matching the filter"},"providers":{"additionalProperties":{"type":"integer"},"type":"object","title":"Providers","description":"Provider names with model counts"},"modes":{"additionalProperties":{"type":"integer"},"type":"object","title":"Modes","description":"Mode types with model counts"},"is_cached":{"type":"boolean","title":"Is Cached","description":"Whether the data is from cache (True) or fallback (False)"}},"type":"object","required":["models","total_count","providers","modes","is_cached"],"title":"ModelListResponse","description":"Response for listing models.","example":{"is_cached":true,"models":[{"max_input_tokens":128000,"max_output_tokens":16384,"mode":"chat","model_id":"gpt-4o","provider":"OpenAI","supports_function_calling":true,"supports_vision":true}],"modes":{"chat":18,"embedding":2},"providers":{"Anthropic":5,"OpenAI":15},"total_count":1}},"OnboardingCompleteRequest":{"properties":{"outcome":{"type":"string","pattern":"^(success|abandoned|blocked)$","title":"Outcome"},"runbook_task_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Runbook Task Id"}},"type":"object","required":["outcome"],"title":"OnboardingCompleteRequest"},"OnboardingStateSchema":{"properties":{"identifier":{"type":"string","title":"Identifier"},"collections":{"items":{"type":"string"},"type":"array","title":"Collections"},"budgets":{"additionalProperties":{"$ref":"#/components/schemas/BudgetStatusSchema"},"type":"object","title":"Budgets"}},"type":"object","required":["identifier","collections","budgets"],"title":"OnboardingStateSchema"},"OptimizeModeFinalize":{"properties":{"mode":{"type":"string","const":"optimize","title":"Mode"},"skip_candidate_run":{"type":"boolean","title":"Skip Candidate Run","default":false},"confirm_template_blanks":{"type":"boolean","title":"Confirm Template Blanks","description":"Save even though the runbook's Code Checks or Checklist still have template blanks ({primary_output}, {TODO: …}); without it finalize refuses with 409 code template_blanks.","default":false}},"type":"object","required":["mode"],"title":"OptimizeModeFinalize","description":"Optimize-mode finalize.\n\nThe Task, trajectory, and version bump are inferable from the\nsession state captured at create time.\n\n``skip_candidate_run`` lets Spot opt out of the auto-fired candidate\nrun on the baseline trajectory's ``init_params``. With it set the\nUI lands on a test-run interstitial where the user can supply\nfresh inputs (mirrors the create-mode finalize → AuthoringTestRunPanel\nflow). Without it the legacy \"version bump + auto candidate run +\nside-by-side compare\" behavior kicks in."},"OptimizeModeRequest":{"properties":{"mode":{"type":"string","const":"optimize","title":"Mode"},"collection_name":{"type":"string","maxLength":255,"minLength":1,"title":"Collection Name"},"task_name":{"type":"string","maxLength":80,"minLength":2,"title":"Task Name"},"trajectory_id":{"type":"string","maxLength":200,"minLength":1,"title":"Trajectory Id"},"user_intent":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}],"title":"User Intent"},"title":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Title"},"agent":{"anyOf":[{"type":"string","enum":["claude-code","claude-code-openrouter","codex","opencode","pi"]},{"type":"null"}],"title":"Agent"},"model":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Model"}},"type":"object","required":["mode","collection_name","task_name","trajectory_id"],"title":"OptimizeModeRequest","description":"Authoring optimize — tune an existing runbook against a trajectory.\n\nTwo intake shapes share this endpoint:\n- Wizard-style: the caller pre-collects directives into\n  ``user_intent`` and the lifecycle auto-fires them as turn 1.\n- Chat-first: ``user_intent`` is omitted, the server defers\n  auto-fire, and the user's first chat message becomes turn 1."},"OutputFieldSchema":{"properties":{"name":{"type":"string","title":"Name","description":"Output field name"},"type":{"$ref":"#/components/schemas/ParameterType","description":"Data type of the output"},"description":{"type":"string","title":"Description","description":"What this output contains"},"always_present":{"type":"boolean","title":"Always Present","description":"Whether this output is always present vs conditional","default":true},"example":{"title":"Example","description":"Example value"}},"type":"object","required":["name","type","description"],"title":"OutputFieldSchema","description":"Schema for a step output field."},"ParameterSchema":{"properties":{"name":{"type":"string","title":"Name","description":"Parameter name as used in step config"},"type":{"$ref":"#/components/schemas/ParameterType","description":"Data type of the parameter"},"description":{"type":"string","title":"Description","description":"Human-readable description of what this parameter does"},"required":{"type":"boolean","title":"Required","description":"Whether this parameter is required","default":false},"default":{"title":"Default","description":"Default value if not provided"},"supports_path_expression":{"type":"boolean","title":"Supports Path Expression","description":"Whether this parameter can use a _path suffix for dynamic values","default":false},"path_suffix_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path Suffix Name","description":"Alternative parameter name with _path suffix (e.g., 'prompt_path' for 'prompt')"},"enum_values":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Enum Values","description":"Allowed values if type is ENUM"},"array_item_type":{"anyOf":[{"$ref":"#/components/schemas/ParameterType"},{"type":"null"}],"description":"Type of items if type is ARRAY"},"object_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Object Schema","description":"Nested schema if type is OBJECT"},"examples":{"items":{},"type":"array","title":"Examples","description":"Example values for this parameter"},"validation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Validation","description":"Validation rules (min, max, pattern, etc.)"},"ui_hints":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ui Hints","description":"UI rendering hints (multiline, editor_type, etc.)"}},"type":"object","required":["name","type","description"],"title":"ParameterSchema","description":"Schema for a single step parameter."},"ParameterType":{"type":"string","enum":["string","integer","float","boolean","array","object","path_expression","file_path","model_id","url","json_schema","enum"],"title":"ParameterType","description":"Supported parameter types for step configuration."},"PathExpressionInfo":{"properties":{"syntax_patterns":{"items":{"type":"string"},"type":"array","title":"Syntax Patterns","description":"Valid path expression patterns","default":["init_params.<field>","<step_name>.outputs.<field>","<step_name>.inputs.<field>","steps.<step_name>.outputs.<field>"]},"magic_variables":{"additionalProperties":{"type":"string"},"type":"object","title":"Magic Variables","description":"Magic variables available in template expressions","default":{"$item":"Current item in list_emit_await iteration","$index":"Current index in iteration (0-based)","$parent_id":"Parent trajectory ID","$item_len":"Length of current item","$item_type":"Type name of current item"}},"template_syntax":{"type":"string","title":"Template Syntax","description":"Template expression wrapper syntax","default":"{{ expression }}"},"examples":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Examples","description":"Example path expressions with explanations"}},"type":"object","title":"PathExpressionInfo","description":"Describes path expression syntax for data flow."},"PresignRequest":{"properties":{"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type","default":"application/octet-stream"}},"type":"object","required":["filename"],"title":"PresignRequest"},"ProviderListResponse":{"properties":{"providers":{"additionalProperties":{"type":"integer"},"type":"object","title":"Providers","description":"Provider names mapped to model counts"}},"type":"object","required":["providers"],"title":"ProviderListResponse","description":"Response for listing providers.","example":{"providers":{"Anthropic":5,"Google":8,"Mistral":3,"OpenAI":15}}},"ProviderSchema":{"properties":{"name":{"type":"string","title":"Name","description":"Registry key, e.g. 'bedrock'"},"kind":{"type":"string","title":"Kind","description":"Auth shape: anthropic | openai | aws | openrouter | google | vllm | cloudflare"},"fields":{"items":{"$ref":"#/components/schemas/FieldSchema"},"type":"array","title":"Fields","description":"Credential fields the provider needs"}},"type":"object","required":["name","kind","fields"],"title":"ProviderSchema","description":"A registered ModelProvider."},"QueryFilters":{"properties":{"time_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time From","description":"ISO timestamp for created_at >= filter"},"time_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time To","description":"ISO timestamp for created_at <= filter"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"Status to filter by"},"param_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Param Key","description":"Key in init_params to filter"},"param_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Param Value","description":"Value for param_key filter"},"label_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Key","description":"Label key to filter"},"label_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Value","description":"Label value to filter"}},"type":"object","title":"QueryFilters","description":"Filter parameters for trajectory queries."},"RedeemRequest":{"properties":{"code":{"type":"string","title":"Code"},"referee_collection_id":{"type":"integer","title":"Referee Collection Id"},"referee_owner_identifier":{"type":"string","title":"Referee Owner Identifier"},"clerk_user_id":{"type":"string","title":"Clerk User Id"},"email":{"type":"string","title":"Email"},"referrer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referrer Email"}},"type":"object","required":["code","referee_collection_id","referee_owner_identifier","clerk_user_id","email"],"title":"RedeemRequest"},"RedeemResponse":{"properties":{"status":{"type":"string","title":"Status"},"referee_grant":{"anyOf":[{"$ref":"#/components/schemas/GrantView"},{"type":"null"}]},"referrer_grant":{"anyOf":[{"$ref":"#/components/schemas/GrantView"},{"type":"null"}]}},"type":"object","required":["status"],"title":"RedeemResponse"},"ReferralView":{"properties":{"code":{"type":"string","title":"Code"},"share_url":{"type":"string","title":"Share Url"},"successful_count":{"type":"integer","title":"Successful Count"},"cap":{"type":"integer","title":"Cap"},"runs_earned":{"type":"integer","title":"Runs Earned"},"invitees":{"items":{"$ref":"#/components/schemas/InviteeView"},"type":"array","title":"Invitees"}},"type":"object","required":["code","share_url","successful_count","cap","runs_earned","invitees"],"title":"ReferralView","description":"Response for ``GET /api/v1/referrals/me``."},"RevertResponse":{"properties":{"task_id":{"type":"integer","title":"Task Id"},"reverted_to_version":{"type":"string","title":"Reverted To Version"}},"type":"object","required":["task_id","reverted_to_version"],"title":"RevertResponse","description":"``POST /sessions/{id}/revert`` (optimize-mode only) result."},"RoutineCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"cadence":{"$ref":"#/components/schemas/CadenceConfig"},"init_params_overrides":{"additionalProperties":true,"type":"object","title":"Init Params Overrides"},"secret_params":{"additionalProperties":true,"type":"object","title":"Secret Params"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"},"webhook_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Secret"},"paused":{"type":"boolean","title":"Paused","default":false},"overlap_policy":{"type":"string","title":"Overlap Policy","default":"skip"}},"type":"object","required":["name","cadence"],"title":"RoutineCreate","description":"Input schema for ``POST /api/v1/routines/{collection}/{task}``."},"RoutineRead":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"task_name":{"type":"string","title":"Task Name"},"collection_name":{"type":"string","title":"Collection Name"},"cadence":{"$ref":"#/components/schemas/CadenceConfig"},"init_params_overrides":{"additionalProperties":true,"type":"object","title":"Init Params Overrides"},"secret_params":{"additionalProperties":true,"type":"object","title":"Secret Params"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"},"webhook_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Secret"},"paused":{"type":"boolean","title":"Paused"},"overlap_policy":{"type":"string","title":"Overlap Policy"},"owner_identifier":{"type":"string","title":"Owner Identifier"},"created_by":{"type":"string","title":"Created By"},"created_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By User Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Run At"},"last_trajectory_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Trajectory Id"},"temporal_schedule_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporal Schedule Id"}},"type":"object","required":["id","name","task_name","collection_name","cadence","init_params_overrides","paused","overlap_policy","owner_identifier","created_by","created_at","updated_at"],"title":"RoutineRead","description":"Output schema for routine reads."},"RoutineUpdate":{"properties":{"cadence":{"anyOf":[{"$ref":"#/components/schemas/CadenceConfig"},{"type":"null"}]},"init_params_overrides":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Init Params Overrides"},"secret_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Secret Params"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"},"webhook_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Secret"},"paused":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Paused"},"overlap_policy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Overlap Policy"}},"type":"object","title":"RoutineUpdate","description":"Input schema for ``PATCH /api/v1/routines/{collection}/{task}/{name}``."},"RunMetrics":{"properties":{"prompt_tokens":{"type":"integer","title":"Prompt Tokens","default":0},"completion_tokens":{"type":"integer","title":"Completion Tokens","default":0},"total_tokens":{"type":"integer","title":"Total Tokens","default":0},"cache_read_input_tokens":{"type":"integer","title":"Cache Read Input Tokens","default":0},"cache_creation_input_tokens":{"type":"integer","title":"Cache Creation Input Tokens","default":0},"cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Usd"},"cost_confidence":{"type":"string","enum":["estimated","unknown","mixed","measured"],"title":"Cost Confidence","default":"unknown"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"wall_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Wall Seconds"},"api_calls":{"type":"integer","title":"Api Calls","default":0},"steps":{"type":"integer","title":"Steps","default":0}},"type":"object","title":"RunMetrics","description":"Per-step ``usage`` aggregated over the run (``attributes.metrics``).\n\nBuilt by :func:`mise.evaluation.summary.aggregate_usage` from every step's\n``outputs.usage``, so it counts mise's own LLM calls (the §7.3 title) as\nwell as the agent's.\n\nToken counts default to ``0`` because a step that reported no usage\ncontributes nothing; the costs and durations are ``None`` when nothing\npriced or nothing timed, which is not the same as zero."},"RunRuntime":{"properties":{"agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"model_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Provider"},"snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot"},"skills":{"items":{"type":"string"},"type":"array","title":"Skills"},"mcp_servers":{"items":{"type":"string"},"type":"array","title":"Mcp Servers"},"secrets_declared":{"items":{"type":"string"},"type":"array","title":"Secrets Declared"},"cpus":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cpus"},"memory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory"}},"type":"object","title":"RunRuntime","description":"How the run was configured (``attributes.runtime``).\n\n``secrets_declared`` is the runbook frontmatter's secret *names* only\n(``RunbookFrontmatter.secret_env_names()`` returns ``(name, env_var)``\npairs and the step passes the names). The values live\nin ``trajectory.runtime_env``, which is excluded from serialization; no\nsecret value reaches this model, the storage blob or the DB row."},"RunbookCollectionViewModel":{"properties":{"schema_version":{"type":"integer","const":1,"title":"Schema Version","description":"Shape version of this document. Bumped only on a breaking change."},"collection_name":{"type":"string","title":"Collection Name","description":"The collection's stored name (its stored casing, not the path's)."},"generated_at":{"type":"string","format":"date-time","title":"Generated At","description":"When this view model was built (UTC)."},"runbooks":{"items":{"$ref":"#/components/schemas/RunbookEntry"},"type":"array","title":"Runbooks","description":"Every live task with a runbook step, newest run first; runbooks that never ran last, by name."}},"type":"object","required":["schema_version","collection_name","generated_at","runbooks"],"title":"RunbookCollectionViewModel","description":"Everything the `/flows/<collection>/runbooks` page renders, in one response."},"RunbookEntry":{"properties":{"name":{"type":"string","title":"Name","description":"The task name; the run name is `<collection>/<name>`."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The task's description, or null when it has none."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version","description":"The task's version, or null."},"has_file_uploads":{"type":"boolean","title":"Has File Uploads","description":"Whether the runbook accepts file uploads at run time."},"run_count":{"type":"integer","minimum":0.0,"title":"Run Count","description":"Non-archived runs ever."},"last_run":{"anyOf":[{"$ref":"#/components/schemas/RunbookLastRun"},{"type":"null"}],"description":"The most recent run, or null when the runbook never ran."}},"type":"object","required":["name","description","version","has_file_uploads","run_count","last_run"],"title":"RunbookEntry","description":"One runbook of the collection with its run history."},"RunbookLastRun":{"properties":{"trajectory_id":{"type":"string","title":"Trajectory Id","description":"The run's trajectory id."},"status":{"type":"string","enum":["pending","running","completed","failed","cancelled"],"title":"Status","description":"Run status. Archived runs never appear here."},"verdict":{"type":"string","enum":["pass","fail","unknown"],"title":"Verdict","description":"The run's evaluation verdict. Evals-v2 runs store it; for older runs a completed run with no step reporting failure is `pass`, a failed run is `fail`, anything else is `unknown`."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the run was created (UTC)."}},"type":"object","required":["trajectory_id","status","verdict","created_at"],"title":"RunbookLastRun","description":"A runbook's most recent non-archived run; the entry names the runbook."},"RunnerSchema":{"properties":{"name":{"type":"string","title":"Name","description":"Registry key, e.g. 'goose'"},"log_file":{"type":"string","title":"Log File","description":"Sandbox path the runner writes streaming output to"},"supports":{"items":{"type":"string"},"type":"array","title":"Supports","description":"Provider names this runner can drive (the compat row)"}},"type":"object","required":["name","log_file","supports"],"title":"RunnerSchema","description":"A registered AgentRunner."},"SectionUpdateRequest":{"properties":{"section":{"type":"string","title":"Section"},"value":{"title":"Value"},"index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Index"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"}},"type":"object","required":["section","value"],"title":"SectionUpdateRequest"},"SendMessageRequest":{"properties":{"content":{"type":"string","maxLength":64000,"minLength":1,"title":"Content"}},"type":"object","required":["content"],"title":"SendMessageRequest"},"SendMessageResponse":{"properties":{"sequence":{"type":"integer","title":"Sequence"}},"type":"object","required":["sequence"],"title":"SendMessageResponse"},"SessionDetail":{"properties":{"session":{"$ref":"#/components/schemas/SessionSummary"},"messages":{"items":{"$ref":"#/components/schemas/MessageOut"},"type":"array","title":"Messages"},"current_draft_md":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Draft Md"}},"type":"object","required":["session","messages","current_draft_md"],"title":"SessionDetail"},"SessionSummary":{"properties":{"session_id":{"type":"string","title":"Session Id"},"status":{"type":"string","title":"Status"},"collection_id":{"type":"integer","title":"Collection Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"mission":{"type":"string","title":"Mission"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"last_active_at":{"type":"string","format":"date-time","title":"Last Active At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"mode":{"type":"string","enum":["create","optimize"],"title":"Mode","default":"create"},"user_intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Intent"},"optimize_task_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Optimize Task Name"},"optimize_trajectory_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Optimize Trajectory Id"}},"type":"object","required":["session_id","status","collection_id","title","mission","started_at","last_active_at","expires_at","finished_at"],"title":"SessionSummary"},"SignupAttributionRequest":{"properties":{"code":{"type":"string","title":"Code"},"clerk_user_id":{"type":"string","title":"Clerk User Id"},"email":{"type":"string","title":"Email"}},"type":"object","required":["code","clerk_user_id","email"],"title":"SignupAttributionRequest"},"SignupAttributionResponse":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"SignupAttributionResponse"},"StatsResponse":{"properties":{"total":{"type":"integer","title":"Total"},"by_status":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Status"}},"type":"object","required":["total","by_status"],"title":"StatsResponse","description":"Response for trajectory statistics."},"Step":{"properties":{"inputs":{"additionalProperties":true,"type":"object","title":"Inputs","default":{}},"outputs":{"additionalProperties":true,"type":"object","title":"Outputs","default":{}},"activity":{"type":"string","title":"Activity","default":"none"},"key":{"type":"string","title":"Key","default":"797370da8b8f45eba579df8f125c79bf"},"depends_on":{"items":{"type":"string"},"type":"array","title":"Depends On","default":[]},"created":{"type":"string","title":"Created"},"ended":{"type":"string","title":"Ended"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"author":{"type":"string","title":"Author","default":"mise@jetty.io"},"origin":{"additionalProperties":true,"type":"object","title":"Origin","default":{}},"config":{"additionalProperties":true,"type":"object","title":"Config","default":{}}},"type":"object","title":"Step"},"StepCategory":{"type":"string","enum":["ai_models","control_flow","data_processing","evaluation","iteration","specialized","utility"],"title":"StepCategory","description":"Categories for organizing step functions."},"StepTemplateListResponse":{"properties":{"templates":{"items":{"$ref":"#/components/schemas/StepTemplateSchema"},"type":"array","title":"Templates"},"total_count":{"type":"integer","title":"Total Count"},"categories":{"additionalProperties":{"type":"integer"},"type":"object","title":"Categories"}},"type":"object","required":["templates","total_count","categories"],"title":"StepTemplateListResponse","description":"Response model for listing all step templates."},"StepTemplateSchema":{"properties":{"activity_name":{"type":"string","title":"Activity Name","description":"Unique activity identifier used in step configs"},"display_name":{"type":"string","title":"Display Name","description":"Human-readable name for UI display"},"description":{"type":"string","title":"Description","description":"Detailed description of what this step does"},"category":{"$ref":"#/components/schemas/StepCategory","description":"Functional category for organization"},"parameters":{"items":{"$ref":"#/components/schemas/ParameterSchema"},"type":"array","title":"Parameters","description":"Configuration parameters for this step"},"outputs":{"items":{"$ref":"#/components/schemas/OutputFieldSchema"},"type":"array","title":"Outputs","description":"Output fields produced by this step"},"required_api_keys":{"items":{"$ref":"#/components/schemas/ApiKeyRequirement"},"type":"array","title":"Required Api Keys","description":"API keys that may be needed for this step"},"minimal_example":{"additionalProperties":true,"type":"object","title":"Minimal Example","description":"Minimal working configuration"},"full_example":{"additionalProperties":true,"type":"object","title":"Full Example","description":"Comprehensive configuration showing all options"},"documentation_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentation Url","description":"Link to detailed documentation"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"Searchable tags for discovery"},"version":{"type":"string","title":"Version","description":"Schema version for this template","default":"1.0.0"},"deprecated":{"type":"boolean","title":"Deprecated","description":"Whether this step is deprecated","default":false},"deprecation_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deprecation Message","description":"Message explaining deprecation and alternatives"}},"type":"object","required":["activity_name","display_name","description","category","minimal_example","full_example"],"title":"StepTemplateSchema","description":"Complete schema for a step function template."},"SweepResponse":{"properties":{"deactivated":{"type":"integer","title":"Deactivated"}},"type":"object","required":["deactivated"],"title":"SweepResponse"},"TaskCreate":{"properties":{"name":{"type":"string","title":"Name"},"workflow":{"additionalProperties":true,"type":"object","title":"Workflow"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"has_file_uploads":{"type":"boolean","title":"Has File Uploads","default":true},"is_chat_flow":{"type":"boolean","title":"Is Chat Flow","default":false},"entity_type":{"type":"string","const":"task","title":"Entity Type","default":"task"},"croissant_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Croissant Metadata"},"is_private":{"type":"boolean","title":"Is Private","default":true}},"type":"object","required":["name","workflow"],"title":"TaskCreate"},"TaskListResponse":{"properties":{"name":{"type":"string","title":"Name"},"entity_type":{"type":"string","title":"Entity Type","default":"task"},"is_private":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Private","default":true},"croissant_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Croissant Metadata"},"workflow":{"additionalProperties":true,"type":"object","title":"Workflow"},"collection_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Collection Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"has_file_uploads":{"type":"boolean","title":"Has File Uploads","default":true},"is_chat_flow":{"type":"boolean","title":"Is Chat Flow","default":false},"id":{"type":"integer","title":"Id"},"collection_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collection Name"}},"type":"object","required":["name","workflow","id"],"title":"TaskListResponse"},"TaskResponse":{"properties":{"name":{"type":"string","title":"Name"},"entity_type":{"type":"string","title":"Entity Type","default":"task"},"is_private":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Private","default":true},"croissant_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Croissant Metadata"},"workflow":{"additionalProperties":true,"type":"object","title":"Workflow"},"collection_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Collection Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"has_file_uploads":{"type":"boolean","title":"Has File Uploads","default":true},"is_chat_flow":{"type":"boolean","title":"Is Chat Flow","default":false},"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"environment_variables":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Environment Variables"},"storage_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Storage Info"},"storage_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Provider"}},"type":"object","required":["name","workflow","id","created_at"],"title":"TaskResponse"},"TaskUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"workflow":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Workflow"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"has_file_uploads":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has File Uploads"},"is_chat_flow":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Chat Flow"},"is_private":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Private"},"croissant_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Croissant Metadata"}},"type":"object","title":"TaskUpdate"},"TemplateDefaultsSchema":{"properties":{"template_id":{"type":"string","title":"Template Id"},"template_version":{"type":"integer","title":"Template Version"},"template_variables":{"additionalProperties":true,"type":"object","title":"Template Variables"},"sample_dataset_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sample Dataset Path"}},"type":"object","required":["template_id","template_version","template_variables","sample_dataset_path"],"title":"TemplateDefaultsSchema"},"TemplateSummarySchema":{"properties":{"template_id":{"type":"string","title":"Template Id"},"template_version":{"type":"integer","title":"Template Version"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"category":{"type":"string","title":"Category"}},"type":"object","required":["template_id","template_version","display_name","description","category"],"title":"TemplateSummarySchema"},"Trajectory":{"properties":{"name":{"type":"string","title":"Name","default":"none"},"trajectory_id":{"type":"string","title":"Trajectory Id","default":"none"},"storage_path":{"type":"string","title":"Storage Path","default":"none"},"status":{"type":"string","title":"Status","default":"pending"},"attributes":{"$ref":"#/components/schemas/TrajectoryAttribute","default":{"asset_type":"activity","asset_filename":"none","created":"2026-11-19T23:14:55.479130","params":{}}},"created":{"type":"string","title":"Created"},"updated":{"type":"string","title":"Updated"},"author":{"type":"string","title":"Author","default":"mise@jetty.io"},"metadata_uri":{"type":"string","title":"Metadata Uri","default":"none"},"steps":{"additionalProperties":{"$ref":"#/components/schemas/Step"},"type":"object","title":"Steps","default":{}},"labels":{"items":{"$ref":"#/components/schemas/Label"},"type":"array","title":"Labels","default":[]},"total_steps":{"items":{"type":"string"},"type":"array","title":"Total Steps","default":[]},"completed_steps":{"items":{"type":"string"},"type":"array","title":"Completed Steps","default":[]},"init_params":{"additionalProperties":true,"type":"object","title":"Init Params","default":{}},"step_configs":{"additionalProperties":true,"type":"object","title":"Step Configs","default":{}},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"triggered_by_routine_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Triggered By Routine Id"},"run_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Path"},"initiating_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initiating User Id"},"collection_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Collection Id"},"notify_on_completion":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Notify On Completion"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"}},"type":"object","title":"Trajectory"},"TrajectoryAttribute":{"properties":{"asset_type":{"type":"string","title":"Asset Type","default":"activity"},"asset_filename":{"type":"string","title":"Asset Filename","default":"none"},"created":{"type":"string","title":"Created"},"params":{"additionalProperties":true,"type":"object","title":"Params","default":{}},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"title_source":{"anyOf":[{"type":"string","enum":["llm","derived"]},{"type":"null"}],"title":"Title Source"},"verdict":{"anyOf":[{"type":"string","enum":["pass","fail","unknown"]},{"type":"null"}],"title":"Verdict"},"evaluation":{"anyOf":[{"$ref":"#/components/schemas/EvaluationSummary"},{"type":"null"}]},"metrics":{"anyOf":[{"$ref":"#/components/schemas/RunMetrics"},{"type":"null"}]},"runtime":{"anyOf":[{"$ref":"#/components/schemas/RunRuntime"},{"type":"null"}]}},"type":"object","title":"TrajectoryAttribute"},"TrajectoryListItem":{"properties":{"collection":{"type":"string","title":"Collection"},"name":{"type":"string","title":"Name"},"folder":{"type":"string","title":"Folder"},"trajectory_id":{"type":"string","title":"Trajectory Id"}},"type":"object","required":["collection","name","folder","trajectory_id"],"title":"TrajectoryListItem","description":"Minimal trajectory information for listing."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WorkflowResponse":{"properties":{"message":{"type":"string","title":"Message"},"workflow_id":{"type":"string","title":"Workflow Id"},"result":{"additionalProperties":true,"type":"object","title":"Result","default":{}},"trajectory":{"additionalProperties":true,"type":"object","title":"Trajectory","default":{}},"metadata":{"type":"string","title":"Metadata","default":""}},"type":"object","required":["message","workflow_id"],"title":"WorkflowResponse"},"mise__api__endpoints__trajectory__BatchStatusUpdateResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/BatchStatusUpdateItem"},"type":"array","title":"Results"},"updated_count":{"type":"integer","title":"Updated Count"}},"type":"object","required":["results","updated_count"],"title":"BatchStatusUpdateResponse","description":"Response model for batch status updates."},"mise__api__endpoints__trajectory__TrajectoryListResponse":{"properties":{"trajectories":{"items":{"$ref":"#/components/schemas/TrajectoryListItem"},"type":"array","title":"Trajectories"},"total_count":{"type":"integer","title":"Total Count"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["trajectories","total_count","limit","offset"],"title":"TrajectoryListResponse","description":"Response model for trajectory listing with pagination."},"mise__api__endpoints__trajectory_db__BatchStatusUpdateResponse":{"properties":{"results":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Results"},"updated_count":{"type":"integer","title":"Updated Count"}},"type":"object","required":["results","updated_count"],"title":"BatchStatusUpdateResponse","description":"Response for batch status updates."},"mise__api__endpoints__trajectory_db__TrajectoryListResponse":{"properties":{"trajectories":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Trajectories"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"limit":{"type":"integer","title":"Limit"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["trajectories","total","page","limit","has_more"],"title":"TrajectoryListResponse","description":"Response model for trajectory listing."},"mise__authoring__schemas__CreateSessionResponse":{"properties":{"session_id":{"type":"string","title":"Session Id"},"status":{"type":"string","title":"Status"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"mode":{"type":"string","enum":["create","optimize"],"title":"Mode","default":"create"},"optimize_task_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Optimize Task Name"},"optimize_trajectory_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Optimize Trajectory Id"},"auto_fire_first_turn":{"type":"boolean","title":"Auto Fire First Turn","default":false},"agent":{"type":"string","title":"Agent","default":"claude-code"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},"type":"object","required":["session_id","status","expires_at"],"title":"CreateSessionResponse","description":"Create-session result.\n\nCarries enough to (a) drive status polling, (b) tell the client\nwhether to auto-fire turn 1 (optimize) or wait for user input\n(create), (c) correlate the session with the Task / trajectory it\ntargets (optimize-mode)."},"mise__onboarding__concierge__CreateSessionResponse":{"properties":{"session_id":{"type":"string","title":"Session Id"},"collection_id":{"type":"integer","title":"Collection Id"},"collection_name":{"type":"string","title":"Collection Name"}},"type":"object","required":["session_id","collection_id","collection_name"],"title":"CreateSessionResponse"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}