{
  "openapi": "3.1.0",
  "info": {
    "title": "Ketvia Kit developer API",
    "version": "1.0.0",
    "description": "The API behind `ketvia kits …`. Authenticate with `Authorization: Bearer kdev_…`, a developer token created in the developer portal. The token acts as its member in its own workspace only. Rate limit: 60 requests per minute per token. Errors are `{code, message, correlationId}`."
  },
  "servers": [
    {
      "url": "https://api.ketvia.com/api/v1"
    }
  ],
  "tags": [
    {
      "name": "Developer"
    }
  ],
  "paths": {
    "/dev/me": {
      "get": {
        "operationId": "devMe",
        "summary": "Check a developer token",
        "description": "The token, its workspace and whether that workspace is a developer sandbox.",
        "tags": [
          "Developer"
        ],
        "security": [
          {
            "developerToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevMeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/dev/kits": {
      "get": {
        "operationId": "devKitsList",
        "summary": "List the workspace's Kits",
        "tags": [
          "Developer"
        ],
        "security": [
          {
            "developerToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KitListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/dev/kits/{kitId}": {
      "get": {
        "operationId": "devKitsGet",
        "summary": "Get a Kit with its versions, domains and credential metadata",
        "tags": [
          "Developer"
        ],
        "security": [
          {
            "developerToken": []
          }
        ],
        "parameters": [
          {
            "name": "kitId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KitDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not visible to this token (never distinguished).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/dev/kits/validate": {
      "post": {
        "operationId": "devKitsValidate",
        "summary": "Validate a manifest",
        "description": "Schema, slug ownership, domain coverage and the consent difference to the latest published version. Changes nothing.",
        "tags": [
          "Developer"
        ],
        "security": [
          {
            "developerToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/dev/kits/versions": {
      "post": {
        "operationId": "devKitsUpload",
        "summary": "Upload a manifest as a new version",
        "description": "Creates the Kit on first use (private). The version is a draft unless `publish` is true; a version is immutable once registered, so uploading the same version with a different manifest is a 409.",
        "tags": [
          "Developer"
        ],
        "security": [
          {
            "developerToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict (for example an `Idempotency-Key` reused with different content).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/dev/kits/{kitId}/versions/{version}/publish": {
      "post": {
        "operationId": "devKitsPublish",
        "summary": "Publish a draft version",
        "description": "Makes the version installable and applies the manifest distribution. `unlisted` needs a verified domain for every endpoint host.",
        "tags": [
          "Developer"
        ],
        "security": [
          {
            "developerToken": []
          }
        ],
        "parameters": [
          {
            "name": "kitId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(0|[1-9]\\d{0,3})\\.(0|[1-9]\\d{0,4})\\.(0|[1-9]\\d{0,5})$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not visible to this token (never distinguished).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict (for example an `Idempotency-Key` reused with different content).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/dev/kits/{kitId}/logs": {
      "get": {
        "operationId": "devKitsLogs",
        "summary": "Read the delivery and error log of a Kit",
        "tags": [
          "Developer"
        ],
        "security": [
          {
            "developerToken": []
          }
        ],
        "parameters": [
          {
            "name": "kitId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 512
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "tool_call",
                "audit",
                "delivery"
              ]
            }
          },
          {
            "name": "level",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "info",
                "error"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not visible to this token (never distinguished).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/dev/sandbox/dev-install": {
      "post": {
        "operationId": "devKitsDevInstall",
        "summary": "Install a manifest into the developer sandbox on a tunnel URL",
        "description": "Only for a token created in the developer sandbox workspace. Moves every endpoint URL onto the origin of `url` (a third-party tunnel; Ketvia runs no relay), registers the manifest as a private Kit version of the sandbox and installs or updates it there.",
        "tags": [
          "Developer"
        ],
        "security": [
          {
            "developerToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DevInstallRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevInstallResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (field paths only; submitted values are never echoed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope (`missing_scope`, header `X-Ketvia-Required-Scope`) or its type cannot call this method (`forbidden`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict (for example an `Idempotency-Key` reused with different content).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error; quote the `correlationId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "developerToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "A developer token (`kdev_…`)."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "validation_error",
              "unauthenticated",
              "invalid_credentials",
              "csrf_rejected",
              "forbidden",
              "not_found",
              "conflict",
              "idempotency_conflict",
              "send_context_changed",
              "workspace_context_changed",
              "email_taken",
              "name_taken",
              "slug_taken",
              "workspace_login_unavailable",
              "invalid_invitation",
              "rate_limited",
              "payload_too_large",
              "unsupported_media_type",
              "internal_error",
              "invalid_token",
              "missing_scope",
              "gone",
              "kit_unavailable"
            ]
          },
          "message": {
            "type": "string"
          },
          "correlationId": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message",
          "correlationId"
        ],
        "additionalProperties": false
      },
      "ConsentSummary": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{1,39}$"
          },
          "version": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d{0,3})\\.(0|[1-9]\\d{0,4})\\.(0|[1-9]\\d{0,5})$"
          },
          "official": {
            "type": "boolean"
          },
          "displayName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "developerName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "privacyPolicyUrl": {
            "type": "string",
            "maxLength": 2000,
            "format": "uri"
          },
          "iconUrl": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "categories": {
            "maxItems": 5,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 31
            }
          },
          "sample": {
            "type": "boolean"
          },
          "externalAuth": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "displayName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "requiredScopes": {
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 100
                    }
                  },
                  "optionalScopes": {
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 100
                    }
                  }
                },
                "required": [
                  "displayName",
                  "requiredScopes",
                  "optionalScopes"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "botScopes": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 40
            }
          },
          "tools": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "pattern": "^[a-z][a-z0-9_]{0,63}$"
                },
                "displayName": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "description": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1000
                },
                "access": {
                  "type": "string",
                  "enum": [
                    "read",
                    "write"
                  ]
                },
                "dataClass": {
                  "type": "string",
                  "enum": [
                    "aggregate",
                    "standard",
                    "personal",
                    "sensitive"
                  ]
                },
                "audience": {
                  "type": "string",
                  "enum": [
                    "any",
                    "private"
                  ]
                }
              },
              "required": [
                "name",
                "displayName",
                "description",
                "access",
                "dataClass",
                "audience"
              ],
              "additionalProperties": false
            }
          },
          "requestedModelDataPolicy": {
            "type": "string",
            "enum": [
              "none",
              "answer"
            ]
          },
          "consentHash": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "available": {
            "type": "boolean"
          },
          "installed": {
            "type": "boolean"
          },
          "ownedByWorkspace": {
            "type": "boolean"
          },
          "userScopes": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 40
            }
          }
        },
        "required": [
          "slug",
          "version",
          "official",
          "displayName",
          "description",
          "developerName",
          "privacyPolicyUrl",
          "iconUrl",
          "categories",
          "sample",
          "externalAuth",
          "botScopes",
          "tools",
          "requestedModelDataPolicy",
          "consentHash",
          "available",
          "installed"
        ],
        "additionalProperties": false
      },
      "ConsentDiff": {
        "type": "object",
        "properties": {
          "addedBotScopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "removedBotScopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "addedUserScopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "removedUserScopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "addedTools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "access": {
                  "type": "string",
                  "enum": [
                    "read",
                    "write"
                  ]
                },
                "dataClass": {
                  "type": "string",
                  "enum": [
                    "aggregate",
                    "standard",
                    "personal",
                    "sensitive"
                  ]
                },
                "audience": {
                  "type": "string",
                  "enum": [
                    "any",
                    "private"
                  ]
                }
              },
              "required": [
                "name",
                "access",
                "dataClass",
                "audience"
              ],
              "additionalProperties": false
            }
          },
          "removedTools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "changedTools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "from": {
                  "type": "object",
                  "properties": {
                    "access": {
                      "type": "string",
                      "enum": [
                        "read",
                        "write"
                      ]
                    },
                    "dataClass": {
                      "type": "string",
                      "enum": [
                        "aggregate",
                        "standard",
                        "personal",
                        "sensitive"
                      ]
                    },
                    "audience": {
                      "type": "string",
                      "enum": [
                        "any",
                        "private"
                      ]
                    }
                  },
                  "required": [
                    "access",
                    "dataClass",
                    "audience"
                  ],
                  "additionalProperties": false
                },
                "to": {
                  "type": "object",
                  "properties": {
                    "access": {
                      "type": "string",
                      "enum": [
                        "read",
                        "write"
                      ]
                    },
                    "dataClass": {
                      "type": "string",
                      "enum": [
                        "aggregate",
                        "standard",
                        "personal",
                        "sensitive"
                      ]
                    },
                    "audience": {
                      "type": "string",
                      "enum": [
                        "any",
                        "private"
                      ]
                    }
                  },
                  "required": [
                    "access",
                    "dataClass",
                    "audience"
                  ],
                  "additionalProperties": false
                },
                "wider": {
                  "type": "boolean"
                }
              },
              "required": [
                "name",
                "from",
                "to",
                "wider"
              ],
              "additionalProperties": false
            }
          },
          "addedEvents": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "removedEvents": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "addedCommands": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "removedCommands": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "externalAuth": {
            "type": "string",
            "enum": [
              "unchanged",
              "added",
              "removed",
              "widened",
              "narrowed"
            ]
          },
          "modelDataPolicy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "enum": [
                      "none",
                      "answer"
                    ]
                  },
                  "to": {
                    "type": "string",
                    "enum": [
                      "none",
                      "answer"
                    ]
                  }
                },
                "required": [
                  "from",
                  "to"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "wider": {
            "type": "boolean"
          }
        },
        "required": [
          "addedBotScopes",
          "removedBotScopes",
          "addedUserScopes",
          "removedUserScopes",
          "addedTools",
          "removedTools",
          "changedTools",
          "addedEvents",
          "removedEvents",
          "addedCommands",
          "removedCommands",
          "externalAuth",
          "modelDataPolicy",
          "wider"
        ],
        "additionalProperties": false
      },
      "Version": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "version": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d{0,3})\\.(0|[1-9]\\d{0,4})\\.(0|[1-9]\\d{0,5})$"
          },
          "published": {
            "type": "boolean"
          },
          "publishedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "consentHash": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "manifestHash": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "distribution": {
            "type": "string",
            "enum": [
              "private",
              "unlisted",
              "directory"
            ]
          }
        },
        "required": [
          "id",
          "version",
          "published",
          "publishedAt",
          "createdAt",
          "consentHash",
          "manifestHash",
          "distribution"
        ],
        "additionalProperties": false
      },
      "Kit": {
        "type": "object",
        "properties": {
          "kitId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "slug": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{1,39}$"
          },
          "displayName": {
            "type": "string"
          },
          "distribution": {
            "type": "string",
            "enum": [
              "private",
              "unlisted",
              "directory"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "suspended"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "latestVersion": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(0|[1-9]\\d{0,3})\\.(0|[1-9]\\d{0,4})\\.(0|[1-9]\\d{0,5})$"
              },
              {
                "type": "null"
              }
            ]
          },
          "latestPublishedVersion": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(0|[1-9]\\d{0,3})\\.(0|[1-9]\\d{0,4})\\.(0|[1-9]\\d{0,5})$"
              },
              {
                "type": "null"
              }
            ]
          },
          "installedHere": {
            "type": "boolean"
          }
        },
        "required": [
          "kitId",
          "slug",
          "displayName",
          "distribution",
          "state",
          "createdAt",
          "latestVersion",
          "latestPublishedVersion",
          "installedHere"
        ],
        "additionalProperties": false
      },
      "Domain": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string",
            "maxLength": 253,
            "pattern": "^(?=.{3,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"
          },
          "method": {
            "type": "string",
            "enum": [
              "dns",
              "well_known"
            ]
          },
          "verified": {
            "type": "boolean"
          },
          "verifiedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "challenge": {
            "type": "string"
          },
          "proof": {
            "type": "object",
            "properties": {
              "dns": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "TXT"
                  },
                  "host": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "host",
                  "value"
                ],
                "additionalProperties": false
              },
              "wellKnown": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "body": {
                    "type": "object",
                    "properties": {
                      "kitId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "token": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kitId",
                      "token"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "url",
                  "body"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "dns",
              "wellKnown"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "domain",
          "method",
          "verified",
          "verifiedAt",
          "challenge",
          "proof"
        ],
        "additionalProperties": false
      },
      "DevMeResponse": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "userId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "sandbox": {
            "type": "boolean"
          },
          "token": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "name": {
                "type": "string"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "lastUsedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revokedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "name",
              "createdAt",
              "expiresAt",
              "lastUsedAt",
              "revokedAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "workspaceId",
          "userId",
          "sandbox",
          "token"
        ],
        "additionalProperties": false
      },
      "KitListResponse": {
        "type": "object",
        "properties": {
          "kits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Kit"
            }
          }
        },
        "required": [
          "kits"
        ],
        "additionalProperties": false
      },
      "KitDetailResponse": {
        "type": "object",
        "properties": {
          "detail": {
            "type": "object",
            "properties": {
              "kit": {
                "$ref": "#/components/schemas/Kit"
              },
              "versions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Version"
                }
              },
              "domains": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Domain"
                }
              },
              "credentials": {
                "type": "object",
                "properties": {
                  "clientSecret": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "createdAt"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "signingSecret": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "generation": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "previousExpiresAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "generation",
                          "createdAt",
                          "previousExpiresAt"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "clientSecret",
                  "signingSecret"
                ],
                "additionalProperties": false
              },
              "installLink": {
                "type": "object",
                "properties": {
                  "active": {
                    "type": "boolean"
                  },
                  "createdAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "active",
                  "createdAt"
                ],
                "additionalProperties": false
              },
              "endpointHosts": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "unverifiedHosts": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "kit",
              "versions",
              "domains",
              "credentials",
              "installLink",
              "endpointHosts",
              "unverifiedHosts"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "detail"
        ],
        "additionalProperties": false
      },
      "ValidateResponse": {
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean"
          },
          "problems": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string",
                  "maxLength": 200
                },
                "message": {
                  "type": "string",
                  "maxLength": 300
                }
              },
              "required": [
                "path",
                "message"
              ],
              "additionalProperties": false
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string",
                  "maxLength": 200
                },
                "message": {
                  "type": "string",
                  "maxLength": 300
                }
              },
              "required": [
                "path",
                "message"
              ],
              "additionalProperties": false
            }
          },
          "consent": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConsentSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "hosts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "unverifiedHosts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "diff": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConsentDiff"
              },
              {
                "type": "null"
              }
            ]
          },
          "existingKitId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "valid",
          "problems",
          "warnings",
          "consent",
          "hosts",
          "unverifiedHosts",
          "diff",
          "existingKitId"
        ],
        "additionalProperties": false
      },
      "UploadResponse": {
        "type": "object",
        "properties": {
          "kitId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "created": {
            "type": "boolean"
          },
          "version": {
            "$ref": "#/components/schemas/Version"
          },
          "installationId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "kitId",
          "created",
          "version",
          "installationId"
        ],
        "additionalProperties": false
      },
      "LogResponse": {
        "type": "object",
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "maxLength": 100
                },
                "at": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "source": {
                  "type": "string",
                  "enum": [
                    "tool_call",
                    "audit",
                    "delivery"
                  ]
                },
                "level": {
                  "type": "string",
                  "enum": [
                    "info",
                    "error"
                  ]
                },
                "event": {
                  "type": "string",
                  "maxLength": 120
                },
                "installationId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 40
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "errorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 80
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "durationMs": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "httpStatus": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 100,
                      "maximum": 599
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "attempt": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "at",
                "source",
                "level",
                "event",
                "installationId",
                "status",
                "errorCode",
                "durationMs",
                "httpStatus",
                "attempt"
              ],
              "additionalProperties": false
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "tool_call",
                "audit",
                "delivery"
              ]
            }
          }
        },
        "required": [
          "entries",
          "nextCursor",
          "sources"
        ],
        "additionalProperties": false
      },
      "DevInstallResponse": {
        "type": "object",
        "properties": {
          "kitId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "slug": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{1,39}$"
          },
          "version": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d{0,3})\\.(0|[1-9]\\d{0,4})\\.(0|[1-9]\\d{0,5})$"
          },
          "installationId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "endpoints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "signingSecret": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "signingSecret": {
                    "type": "string",
                    "pattern": "^kss_[A-Za-z0-9_-]{43}$"
                  },
                  "generation": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "previousExpiresAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "signingSecret",
                  "generation",
                  "previousExpiresAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "kitId",
          "slug",
          "version",
          "installationId",
          "endpoints",
          "signingSecret"
        ],
        "additionalProperties": false
      },
      "ValidateRequest": {
        "type": "object",
        "properties": {
          "manifest": {
            "type": "string",
            "minLength": 2,
            "maxLength": 65536
          }
        },
        "required": [
          "manifest"
        ],
        "additionalProperties": false
      },
      "UploadRequest": {
        "type": "object",
        "properties": {
          "manifest": {
            "type": "string",
            "minLength": 2,
            "maxLength": 65536
          },
          "publish": {
            "default": false,
            "type": "boolean"
          }
        },
        "required": [
          "manifest"
        ],
        "additionalProperties": false
      },
      "DevInstallRequest": {
        "type": "object",
        "properties": {
          "manifest": {
            "type": "string",
            "minLength": 2,
            "maxLength": 65536
          },
          "url": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          }
        },
        "required": [
          "manifest",
          "url"
        ],
        "additionalProperties": false
      }
    }
  }
}
