{
  "components": {
    "schemas": {
      "AIModelsRequest": {
        "properties": {
          "base_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Base Url"
          },
          "binary_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Binary Path"
          },
          "endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Endpoint"
          },
          "header_prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Header Prefix"
          },
          "key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key"
          },
          "provider": {
            "title": "Provider",
            "type": "string"
          }
        },
        "required": [
          "provider"
        ],
        "title": "AIModelsRequest",
        "type": "object"
      },
      "AdminConfirmBody": {
        "properties": {
          "confirm": {
            "default": "",
            "title": "Confirm",
            "type": "string"
          }
        },
        "title": "AdminConfirmBody",
        "type": "object"
      },
      "AssistantMessageBody": {
        "additionalProperties": false,
        "properties": {
          "legacy_adoption": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Legacy Adoption"
          },
          "text": {
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "title": "AssistantMessageBody",
        "type": "object"
      },
      "AssistantPermissionAnswer": {
        "properties": {
          "allow": {
            "title": "Allow",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "required": [
          "allow"
        ],
        "title": "AssistantPermissionAnswer",
        "type": "object"
      },
      "AssistantPermissionOpen": {
        "properties": {
          "input": {
            "additionalProperties": true,
            "default": {},
            "title": "Input",
            "type": "object"
          },
          "session_id": {
            "title": "Session Id",
            "type": "integer"
          },
          "tool_name": {
            "title": "Tool Name",
            "type": "string"
          },
          "tool_use_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Use Id"
          }
        },
        "required": [
          "session_id",
          "tool_name"
        ],
        "title": "AssistantPermissionOpen",
        "type": "object"
      },
      "AssistantSessionCreate": {
        "additionalProperties": false,
        "properties": {
          "choices": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Choices"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "title": "AssistantSessionCreate",
        "type": "object"
      },
      "BackupRequest": {
        "properties": {
          "confirm": {
            "default": "",
            "title": "Confirm",
            "type": "string"
          },
          "include_reports": {
            "default": true,
            "title": "Include Reports",
            "type": "boolean"
          }
        },
        "title": "BackupRequest",
        "type": "object"
      },
      "Body_import_configurations_api_configurations_import_post": {
        "properties": {
          "files": {
            "items": {
              "contentMediaType": "application/octet-stream",
              "type": "string"
            },
            "title": "Files",
            "type": "array"
          }
        },
        "required": [
          "files"
        ],
        "title": "Body_import_configurations_api_configurations_import_post",
        "type": "object"
      },
      "BundleBody": {
        "properties": {
          "path": {
            "default": "",
            "title": "Path",
            "type": "string"
          }
        },
        "title": "BundleBody",
        "type": "object"
      },
      "CloudBackup": {
        "properties": {
          "execution_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Execution Ids"
          }
        },
        "title": "CloudBackup",
        "type": "object"
      },
      "ConfigCreate": {
        "properties": {
          "config_type": {
            "title": "Config Type",
            "type": "string"
          },
          "link_to_execution_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link To Execution Id"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "parameters": {
            "additionalProperties": true,
            "title": "Parameters",
            "type": "object"
          }
        },
        "required": [
          "name",
          "config_type",
          "parameters"
        ],
        "title": "ConfigCreate",
        "type": "object"
      },
      "ConfigExport": {
        "properties": {
          "ids": {
            "items": {
              "type": "integer"
            },
            "title": "Ids",
            "type": "array"
          }
        },
        "required": [
          "ids"
        ],
        "title": "ConfigExport",
        "type": "object"
      },
      "ConfigUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "parameters": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parameters"
          }
        },
        "title": "ConfigUpdate",
        "type": "object"
      },
      "CredentialStore": {
        "properties": {
          "value": {
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "value"
        ],
        "title": "CredentialStore",
        "type": "object"
      },
      "CredentialValidate": {
        "properties": {
          "base_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Base Url"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "provider": {
            "title": "Provider",
            "type": "string"
          }
        },
        "required": [
          "provider",
          "key"
        ],
        "title": "CredentialValidate",
        "type": "object"
      },
      "DeliveryTargetCreate": {
        "description": "One destination for a routine's report.\n\n``target`` is the address for ``email`` and the directory for ``folder``.\nAn empty email target means \"the recipient configured under Settings ->\nEmail\", which is where the address came from before schema 21 and still\ndoes for every routine the migration seeded.",
        "properties": {
          "channel": {
            "title": "Channel",
            "type": "string"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "mode": {
            "default": "automatic",
            "title": "Mode",
            "type": "string"
          },
          "target": {
            "default": "",
            "title": "Target",
            "type": "string"
          }
        },
        "required": [
          "channel"
        ],
        "title": "DeliveryTargetCreate",
        "type": "object"
      },
      "DeliveryTargetUpdate": {
        "properties": {
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          },
          "mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mode"
          },
          "target": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target"
          }
        },
        "title": "DeliveryTargetUpdate",
        "type": "object"
      },
      "DiveRequest": {
        "properties": {
          "ai_enabled": {
            "default": false,
            "title": "Ai Enabled",
            "type": "boolean"
          },
          "ai_settings": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Settings"
          },
          "date_from": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date From"
          },
          "date_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date To"
          },
          "ephemeral_credentials": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ephemeral Credentials"
          },
          "keywords": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Keywords"
          },
          "max_results": {
            "default": 100,
            "title": "Max Results",
            "type": "integer"
          },
          "query": {
            "title": "Query",
            "type": "string"
          },
          "repository": {
            "title": "Repository",
            "type": "string"
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Request Id"
          },
          "saved_configuration_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Saved Configuration Id"
          }
        },
        "required": [
          "repository",
          "query"
        ],
        "title": "DiveRequest",
        "type": "object"
      },
      "DocumentIdsBody": {
        "properties": {
          "document_ids": {
            "default": [],
            "items": {
              "type": "integer"
            },
            "title": "Document Ids",
            "type": "array"
          }
        },
        "title": "DocumentIdsBody",
        "type": "object"
      },
      "EmbeddingProbeBody": {
        "description": "An unsaved lane to probe, so a user can test before committing to it.",
        "properties": {
          "settings": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Settings"
          }
        },
        "title": "EmbeddingProbeBody",
        "type": "object"
      },
      "ExecutionExport": {
        "properties": {
          "ids": {
            "items": {
              "type": "integer"
            },
            "title": "Ids",
            "type": "array"
          }
        },
        "required": [
          "ids"
        ],
        "title": "ExecutionExport",
        "type": "object"
      },
      "ExecutionSettingsBody": {
        "properties": {
          "max_concurrent_executions": {
            "title": "Max Concurrent Executions",
            "type": "integer"
          },
          "routine_fire_queue_limit": {
            "title": "Routine Fire Queue Limit",
            "type": "integer"
          }
        },
        "required": [
          "max_concurrent_executions",
          "routine_fire_queue_limit"
        ],
        "title": "ExecutionSettingsBody",
        "type": "object"
      },
      "ExplorerExportBody": {
        "properties": {
          "authors": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Authors",
            "type": "array"
          },
          "categories": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Categories",
            "type": "array"
          },
          "date_from": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date From"
          },
          "date_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date To"
          },
          "format": {
            "default": "bibtex",
            "title": "Format",
            "type": "string"
          },
          "query": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Query"
          },
          "sources": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Sources",
            "type": "array"
          }
        },
        "title": "ExplorerExportBody",
        "type": "object"
      },
      "ExplorerFilters": {
        "properties": {
          "authors": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Authors",
            "type": "array"
          },
          "categories": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Categories",
            "type": "array"
          },
          "date_from": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date From"
          },
          "date_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date To"
          },
          "query": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Query"
          },
          "sources": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Sources",
            "type": "array"
          }
        },
        "title": "ExplorerFilters",
        "type": "object"
      },
      "ExplorerSearchBody": {
        "properties": {
          "authors": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Authors",
            "type": "array"
          },
          "categories": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Categories",
            "type": "array"
          },
          "cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cursor"
          },
          "date_from": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date From"
          },
          "date_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date To"
          },
          "limit": {
            "default": 50,
            "title": "Limit",
            "type": "integer"
          },
          "query": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Query"
          },
          "sort": {
            "default": "newest",
            "title": "Sort",
            "type": "string"
          },
          "sources": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Sources",
            "type": "array"
          }
        },
        "title": "ExplorerSearchBody",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "LibraryLinkBody": {
        "additionalProperties": false,
        "properties": {
          "document_id": {
            "exclusiveMinimum": 0.0,
            "title": "Document Id",
            "type": "integer"
          },
          "expected_vault_id": {
            "title": "Expected Vault Id",
            "type": "string"
          }
        },
        "required": [
          "expected_vault_id",
          "document_id"
        ],
        "title": "LibraryLinkBody",
        "type": "object"
      },
      "LibraryOpenBody": {
        "additionalProperties": false,
        "properties": {
          "expected_vault_id": {
            "title": "Expected Vault Id",
            "type": "string"
          },
          "expected_version_id": {
            "title": "Expected Version Id",
            "type": "string"
          }
        },
        "required": [
          "expected_vault_id",
          "expected_version_id"
        ],
        "title": "LibraryOpenBody",
        "type": "object"
      },
      "LibraryVaultBody": {
        "additionalProperties": false,
        "properties": {
          "parent_directory": {
            "maxLength": 4096,
            "minLength": 1,
            "title": "Parent Directory",
            "type": "string"
          }
        },
        "required": [
          "parent_directory"
        ],
        "title": "LibraryVaultBody",
        "type": "object"
      },
      "LifecycleCheckRequest": {
        "properties": {
          "limit": {
            "default": 1000,
            "maximum": 5000.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "run_until_done": {
            "default": false,
            "title": "Run Until Done",
            "type": "boolean"
          }
        },
        "title": "LifecycleCheckRequest",
        "type": "object"
      },
      "LifecycleForDocumentsRequest": {
        "properties": {
          "document_ids": {
            "items": {
              "type": "integer"
            },
            "maxItems": 500,
            "title": "Document Ids",
            "type": "array"
          }
        },
        "title": "LifecycleForDocumentsRequest",
        "type": "object"
      },
      "ProfileImportBody": {
        "description": "One exported profile, or a list of them.",
        "properties": {
          "profiles": {
            "default": [],
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Profiles",
            "type": "array"
          }
        },
        "title": "ProfileImportBody",
        "type": "object"
      },
      "ProfileMatchesForDocumentsBody": {
        "properties": {
          "document_ids": {
            "default": [],
            "items": {
              "type": "integer"
            },
            "title": "Document Ids",
            "type": "array"
          }
        },
        "title": "ProfileMatchesForDocumentsBody",
        "type": "object"
      },
      "ReadingQueueSaveBody": {
        "properties": {
          "document_id": {
            "title": "Document Id",
            "type": "integer"
          }
        },
        "required": [
          "document_id"
        ],
        "title": "ReadingQueueSaveBody",
        "type": "object"
      },
      "ReadingQueueStatusBody": {
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "title": "ReadingQueueStatusBody",
        "type": "object"
      },
      "ReferenceExportBody": {
        "properties": {
          "document_ids": {
            "default": [],
            "items": {
              "type": "integer"
            },
            "title": "Document Ids",
            "type": "array"
          },
          "execution_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Execution Ids"
          },
          "format": {
            "default": "bibtex",
            "title": "Format",
            "type": "string"
          }
        },
        "title": "ReferenceExportBody",
        "type": "object"
      },
      "RendererOriginBody": {
        "additionalProperties": false,
        "properties": {
          "origin": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Origin",
            "type": "string"
          }
        },
        "required": [
          "origin"
        ],
        "title": "RendererOriginBody",
        "type": "object"
      },
      "RestartRequest": {
        "description": "Body of ``POST /api/executions/{id}/restart``. Every field optional.\n\nThe route took no body at all before this; it still answers a request that\nsends none, because the renderer's Restart button and every existing caller\ndo exactly that.",
        "properties": {
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Request Id"
          }
        },
        "title": "RestartRequest",
        "type": "object"
      },
      "RestoreRequest": {
        "properties": {
          "accept_fk_violations": {
            "default": false,
            "title": "Accept Fk Violations",
            "type": "boolean"
          },
          "confirm": {
            "default": "",
            "title": "Confirm",
            "type": "string"
          },
          "path": {
            "default": "",
            "title": "Path",
            "type": "string"
          },
          "vault_parent": {
            "default": "",
            "title": "Vault Parent",
            "type": "string"
          }
        },
        "title": "RestoreRequest",
        "type": "object"
      },
      "RoutineCreate": {
        "properties": {
          "ai_enabled": {
            "default": false,
            "title": "Ai Enabled",
            "type": "boolean"
          },
          "ai_settings": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Settings"
          },
          "email_ai_summary_enabled": {
            "default": false,
            "title": "Email Ai Summary Enabled",
            "type": "boolean"
          },
          "email_enabled": {
            "default": false,
            "title": "Email Enabled",
            "type": "boolean"
          },
          "intent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Intent"
          },
          "is_active": {
            "default": true,
            "title": "Is Active",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "notify_on_complete": {
            "default": false,
            "title": "Notify On Complete",
            "type": "boolean"
          },
          "parameters": {
            "additionalProperties": true,
            "title": "Parameters",
            "type": "object"
          },
          "schedule_cron": {
            "title": "Schedule Cron",
            "type": "string"
          },
          "storage_settings": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Settings"
          }
        },
        "required": [
          "name",
          "schedule_cron",
          "parameters"
        ],
        "title": "RoutineCreate",
        "type": "object"
      },
      "RoutineUpdate": {
        "properties": {
          "ai_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Enabled"
          },
          "ai_settings": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Settings"
          },
          "email_ai_summary_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Ai Summary Enabled"
          },
          "email_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Enabled"
          },
          "intent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Intent"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "notify_on_complete": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notify On Complete"
          },
          "parameters": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parameters"
          },
          "schedule_cron": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Schedule Cron"
          },
          "storage_settings": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Settings"
          }
        },
        "title": "RoutineUpdate",
        "type": "object"
      },
      "ServiceInstallBody": {
        "properties": {
          "port": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Port"
          },
          "register": {
            "default": false,
            "title": "Register",
            "type": "boolean"
          }
        },
        "title": "ServiceInstallBody",
        "type": "object"
      },
      "SettingsBody": {
        "properties": {
          "settings": {
            "additionalProperties": true,
            "title": "Settings",
            "type": "object"
          }
        },
        "required": [
          "settings"
        ],
        "title": "SettingsBody",
        "type": "object"
      },
      "SweepRequest": {
        "properties": {
          "ai_enabled": {
            "default": false,
            "title": "Ai Enabled",
            "type": "boolean"
          },
          "ai_settings": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Settings"
          },
          "date_from": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date From"
          },
          "date_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date To"
          },
          "ephemeral_credentials": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ephemeral Credentials"
          },
          "keywords": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Keywords"
          },
          "max_results": {
            "default": 100,
            "title": "Max Results",
            "type": "integer"
          },
          "query": {
            "title": "Query",
            "type": "string"
          },
          "repositories": {
            "items": {
              "type": "string"
            },
            "title": "Repositories",
            "type": "array"
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Request Id"
          },
          "saved_configuration_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Saved Configuration Id"
          }
        },
        "required": [
          "repositories",
          "query"
        ],
        "title": "SweepRequest",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "WatchProfileBody": {
        "properties": {
          "affiliations": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Affiliations",
            "type": "array"
          },
          "display_name": {
            "default": "",
            "title": "Display Name",
            "type": "string"
          },
          "field_hints": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Field Hints",
            "type": "array"
          },
          "identifiers": {
            "additionalProperties": true,
            "default": {},
            "title": "Identifiers",
            "type": "object"
          },
          "kind": {
            "default": "person",
            "title": "Kind",
            "type": "string"
          },
          "names": {
            "default": [],
            "items": {},
            "title": "Names",
            "type": "array"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          }
        },
        "title": "WatchProfileBody",
        "type": "object"
      },
      "WatchdogMuteRequest": {
        "properties": {
          "finding_key": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Finding Key",
            "type": "string"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          }
        },
        "required": [
          "finding_key"
        ],
        "title": "WatchdogMuteRequest",
        "type": "object"
      }
    }
  },
  "info": {
    "title": "resmon"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/admin/erase-ai-keys": {
      "post": {
        "operationId": "admin_erase_ai_keys_api_admin_erase_ai_keys_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Admin Erase Ai Keys"
      }
    },
    "/api/admin/erase-app-data": {
      "post": {
        "description": "Erase the corpus + configs + executions + every API key.\n\nThe corpus is included as of 1.7.0. \"All app data\" that left every collected\npaper behind was not a description of what this did.",
        "operationId": "admin_erase_app_data_api_admin_erase_app_data_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminConfirmBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Admin Erase App Data"
      }
    },
    "/api/admin/erase-configs": {
      "post": {
        "operationId": "admin_erase_configs_api_admin_erase_configs_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminConfirmBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Admin Erase Configs"
      }
    },
    "/api/admin/erase-corpus": {
      "post": {
        "description": "Erase every collected paper. Executions, configs and keys are kept.",
        "operationId": "admin_erase_corpus_api_admin_erase_corpus_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminConfirmBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Admin Erase Corpus"
      }
    },
    "/api/admin/erase-execution-data": {
      "post": {
        "description": "Erase all configs + all executions. Settings and API keys untouched.",
        "operationId": "admin_erase_execution_data_api_admin_erase_execution_data_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminConfirmBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Admin Erase Execution Data"
      }
    },
    "/api/admin/erase-executions": {
      "post": {
        "operationId": "admin_erase_executions_api_admin_erase_executions_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminConfirmBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Admin Erase Executions"
      }
    },
    "/api/admin/erase-repo-keys": {
      "post": {
        "operationId": "admin_erase_repo_keys_api_admin_erase_repo_keys_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Admin Erase Repo Keys"
      }
    },
    "/api/admin/factory-reset": {
      "post": {
        "description": "Erase every secret, config, execution, setting, and collected paper.\n\nThe corpus is included as of 1.7.0 — a \"factory reset\" that left tens of\nthousands of papers on disk was the single most misleading label in the app.",
        "operationId": "admin_factory_reset_api_admin_factory_reset_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminConfirmBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Admin Factory Reset"
      }
    },
    "/api/admin/reset-settings": {
      "post": {
        "description": "Reset every setting plus erase every API key. Configs/executions kept.",
        "operationId": "admin_reset_settings_api_admin_reset_settings_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminConfirmBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Admin Reset Settings"
      }
    },
    "/api/ai/models": {
      "post": {
        "description": "Return the list of model IDs the BYOK credential can access.\n\nThe caller may send a freshly-typed ``key`` or rely on the credential\nalready stored in the OS keyring for ``{provider}_api_key`` (or\n``custom_llm_api_key`` for the Custom provider). ``local`` uses no\nkey and requires ``endpoint`` instead.",
        "operationId": "list_ai_models_api_ai_models_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AIModelsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Ai Models"
      }
    },
    "/api/analytics/discovery-lag": {
      "get": {
        "description": "Median days between publication and resmon first seeing each paper.",
        "operationId": "analytics_discovery_lag_api_analytics_discovery_lag_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Analytics Discovery Lag"
      }
    },
    "/api/analytics/keyword-contribution": {
      "get": {
        "description": "Per keyword: papers it found that no other keyword did.\n\nScoped to one execution with ``?execution_id=``, otherwise to every keyword\never searched against the whole corpus. Cached like the other analytics —\nit reads every candidate document once, which is not free on a large corpus.",
        "operationId": "analytics_keyword_contribution_api_analytics_keyword_contribution_get",
        "parameters": [
          {
            "in": "query",
            "name": "execution_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Execution Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Analytics Keyword Contribution"
      }
    },
    "/api/analytics/overview": {
      "get": {
        "description": "Everything the Analytics page needs, in one round trip.",
        "operationId": "analytics_overview_api_analytics_overview_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Analytics Overview"
      }
    },
    "/api/analytics/publication-volume": {
      "get": {
        "description": "Papers per publication month, split by source or subject category.",
        "operationId": "analytics_publication_volume_api_analytics_publication_volume_get",
        "parameters": [
          {
            "in": "query",
            "name": "group_by",
            "required": false,
            "schema": {
              "default": "source",
              "title": "Group By",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "months",
            "required": false,
            "schema": {
              "default": 12,
              "title": "Months",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Analytics Publication Volume"
      }
    },
    "/api/analytics/routine-health": {
      "get": {
        "description": "Per routine: new results per run, and whether it has gone quiet.",
        "operationId": "analytics_routine_health_api_analytics_routine_health_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Analytics Routine Health"
      }
    },
    "/api/analytics/source-contribution": {
      "get": {
        "description": "Per source: papers delivered, and how many nothing else found.",
        "operationId": "analytics_source_contribution_api_analytics_source_contribution_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Analytics Source Contribution"
      }
    },
    "/api/analytics/summary": {
      "get": {
        "operationId": "analytics_summary_api_analytics_summary_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Analytics Summary"
      }
    },
    "/api/assistant/permissions": {
      "post": {
        "description": "Ask the person, and hold this request open until they answer.\n\nCalled by ``assistant_permission_server.py``, not by the renderer. The wait\nis the point: ``claude`` is blocked on this reply and will not run the tool\nuntil it arrives, so a write physically cannot precede the answer.\n\nA card that nobody is listening for is denied immediately rather than left to\ntime out — if the panel has closed the stream, there is no one to ask.",
        "operationId": "open_assistant_permission_api_assistant_permissions_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssistantPermissionOpen"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Open Assistant Permission"
      }
    },
    "/api/assistant/permissions/{request_id}": {
      "post": {
        "description": "The panel's Allow / Deny.\n\nA second answer to the same request is refused rather than applied: two taps\non a card must not turn a deny into an allow.",
        "operationId": "answer_assistant_permission_api_assistant_permissions__request_id__post",
        "parameters": [
          {
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "title": "Request Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssistantPermissionAnswer"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Answer Assistant Permission"
      }
    },
    "/api/assistant/sessions": {
      "get": {
        "operationId": "list_assistant_sessions_api_assistant_sessions_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Assistant Sessions"
      },
      "post": {
        "operationId": "create_assistant_session_api_assistant_sessions_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssistantSessionCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Assistant Session"
      }
    },
    "/api/assistant/sessions/browse": {
      "get": {
        "operationId": "browse_assistant_sessions_api_assistant_sessions_browse_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "before_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 9223372036854775807,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Before Id"
            }
          },
          {
            "in": "query",
            "name": "through_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 9223372036854775807,
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Through Id"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 200,
              "title": "Q",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Browse Assistant Sessions"
      }
    },
    "/api/assistant/sessions/{session_id}": {
      "delete": {
        "operationId": "delete_assistant_session_api_assistant_sessions__session_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Assistant Session"
      },
      "get": {
        "operationId": "get_assistant_session_api_assistant_sessions__session_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Assistant Session"
      }
    },
    "/api/assistant/sessions/{session_id}/cancel": {
      "post": {
        "description": "Stop the running turn. Idempotent, and it says which happened.",
        "operationId": "cancel_assistant_turn_api_assistant_sessions__session_id__cancel_post",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Cancel Assistant Turn"
      }
    },
    "/api/assistant/sessions/{session_id}/export": {
      "get": {
        "operationId": "export_assistant_session_api_assistant_sessions__session_id__export_get",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "format",
            "required": true,
            "schema": {
              "pattern": "^(json|markdown)$",
              "title": "Format",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Export Assistant Session"
      }
    },
    "/api/assistant/sessions/{session_id}/messages": {
      "post": {
        "operationId": "send_assistant_message_api_assistant_sessions__session_id__messages_post",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssistantMessageBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Send Assistant Message"
      }
    },
    "/api/assistant/status": {
      "get": {
        "description": "Whether the assistant can run, and if not, the reason in one sentence.\n\nCodex is reported as unavailable *with its reason* rather than omitted: a\nuser who has Codex installed and sees no mention of it would reasonably\nconclude resmon had not noticed it.",
        "operationId": "assistant_status_api_assistant_status_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Assistant Status"
      }
    },
    "/api/auth/renderer-origin": {
      "post": {
        "description": "Allow one more exact renderer origin on this backend.\n\nExists for the daemon. launchd starts it long before any window exists, so\nunlike an Electron-spawned backend it cannot be told its renderer's origin\nat spawn — and \"any loopback origin\" is what the old Library guard trusted\nand what this lock-down removes. Electron's main process, which read the\ntoken from the daemon's token file, registers its renderer's origin here\nonce it has bound the renderer server.\n\nRefused from a browser: a request carrying an Origin is a page, and a page\nmust not be able to widen the set of pages the backend trusts, even the\nrenderer itself.",
        "operationId": "register_renderer_origin_api_auth_renderer_origin_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RendererOriginBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Register Renderer Origin"
      }
    },
    "/api/backup": {
      "post": {
        "description": "Write one bundle: the snapshotted database, the vault's bytes, optionally reports.",
        "operationId": "backup_now_api_backup_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Backup Now"
      }
    },
    "/api/backup/last": {
      "get": {
        "description": "The last bundle, the last restore outcome, and whether an undo copy exists.",
        "operationId": "backup_last_api_backup_last_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Backup Last"
      }
    },
    "/api/backup/verify": {
      "post": {
        "description": "Recompute every hash and report what a restore would and would not do.",
        "operationId": "backup_verify_api_backup_verify_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BundleBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Backup Verify"
      }
    },
    "/api/calendar/events": {
      "get": {
        "operationId": "calendar_events_api_calendar_events_get",
        "parameters": [
          {
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Calendar Events"
      }
    },
    "/api/cloud/backup": {
      "post": {
        "operationId": "cloud_backup_api_cloud_backup_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloudBackup"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Cloud Backup"
      }
    },
    "/api/cloud/link": {
      "post": {
        "operationId": "cloud_link_api_cloud_link_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Cloud Link"
      }
    },
    "/api/cloud/status": {
      "get": {
        "operationId": "cloud_status_api_cloud_status_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Cloud Status"
      }
    },
    "/api/cloud/unlink": {
      "post": {
        "operationId": "cloud_unlink_api_cloud_unlink_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Cloud Unlink"
      }
    },
    "/api/configurations": {
      "get": {
        "operationId": "list_configurations_api_configurations_get",
        "parameters": [
          {
            "in": "query",
            "name": "config_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Config Type"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Configurations"
      },
      "post": {
        "operationId": "create_configuration_api_configurations_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfigCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Configuration"
      }
    },
    "/api/configurations/export": {
      "post": {
        "operationId": "export_configurations_api_configurations_export_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfigExport"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Export Configurations"
      }
    },
    "/api/configurations/import": {
      "post": {
        "operationId": "import_configurations_api_configurations_import_post",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_import_configurations_api_configurations_import_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Import Configurations"
      }
    },
    "/api/configurations/{config_id}": {
      "delete": {
        "operationId": "delete_configuration_endpoint_api_configurations__config_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "config_id",
            "required": true,
            "schema": {
              "title": "Config Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Configuration Endpoint"
      },
      "put": {
        "operationId": "update_configuration_endpoint_api_configurations__config_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "config_id",
            "required": true,
            "schema": {
              "title": "Config Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfigUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Configuration Endpoint"
      }
    },
    "/api/credentials": {
      "get": {
        "description": "Return per-credential status for every known credential name.\n\nNever returns the raw credential value.\n\nEach entry carries ``present`` (kept for compatibility) and ``status``,\nwhich is ``present``, ``absent`` or ``unreadable``. The last one matters:\nan unsigned macOS build is denied access to keychain items an earlier\nbuild stored, and reporting that as \"absent\" tells the user their keys\nare gone when they are simply unreachable. ``keyring_responsive`` is\nFalse once a read has timed out, so the interface can say so once at the\ntop rather than fifteen times over.",
        "operationId": "credentials_presence_api_credentials_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Credentials Presence"
      }
    },
    "/api/credentials/validate": {
      "post": {
        "operationId": "validate_credential_api_credentials_validate_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CredentialValidate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Validate Credential"
      }
    },
    "/api/credentials/{key_name}": {
      "delete": {
        "operationId": "delete_credential_endpoint_api_credentials__key_name__delete",
        "parameters": [
          {
            "in": "path",
            "name": "key_name",
            "required": true,
            "schema": {
              "title": "Key Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Credential Endpoint"
      },
      "put": {
        "operationId": "store_credential_endpoint_api_credentials__key_name__put",
        "parameters": [
          {
            "in": "path",
            "name": "key_name",
            "required": true,
            "schema": {
              "title": "Key Name",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CredentialStore"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Store Credential Endpoint"
      }
    },
    "/api/deliveries/{delivery_id}/bundle": {
      "get": {
        "description": "The report bundle a webhook envelope linked to, for whoever holds the link.\n\nThis is the one route in resmon that answers without the local API token,\nand it is the one route that is not for resmon: a webhook receiver is a\nprogram the user pointed a routine at, and handing it the token that opens\nevery route would be a far worse trade than a signature over one delivery\nid with an expiry on it. ``api_auth.AUTH_SIGNED_PATHS`` is where the guard\nsteps aside; everything it checks before the token -- the Host, and a\nbrowser's Origin -- still applies here.\n\nEvery way of not being entitled to the file gets the same 403: a wrong\nsignature, an expired one, a destination with no secret stored, and a\ndelivery that was not a webhook at all. A caller guessing learns only that\nit did not work.",
        "operationId": "delivery_bundle_api_deliveries__delivery_id__bundle_get",
        "parameters": [
          {
            "in": "path",
            "name": "delivery_id",
            "required": true,
            "schema": {
              "title": "Delivery Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "exp",
            "required": false,
            "schema": {
              "default": "",
              "title": "Exp",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sig",
            "required": false,
            "schema": {
              "default": "",
              "title": "Sig",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delivery Bundle"
      }
    },
    "/api/deliveries/{delivery_id}/deliver": {
      "post": {
        "description": "Release a delivery that was waiting for review. The only promotion.",
        "operationId": "approve_delivery_api_deliveries__delivery_id__deliver_post",
        "parameters": [
          {
            "in": "path",
            "name": "delivery_id",
            "required": true,
            "schema": {
              "title": "Delivery Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Approve Delivery"
      }
    },
    "/api/deliveries/{delivery_id}/retry": {
      "post": {
        "description": "Start the attempt sequence again, after the backoff has given up.",
        "operationId": "retry_delivery_api_deliveries__delivery_id__retry_post",
        "parameters": [
          {
            "in": "path",
            "name": "delivery_id",
            "required": true,
            "schema": {
              "title": "Delivery Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Retry Delivery"
      }
    },
    "/api/deliveries/{delivery_id}/skip": {
      "post": {
        "operationId": "skip_delivery_api_deliveries__delivery_id__skip_post",
        "parameters": [
          {
            "in": "path",
            "name": "delivery_id",
            "required": true,
            "schema": {
              "title": "Delivery Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Skip Delivery"
      }
    },
    "/api/documents/{doc_id}/lifecycle": {
      "get": {
        "description": "Lifecycle events recorded against one paper.",
        "operationId": "document_lifecycle_api_documents__doc_id__lifecycle_get",
        "parameters": [
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "title": "Doc Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Document Lifecycle"
      }
    },
    "/api/documents/{doc_id}/why": {
      "get": {
        "description": "What is locally verifiable about why this paper is in the corpus.",
        "operationId": "document_why_api_documents__doc_id__why_get",
        "parameters": [
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "title": "Doc Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "execution_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Execution Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Document Why"
      }
    },
    "/api/documents/{document_id}/links": {
      "get": {
        "description": "What else in the corpus looks like the same work as this paper.\n\nA link is an assertion laid beside two records, never a merge: both rows stay,\nboth provenances stay, and nothing is hidden. Each link names the ``method``\nthat produced it, because \"these two share a DOI\" and \"these two have\nnear-identical titles and nearby vectors\" are different strengths of claim.",
        "operationId": "document_links_api_documents__document_id__links_get",
        "parameters": [
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "title": "Document Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Document Links"
      }
    },
    "/api/documents/{document_id}/similar": {
      "get": {
        "description": "The papers nearest this one, with distances and their sources.\n\nCosts one index query and nothing at the provider: the document's vector is\nalready stored, so \"more like this\" never calls an embedding model.",
        "operationId": "document_similar_api_documents__document_id__similar_get",
        "parameters": [
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "title": "Document Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "k",
            "required": false,
            "schema": {
              "default": 10,
              "title": "K",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Document Similar"
      }
    },
    "/api/embeddings/backfill": {
      "post": {
        "description": "Embed every document lacking a vector for the active model.\n\nReturns immediately; poll ``GET /api/embeddings/status``. Resumable by\nconstruction — the work remaining is a query, not a stored cursor — so a\ncancelled run restarts where the corpus is, not where the last run thought\nit was.",
        "operationId": "start_embedding_backfill_api_embeddings_backfill_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Start Embedding Backfill"
      }
    },
    "/api/embeddings/backfill/cancel": {
      "post": {
        "description": "Stop after the batch in flight. Vectors already written are kept.",
        "operationId": "cancel_embedding_backfill_api_embeddings_backfill_cancel_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Cancel Embedding Backfill"
      }
    },
    "/api/embeddings/estimate": {
      "get": {
        "description": "What a backfill would cost, before it starts.\n\nBuilt from the real pending set and the real text builder, not from an\naverage: the number a user is shown is computed from the documents that will\nactually be sent.",
        "operationId": "embedding_estimate_api_embeddings_estimate_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Embedding Estimate"
      }
    },
    "/api/embeddings/probe": {
      "post": {
        "description": "Ask the configured (or supplied) lane to embed one short string.\n\nThis is what turns a claim about a provider into a fact about this machine.\n``PROVIDER_EMBEDDING`` says what a vendor serves; only a probe says whether\nthis endpoint, this key and this model answer — and for a local server that\nlists models and still refuses to embed, the probe is the entire difference\nbetween a usable lane and a corpus with nothing to rank (P9).",
        "operationId": "probe_embedding_lane_api_embeddings_probe_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/EmbeddingProbeBody"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Probe Embedding Lane"
      }
    },
    "/api/embeddings/rebuild": {
      "post": {
        "description": "Rebuild the vector index from the canonical table.\n\nExposed because the index is derived and the table is not: a database copied\nfrom a machine that could not load the extension arrives with every vector\nand no index, and this is the one action that fixes it.",
        "operationId": "rebuild_embedding_index_api_embeddings_rebuild_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Rebuild Embedding Index"
      }
    },
    "/api/embeddings/status": {
      "get": {
        "description": "N of M embedded with model X, the run, the index, and the extension.",
        "operationId": "embedding_status_api_embeddings_status_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Embedding Status"
      }
    },
    "/api/evidence/projects": {
      "get": {
        "operationId": "evidence_projects_api_evidence_projects_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Evidence Projects"
      },
      "post": {
        "operationId": "evidence_create_project_api_evidence_projects_post",
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Evidence Create Project"
      }
    },
    "/api/evidence/projects/{project_id}": {
      "get": {
        "operationId": "evidence_project_detail_api_evidence_projects__project_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Evidence Project Detail"
      },
      "patch": {
        "operationId": "evidence_rename_project_api_evidence_projects__project_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Evidence Rename Project"
      }
    },
    "/api/evidence/projects/{project_id}/answer-previews": {
      "post": {
        "operationId": "selected_answer_preview_api_evidence_projects__project_id__answer_previews_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Selected Answer Preview"
      }
    },
    "/api/evidence/projects/{project_id}/answers": {
      "get": {
        "operationId": "selected_answer_history_api_evidence_projects__project_id__answers_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Selected Answer History"
      },
      "post": {
        "operationId": "selected_answer_send_api_evidence_projects__project_id__answers_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Selected Answer Send"
      }
    },
    "/api/evidence/projects/{project_id}/answers/{answer_id}": {
      "get": {
        "operationId": "selected_answer_detail_api_evidence_projects__project_id__answers__answer_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "answer_id",
            "required": true,
            "schema": {
              "title": "Answer Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Selected Answer Detail"
      }
    },
    "/api/evidence/projects/{project_id}/answers/{answer_id}/cancel": {
      "post": {
        "operationId": "selected_answer_cancel_api_evidence_projects__project_id__answers__answer_id__cancel_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "answer_id",
            "required": true,
            "schema": {
              "title": "Answer Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Selected Answer Cancel"
      }
    },
    "/api/evidence/projects/{project_id}/answers/{answer_id}/events": {
      "get": {
        "operationId": "selected_answer_events_api_evidence_projects__project_id__answers__answer_id__events_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "answer_id",
            "required": true,
            "schema": {
              "title": "Answer Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Selected Answer Events"
      }
    },
    "/api/evidence/projects/{project_id}/answers/{answer_id}/export": {
      "get": {
        "operationId": "selected_answer_export_api_evidence_projects__project_id__answers__answer_id__export_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "answer_id",
            "required": true,
            "schema": {
              "title": "Answer Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Selected Answer Export"
      }
    },
    "/api/evidence/projects/{project_id}/bundle": {
      "post": {
        "operationId": "evidence_bundle_api_evidence_projects__project_id__bundle_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Evidence Bundle"
      }
    },
    "/api/evidence/projects/{project_id}/files": {
      "get": {
        "operationId": "evidence_files_api_evidence_projects__project_id__files_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Evidence Files"
      },
      "post": {
        "operationId": "evidence_add_file_api_evidence_projects__project_id__files_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Evidence Add File"
      }
    },
    "/api/evidence/projects/{project_id}/files/{file_id}": {
      "delete": {
        "operationId": "evidence_remove_file_api_evidence_projects__project_id__files__file_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "title": "File Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Evidence Remove File"
      }
    },
    "/api/evidence/projects/{project_id}/notes": {
      "get": {
        "operationId": "evidence_notes_api_evidence_projects__project_id__notes_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Evidence Notes"
      },
      "post": {
        "operationId": "evidence_create_note_api_evidence_projects__project_id__notes_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Evidence Create Note"
      }
    },
    "/api/evidence/projects/{project_id}/notes/{note_id}": {
      "patch": {
        "operationId": "evidence_edit_note_api_evidence_projects__project_id__notes__note_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Evidence Edit Note"
      }
    },
    "/api/evidence/projects/{project_id}/reader/{file_id}": {
      "get": {
        "operationId": "evidence_read_api_evidence_projects__project_id__reader__file_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "title": "File Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Evidence Read"
      }
    },
    "/api/executions": {
      "get": {
        "operationId": "list_executions_api_executions_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Type"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Executions"
      }
    },
    "/api/executions/active": {
      "get": {
        "operationId": "active_executions_api_executions_active_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Active Executions"
      }
    },
    "/api/executions/export": {
      "post": {
        "description": "Bundle the reports and logs for the selected executions into a .zip.\n\nThe output path respects the Storage tab's configured export directory\nwhen set; otherwise a temporary file is used. Raises 404 if no executions\nin the selection exist.",
        "operationId": "export_executions_api_executions_export_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExecutionExport"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Export Executions"
      }
    },
    "/api/executions/{exec_id}": {
      "delete": {
        "operationId": "delete_execution_api_executions__exec_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "exec_id",
            "required": true,
            "schema": {
              "title": "Exec Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Execution"
      },
      "get": {
        "operationId": "get_execution_api_executions__exec_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "exec_id",
            "required": true,
            "schema": {
              "title": "Exec Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "expected_runtime_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Expected Runtime Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Execution"
      }
    },
    "/api/executions/{exec_id}/cancel": {
      "post": {
        "description": "Request cooperative cancellation of a running execution.\n\nA row that is not in the in-memory ``ProgressStore`` is not cancellable,\nand this used to say only \"Execution not running\" -- which read, on an\ninterrupted row, as if resmon had lost track of something. The row's own\nstate belongs in the sentence.\n\n``detail`` stays a **string**. FastAPI will serialise a dict there happily,\nand a renderer that renders ``detail`` directly -- which several of\nresmon's do -- would then show ``[object Object]``. Anything that needs the\nstate structurally reads ``status`` off the row it already has.",
        "operationId": "cancel_execution_api_executions__exec_id__cancel_post",
        "parameters": [
          {
            "in": "path",
            "name": "exec_id",
            "required": true,
            "schema": {
              "title": "Exec Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Cancel Execution"
      }
    },
    "/api/executions/{exec_id}/deliveries": {
      "get": {
        "operationId": "list_execution_deliveries_api_executions__exec_id__deliveries_get",
        "parameters": [
          {
            "in": "path",
            "name": "exec_id",
            "required": true,
            "schema": {
              "title": "Exec Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Execution Deliveries"
      }
    },
    "/api/executions/{exec_id}/documents": {
      "get": {
        "description": "One page of the papers this run found, each with its stored id.\n\nResults & Logs listed runs and rendered a Markdown report; the papers\ninside a run were reachable only by reading that text or by exporting the\nwhole file. Neither gives a user something to click, and an execution id is\nnot a paper id -- so the Papers tab needed a route that hands back the\ncorpus-local document ids the rest of the app is keyed on (the same ids\n``include_ids`` carries into a JSON export, phase 2.1a).\n\nPaged rather than whole: a sweep can return thousands, and a renderer that\nholds all of them is a renderer that stops responding on the run that\nmatters most. ``queue_status`` rides along so the Save control can show the\nstate the database actually holds instead of guessing from what the user\nlast clicked.",
        "operationId": "get_execution_papers_api_executions__exec_id__documents_get",
        "parameters": [
          {
            "in": "path",
            "name": "exec_id",
            "required": true,
            "schema": {
              "title": "Exec Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "only_new",
            "required": false,
            "schema": {
              "default": false,
              "title": "Only New",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Execution Papers"
      }
    },
    "/api/executions/{exec_id}/log": {
      "get": {
        "operationId": "get_execution_log_api_executions__exec_id__log_get",
        "parameters": [
          {
            "in": "path",
            "name": "exec_id",
            "required": true,
            "schema": {
              "title": "Exec Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Execution Log"
      }
    },
    "/api/executions/{exec_id}/progress/events": {
      "get": {
        "operationId": "get_execution_progress_events_api_executions__exec_id__progress_events_get",
        "parameters": [
          {
            "in": "path",
            "name": "exec_id",
            "required": true,
            "schema": {
              "title": "Exec Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Execution Progress Events"
      }
    },
    "/api/executions/{exec_id}/progress/stream": {
      "get": {
        "operationId": "stream_progress_api_executions__exec_id__progress_stream_get",
        "parameters": [
          {
            "in": "path",
            "name": "exec_id",
            "required": true,
            "schema": {
              "title": "Exec Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "last_event_id",
            "required": false,
            "schema": {
              "default": 0,
              "title": "Last Event Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Stream Progress"
      }
    },
    "/api/executions/{exec_id}/references": {
      "get": {
        "description": "Export one run; JSON can explicitly include corpus IDs for follow-up reads.",
        "operationId": "export_execution_references_api_executions__exec_id__references_get",
        "parameters": [
          {
            "in": "path",
            "name": "exec_id",
            "required": true,
            "schema": {
              "title": "Exec Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "format",
            "required": false,
            "schema": {
              "default": "bibtex",
              "title": "Format",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "only_new",
            "required": false,
            "schema": {
              "default": false,
              "title": "Only New",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "include_ids",
            "required": false,
            "schema": {
              "default": false,
              "title": "Include Ids",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Export Execution References"
      }
    },
    "/api/executions/{exec_id}/report": {
      "get": {
        "operationId": "get_execution_report_api_executions__exec_id__report_get",
        "parameters": [
          {
            "in": "path",
            "name": "exec_id",
            "required": true,
            "schema": {
              "title": "Exec Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Execution Report"
      }
    },
    "/api/executions/{exec_id}/restart": {
      "post": {
        "description": "Start a fresh execution with the source's parameters, linked back to it.\n\nRestart is not resume. ``progress_events`` is persisted once, at the end,\nso an interrupted run has nothing to resume *from* -- there is no durable\nrecord of which sources it had already asked. What resmon can honestly\noffer is the same search again, and a link saying where it came from.\n\nThe source row is never touched. Its history is what happened, and a\nrestart is a second thing that happened, not a correction of the first.",
        "operationId": "restart_execution_api_executions__exec_id__restart_post",
        "parameters": [
          {
            "in": "path",
            "name": "exec_id",
            "required": true,
            "schema": {
              "title": "Exec Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/RestartRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Restart Execution"
      }
    },
    "/api/executions/{exec_id}/search-record": {
      "get": {
        "description": "The complete, dated account of one search.\n\n``?format=markdown`` returns a methods-section-shaped document as\n``text/markdown`` rather than JSON.",
        "operationId": "execution_search_record_api_executions__exec_id__search_record_get",
        "parameters": [
          {
            "in": "path",
            "name": "exec_id",
            "required": true,
            "schema": {
              "title": "Exec Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "format",
            "required": false,
            "schema": {
              "default": "json",
              "title": "Format",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Execution Search Record"
      }
    },
    "/api/explorer/export": {
      "post": {
        "description": "Export everything matching the current filters, not just the page shown.\n\nReuses the same renderers as the per-execution export; only the way the\ndocuments are selected differs.",
        "operationId": "explorer_export_api_explorer_export_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExplorerExportBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Explorer Export"
      }
    },
    "/api/explorer/facets": {
      "post": {
        "description": "Available filter values and their counts, for the current filters.",
        "operationId": "explorer_facets_api_explorer_facets_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExplorerFilters"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Explorer Facets"
      }
    },
    "/api/explorer/search": {
      "post": {
        "description": "Search the whole corpus. POST because the filter set is a structure.\n\n``sort=\"similarity\"`` embeds the search phrase and re-orders the same\nfiltered set by distance from it. The filters still decide *which* papers;\nthe sort decides only their order, so switching sorts cannot change what a\nuser is looking at.",
        "operationId": "explorer_search_api_explorer_search_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExplorerSearchBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Explorer Search"
      }
    },
    "/api/export/references": {
      "post": {
        "description": "Render one selection, with one entry per stored document ID.\n\nExecution selections are unioned before rendering. Publication date then ID\ndescending fixes order independently of selection order, so BibTeX keys are\nallocated once for the complete file. This never merges corpus records.",
        "operationId": "export_selected_references_api_export_references_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReferenceExportBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Export Selected References"
      }
    },
    "/api/health": {
      "get": {
        "description": "Liveness endpoint. Returns process identity so clients can attach-or-spawn.\n\n``embeddings`` reports whether *this* backend can load the vector extension,\nand why not when it cannot. It is here rather than on a route of its own\nbecause the renderer already reads health on startup to decide what to show,\nand phase 1.9's rule is that a feature whose dependency is missing is\n**absent** rather than present-and-broken: the Explorer's similarity sort and\nthe similar-papers panel are not rendered when this says ``null``. A user is\ntold the reason in Settings, not by a control that does nothing.\n\nThe load is attempted against a real connection on every call rather than\nread from a cached probe. It is a ``dlopen`` of a 165 KB library, and a\nhealth endpoint that answered from memory would keep reporting a capability\nthe process had lost.",
        "operationId": "health_api_health_get",
        "parameters": [
          {
            "in": "query",
            "name": "expected_runtime_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Expected Runtime Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Health"
      }
    },
    "/api/library": {
      "get": {
        "operationId": "library_status_api_library_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Library Status"
      }
    },
    "/api/library/export": {
      "get": {
        "operationId": "library_inventory_api_library_export_get",
        "parameters": [
          {
            "in": "query",
            "name": "expected_vault_id",
            "required": true,
            "schema": {
              "title": "Expected Vault Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "required": false,
            "schema": {
              "default": "json",
              "title": "Format",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Library Inventory"
      }
    },
    "/api/library/files": {
      "get": {
        "operationId": "library_list_api_library_files_get",
        "parameters": [
          {
            "in": "query",
            "name": "expected_vault_id",
            "required": true,
            "schema": {
              "title": "Expected Vault Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "default": "",
              "title": "Q",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "through_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Through Id"
            }
          },
          {
            "in": "query",
            "name": "before_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Before Id"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Library List"
      },
      "post": {
        "operationId": "library_import_api_library_files_post",
        "parameters": [
          {
            "in": "query",
            "name": "expected_vault_id",
            "required": true,
            "schema": {
              "title": "Expected Vault Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "filename",
            "required": true,
            "schema": {
              "title": "Filename",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "document_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Document Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Library Import"
      }
    },
    "/api/library/files/{file_id}": {
      "get": {
        "operationId": "library_detail_api_library_files__file_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "title": "File Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "expected_vault_id",
            "required": true,
            "schema": {
              "title": "Expected Vault Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Library Detail"
      }
    },
    "/api/library/files/{file_id}/open": {
      "post": {
        "operationId": "library_open_api_library_files__file_id__open_post",
        "parameters": [
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "title": "File Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LibraryOpenBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Library Open"
      }
    },
    "/api/library/files/{file_id}/paper-links": {
      "post": {
        "operationId": "library_link_api_library_files__file_id__paper_links_post",
        "parameters": [
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "title": "File Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LibraryLinkBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Library Link"
      }
    },
    "/api/library/files/{file_id}/text": {
      "get": {
        "operationId": "library_read_text_api_library_files__file_id__text_get",
        "parameters": [
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "title": "File Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "expected_vault_id",
            "required": true,
            "schema": {
              "title": "Expected Vault Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "expected_version_id",
            "required": true,
            "schema": {
              "title": "Expected Version Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Library Read Text"
      }
    },
    "/api/library/vault": {
      "post": {
        "operationId": "library_create_vault_api_library_vault_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LibraryVaultBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Library Create Vault"
      }
    },
    "/api/lifecycle": {
      "get": {
        "description": "Recorded lifecycle events, and how much of the corpus they cover.",
        "operationId": "lifecycle_report_api_lifecycle_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Lifecycle Report"
      }
    },
    "/api/lifecycle/check": {
      "post": {
        "description": "Start a bounded lifecycle check over the least recently checked papers.\n\nReturns immediately. Poll ``GET /api/lifecycle`` for progress and results.",
        "operationId": "lifecycle_check_api_lifecycle_check_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LifecycleCheckRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Lifecycle Check"
      }
    },
    "/api/lifecycle/for-documents": {
      "post": {
        "description": "Lifecycle events for a page of results, in one round trip.\n\nThe Explorer renders fifty papers at a time and needs to badge each one.\nAsking per row would be fifty requests to paint one screen; this is one.\nIds with no events are simply absent from the map.",
        "operationId": "lifecycle_for_documents_api_lifecycle_for_documents_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LifecycleForDocumentsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Lifecycle For Documents"
      }
    },
    "/api/lifecycle/stop": {
      "post": {
        "description": "Ask a running check to stop after its current slice.\n\nCooperative rather than abrupt: the papers already checked keep their\nresults, and the rest stay unchecked rather than being recorded as clean.",
        "operationId": "lifecycle_stop_api_lifecycle_stop_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Lifecycle Stop"
      }
    },
    "/api/links/collapse-preview": {
      "post": {
        "description": "Which of these ids a collapse *would* fold, without folding anything.\n\nThe interface asks for this only when the reader has switched collapse on.\nIt returns a grouping; the rows themselves are untouched and the totals a\npage reports are computed without it.",
        "operationId": "links_collapse_preview_api_links_collapse_preview_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentIdsBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Links Collapse Preview"
      }
    },
    "/api/links/for-documents": {
      "post": {
        "description": "Links for a page of results in one round trip.\n\nThe same shape as ``/api/lifecycle/for-documents`` and for the same reason:\nthe Explorer renders fifty rows, and fifty requests to badge them is the\nthing that endpoint exists to avoid.",
        "operationId": "links_for_documents_api_links_for_documents_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentIdsBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Links For Documents"
      }
    },
    "/api/links/scan": {
      "post": {
        "description": "Find near-duplicates across the corpus. Returns immediately.\n\nRefused before it starts when there is nothing to compare, rather than\nrunning and reporting zero — \"no near-duplicates\" and \"nothing is embedded\"\nare different answers and only one of them is about the corpus.",
        "operationId": "links_scan_api_links_scan_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Links Scan"
      }
    },
    "/api/links/scan/cancel": {
      "post": {
        "description": "Stop after the document in flight. Links already written are kept.",
        "operationId": "links_scan_cancel_api_links_scan_cancel_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Links Scan Cancel"
      }
    },
    "/api/links/status": {
      "get": {
        "description": "How many links are stored, by method, and the scan's state.",
        "operationId": "links_status_api_links_status_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Links Status"
      }
    },
    "/api/onboarding": {
      "get": {
        "description": "What the first-run card renders, as facts rather than as prose.",
        "operationId": "onboarding_state_api_onboarding_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Onboarding State"
      }
    },
    "/api/onboarding/dismiss": {
      "post": {
        "description": "Put the card away for good.\n\nDeliberately not a settings *group*: a group is something the assistant's\n``update_settings`` reaches, and the assistant putting away the user's own\ngetting-started card is not a write anyone would ask for.",
        "operationId": "dismiss_onboarding_api_onboarding_dismiss_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Dismiss Onboarding"
      }
    },
    "/api/profiles": {
      "get": {
        "operationId": "list_watch_profiles_api_profiles_get",
        "parameters": [
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kind"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Watch Profiles"
      },
      "post": {
        "operationId": "create_watch_profile_api_profiles_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WatchProfileBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Watch Profile"
      }
    },
    "/api/profiles/import": {
      "post": {
        "description": "Import one or more exported profiles.\n\nReports per profile rather than failing the batch: a file with one bad\nentry should import the rest and say which one it could not read, because\nthe alternative is a user editing JSON to find out which line resmon\nobjected to.",
        "operationId": "import_watch_profiles_api_profiles_import_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileImportBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Import Watch Profiles"
      }
    },
    "/api/profiles/matches/for-documents": {
      "post": {
        "description": "Which watch profiles matched a page of papers, and on what basis.\n\nThe Explorer and the Results list render fifty papers at a time and each\none may carry a basis badge. Asking per row would be fifty requests to\npaint one screen; this is one — the same shape and the same reason as\n``/api/lifecycle/for-documents``.\n\nDeclared **above** ``/api/profiles/{profile_id}`` deliberately. FastAPI\nmatches in declaration order, and a path parameter declared first swallows\na literal segment after it: ``/api/profiles/starter`` was written below\n``/api/profiles/{profile_id}`` once and three tests failed on it.",
        "operationId": "profile_matches_for_documents_api_profiles_matches_for_documents_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileMatchesForDocumentsBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Profile Matches For Documents"
      }
    },
    "/api/profiles/starter": {
      "get": {
        "description": "The curated set that ships with the app, not yet anybody's profile.\n\nServed rather than bundled into the renderer so the files stay the one\nsource: the picker shows what is on disk, and a user who edits or removes\none sees that.",
        "operationId": "list_starter_profiles_api_profiles_starter_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "List Starter Profiles"
      }
    },
    "/api/profiles/{profile_id}": {
      "delete": {
        "description": "Remove a profile and its matches. **The corpus is untouched.**\n\nA routine pointing at this profile is *named* rather than silently orphaned.\nThere is no foreign key from a routine to a profile — a routine's\nconfiguration is a JSON blob — so the deletion cannot cascade, and the next\nfire of such a routine fails with a sentence saying the profile is gone.\nSaying which routines those are here is the difference between that being a\nsurprise and being a consequence.",
        "operationId": "delete_watch_profile_api_profiles__profile_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "profile_id",
            "required": true,
            "schema": {
              "title": "Profile Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Watch Profile"
      },
      "get": {
        "operationId": "get_watch_profile_api_profiles__profile_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "profile_id",
            "required": true,
            "schema": {
              "title": "Profile Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Watch Profile"
      },
      "put": {
        "operationId": "update_watch_profile_api_profiles__profile_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "profile_id",
            "required": true,
            "schema": {
              "title": "Profile Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WatchProfileBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Watch Profile"
      }
    },
    "/api/profiles/{profile_id}/export": {
      "get": {
        "operationId": "export_watch_profile_api_profiles__profile_id__export_get",
        "parameters": [
          {
            "in": "path",
            "name": "profile_id",
            "required": true,
            "schema": {
              "title": "Profile Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Export Watch Profile"
      }
    },
    "/api/profiles/{profile_id}/lifecycle": {
      "get": {
        "description": "Retractions and other lifecycle findings on this profile's papers.\n\nA **join** over findings resmon already holds, never a new claim: the rule\nthat resmon never asserts a lifecycle event on its own authority is at its\nmost load-bearing here, because a false retraction attached to a named\nperson is defamatory. Every finding carries its notice link and every match\ncarries its basis, so a finding on a `name_only` match is visibly a finding\non a paper that merely has this name on it.",
        "operationId": "get_watch_profile_lifecycle_api_profiles__profile_id__lifecycle_get",
        "parameters": [
          {
            "in": "path",
            "name": "profile_id",
            "required": true,
            "schema": {
              "title": "Profile Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Watch Profile Lifecycle"
      }
    },
    "/api/profiles/{profile_id}/matches": {
      "get": {
        "description": "Papers matched to this profile, **each with the basis it was matched on**.\n\nThe basis rides on every row and is never omitted: a list of papers with no\nbasis is exactly the claim resmon refuses to make.",
        "operationId": "get_watch_profile_matches_api_profiles__profile_id__matches_get",
        "parameters": [
          {
            "in": "path",
            "name": "profile_id",
            "required": true,
            "schema": {
              "title": "Profile Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Watch Profile Matches"
      }
    },
    "/api/reading-queue": {
      "get": {
        "description": "One page of saved papers. ``status`` omitted (or ``all``) means both.",
        "operationId": "list_reading_queue_api_reading_queue_get",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Reading Queue"
      },
      "post": {
        "description": "Save a stored paper. Saving one already saved returns it unchanged.\n\n201 either way: the request's outcome -- this paper is in the queue -- is\nthe same, and the body carries the entry, so a second click cannot be\nmistaken for a state change. ``saved_at`` in that body is the original save\ntime, which is how a caller can tell the two apart if it needs to.",
        "operationId": "save_to_reading_queue_api_reading_queue_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReadingQueueSaveBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Save To Reading Queue"
      }
    },
    "/api/reading-queue/{document_id}": {
      "delete": {
        "description": "Take a paper out of the queue. The paper itself is not touched.\n\n404 when there was nothing to remove, because \"it is gone\" and \"it was\nnever there\" are different answers and the second one usually means the\ninterface is looking at a list somebody else already changed.",
        "operationId": "remove_from_reading_queue_api_reading_queue__document_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "title": "Document Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Remove From Reading Queue"
      },
      "put": {
        "description": "Mark a saved paper read or unread.",
        "operationId": "set_reading_queue_status_api_reading_queue__document_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "title": "Document Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReadingQueueStatusBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Set Reading Queue Status"
      }
    },
    "/api/renderer/heartbeat": {
      "post": {
        "description": "Renderer-presence ping.\n\nThe Electron renderer posts here every few seconds while it is\nrunning. The backend uses the most recent ping to decide whether\nto suppress its own desktop-notification dispatch (which would\notherwise duplicate the in-renderer ``new Notification(...)`` and,\non macOS, surface under ``Script Editor`` because it's invoked via\n``osascript``). When the heartbeat is stale (renderer closed), the\nbackend resumes dispatching so the headless-daemon path still\nworks.",
        "operationId": "renderer_heartbeat_api_renderer_heartbeat_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Renderer Heartbeat"
      }
    },
    "/api/repositories/catalog": {
      "get": {
        "description": "Return the static repository catalog (never returns secrets).",
        "operationId": "repositories_catalog_api_repositories_catalog_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Repositories Catalog"
      }
    },
    "/api/restore": {
      "post": {
        "description": "Verify a bundle and stage it. The restore itself happens on the next start.",
        "operationId": "restore_stage_api_restore_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Restore Stage"
      }
    },
    "/api/restore/acknowledge": {
      "post": {
        "description": "Dismiss the one-time \"what a restore did not bring back\" card.",
        "operationId": "restore_acknowledge_api_restore_acknowledge_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Restore Acknowledge"
      }
    },
    "/api/restore/cancel": {
      "post": {
        "description": "Forget a staged restore. Nothing had been moved yet, so nothing is undone.",
        "operationId": "restore_cancel_api_restore_cancel_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Restore Cancel"
      }
    },
    "/api/restore/undo-copy/delete": {
      "post": {
        "description": "Delete the database copies a restore set aside. Irreversible, so confirm-gated.",
        "operationId": "restore_delete_undo_api_restore_undo_copy_delete_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminConfirmBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Restore Delete Undo"
      }
    },
    "/api/routines": {
      "get": {
        "operationId": "list_routines_api_routines_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "List Routines"
      },
      "post": {
        "operationId": "create_routine_api_routines_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoutineCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Routine"
      }
    },
    "/api/routines/{routine_id}": {
      "delete": {
        "operationId": "delete_routine_endpoint_api_routines__routine_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "routine_id",
            "required": true,
            "schema": {
              "title": "Routine Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Routine Endpoint"
      },
      "get": {
        "description": "Fetch a single routine by ID.\n\nThe renderer's notification path needs the per-routine\n``notify_on_complete`` flag to decide whether to fire a desktop\nnotification under ``notify_automatic_mode == 'selected'``. Without\nthis endpoint the renderer's fetch silently 404s and the per-routine\nopt-in is treated as ``false``, which suppresses notifications even\nwhen the user enabled the per-row toggle.",
        "operationId": "get_routine_api_routines__routine_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "routine_id",
            "required": true,
            "schema": {
              "title": "Routine Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Routine"
      },
      "put": {
        "operationId": "update_routine_endpoint_api_routines__routine_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "routine_id",
            "required": true,
            "schema": {
              "title": "Routine Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoutineUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Routine Endpoint"
      }
    },
    "/api/routines/{routine_id}/activate": {
      "post": {
        "operationId": "activate_routine_api_routines__routine_id__activate_post",
        "parameters": [
          {
            "in": "path",
            "name": "routine_id",
            "required": true,
            "schema": {
              "title": "Routine Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Activate Routine"
      }
    },
    "/api/routines/{routine_id}/coverage": {
      "get": {
        "description": "Is this routine finding what its owner meant, and what is it missing?\n\nTwo lists, both scoped to the corpus resmon already holds — which is the one\nclaim this endpoint is entitled to make, and it returns the sentence saying\nso rather than leaving the interface to remember it.",
        "operationId": "routine_coverage_api_routines__routine_id__coverage_get",
        "parameters": [
          {
            "in": "path",
            "name": "routine_id",
            "required": true,
            "schema": {
              "title": "Routine Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Routine Coverage"
      }
    },
    "/api/routines/{routine_id}/deactivate": {
      "post": {
        "operationId": "deactivate_routine_api_routines__routine_id__deactivate_post",
        "parameters": [
          {
            "in": "path",
            "name": "routine_id",
            "required": true,
            "schema": {
              "title": "Routine Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Deactivate Routine"
      }
    },
    "/api/routines/{routine_id}/deliveries": {
      "get": {
        "operationId": "list_routine_deliveries_api_routines__routine_id__deliveries_get",
        "parameters": [
          {
            "in": "path",
            "name": "routine_id",
            "required": true,
            "schema": {
              "title": "Routine Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Routine Deliveries"
      }
    },
    "/api/routines/{routine_id}/delivery-targets": {
      "get": {
        "operationId": "list_routine_delivery_targets_api_routines__routine_id__delivery_targets_get",
        "parameters": [
          {
            "in": "path",
            "name": "routine_id",
            "required": true,
            "schema": {
              "title": "Routine Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Routine Delivery Targets"
      },
      "post": {
        "operationId": "add_routine_delivery_target_api_routines__routine_id__delivery_targets_post",
        "parameters": [
          {
            "in": "path",
            "name": "routine_id",
            "required": true,
            "schema": {
              "title": "Routine Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeliveryTargetCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add Routine Delivery Target"
      }
    },
    "/api/routines/{routine_id}/delivery-targets/{target_id}": {
      "delete": {
        "operationId": "delete_routine_delivery_target_api_routines__routine_id__delivery_targets__target_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "routine_id",
            "required": true,
            "schema": {
              "title": "Routine Id",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "target_id",
            "required": true,
            "schema": {
              "title": "Target Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Routine Delivery Target"
      },
      "put": {
        "operationId": "update_routine_delivery_target_api_routines__routine_id__delivery_targets__target_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "routine_id",
            "required": true,
            "schema": {
              "title": "Routine Id",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "target_id",
            "required": true,
            "schema": {
              "title": "Target Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeliveryTargetUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Routine Delivery Target"
      }
    },
    "/api/routines/{routine_id}/run": {
      "post": {
        "description": "Run a routine immediately, outside its schedule.\n\nWriting the MCP contract found that resmon had no way to do this at all:\nroutines could be activated or deactivated, and running one now meant\nrebuilding its configuration by hand as a sweep. That is a gap in the\napplication rather than only in the tool surface -- \"run my arXiv routine\nnow\" is something a person should be able to do from the interface too.\n\nDeliberately a thin wrapper over ``_dispatch_routine_fire``, the same\nfunction the scheduler calls, so a manual run and a scheduled fire take one\ncode path and cannot drift apart. Everything that makes a scheduled fire\ncorrect -- admission control, the routine_id stamp, progress registration,\nthe last_executed_at update -- applies here for free because it is\nliterally the same code.\n\nAn **inactive** routine does run, and the response says so. ``is_active``\ngoverns whether the scheduler fires a routine on its own; it is not a\nstatement that the routine may never run. Refusing here would mean a user\nhas to activate a routine, run it, and deactivate it again to get one\nresult.",
        "operationId": "run_routine_now_api_routines__routine_id__run_post",
        "parameters": [
          {
            "in": "path",
            "name": "routine_id",
            "required": true,
            "schema": {
              "title": "Routine Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Run Routine Now"
      }
    },
    "/api/scheduler/jobs": {
      "get": {
        "operationId": "get_scheduler_jobs_api_scheduler_jobs_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get Scheduler Jobs"
      }
    },
    "/api/search/dive": {
      "post": {
        "operationId": "search_dive_api_search_dive_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Search Dive"
      }
    },
    "/api/search/repositories": {
      "get": {
        "operationId": "search_repositories_api_search_repositories_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Search Repositories"
      }
    },
    "/api/search/sweep": {
      "post": {
        "operationId": "search_sweep_api_search_sweep_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SweepRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Search Sweep"
      }
    },
    "/api/service/daemon-status": {
      "get": {
        "description": "Return ground-truth daemon status read from ``daemon.lock``.\n\nUpdate 4 / Fix E. Unlike ``/api/health`` (which always describes the\n*current* backend), this endpoint reads the on-disk daemon lock file\nand probes the daemon's actual port. The Advanced tab uses it so that\na renderer-spawned fallback backend cannot masquerade as the daemon.\n\nResponse shape::\n\n    {\n      \"lock_present\": bool,\n      \"running\": bool,                # true iff lock present AND health probe succeeds\n      \"pid\": int | None,              # from the live health probe\n      \"port\": int | None,\n      \"version\": str | None,\n      \"started_at\": str | None,\n      \"lock_pid\": int | None,         # raw lock-file payload (for diagnostics)\n      \"lock_port\": int | None,\n      \"lock_version\": str | None,\n      \"error\": str | None,            # populated when lock_present but probe failed\n    }",
        "operationId": "service_daemon_status_api_service_daemon_status_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Service Daemon Status"
      }
    },
    "/api/service/install": {
      "post": {
        "description": "Render the platform unit template and write it to the install path.\n\n``register=True`` additionally asks the OS service manager to enable the\nunit at login (launchctl / systemctl / schtasks).",
        "operationId": "service_install_api_service_install_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceInstallBody",
                "default": {
                  "register": false
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Service Install"
      }
    },
    "/api/service/status": {
      "get": {
        "description": "Return whether the daemon unit file is installed and its path.",
        "operationId": "service_status_api_service_status_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Service Status"
      }
    },
    "/api/service/uninstall": {
      "post": {
        "description": "Remove the unit file; optionally deregister with the OS first.",
        "operationId": "service_uninstall_api_service_uninstall_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceInstallBody",
                "default": {
                  "register": false
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Service Uninstall"
      }
    },
    "/api/settings/ai": {
      "get": {
        "operationId": "get_ai_settings_api_settings_ai_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get Ai Settings"
      },
      "put": {
        "operationId": "update_ai_settings_api_settings_ai_put",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingsBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Ai Settings"
      }
    },
    "/api/settings/ai/cli-status": {
      "get": {
        "description": "Report whether each subscription-lane CLI can be found, and where.\n\nDetection only — this never runs the binary, so it cannot say whether\nanyone is logged in. That distinction is deliberate and is carried in the\nresponse: a CLI that is present but logged out fails on first use with\n``CLI_AUTH``, and claiming \"ready\" here would be a promise this endpoint\nhas not checked.\n\n``tried`` is returned because \"not found\" on its own is unhelpful. A\npackaged app launched from the Finder searches a far smaller PATH than a\nterminal does, so showing the candidate paths is what lets someone see that\nresmon looked in the wrong place rather than that their CLI is broken.",
        "operationId": "get_ai_cli_status_api_settings_ai_cli_status_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get Ai Cli Status"
      }
    },
    "/api/settings/assistant": {
      "get": {
        "operationId": "get_assistant_settings_api_settings_assistant_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get Assistant Settings"
      },
      "put": {
        "operationId": "update_assistant_settings_api_settings_assistant_put",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingsBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Assistant Settings"
      }
    },
    "/api/settings/cloud": {
      "get": {
        "operationId": "get_cloud_settings_api_settings_cloud_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get Cloud Settings"
      },
      "put": {
        "operationId": "update_cloud_settings_api_settings_cloud_put",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingsBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Cloud Settings"
      }
    },
    "/api/settings/email": {
      "get": {
        "operationId": "get_email_settings_api_settings_email_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get Email Settings"
      },
      "put": {
        "operationId": "update_email_settings_api_settings_email_put",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingsBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Email Settings"
      }
    },
    "/api/settings/email/test": {
      "post": {
        "description": "Send a test email using the currently-stored SMTP settings.\n\nLoads the SMTP config via the same helper used for routine\ncompletion emails (settings table + keychain for the password) and\ninvokes :func:`email_notifier.send_test_email`. Returns HTTP 400\nwith a human-readable reason when configuration is incomplete or\nthe SMTP handshake fails.",
        "operationId": "send_test_email_endpoint_api_settings_email_test_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Send Test Email Endpoint"
      }
    },
    "/api/settings/embeddings": {
      "get": {
        "description": "The stored settings, plus everything the tab needs to render honestly.\n\n``providers`` carries a *can embed* answer for every provider resmon lists,\nincluding the ones that cannot, so the interface states the limitation rather\nthan quietly omitting the option. The evidence string travels with it: a user\nreading \"Anthropic does not offer an embeddings API\" can see what that rests\non.",
        "operationId": "get_embedding_settings_api_settings_embeddings_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get Embedding Settings"
      },
      "put": {
        "description": "Store the settings, refusing a provider that cannot embed.\n\nThe refusal is **here**, at configuration, and not at backfill: P8. A user\nwho picks Anthropic learns it when they pick it, with the reason, rather than\nafter waiting for a run that was never going to produce anything.",
        "operationId": "update_embedding_settings_api_settings_embeddings_put",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingsBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Embedding Settings"
      }
    },
    "/api/settings/execution": {
      "get": {
        "operationId": "get_execution_settings_api_settings_execution_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get Execution Settings"
      },
      "put": {
        "operationId": "update_execution_settings_api_settings_execution_put",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExecutionSettingsBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Execution Settings"
      }
    },
    "/api/settings/notifications": {
      "get": {
        "operationId": "get_notification_settings_api_settings_notifications_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get Notification Settings"
      },
      "put": {
        "operationId": "update_notification_settings_api_settings_notifications_put",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingsBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Notification Settings"
      }
    },
    "/api/settings/storage": {
      "get": {
        "operationId": "get_storage_settings_api_settings_storage_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get Storage Settings"
      },
      "put": {
        "operationId": "update_storage_settings_api_settings_storage_put",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingsBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Storage Settings"
      }
    },
    "/api/watchdog": {
      "get": {
        "description": "Findings, what could not be judged yet, and the thresholds used.",
        "operationId": "watchdog_report_api_watchdog_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Watchdog Report"
      }
    },
    "/api/watchdog/mute": {
      "post": {
        "description": "Acknowledge one finding so it stops counting toward the alarm total.\n\nMuting is per finding, never per source or per routine: the mute is dropped\nautomatically once the condition clears, so the same source failing again\nlater is reported again.",
        "operationId": "watchdog_mute_api_watchdog_mute_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WatchdogMuteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Watchdog Mute"
      }
    },
    "/api/watchdog/unmute": {
      "post": {
        "description": "Un-acknowledge a finding, returning it to the alarm total.",
        "operationId": "watchdog_unmute_api_watchdog_unmute_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WatchdogMuteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Watchdog Unmute"
      }
    }
  }
}
