{
  "components": {
    "schemas": {
      "ApiVersion": {
        "additionalProperties": false,
        "properties": {
          "application_contract": {
            "const": "ancestryllm.application/0.3",
            "default": "ancestryllm.application/0.3",
            "title": "Application Contract",
            "type": "string"
          },
          "contract": {
            "const": "ancestryllm.internal-api/1",
            "default": "ancestryllm.internal-api/1",
            "title": "Contract",
            "type": "string"
          },
          "namespace": {
            "const": "/api/v1",
            "default": "/api/v1",
            "title": "Namespace",
            "type": "string"
          }
        },
        "title": "ApiVersion",
        "type": "object"
      },
      "CapabilityAction": {
        "additionalProperties": false,
        "properties": {
          "dispatch_key": {
            "maxLength": 193,
            "minLength": 3,
            "pattern": "^[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+$",
            "title": "Dispatch Key",
            "type": "string"
          },
          "name": {
            "maxLength": 96,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._:-]+$",
            "title": "Name",
            "type": "string"
          },
          "summary": {
            "maxLength": 512,
            "minLength": 1,
            "title": "Summary",
            "type": "string"
          }
        },
        "required": [
          "dispatch_key",
          "name",
          "summary"
        ],
        "title": "CapabilityAction",
        "type": "object"
      },
      "CapabilityManifest": {
        "additionalProperties": false,
        "properties": {
          "api": {
            "$ref": "#/components/schemas/ApiVersion"
          },
          "modules": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/CapabilityModule"
            },
            "maxItems": 128,
            "title": "Modules",
            "type": "array"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPolicy"
          },
          "request_policy": {
            "$ref": "#/components/schemas/RequestSizePolicy"
          }
        },
        "title": "CapabilityManifest",
        "type": "object"
      },
      "CapabilityModule": {
        "additionalProperties": false,
        "properties": {
          "actions": {
            "items": {
              "$ref": "#/components/schemas/CapabilityAction"
            },
            "maxItems": 128,
            "minItems": 1,
            "title": "Actions",
            "type": "array"
          },
          "module_id": {
            "maxLength": 96,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._:-]+$",
            "title": "Module Id",
            "type": "string"
          },
          "name": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "summary": {
            "maxLength": 512,
            "minLength": 1,
            "title": "Summary",
            "type": "string"
          }
        },
        "required": [
          "module_id",
          "name",
          "summary",
          "actions"
        ],
        "title": "CapabilityModule",
        "type": "object"
      },
      "ErrorEnvelope": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "maxLength": 96,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._:-]+$",
            "title": "Code",
            "type": "string"
          },
          "correlation_ref": {
            "pattern": "^api_[0-9a-f]{32}$",
            "title": "Correlation Ref",
            "type": "string"
          },
          "details": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/FailureDetail"
            },
            "maxItems": 16,
            "title": "Details",
            "type": "array"
          },
          "message": {
            "maxLength": 512,
            "minLength": 1,
            "title": "Message",
            "type": "string"
          },
          "remediation": {
            "anyOf": [
              {
                "maxLength": 512,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remediation"
          }
        },
        "required": [
          "code",
          "message",
          "correlation_ref"
        ],
        "title": "ErrorEnvelope",
        "type": "object"
      },
      "FailureDetail": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "maxLength": 96,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._:-]+$",
            "title": "Name",
            "type": "string"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "title": "FailureDetail",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "HealthResponse": {
        "additionalProperties": false,
        "properties": {
          "api": {
            "$ref": "#/components/schemas/ApiVersion"
          },
          "app_build": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._:+-]+$",
            "title": "App Build",
            "type": "string"
          },
          "readiness_proof": {
            "pattern": "^[0-9a-f]{64}$",
            "title": "Readiness Proof",
            "type": "string"
          },
          "sidecar_build": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._:+-]+$",
            "title": "Sidecar Build",
            "type": "string"
          },
          "status": {
            "const": "ready",
            "default": "ready",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "app_build",
          "sidecar_build",
          "readiness_proof"
        ],
        "title": "HealthResponse",
        "type": "object"
      },
      "PageMetadata": {
        "additionalProperties": false,
        "properties": {
          "count": {
            "default": 0,
            "maximum": 100,
            "minimum": 0,
            "title": "Count",
            "type": "integer"
          },
          "next_cursor": {
            "anyOf": [
              {
                "maxLength": 256,
                "minLength": 32,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Next Cursor"
          }
        },
        "title": "PageMetadata",
        "type": "object"
      },
      "PaginationPolicy": {
        "additionalProperties": false,
        "properties": {
          "default_limit": {
            "default": 25,
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Default Limit",
            "type": "integer"
          },
          "maximum_cursor_characters": {
            "default": 256,
            "maximum": 1024.0,
            "minimum": 32.0,
            "title": "Maximum Cursor Characters",
            "type": "integer"
          },
          "maximum_limit": {
            "default": 100,
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Maximum Limit",
            "type": "integer"
          }
        },
        "title": "PaginationPolicy",
        "type": "object"
      },
      "PaginationRequest": {
        "additionalProperties": false,
        "properties": {
          "cursor": {
            "anyOf": [
              {
                "maxLength": 256,
                "minLength": 32,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Cursor"
          },
          "limit": {
            "default": 25,
            "maximum": 100,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          }
        },
        "title": "PaginationRequest",
        "type": "object"
      },
      "RequestSizePolicy": {
        "additionalProperties": false,
        "properties": {
          "max_body_bytes": {
            "default": 1048576,
            "maximum": 1048576.0,
            "minimum": 1.0,
            "title": "Max Body Bytes",
            "type": "integer"
          },
          "max_collection_items": {
            "default": 1000,
            "maximum": 10000.0,
            "minimum": 1.0,
            "title": "Max Collection Items",
            "type": "integer"
          },
          "max_json_depth": {
            "default": 16,
            "maximum": 64.0,
            "minimum": 1.0,
            "title": "Max Json Depth",
            "type": "integer"
          },
          "max_string_characters": {
            "default": 65536,
            "maximum": 1048576.0,
            "minimum": 1.0,
            "title": "Max String Characters",
            "type": "integer"
          }
        },
        "title": "RequestSizePolicy",
        "type": "object"
      },
      "SecretSetRequest": {
        "additionalProperties": false,
        "description": "Write-only secret input that is never returned by the API.",
        "properties": {
          "value": {
            "maxLength": 65536,
            "minLength": 1,
            "title": "Value",
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "value"
        ],
        "title": "SecretSetRequest",
        "type": "object"
      },
      "SecretStatusResponse": {
        "additionalProperties": false,
        "description": "Credential presence without credential readback.",
        "properties": {
          "reference": {
            "maxLength": 96,
            "minLength": 1,
            "pattern": "^[a-z0-9_.-]+$",
            "title": "Reference",
            "type": "string"
          },
          "status": {
            "enum": [
              "present",
              "missing",
              "unavailable"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "reference",
          "status"
        ],
        "title": "SecretStatusResponse",
        "type": "object"
      },
      "SettingFieldResponse": {
        "additionalProperties": false,
        "description": "One renderer-safe setting descriptor.",
        "properties": {
          "default_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "number"
              }
            ],
            "title": "Default Value"
          },
          "help": {
            "maxLength": 512,
            "minLength": 1,
            "title": "Help",
            "type": "string"
          },
          "key": {
            "maxLength": 96,
            "minLength": 1,
            "pattern": "^[a-z0-9_.-]+$",
            "title": "Key",
            "type": "string"
          },
          "label": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Label",
            "type": "string"
          },
          "restart_required": {
            "default": false,
            "title": "Restart Required",
            "type": "boolean"
          },
          "sensitive": {
            "const": false,
            "default": false,
            "title": "Sensitive",
            "type": "boolean"
          },
          "type": {
            "enum": [
              "string",
              "integer",
              "number"
            ],
            "title": "Type",
            "type": "string"
          },
          "validation": {
            "$ref": "#/components/schemas/SettingValidationResponse"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "number"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "key",
          "label",
          "help",
          "type",
          "value",
          "default_value",
          "validation"
        ],
        "title": "SettingFieldResponse",
        "type": "object"
      },
      "SettingValidationResponse": {
        "additionalProperties": false,
        "description": "Reviewed renderer constraints for one non-secret setting.",
        "properties": {
          "allowed_values": {
            "default": [],
            "items": {
              "type": "string"
            },
            "maxItems": 32,
            "title": "Allowed Values",
            "type": "array"
          },
          "maximum": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Maximum"
          },
          "minimum": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Minimum"
          }
        },
        "title": "SettingValidationResponse",
        "type": "object"
      },
      "SettingsPatchRequest": {
        "additionalProperties": false,
        "description": "Allowlisted settings changes based on a previously read revision.",
        "properties": {
          "changes": {
            "additionalProperties": true,
            "maxProperties": 32,
            "minProperties": 1,
            "title": "Changes",
            "type": "object"
          },
          "expected_revision": {
            "minimum": 0.0,
            "title": "Expected Revision",
            "type": "integer"
          },
          "schema_version": {
            "const": 1,
            "minimum": 1.0,
            "title": "Schema Version",
            "type": "integer"
          }
        },
        "required": [
          "schema_version",
          "expected_revision",
          "changes"
        ],
        "title": "SettingsPatchRequest",
        "type": "object"
      },
      "SettingsResponse": {
        "additionalProperties": false,
        "description": "Versioned settings snapshot with an optimistic-lock revision.",
        "properties": {
          "fields": {
            "items": {
              "$ref": "#/components/schemas/SettingFieldResponse"
            },
            "maxItems": 32,
            "minItems": 1,
            "title": "Fields",
            "type": "array"
          },
          "revision": {
            "minimum": 0.0,
            "title": "Revision",
            "type": "integer"
          },
          "schema_version": {
            "const": 1,
            "minimum": 1.0,
            "title": "Schema Version",
            "type": "integer"
          }
        },
        "required": [
          "schema_version",
          "revision",
          "fields"
        ],
        "title": "SettingsResponse",
        "type": "object"
      },
      "StartupDiagnosticComponentResponse": {
        "additionalProperties": false,
        "description": "One renderer-safe startup component result.",
        "properties": {
          "blocks_mutations": {
            "title": "Blocks Mutations",
            "type": "boolean"
          },
          "code": {
            "maxLength": 96,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._:-]+$",
            "title": "Code",
            "type": "string"
          },
          "component": {
            "enum": [
              "configuration",
              "sqlcipher",
              "keyring",
              "workspace"
            ],
            "title": "Component",
            "type": "string"
          },
          "message": {
            "maxLength": 512,
            "minLength": 1,
            "title": "Message",
            "type": "string"
          },
          "remediation": {
            "anyOf": [
              {
                "maxLength": 512,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remediation"
          },
          "restart_required": {
            "title": "Restart Required",
            "type": "boolean"
          },
          "status": {
            "enum": [
              "ready",
              "warning",
              "blocked"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "component",
          "status",
          "code",
          "message",
          "remediation",
          "restart_required",
          "blocks_mutations"
        ],
        "title": "StartupDiagnosticComponentResponse",
        "type": "object"
      },
      "StartupDiagnosticReportResponse": {
        "additionalProperties": false,
        "description": "Schema-v1 startup report consumed by Electron main and the renderer.",
        "properties": {
          "components": {
            "items": {
              "$ref": "#/components/schemas/StartupDiagnosticComponentResponse"
            },
            "maxItems": 4,
            "minItems": 4,
            "title": "Components",
            "type": "array"
          },
          "platform": {
            "$ref": "#/components/schemas/StartupPlatformResponse"
          },
          "schema_version": {
            "const": 1,
            "default": 1,
            "title": "Schema Version",
            "type": "integer"
          },
          "status": {
            "enum": [
              "ready",
              "degraded"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status",
          "platform",
          "components"
        ],
        "title": "StartupDiagnosticReportResponse",
        "type": "object"
      },
      "StartupPlatformResponse": {
        "additionalProperties": false,
        "description": "Non-sensitive platform details for relevant local remediation.",
        "properties": {
          "architecture": {
            "enum": [
              "arm64",
              "x64",
              "unsupported"
            ],
            "title": "Architecture",
            "type": "string"
          },
          "operating_system": {
            "enum": [
              "linux",
              "macos",
              "windows",
              "unsupported"
            ],
            "title": "Operating System",
            "type": "string"
          }
        },
        "required": [
          "operating_system",
          "architecture"
        ],
        "title": "StartupPlatformResponse",
        "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"
      }
    },
    "securitySchemes": {
      "PrivateBearer": {
        "description": "Fresh per-launch 256-bit bearer supplied privately by Electron main.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Authenticated internal discovery only. This is not a public, LAN, or browser API.",
    "summary": "Private loopback control plane for the AncestryLLM desktop application.",
    "title": "AncestryLLM Internal API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/v1/capabilities": {
      "get": {
        "operationId": "getInternalCapabilities",
        "parameters": [
          {
            "in": "header",
            "name": "X-Ancestry-API-Version",
            "required": true,
            "schema": {
              "const": "ancestryllm.internal-api/1",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Ancestry-App-Build",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapabilityManifest"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request failed closed."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The private bearer is invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The route is not exposed."
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The method is not accepted."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request conflicts with the current protected state."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is too large."
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The content type is not accepted."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request failed safely."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Secure credential storage is unavailable."
          }
        },
        "security": [
          {
            "PrivateBearer": []
          }
        ],
        "summary": "Get Capabilities",
        "tags": [
          "control"
        ]
      }
    },
    "/api/v1/health": {
      "get": {
        "operationId": "getInternalHealth",
        "parameters": [
          {
            "in": "header",
            "name": "X-Ancestry-API-Version",
            "required": true,
            "schema": {
              "const": "ancestryllm.internal-api/1",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Ancestry-App-Build",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request failed closed."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The private bearer is invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The route is not exposed."
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The method is not accepted."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request conflicts with the current protected state."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is too large."
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The content type is not accepted."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request failed safely."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Secure credential storage is unavailable."
          }
        },
        "security": [
          {
            "PrivateBearer": []
          }
        ],
        "summary": "Get Health",
        "tags": [
          "control"
        ]
      }
    },
    "/api/v1/secrets/{reference}/delete": {
      "post": {
        "operationId": "deleteInternalSecret",
        "parameters": [
          {
            "in": "path",
            "name": "reference",
            "required": true,
            "schema": {
              "title": "Reference",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Ancestry-API-Version",
            "required": true,
            "schema": {
              "const": "ancestryllm.internal-api/1",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Ancestry-App-Build",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request failed closed."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The private bearer is invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The route is not exposed."
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The method is not accepted."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request conflicts with the current protected state."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is too large."
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The content type is not accepted."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request failed safely."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Secure credential storage is unavailable."
          }
        },
        "security": [
          {
            "PrivateBearer": []
          }
        ],
        "summary": "Delete Secret",
        "tags": [
          "secrets"
        ]
      }
    },
    "/api/v1/secrets/{reference}/set": {
      "post": {
        "operationId": "setInternalSecret",
        "parameters": [
          {
            "in": "path",
            "name": "reference",
            "required": true,
            "schema": {
              "title": "Reference",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Ancestry-API-Version",
            "required": true,
            "schema": {
              "const": "ancestryllm.internal-api/1",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Ancestry-App-Build",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SecretSetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request failed closed."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The private bearer is invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The route is not exposed."
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The method is not accepted."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request conflicts with the current protected state."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is too large."
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The content type is not accepted."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request failed safely."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Secure credential storage is unavailable."
          }
        },
        "security": [
          {
            "PrivateBearer": []
          }
        ],
        "summary": "Set Secret",
        "tags": [
          "secrets"
        ]
      }
    },
    "/api/v1/secrets/{reference}/status": {
      "get": {
        "operationId": "getInternalSecretStatus",
        "parameters": [
          {
            "in": "path",
            "name": "reference",
            "required": true,
            "schema": {
              "title": "Reference",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Ancestry-API-Version",
            "required": true,
            "schema": {
              "const": "ancestryllm.internal-api/1",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Ancestry-App-Build",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request failed closed."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The private bearer is invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The route is not exposed."
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The method is not accepted."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request conflicts with the current protected state."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is too large."
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The content type is not accepted."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request failed safely."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Secure credential storage is unavailable."
          }
        },
        "security": [
          {
            "PrivateBearer": []
          }
        ],
        "summary": "Get Secret Status",
        "tags": [
          "secrets"
        ]
      }
    },
    "/api/v1/settings": {
      "get": {
        "operationId": "getInternalSettings",
        "parameters": [
          {
            "in": "header",
            "name": "X-Ancestry-API-Version",
            "required": true,
            "schema": {
              "const": "ancestryllm.internal-api/1",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Ancestry-App-Build",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request failed closed."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The private bearer is invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The route is not exposed."
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The method is not accepted."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request conflicts with the current protected state."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is too large."
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The content type is not accepted."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request failed safely."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Secure credential storage is unavailable."
          }
        },
        "security": [
          {
            "PrivateBearer": []
          }
        ],
        "summary": "Get Settings",
        "tags": [
          "settings"
        ]
      },
      "patch": {
        "operationId": "patchInternalSettings",
        "parameters": [
          {
            "in": "header",
            "name": "X-Ancestry-API-Version",
            "required": true,
            "schema": {
              "const": "ancestryllm.internal-api/1",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Ancestry-App-Build",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingsPatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request failed closed."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The private bearer is invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The route is not exposed."
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The method is not accepted."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request conflicts with the current protected state."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is too large."
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The content type is not accepted."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request failed safely."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Secure credential storage is unavailable."
          }
        },
        "security": [
          {
            "PrivateBearer": []
          }
        ],
        "summary": "Patch Settings",
        "tags": [
          "settings"
        ]
      }
    },
    "/api/v1/startup-diagnostics": {
      "get": {
        "operationId": "getInternalStartupDiagnostics",
        "parameters": [
          {
            "in": "header",
            "name": "X-Ancestry-API-Version",
            "required": true,
            "schema": {
              "const": "ancestryllm.internal-api/1",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Ancestry-App-Build",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartupDiagnosticReportResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request failed closed."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The private bearer is invalid."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The route is not exposed."
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The method is not accepted."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request conflicts with the current protected state."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is too large."
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The content type is not accepted."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request failed safely."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Secure credential storage is unavailable."
          }
        },
        "security": [
          {
            "PrivateBearer": []
          }
        ],
        "summary": "Get Startup Diagnostics",
        "tags": [
          "control"
        ]
      }
    }
  },
  "security": [
    {
      "PrivateBearer": []
    }
  ],
  "x-ancestryllm-internal": true
}
