{
  "openapi": "3.1.1",
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "info": {
    "title": "MindMemOS Service API",
    "version": "1.1.0",
    "summary": "Cloudflare Workers 上的多通道记忆与技能服务",
    "description": "公开业务接口。管理员登录、API Key 签发及 Better Auth 内部端点不属于本规范。业务接口同时接受 mmos.* API Key 与已配置 PLog IdP 签发的短时 JWT；两者最终都解析为 MindMem 项目/用户作用域。"
  },
  "servers": [
    {
      "url": "https://mindmem.bowong.cc",
      "description": "生产环境"
    }
  ],
  "tags": [
    {
      "name": "System",
      "description": "无需认证的健康与数据库只读就绪探针"
    },
    {
      "name": "Accounts",
      "description": "外部 OIDC 身份与 MindMem 用户的无感关联"
    },
    {
      "name": "Memories",
      "description": "记忆写入、读取、更新、删除、批量与历史"
    },
    {
      "name": "Search",
      "description": "fast、schema 与 agentic 混合检索"
    },
    {
      "name": "Feedback",
      "description": "显式或隐式检索反馈"
    },
    {
      "name": "Dreaming",
      "description": "记忆整合与演化"
    },
    {
      "name": "Jobs",
      "description": "异步任务状态"
    },
    {
      "name": "Skills",
      "description": "技能内容、版本、同步、演化与回滚"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "检查 Worker 存活状态",
        "tags": [
          "System"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Worker 正常响应",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": false
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/ready": {
      "get": {
        "operationId": "getReadiness",
        "summary": "检查数据库 Schema 就绪状态",
        "description": "只执行轻量只读检查，不返回连接串、供应商信息或内部配置。",
        "tags": [
          "System"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "服务已就绪",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Readiness"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "数据库尚未就绪",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Readiness"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/link": {
      "post": {
        "operationId": "linkExternalAccount",
        "summary": "关联当前 PLog 身份",
        "description": "仅接受已配置 issuer/JWKS/audience 校验通过的短时 RS256 JWT。JWT sub 只作为 auth_accounts 的 provider account 标识，不能直接成为 MindMem user_id。重复调用保持幂等。",
        "tags": [
          "Accounts"
        ],
        "security": [
          {
            "PlogJWT": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "外部身份已关联",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/ExternalAccountLinkResult"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求格式或字段校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Bearer API Key/JWT 缺失、格式错误、已停用、无效或尚未关联",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "当前凭据不具备所需权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在；跨作用域资源同样表现为不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "幂等冲突或资源状态冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "413": {
            "description": "请求正文超过大小限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "超过当前 API Key 或外部身份的速率/并发限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "数据库或外部 AI 服务暂时不可用，可重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/memory/add": {
      "post": {
        "operationId": "addMemory",
        "summary": "新增或演化记忆",
        "description": "infer=true 时调用 LLM 抽取并执行 ADD/UPDATE/DELETE/NOOP；async_mode=true 时返回任务 ID。",
        "tags": [
          "Memories"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "PlogJWT": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddMemoryRequest"
              },
              "example": {
                "user_id": "user-your-service",
                "messages": [
                  {
                    "role": "user",
                    "content": "我偏好低糖饮品。"
                  }
                ],
                "metadata": {
                  "source": "chat"
                },
                "infer": true,
                "async_mode": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "请求成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/MemoryAddResult"
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "异步任务已入队",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AsyncTask"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求格式或字段校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Bearer API Key/JWT 缺失、格式错误、已停用、无效或尚未关联",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "当前凭据不具备所需权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在；跨作用域资源同样表现为不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "幂等冲突或资源状态冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "413": {
            "description": "请求正文超过大小限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "超过当前 API Key 或外部身份的速率/并发限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "数据库或外部 AI 服务暂时不可用，可重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/memory/get": {
      "post": {
        "operationId": "getMemory",
        "summary": "读取单条记忆或分页列表",
        "description": "提供 memory_id 时返回单条记忆；否则返回最多 100 条的列表。",
        "tags": [
          "Memories"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "PlogJWT": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetMemoryRequest"
              },
              "example": {
                "user_id": "user-your-service",
                "limit": 20
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "请求成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/MemoryRecord"
                        },
                        {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/MemoryRecord"
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求格式或字段校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Bearer API Key/JWT 缺失、格式错误、已停用、无效或尚未关联",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "当前凭据不具备所需权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在；跨作用域资源同样表现为不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "幂等冲突或资源状态冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "413": {
            "description": "请求正文超过大小限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "超过当前 API Key 或外部身份的速率/并发限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "数据库或外部 AI 服务暂时不可用，可重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/memory/update": {
      "post": {
        "operationId": "updateMemory",
        "summary": "更新记忆并保留版本历史",
        "tags": [
          "Memories"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "PlogJWT": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMemoryRequest"
              },
              "example": {
                "user_id": "user-your-service",
                "memory_id": "memory-id",
                "content": "我现在只喝无糖饮品。"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "请求成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/MemoryRecord"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求格式或字段校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Bearer API Key/JWT 缺失、格式错误、已停用、无效或尚未关联",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "当前凭据不具备所需权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在；跨作用域资源同样表现为不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "幂等冲突或资源状态冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "413": {
            "description": "请求正文超过大小限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "超过当前 API Key 或外部身份的速率/并发限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "数据库或外部 AI 服务暂时不可用，可重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/memory/delete": {
      "post": {
        "operationId": "deleteMemory",
        "summary": "删除记忆",
        "tags": [
          "Memories"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "PlogJWT": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemoryIdRequest"
              },
              "example": {
                "user_id": "user-your-service",
                "memory_id": "memory-id"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "请求成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/MemoryRecord"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求格式或字段校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Bearer API Key/JWT 缺失、格式错误、已停用、无效或尚未关联",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "当前凭据不具备所需权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在；跨作用域资源同样表现为不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "幂等冲突或资源状态冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "413": {
            "description": "请求正文超过大小限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "超过当前 API Key 或外部身份的速率/并发限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "数据库或外部 AI 服务暂时不可用，可重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/memory/batch": {
      "post": {
        "operationId": "batchMutateMemories",
        "summary": "批量更新或删除记忆",
        "description": "每个子操作独立返回完成或失败状态，顶层 partial_failure 指示是否存在部分失败。",
        "tags": [
          "Memories"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "PlogJWT": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchMutationRequest"
              },
              "example": {
                "user_id": "user-your-service",
                "operations": [
                  {
                    "operation": "delete",
                    "memory_id": "memory-id"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "请求成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/BatchMutationResult"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求格式或字段校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Bearer API Key/JWT 缺失、格式错误、已停用、无效或尚未关联",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "当前凭据不具备所需权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在；跨作用域资源同样表现为不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "幂等冲突或资源状态冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "413": {
            "description": "请求正文超过大小限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "超过当前 API Key 或外部身份的速率/并发限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "数据库或外部 AI 服务暂时不可用，可重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/memory/history": {
      "post": {
        "operationId": "getMemoryHistory",
        "summary": "读取记忆版本历史",
        "tags": [
          "Memories"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "PlogJWT": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemoryIdRequest"
              },
              "example": {
                "user_id": "user-your-service",
                "memory_id": "memory-id"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "请求成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MemoryHistoryEntry"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求格式或字段校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Bearer API Key/JWT 缺失、格式错误、已停用、无效或尚未关联",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "当前凭据不具备所需权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在；跨作用域资源同样表现为不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "幂等冲突或资源状态冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "413": {
            "description": "请求正文超过大小限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "超过当前 API Key 或外部身份的速率/并发限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "数据库或外部 AI 服务暂时不可用，可重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/memory/search": {
      "post": {
        "operationId": "searchMemories",
        "summary": "执行混合记忆检索",
        "description": "融合向量、全文、实体、属性、时间、图和 Schema 通道。rerank 暂时失败时保留融合顺序并设置 rerank_degraded=true。",
        "tags": [
          "Search"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "PlogJWT": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchMemoryRequest"
              },
              "example": {
                "user_id": "user-your-service",
                "query": "我的饮品偏好是什么？",
                "strategy": "fast",
                "top_k": 10
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "请求成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SearchResult"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求格式或字段校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Bearer API Key/JWT 缺失、格式错误、已停用、无效或尚未关联",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "当前凭据不具备所需权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在；跨作用域资源同样表现为不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "幂等冲突或资源状态冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "413": {
            "description": "请求正文超过大小限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "超过当前 API Key 或外部身份的速率/并发限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "数据库或外部 AI 服务暂时不可用，可重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/memory/feedback": {
      "post": {
        "operationId": "recordMemoryFeedback",
        "summary": "记录检索或记忆反馈",
        "tags": [
          "Feedback"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "PlogJWT": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedbackRequest"
              },
              "example": {
                "user_id": "user-your-service",
                "memory_id": "memory-id",
                "signal": "useful",
                "weight": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "请求成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FeedbackResult"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求格式或字段校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Bearer API Key/JWT 缺失、格式错误、已停用、无效或尚未关联",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "当前凭据不具备所需权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在；跨作用域资源同样表现为不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "幂等冲突或资源状态冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "413": {
            "description": "请求正文超过大小限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "超过当前 API Key 或外部身份的速率/并发限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "数据库或外部 AI 服务暂时不可用，可重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/memory/dreaming": {
      "post": {
        "operationId": "dreamMemories",
        "summary": "整合与演化记忆",
        "description": "默认异步执行。memory_ids 省略时从当前 Key 绑定用户的记忆中选择来源。",
        "tags": [
          "Dreaming"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "PlogJWT": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DreamingRequest"
              },
              "example": {
                "user_id": "user-your-service",
                "async_mode": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "请求成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/DreamingResult"
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "异步任务已入队",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AsyncTask"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求格式或字段校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Bearer API Key/JWT 缺失、格式错误、已停用、无效或尚未关联",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "当前凭据不具备所需权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在；跨作用域资源同样表现为不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "幂等冲突或资源状态冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "413": {
            "description": "请求正文超过大小限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "超过当前 API Key 或外部身份的速率/并发限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "数据库或外部 AI 服务暂时不可用，可重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/jobs/{id}": {
      "get": {
        "operationId": "getJob",
        "summary": "查询异步任务状态",
        "tags": [
          "Jobs"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "PlogJWT": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "任务状态",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Job"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求格式或字段校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Bearer API Key/JWT 缺失、格式错误、已停用、无效或尚未关联",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "当前凭据不具备所需权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在；跨作用域资源同样表现为不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "幂等冲突或资源状态冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "413": {
            "description": "请求正文超过大小限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "超过当前 API Key 或外部身份的速率/并发限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "数据库或外部 AI 服务暂时不可用，可重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/skills": {
      "get": {
        "operationId": "listSkills",
        "summary": "列出技能",
        "tags": [
          "Skills"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "PlogJWT": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "技能列表",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SkillListItem"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求格式或字段校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Bearer API Key/JWT 缺失、格式错误、已停用、无效或尚未关联",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "当前凭据不具备所需权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在；跨作用域资源同样表现为不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "幂等冲突或资源状态冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "413": {
            "description": "请求正文超过大小限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "超过当前 API Key 或外部身份的速率/并发限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "数据库或外部 AI 服务暂时不可用，可重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/skills/register": {
      "post": {
        "operationId": "registerSkill",
        "summary": "注册技能及首个版本",
        "tags": [
          "Skills"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "PlogJWT": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterSkillRequest"
              },
              "example": {
                "name": "customer-support",
                "content": "# Customer support skill\n\nFollow the escalation policy."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "请求成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SkillDetail"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求格式或字段校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Bearer API Key/JWT 缺失、格式错误、已停用、无效或尚未关联",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "当前凭据不具备所需权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在；跨作用域资源同样表现为不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "幂等冲突或资源状态冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "413": {
            "description": "请求正文超过大小限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "超过当前 API Key 或外部身份的速率/并发限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "数据库或外部 AI 服务暂时不可用，可重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/skills/evolve": {
      "post": {
        "operationId": "evolveSkill",
        "summary": "根据执行轨迹演化技能",
        "tags": [
          "Skills"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "PlogJWT": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvolveSkillRequest"
              },
              "example": {
                "skill_id": "skill-id",
                "execution_result": {
                  "outcome": "completed"
                },
                "score": 0.9,
                "async_mode": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "请求成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SkillEvolutionResult"
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "异步任务已入队",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AsyncTask"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求格式或字段校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Bearer API Key/JWT 缺失、格式错误、已停用、无效或尚未关联",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "当前凭据不具备所需权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在；跨作用域资源同样表现为不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "幂等冲突或资源状态冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "413": {
            "description": "请求正文超过大小限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "超过当前 API Key 或外部身份的速率/并发限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "数据库或外部 AI 服务暂时不可用，可重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/skills/sync": {
      "post": {
        "operationId": "syncSkill",
        "summary": "读取当前激活技能及内容",
        "tags": [
          "Skills"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "PlogJWT": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillActionRequest"
              },
              "example": {
                "skill_id": "skill-id"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "请求成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SkillSyncResult"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求格式或字段校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Bearer API Key/JWT 缺失、格式错误、已停用、无效或尚未关联",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "当前凭据不具备所需权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在；跨作用域资源同样表现为不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "幂等冲突或资源状态冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "413": {
            "description": "请求正文超过大小限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "超过当前 API Key 或外部身份的速率/并发限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "数据库或外部 AI 服务暂时不可用，可重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/skills/{id}/get": {
      "post": {
        "operationId": "getSkill",
        "summary": "读取技能详情",
        "tags": [
          "Skills"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "PlogJWT": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "技能详情",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SkillDetail"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求格式或字段校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Bearer API Key/JWT 缺失、格式错误、已停用、无效或尚未关联",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "当前凭据不具备所需权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在；跨作用域资源同样表现为不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "幂等冲突或资源状态冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "413": {
            "description": "请求正文超过大小限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "超过当前 API Key 或外部身份的速率/并发限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "数据库或外部 AI 服务暂时不可用，可重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/skills/{id}/versions": {
      "get": {
        "operationId": "listSkillVersions",
        "summary": "列出技能版本",
        "tags": [
          "Skills"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "PlogJWT": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "版本列表",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SkillVersion"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求格式或字段校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Bearer API Key/JWT 缺失、格式错误、已停用、无效或尚未关联",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "当前凭据不具备所需权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在；跨作用域资源同样表现为不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "幂等冲突或资源状态冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "413": {
            "description": "请求正文超过大小限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "超过当前 API Key 或外部身份的速率/并发限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "数据库或外部 AI 服务暂时不可用，可重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/skills/{id}/versions/{version}/content": {
      "get": {
        "operationId": "getSkillVersionContent",
        "summary": "读取技能版本内容",
        "tags": [
          "Skills"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "PlogJWT": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          },
          {
            "$ref": "#/components/parameters/VersionId"
          }
        ],
        "responses": {
          "200": {
            "description": "经过 SHA-256 校验的技能内容",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SkillContent"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求格式或字段校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Bearer API Key/JWT 缺失、格式错误、已停用、无效或尚未关联",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "当前凭据不具备所需权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在；跨作用域资源同样表现为不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "幂等冲突或资源状态冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "413": {
            "description": "请求正文超过大小限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "超过当前 API Key 或外部身份的速率/并发限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "数据库或外部 AI 服务暂时不可用，可重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/skills/{id}/rollback": {
      "post": {
        "operationId": "rollbackSkill",
        "summary": "激活指定历史版本",
        "tags": [
          "Skills"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "PlogJWT": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RollbackSkillRequest"
              },
              "example": {
                "version_id": "version-id"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "请求成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SkillRollbackResult"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求格式或字段校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Bearer API Key/JWT 缺失、格式错误、已停用、无效或尚未关联",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "当前凭据不具备所需权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在；跨作用域资源同样表现为不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "幂等冲突或资源状态冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "413": {
            "description": "请求正文超过大小限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "超过当前 API Key 或外部身份的速率/并发限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "数据库或外部 AI 服务暂时不可用，可重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/skills/{id}/delete": {
      "post": {
        "operationId": "deleteSkill",
        "summary": "删除技能",
        "tags": [
          "Skills"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "PlogJWT": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "技能已删除",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "message",
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SkillDeleteResult"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求格式或字段校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Bearer API Key/JWT 缺失、格式错误、已停用、无效或尚未关联",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "当前凭据不具备所需权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在；跨作用域资源同样表现为不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "幂等冲突或资源状态冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "413": {
            "description": "请求正文超过大小限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "超过当前 API Key 或外部身份的速率/并发限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "数据库或外部 AI 服务暂时不可用，可重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "mmos.<key_id>.<secret>",
        "description": "在管理员主页一键签发；明文只显示一次。"
      },
      "PlogJWT": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT (RS256)",
        "description": "由受信任 PLog IdP 为当前用户签发，最长有效期 5 分钟；服务端严格校验 issuer、audience、JWKS、iat 和 exp。"
      }
    },
    "parameters": {
      "RequestId": {
        "name": "X-Request-ID",
        "in": "header",
        "required": false,
        "description": "可选调用链 ID；不合法时服务端自动生成。",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        }
      },
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "description": "同一操作的稳定幂等键，最长 256 字符；同键不同 payload 返回冲突。",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "example": "request-018f6d8d"
      },
      "ResourceId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        }
      },
      "VersionId": {
        "name": "version",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        }
      }
    },
    "schemas": {
      "ErrorEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "message",
          "request_id",
          "data"
        ],
        "properties": {
          "code": {
            "type": "string",
            "example": "invalid_request"
          },
          "message": {
            "type": "string",
            "example": "Request validation failed"
          },
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "null"
          }
        }
      },
      "Readiness": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "ready"
        ],
        "properties": {
          "ready": {
            "type": "boolean"
          }
        }
      },
      "ExternalAccountLinkResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "linked",
          "project_id",
          "user_id"
        ],
        "properties": {
          "linked": {
            "type": "boolean",
            "description": "true 表示本次新建关联，false 表示幂等重放已有映射。"
          },
          "project_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "user_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          }
        }
      },
      "Message": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "role",
              "content"
            ],
            "properties": {
              "role": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "content": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500000
              },
              "timestamp": {
                "type": "number"
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "text"
            ],
            "properties": {
              "text": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500000
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "url"
            ],
            "properties": {
              "url": {
                "type": "string",
                "format": "uri",
                "maxLength": 8192
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "file_name",
              "file_path"
            ],
            "properties": {
              "file_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              "file_path": {
                "type": "string",
                "minLength": 1,
                "maxLength": 8192
              },
              "file_type": {
                "type": "string",
                "maxLength": 256
              }
            }
          }
        ]
      },
      "AddMemoryRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "messages"
        ],
        "properties": {
          "user_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$",
            "description": "mmos.* API Key 必填；PLog JWT 可省略并使用 account 映射后的 MindMem 用户。"
          },
          "messages": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "default": {}
          },
          "infer": {
            "type": "boolean",
            "default": true
          },
          "async_mode": {
            "type": "boolean",
            "default": false
          },
          "event_time": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "GetMemoryRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "user_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$",
            "description": "mmos.* API Key 必填；PLog JWT 可省略并使用 account 映射后的 MindMem 用户。"
          },
          "memory_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 20
          },
          "cursor": {
            "type": "string",
            "maxLength": 512
          }
        }
      },
      "UpdateMemoryRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "memory_id",
          "content"
        ],
        "properties": {
          "user_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$",
            "description": "mmos.* API Key 必填；PLog JWT 可省略并使用 account 映射后的 MindMem 用户。"
          },
          "memory_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "content": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500000
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "MemoryIdRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "memory_id"
        ],
        "properties": {
          "user_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$",
            "description": "mmos.* API Key 必填；PLog JWT 可省略并使用 account 映射后的 MindMem 用户。"
          },
          "memory_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          }
        }
      },
      "BatchMutationRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "operations"
        ],
        "properties": {
          "user_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$",
            "description": "mmos.* API Key 必填；PLog JWT 可省略并使用 account 映射后的 MindMem 用户。"
          },
          "operations": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "operation",
                    "memory_id",
                    "content"
                  ],
                  "properties": {
                    "operation": {
                      "const": "update"
                    },
                    "memory_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[A-Za-z0-9_.:-]+$"
                    },
                    "content": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500000
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                },
                {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "operation",
                    "memory_id"
                  ],
                  "properties": {
                    "operation": {
                      "const": "delete"
                    },
                    "memory_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[A-Za-z0-9_.:-]+$"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "SearchMemoryRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "query"
        ],
        "properties": {
          "user_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$",
            "description": "mmos.* API Key 必填；PLog JWT 可省略并使用 account 映射后的 MindMem 用户。"
          },
          "query": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "strategy": {
            "type": "string",
            "enum": [
              "fast",
              "schema",
              "agentic"
            ],
            "default": "fast"
          },
          "top_k": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 10
          },
          "threshold": {
            "type": "number",
            "minimum": -1,
            "maximum": 1
          },
          "max_rounds": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5,
            "default": 3
          },
          "filters": {
            "type": "object",
            "additionalProperties": false,
            "default": {},
            "properties": {
              "memory_type": {
                "type": "string",
                "maxLength": 64
              },
              "after": {
                "type": "string",
                "format": "date-time"
              },
              "before": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "FeedbackRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "signal"
        ],
        "properties": {
          "user_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$",
            "description": "mmos.* API Key 必填；PLog JWT 可省略并使用 account 映射后的 MindMem 用户。"
          },
          "search_trace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "memory_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "signal": {
            "type": "string",
            "enum": [
              "useful",
              "irrelevant",
              "outdated",
              "wrong",
              "implicit"
            ]
          },
          "feedback_text": {
            "type": "string",
            "maxLength": 10000
          },
          "weight": {
            "type": "number",
            "minimum": -10,
            "maximum": 10,
            "default": 0
          }
        }
      },
      "DreamingRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "user_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$",
            "description": "mmos.* API Key 必填；PLog JWT 可省略并使用 account 映射后的 MindMem 用户。"
          },
          "async_mode": {
            "type": "boolean",
            "default": true
          },
          "memory_ids": {
            "type": "array",
            "minItems": 2,
            "maxItems": 100,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            }
          }
        }
      },
      "RegisterSkillRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "content"
        ],
        "properties": {
          "user_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$",
            "description": "mmos.* API Key 必填；PLog JWT 可省略并使用 account 映射后的 MindMem 用户。"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "content": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000000
          },
          "version_label": {
            "type": "string",
            "maxLength": 128
          }
        }
      },
      "EvolveSkillRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "skill_id",
          "execution_result"
        ],
        "properties": {
          "user_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$",
            "description": "mmos.* API Key 必填；PLog JWT 可省略并使用 account 映射后的 MindMem 用户。"
          },
          "skill_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "execution_result": true,
          "score": {
            "type": "number"
          },
          "task_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "async_mode": {
            "type": "boolean",
            "default": true
          }
        }
      },
      "SkillActionRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "skill_id"
        ],
        "properties": {
          "user_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$",
            "description": "mmos.* API Key 必填；PLog JWT 可省略并使用 account 映射后的 MindMem 用户。"
          },
          "skill_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          }
        }
      },
      "RollbackSkillRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version_id"
        ],
        "properties": {
          "user_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$",
            "description": "mmos.* API Key 必填；PLog JWT 可省略并使用 account 映射后的 MindMem 用户。"
          },
          "version_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          }
        }
      },
      "MemoryRecord": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "projectId",
          "userId",
          "content",
          "memoryType",
          "metadata",
          "contentHash",
          "version",
          "eventTime",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "userId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "content": {
            "type": "string"
          },
          "memoryType": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          },
          "contentHash": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          },
          "eventTime": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SearchCandidate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "projectId",
          "userId",
          "content",
          "memoryType",
          "metadata",
          "contentHash",
          "version",
          "eventTime",
          "createdAt",
          "updatedAt",
          "score",
          "channels"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "userId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "content": {
            "type": "string"
          },
          "memoryType": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          },
          "contentHash": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          },
          "eventTime": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "score": {
            "type": "number"
          },
          "channels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "rerankScore": {
            "type": "number"
          }
        }
      },
      "MemoryAddResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "results",
          "algorithm_version",
          "embedding_profile"
        ],
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemoryRecord"
            }
          },
          "algorithm_version": {
            "type": "string"
          },
          "embedding_profile": {
            "type": "string"
          }
        }
      },
      "AsyncTask": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "task_id"
        ],
        "properties": {
          "task_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          }
        }
      },
      "MemoryHistoryEntry": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version",
          "operation",
          "content",
          "content_hash",
          "memory_type",
          "metadata",
          "changed_at"
        ],
        "properties": {
          "version": {
            "type": "integer"
          },
          "operation": {
            "type": "string",
            "enum": [
              "ADD",
              "UPDATE",
              "DELETE"
            ]
          },
          "content": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "content_hash": {
            "type": "string"
          },
          "memory_type": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          },
          "changed_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "BatchMutationResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "results",
          "partial_failure"
        ],
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "index",
                "status"
              ],
              "properties": {
                "index": {
                  "type": "integer",
                  "minimum": 0
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "completed",
                    "failed"
                  ]
                },
                "data": true,
                "error_code": {
                  "type": "string"
                },
                "retryable": {
                  "type": "boolean"
                }
              }
            }
          },
          "partial_failure": {
            "type": "boolean"
          }
        }
      },
      "SearchResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "results",
          "trace_id",
          "metadata"
        ],
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchCandidate"
            }
          },
          "trace_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "rerank_degraded",
              "fused_ranked_ids",
              "embedding_profile",
              "rerank_profile",
              "search_strategy",
              "rounds",
              "time_relaxed"
            ],
            "properties": {
              "rerank_degraded": {
                "type": "boolean"
              },
              "fused_ranked_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9_.:-]+$"
                }
              },
              "embedding_profile": {
                "type": "string"
              },
              "rerank_profile": {
                "type": "string"
              },
              "search_strategy": {
                "type": "string",
                "enum": [
                  "fast",
                  "schema",
                  "agentic"
                ]
              },
              "rounds": {
                "type": "integer"
              },
              "time_relaxed": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "FeedbackResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "feedback_id"
        ],
        "properties": {
          "feedback_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          }
        }
      },
      "DreamingResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "status",
          "created",
          "updated",
          "deleted",
          "linked",
          "prompt_version",
          "algorithm_version"
        ],
        "properties": {
          "status": {
            "const": "completed"
          },
          "created": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            }
          },
          "updated": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            }
          },
          "deleted": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            }
          },
          "linked": {
            "type": "integer",
            "minimum": 0
          },
          "prompt_version": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "algorithm_version": {
            "type": "string"
          }
        }
      },
      "Job": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "id",
          "kind",
          "status",
          "attempts",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "kind": {
            "type": "string",
            "enum": [
              "memory_add",
              "memory_feedback",
              "memory_dreaming",
              "skill_evolve"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "running",
              "completed",
              "failed"
            ]
          },
          "result": true,
          "error_code": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "attempts": {
            "type": "integer",
            "minimum": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SkillListItem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "active_version_id",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "name": {
            "type": "string"
          },
          "active_version_id": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9_.:-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SkillDetail": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "active_version_id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "name": {
            "type": "string"
          },
          "active_version_id": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9_.:-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "content_hash": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "r2_key": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "version_label": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "prompt_profile": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "SkillVersion": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "parent_version_id",
          "version_label",
          "content_hash",
          "status",
          "prompt_profile",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "parent_version_id": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9_.:-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "version_label": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "content_hash": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "prompt_profile": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SkillContent": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "content",
          "content_hash"
        ],
        "properties": {
          "content": {
            "type": "string"
          },
          "content_hash": {
            "type": "string"
          }
        }
      },
      "SkillSyncResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "skill_id",
          "name",
          "active_version_id",
          "content_hash",
          "content"
        ],
        "properties": {
          "skill_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "name": {
            "type": "string"
          },
          "active_version_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "content_hash": {
            "type": "string"
          },
          "content": {
            "type": "string"
          }
        }
      },
      "SkillEvolutionResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "skill_id",
          "version_id",
          "parent_version_id",
          "content_hash",
          "change_summary"
        ],
        "properties": {
          "skill_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "version_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "parent_version_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "content_hash": {
            "type": "string"
          },
          "change_summary": {
            "type": "string"
          },
          "score": {
            "type": "number"
          },
          "task_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          }
        }
      },
      "SkillRollbackResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "skill_id",
          "active_version_id",
          "content_hash"
        ],
        "properties": {
          "skill_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "active_version_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "content_hash": {
            "type": "string"
          }
        }
      },
      "SkillDeleteResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "skill_id"
        ],
        "properties": {
          "skill_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          }
        }
      }
    }
  }
}