# Generated public contract; edit the source and localization catalog.
openapi: 3.1.0
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
info:
  title: OrbitSpace 工作空间与能力 API
  version: 1.0.0
  description: 工作空间与能力的公开 v1 应用接口契约。协议生命周期与能力可用状态见集成指南。
servers:
  - url: https://api.orbitspace.dev
security:
  - bearerAuth: []
paths:
  /api/v1/agent-versions/{agent_version_id}/model-catalog:
    get:
      tags:
        - AgentService
      description: GetModelCatalog 从不可变 Agent 版本所选的模型服务商发现其当前公布的模型及思考强度选项。
      operationId: AgentService_GetModelCatalog
      parameters:
        - name: agent_version_id
          in: path
          required: true
          schema:
            type: string
          description: Agent版本标识符。
        - name: refresh
          in: query
          schema:
            type: boolean
          description: 刷新。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ModelCatalog"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取服务商模型目录
  /api/v1/agent-versions/{agent_version_id}:probe-model-compatibility:
    post:
      tags:
        - AgentService
      description: ProbeModelCompatibility 对不可变 Agent 版本选择的服务商路由执行显式且范围受限的兼容性检查；仅返回能力信息，不向调用者返回服务商输出或凭据。
      operationId: AgentService_ProbeModelCompatibility
      parameters:
        - name: agent_version_id
          in: path
          required: true
          schema:
            type: string
          description: Agent版本标识符。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProbeModelCompatibilityRequest"
        required: true
        description: 探测模型兼容性的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ModelCompatibilityReport"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 探测模型兼容性
  /api/v1/agent-versions/{id}:
    get:
      tags:
        - AgentService
      operationId: AgentService_GetAgentVersion
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AgentVersion"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取Agent 版本
      description: 读取Agent 版本。
  /api/v1/agents:
    get:
      tags:
        - AgentService
      operationId: AgentService_ListAgents
      parameters:
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: 请求的每页条数，受接口上限约束。
        - name: page_token
          in: query
          schema:
            type: string
          description: 上一页返回的不透明分页令牌，请勿自行构造或修改。
        - name: include_archived
          in: query
          schema:
            type: boolean
          description: 包括归档。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListAgentsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出Agent
      description: 列出Agent。 如需继续读取结果，请使用接口声明的分页参数。
    post:
      tags:
        - AgentService
      operationId: AgentService_CreateAgent
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateAgentRequest"
        required: true
        description: 创建Agent的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Agent"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建Agent
      description: 创建Agent。 请求字段应遵循下方的 Schema。
  /api/v1/agents/{agent_id}/versions:
    get:
      tags:
        - AgentService
      operationId: AgentService_ListAgentVersions
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
          description: Agent标识符。
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: 请求的每页条数，受接口上限约束。
        - name: page_token
          in: query
          schema:
            type: string
          description: 上一页返回的不透明分页令牌，请勿自行构造或修改。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListAgentVersionsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出Agent 版本
      description: 列出Agent 版本。 如需继续读取结果，请使用接口声明的分页参数。
    post:
      tags:
        - AgentService
      operationId: AgentService_CreateAgentVersion
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
          description: Agent标识符。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateAgentVersionRequest"
        required: true
        description: 创建Agent 版本的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AgentVersion"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建Agent 版本
      description: 创建Agent 版本。 请求字段应遵循下方的 Schema。
  /api/v1/agents/{id}:
    get:
      tags:
        - AgentService
      operationId: AgentService_GetAgent
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Agent"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取Agent
      description: 读取Agent。
  /api/v1/agents/{id}:archive:
    post:
      tags:
        - AgentService
      operationId: AgentService_ArchiveAgent
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ArchiveAgentRequest"
        required: true
        description: 归档Agent的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Agent"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 归档Agent
      description: 归档Agent。 请求字段应遵循下方的 Schema。
  /api/v1/agents/{id}:restore:
    post:
      tags:
        - AgentService
      operationId: AgentService_RestoreAgent
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RestoreAgentRequest"
        required: true
        description: 恢复Agent的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Agent"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 恢复Agent
      description: 恢复Agent。 请求字段应遵循下方的 Schema。
  /api/v1/environment-versions/{id}:
    get:
      tags:
        - EnvironmentService
      operationId: EnvironmentService_GetEnvironmentVersion
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EnvironmentVersion"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取执行环境版本
      description: 读取执行环境版本。
  /api/v1/environments:
    get:
      tags:
        - EnvironmentService
      operationId: EnvironmentService_ListEnvironments
      parameters:
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: 请求的每页条数，受接口上限约束。
        - name: page_token
          in: query
          schema:
            type: string
          description: 上一页返回的不透明分页令牌，请勿自行构造或修改。
        - name: include_archived
          in: query
          schema:
            type: boolean
          description: 包括归档。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListEnvironmentsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出执行环境
      description: 列出执行环境。 如需继续读取结果，请使用接口声明的分页参数。
    post:
      tags:
        - EnvironmentService
      operationId: EnvironmentService_CreateEnvironment
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateEnvironmentRequest"
        required: true
        description: 创建执行环境的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AgentEnvironment"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建执行环境
      description: 创建执行环境。 请求字段应遵循下方的 Schema。
  /api/v1/environments/{agent_environment_id}/versions:
    get:
      tags:
        - EnvironmentService
      operationId: EnvironmentService_ListEnvironmentVersions
      parameters:
        - name: agent_environment_id
          in: path
          required: true
          schema:
            type: string
          description: Agent执行环境标识符。
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: 请求的每页条数，受接口上限约束。
        - name: page_token
          in: query
          schema:
            type: string
          description: 上一页返回的不透明分页令牌，请勿自行构造或修改。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListEnvironmentVersionsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出执行环境版本
      description: 列出执行环境版本。 如需继续读取结果，请使用接口声明的分页参数。
    post:
      tags:
        - EnvironmentService
      operationId: EnvironmentService_CreateEnvironmentVersion
      parameters:
        - name: agent_environment_id
          in: path
          required: true
          schema:
            type: string
          description: Agent执行环境标识符。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateEnvironmentVersionRequest"
        required: true
        description: 创建执行环境版本的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EnvironmentVersion"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建执行环境版本
      description: 创建执行环境版本。 请求字段应遵循下方的 Schema。
  /api/v1/environments/{id}:
    get:
      tags:
        - EnvironmentService
      operationId: EnvironmentService_GetEnvironment
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AgentEnvironment"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取执行环境
      description: 读取执行环境。
  /api/v1/environments/{id}:archive:
    post:
      tags:
        - EnvironmentService
      operationId: EnvironmentService_ArchiveEnvironment
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ArchiveEnvironmentRequest"
        required: true
        description: 归档执行环境的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AgentEnvironment"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 归档执行环境
      description: 归档执行环境。 请求字段应遵循下方的 Schema。
  /api/v1/environments/{id}:restore:
    post:
      tags:
        - EnvironmentService
      operationId: EnvironmentService_RestoreEnvironment
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RestoreEnvironmentRequest"
        required: true
        description: 恢复执行环境的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AgentEnvironment"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 恢复执行环境
      description: 恢复执行环境。 请求字段应遵循下方的 Schema。
  /api/v1/execution-engines:
    get:
      tags:
        - AgentService
      description: 由部署配置管理、所有副本共享的执行引擎准入策略。某个引擎被禁用后，历史 Agent 版本仍然可读。
      operationId: AgentService_GetExecutionEnginePolicy
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExecutionEnginePolicy"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取执行引擎准入策略
  /api/v1/memories:
    get:
      tags:
        - MemoryService
      operationId: MemoryService_ListMemories
      parameters:
        - name: scope
          in: query
          schema:
            enum:
              - MEMORY_SCOPE_UNSPECIFIED
              - MEMORY_SCOPE_TENANT
              - MEMORY_SCOPE_AGENT
              - MEMORY_SCOPE_WORKSPACE
              - MEMORY_SCOPE_TASK
            type: string
            format: enum
            description: 权限范围。
            x-enum-descriptions:
              MEMORY_SCOPE_UNSPECIFIED: 未指定
              MEMORY_SCOPE_TENANT: 租户
              MEMORY_SCOPE_AGENT: Agent
              MEMORY_SCOPE_WORKSPACE: 工作空间
              MEMORY_SCOPE_TASK: 任务
          description: 权限范围。
        - name: agent_id
          in: query
          schema:
            type: string
          description: Agent标识符。
        - name: workspace_id
          in: query
          schema:
            type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        - name: task_id
          in: query
          schema:
            type: string
          description: 任务标识，不能用一次执行的 Run ID 替代。
        - name: kind
          in: query
          schema:
            enum:
              - MEMORY_KIND_UNSPECIFIED
              - MEMORY_KIND_NOTE
              - MEMORY_KIND_EPISODIC
            type: string
            format: enum
            description: 类别。
            x-enum-descriptions:
              MEMORY_KIND_UNSPECIFIED: 未指定
              MEMORY_KIND_NOTE: 笔记
              MEMORY_KIND_EPISODIC: 情景记忆
          description: 类别。
        - name: include_suspicious
          in: query
          schema:
            type: boolean
          description: 包括可疑。
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: 请求的每页条数，受接口上限约束。
        - name: page_token
          in: query
          schema:
            type: string
          description: 上一页返回的不透明分页令牌，请勿自行构造或修改。
        - name: execution.run_id
          in: query
          schema:
            type: string
          description: 执行运行标识符。
        - name: execution.worker_id
          in: query
          schema:
            type: string
          description: 执行Worker标识符。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListMemoriesResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出共享记忆
      description: 列出共享记忆。 如需继续读取结果，请使用接口声明的分页参数。
    post:
      tags:
        - MemoryService
      operationId: MemoryService_CreateMemory
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateMemoryRequest"
        required: true
        description: 创建共享记忆的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Memory"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建共享记忆
      description: 创建共享记忆。 请求字段应遵循下方的 Schema。
  /api/v1/memories/{id}:
    get:
      tags:
        - MemoryService
      operationId: MemoryService_GetMemory
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        - name: execution.run_id
          in: query
          schema:
            type: string
          description: 执行运行标识符。
        - name: execution.worker_id
          in: query
          schema:
            type: string
          description: 执行Worker标识符。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Memory"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取共享记忆
      description: 读取共享记忆。
    delete:
      tags:
        - MemoryService
      operationId: MemoryService_DeleteMemory
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        - name: reason
          in: query
          schema:
            type: string
          description: 原因。
        - name: idempotency_key
          in: query
          schema:
            type: string
          description: 本次操作的幂等键，仅在重试同一次、同内容的提交时复用。
        - name: execution.run_id
          in: query
          schema:
            type: string
          description: 执行运行标识符。
        - name: execution.worker_id
          in: query
          schema:
            type: string
          description: 执行Worker标识符。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteMemoryResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 删除共享记忆
      description: 删除共享记忆。
  /api/v1/memories/{id}/content:
    get:
      tags:
        - MemoryService
      operationId: MemoryService_GetMemoryContent
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        - name: content_digest
          in: query
          schema:
            type: string
          description: 内容摘要。
        - name: offset_bytes
          in: query
          schema:
            type: string
          description: 偏移字节。
        - name: max_bytes
          in: query
          schema:
            type: integer
            format: int32
          description: 最大字节。
        - name: execution.run_id
          in: query
          schema:
            type: string
          description: 执行运行标识符。
        - name: execution.worker_id
          in: query
          schema:
            type: string
          description: 执行Worker标识符。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MemoryContentPage"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取记忆正文
      description: 读取记忆正文。
  /api/v1/memories/{id}/head:
    get:
      tags:
        - MemoryService
      operationId: MemoryService_GetMemoryRevisionHead
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        - name: execution.run_id
          in: query
          schema:
            type: string
          description: 执行运行标识符。
        - name: execution.worker_id
          in: query
          schema:
            type: string
          description: 执行Worker标识符。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Memory"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取当前记忆修订
      description: 读取当前记忆修订。
  /api/v1/memories/{id}/revisions:
    get:
      tags:
        - MemoryService
      operationId: MemoryService_ListMemoryRevisions
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        - name: include_suspicious
          in: query
          schema:
            type: boolean
          description: 包括可疑。
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: 请求的每页条数，受接口上限约束。
        - name: page_token
          in: query
          schema:
            type: string
          description: 上一页返回的不透明分页令牌，请勿自行构造或修改。
        - name: execution.run_id
          in: query
          schema:
            type: string
          description: 执行运行标识符。
        - name: execution.worker_id
          in: query
          schema:
            type: string
          description: 执行Worker标识符。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListMemoriesResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出记忆修订
      description: 列出记忆修订。 如需继续读取结果，请使用接口声明的分页参数。
  /api/v1/memories/{id}:revise:
    post:
      tags:
        - MemoryService
      operationId: MemoryService_ReviseMemory
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ReviseMemoryRequest"
        required: true
        description: 修订共享记忆的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Memory"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 修订共享记忆
      description: 修订共享记忆。 请求字段应遵循下方的 Schema。
  /api/v1/memories:search:
    post:
      tags:
        - MemoryService
      operationId: MemoryService_SearchMemories
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SearchMemoriesRequest"
        required: true
        description: 搜索共享记忆的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SearchMemoriesResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 搜索共享记忆
      description: 搜索共享记忆。 请求字段应遵循下方的 Schema。
  /api/v1/memories:search-index:
    post:
      tags:
        - MemoryService
      operationId: MemoryService_SearchMemoryIndex
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SearchMemoryIndexRequest"
        required: true
        description: 搜索记忆索引的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SearchMemoryIndexResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 搜索记忆索引
      description: 搜索记忆索引。 请求字段应遵循下方的 Schema。
  /api/v1/memory-candidates:
    get:
      tags:
        - MemoryService
      operationId: MemoryService_ListMemoryCandidates
      parameters:
        - name: status
          in: query
          schema:
            type: string
          description: 状态。
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: 请求的每页条数，受接口上限约束。
        - name: page_token
          in: query
          schema:
            type: string
          description: 上一页返回的不透明分页令牌，请勿自行构造或修改。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListMemoryCandidatesResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出记忆候选
      description: 列出记忆候选。 如需继续读取结果，请使用接口声明的分页参数。
    post:
      tags:
        - MemoryService
      operationId: MemoryService_ProposeMemoryCandidate
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProposeMemoryCandidateRequest"
        required: true
        description: 提出记忆候选的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MemoryCandidate"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 提出记忆候选
      description: 提交待审核的记忆内容。记忆候选不同于已发布的共享记忆；发布必须遵循配置的审核和授权策略。
  /api/v1/memory-candidates/{id}:
    get:
      tags:
        - MemoryService
      operationId: MemoryService_GetMemoryCandidate
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        - name: execution.run_id
          in: query
          schema:
            type: string
          description: 执行运行标识符。
        - name: execution.worker_id
          in: query
          schema:
            type: string
          description: 执行Worker标识符。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MemoryCandidate"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取记忆候选
      description: 读取记忆候选。
  /api/v1/memory-candidates/{id}/agent-review:
    get:
      tags:
        - MemoryService
      operationId: MemoryService_GetMemoryAgentReview
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MemoryAgentReview"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取记忆独立 Agent 审核
      description: 读取记忆独立 Agent 审核。
  /api/v1/memory-candidates/{id}:assign-review:
    post:
      tags:
        - MemoryService
      operationId: MemoryService_AssignMemoryAgentReview
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AssignMemoryAgentReviewRequest"
        required: true
        description: 分配记忆独立 Agent 审核的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MemoryAgentReview"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 分配记忆独立 Agent 审核
      description: 分配记忆独立 Agent 审核。 请求字段应遵循下方的 Schema。
  /api/v1/memory-candidates/{id}:cancel-review:
    post:
      tags:
        - MemoryService
      operationId: MemoryService_CancelMemoryAgentReview
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CancelMemoryAgentReviewRequest"
        required: true
        description: 取消记忆独立 Agent 审核的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MemoryAgentReview"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 取消记忆独立 Agent 审核
      description: 取消记忆独立 Agent 审核。 请求字段应遵循下方的 Schema。
  /api/v1/memory-candidates/{id}:review:
    post:
      tags:
        - MemoryService
      operationId: MemoryService_ReviewMemoryCandidate
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ReviewMemoryCandidateRequest"
        required: true
        description: 审核记忆候选的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MemoryCandidate"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 审核记忆候选
      description: 审核记忆候选。 请求字段应遵循下方的 Schema。
  /api/v1/memory-index-head:
    get:
      tags:
        - MemoryService
      operationId: MemoryService_GetMemoryIndexHead
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MemoryIndexHead"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取当前记忆索引版本
      description: 读取当前记忆索引版本。
  /api/v1/memory-index-head:activate:
    post:
      tags:
        - MemoryService
      operationId: MemoryService_ActivateMemoryIndex
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ActivateMemoryIndexRequest"
        required: true
        description: 激活记忆索引的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MemoryIndexHead"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 激活记忆索引
      description: 激活记忆索引。 请求字段应遵循下方的 Schema。
  /api/v1/memory-indexes:
    get:
      tags:
        - MemoryService
      operationId: MemoryService_ListMemoryIndexMigrations
      parameters:
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: 请求的每页条数，受接口上限约束。
        - name: page_token
          in: query
          schema:
            type: string
          description: 上一页返回的不透明分页令牌，请勿自行构造或修改。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListMemoryIndexMigrationsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出记忆索引迁移
      description: 列出记忆索引迁移。 如需继续读取结果，请使用接口声明的分页参数。
    post:
      tags:
        - MemoryService
      operationId: MemoryService_CreateMemoryIndexMigration
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateMemoryIndexMigrationRequest"
        required: true
        description: 创建记忆索引迁移的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MemoryIndexGeneration"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建记忆索引迁移
      description: 创建记忆索引迁移。 请求字段应遵循下方的 Schema。
  /api/v1/memory-indexes/{id}:
    get:
      tags:
        - MemoryService
      operationId: MemoryService_GetMemoryIndexMigration
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MemoryIndexGeneration"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取记忆索引迁移
      description: 读取记忆索引迁移。
  /api/v1/memory-indexes/{id}:cancel:
    post:
      tags:
        - MemoryService
      operationId: MemoryService_CancelMemoryIndexMigration
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CancelMemoryIndexMigrationRequest"
        required: true
        description: 取消记忆索引迁移的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MemoryIndexGeneration"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 取消记忆索引迁移
      description: 取消记忆索引迁移。 请求字段应遵循下方的 Schema。
  /api/v1/memory-indexes/{id}:retry:
    post:
      tags:
        - MemoryService
      operationId: MemoryService_RetryMemoryIndexMigration
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RetryMemoryIndexMigrationRequest"
        required: true
        description: 重试记忆索引迁移的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MemoryIndexGeneration"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 重试记忆索引迁移
      description: 重试记忆索引迁移。 请求字段应遵循下方的 Schema。
  /api/v1/memory-runtime-policy:
    get:
      tags:
        - MemoryService
      operationId: MemoryService_GetMemoryRuntimePolicy
      parameters:
        - name: scope
          in: query
          schema:
            enum:
              - MEMORY_SCOPE_UNSPECIFIED
              - MEMORY_SCOPE_TENANT
              - MEMORY_SCOPE_AGENT
              - MEMORY_SCOPE_WORKSPACE
              - MEMORY_SCOPE_TASK
            type: string
            format: enum
            description: 权限范围。
            x-enum-descriptions:
              MEMORY_SCOPE_UNSPECIFIED: 未指定
              MEMORY_SCOPE_TENANT: 租户
              MEMORY_SCOPE_AGENT: Agent
              MEMORY_SCOPE_WORKSPACE: 工作空间
              MEMORY_SCOPE_TASK: 任务
          description: 权限范围。
        - name: resource_id
          in: query
          schema:
            type: string
          description: 资源标识符。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MemoryRuntimePolicy"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取记忆运行策略
      description: 读取记忆运行策略。
    put:
      tags:
        - MemoryService
      operationId: MemoryService_SetMemoryRuntimePolicy
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SetMemoryRuntimePolicyRequest"
        required: true
        description: 设置记忆运行策略的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MemoryRuntimePolicy"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 设置记忆运行策略
      description: 设置记忆运行策略。 请求字段应遵循下方的 Schema。
  /api/v1/memory-runtime-policy/effective:
    get:
      tags:
        - MemoryService
      operationId: MemoryService_GetEffectiveMemoryRuntimePolicy
      parameters:
        - name: execution.run_id
          in: query
          schema:
            type: string
          description: 执行运行标识符。
        - name: execution.worker_id
          in: query
          schema:
            type: string
          description: 执行Worker标识符。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EffectiveMemoryRuntimePolicy"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取实际生效的记忆运行策略
      description: 读取实际生效的记忆运行策略。
  /api/v1/registry/bundles:import:
    post:
      tags:
        - RegistryService
      operationId: RegistryService_ImportRegistryBundle
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ImportRegistryBundleRequest"
        required: true
        description: 导入注册表资源包的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RegistryBundleResult"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 导入注册表资源包
      description: 导入注册表资源包。 请求字段应遵循下方的 Schema。
  /api/v1/registry/bundles:validate:
    post:
      tags:
        - RegistryService
      operationId: RegistryService_ValidateRegistryBundle
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ValidateRegistryBundleRequest"
        required: true
        description: 校验注册表资源包的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RegistryBundleResult"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 校验注册表资源包
      description: 校验注册表资源包。 请求字段应遵循下方的 Schema。
  /api/v1/registry/model-policies:resolve:
    post:
      tags:
        - RegistryService
      operationId: RegistryService_ResolveModelPolicy
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ResolveModelPolicyRequest"
        required: true
        description: 解析模型策略的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ResolvedModelRoute"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 解析模型策略
      description: 解析模型策略。 请求字段应遵循下方的 Schema。
  /api/v1/registry/model-providers/{registry_version_id}/health:
    get:
      tags:
        - RegistryService
      operationId: RegistryService_GetModelProviderHealth
      parameters:
        - name: registry_version_id
          in: path
          required: true
          schema:
            type: string
          description: 注册表版本标识符。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ModelProviderHealth"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取模型服务商健康状态
      description: 读取模型服务商健康状态。
  /api/v1/registry/resources:
    get:
      tags:
        - RegistryService
      operationId: RegistryService_ListRegistryResources
      parameters:
        - name: kind
          in: query
          schema:
            enum:
              - REGISTRY_KIND_UNSPECIFIED
              - REGISTRY_KIND_KNOWLEDGE
              - REGISTRY_KIND_TOOL
              - REGISTRY_KIND_WORKFLOW
              - REGISTRY_KIND_EVALUATOR
              - REGISTRY_KIND_CAPABILITY
              - REGISTRY_KIND_RUNTIME_PROFILE
              - REGISTRY_KIND_MODEL_PROVIDER
              - REGISTRY_KIND_MODEL_POLICY
              - REGISTRY_KIND_SKILL
              - REGISTRY_KIND_MCP_SERVER
            type: string
            format: enum
            description: 类别。
            x-enum-descriptions:
              REGISTRY_KIND_UNSPECIFIED: 未指定
              REGISTRY_KIND_KNOWLEDGE: 知识
              REGISTRY_KIND_TOOL: 工具
              REGISTRY_KIND_WORKFLOW: 工作流
              REGISTRY_KIND_EVALUATOR: 评估器
              REGISTRY_KIND_CAPABILITY: 能力
              REGISTRY_KIND_RUNTIME_PROFILE: Runtime 配置
              REGISTRY_KIND_MODEL_PROVIDER: 模型服务商
              REGISTRY_KIND_MODEL_POLICY: 模型策略
              REGISTRY_KIND_SKILL: Skill
              REGISTRY_KIND_MCP_SERVER: MCP 服务
          description: 类别。
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: 请求的每页条数，受接口上限约束。
        - name: page_token
          in: query
          schema:
            type: string
          description: 上一页返回的不透明分页令牌，请勿自行构造或修改。
        - name: include_archived
          in: query
          schema:
            type: boolean
          description: 包括归档。
        - name: include_global
          in: query
          schema:
            type: boolean
          description: 包括全局。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListRegistryResourcesResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出注册表资源
      description: 列出注册表资源。 如需继续读取结果，请使用接口声明的分页参数。
    post:
      tags:
        - RegistryService
      operationId: RegistryService_CreateRegistryResource
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateRegistryResourceRequest"
        required: true
        description: 创建注册表资源的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RegistryResource"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建注册表资源
      description: 创建注册表资源。 请求字段应遵循下方的 Schema。
  /api/v1/registry/resources/{id}:
    get:
      tags:
        - RegistryService
      operationId: RegistryService_GetRegistryResource
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RegistryResource"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取注册表资源
      description: 读取注册表资源。
  /api/v1/registry/resources/{id}:archive:
    post:
      tags:
        - RegistryService
      operationId: RegistryService_ArchiveRegistryResource
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ArchiveRegistryResourceRequest"
        required: true
        description: 归档注册表资源的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RegistryResource"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 归档注册表资源
      description: 归档注册表资源。 请求字段应遵循下方的 Schema。
  /api/v1/registry/resources/{id}:restore:
    post:
      tags:
        - RegistryService
      operationId: RegistryService_RestoreRegistryResource
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RestoreRegistryResourceRequest"
        required: true
        description: 恢复注册表资源的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RegistryResource"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 恢复注册表资源
      description: 恢复注册表资源。 请求字段应遵循下方的 Schema。
  /api/v1/registry/resources/{registry_resource_id}/versions:
    get:
      tags:
        - RegistryService
      operationId: RegistryService_ListRegistryVersions
      parameters:
        - name: registry_resource_id
          in: path
          required: true
          schema:
            type: string
          description: 注册表资源标识符。
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: 请求的每页条数，受接口上限约束。
        - name: page_token
          in: query
          schema:
            type: string
          description: 上一页返回的不透明分页令牌，请勿自行构造或修改。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListRegistryVersionsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出注册表资源版本
      description: 列出注册表资源版本。 如需继续读取结果，请使用接口声明的分页参数。
    post:
      tags:
        - RegistryService
      operationId: RegistryService_PublishRegistryVersion
      parameters:
        - name: registry_resource_id
          in: path
          required: true
          schema:
            type: string
          description: 注册表资源标识符。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PublishRegistryVersionRequest"
        required: true
        description: 发布注册表资源版本的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RegistryVersion"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 发布注册表资源版本
      description: 发布注册表资源版本。 请求字段应遵循下方的 Schema。
  /api/v1/registry/versions/{id}:
    get:
      tags:
        - RegistryService
      operationId: RegistryService_GetRegistryVersion
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RegistryVersion"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取注册表资源版本
      description: 读取注册表资源版本。
  /api/v1/registry:resolve:
    post:
      tags:
        - RegistryService
      operationId: RegistryService_ResolveRegistryReference
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ResolveRegistryReferenceRequest"
        required: true
        description: 解析注册表引用的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ResolvedRegistryReference"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 解析注册表引用
      description: 解析注册表引用。 请求字段应遵循下方的 Schema。
  /api/v1/skills:package:
    post:
      tags:
        - RegistryService
      description: 将普通文件打包成通过校验的租户 Skill 包，不安装或执行文件；发布仍使用现有 Registry 导入流程。
      operationId: RegistryService_PackageSkillBundle
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PackageSkillBundleRequest"
        required: true
        description: 打包Skill 资源包的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PackageSkillBundleResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 打包Skill 资源包
  /api/v1/workspaces:
    get:
      tags:
        - WorkspaceService
      operationId: WorkspaceService_ListWorkspaces
      parameters:
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: 请求的每页条数，受接口上限约束。
        - name: page_token
          in: query
          schema:
            type: string
          description: 上一页返回的不透明分页令牌，请勿自行构造或修改。
        - name: include_archived
          in: query
          schema:
            type: boolean
          description: 包括归档。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListWorkspacesResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出工作空间
      description: 列出工作空间。 如需继续读取结果，请使用接口声明的分页参数。
    post:
      tags:
        - WorkspaceService
      operationId: WorkspaceService_CreateWorkspace
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateWorkspaceRequest"
        required: true
        description: 创建工作空间的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Workspace"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建工作空间
      description: 创建用于持续协作和访问控制的工作空间。仓库绑定与按任务使用的工作树是独立资源；创建新任务并不等于创建新工作空间。
  /api/v1/workspaces/{id}:
    get:
      tags:
        - WorkspaceService
      operationId: WorkspaceService_GetWorkspace
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Workspace"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取工作空间
      description: 读取工作空间。
    patch:
      tags:
        - WorkspaceService
      operationId: WorkspaceService_UpdateWorkspace
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateWorkspaceRequest"
        required: true
        description: 更新工作空间的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Workspace"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 更新工作空间
      description: 更新工作空间。 请求字段应遵循下方的 Schema。
  /api/v1/workspaces/{id}:archive:
    post:
      tags:
        - WorkspaceService
      operationId: WorkspaceService_ArchiveWorkspace
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ArchiveWorkspaceRequest"
        required: true
        description: 归档工作空间的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Workspace"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 归档工作空间
      description: 归档工作空间。 请求字段应遵循下方的 Schema。
  /api/v1/workspaces/{id}:restore:
    post:
      tags:
        - WorkspaceService
      operationId: WorkspaceService_RestoreWorkspace
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RestoreWorkspaceRequest"
        required: true
        description: 恢复工作空间的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Workspace"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 恢复工作空间
      description: 恢复工作空间。 请求字段应遵循下方的 Schema。
  /api/v1/workspaces/{source_workspace_id}/delegation-participants:
    get:
      tags:
        - WorkspaceService
      operationId: WorkspaceService_ListWorkspaceDelegationParticipants
      parameters:
        - name: source_workspace_id
          in: path
          required: true
          schema:
            type: string
          description: 来源工作空间标识符。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListWorkspaceDelegationParticipantsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出可委派的工作空间参与者
      description: 列出可委派的工作空间参与者。
  /api/v1/workspaces/{target_workspace_id}/delegation-grants:
    get:
      tags:
        - WorkspaceService
      operationId: WorkspaceService_ListWorkspaceDelegationGrants
      parameters:
        - name: target_workspace_id
          in: path
          required: true
          schema:
            type: string
          description: 目标工作空间标识符。
        - name: include_revoked
          in: query
          schema:
            type: boolean
          description: 包括撤销。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListWorkspaceDelegationGrantsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出工作空间委派授权
      description: 列出工作空间委派授权。
    post:
      tags:
        - WorkspaceService
      operationId: WorkspaceService_CreateWorkspaceDelegationGrant
      parameters:
        - name: target_workspace_id
          in: path
          required: true
          schema:
            type: string
          description: 目标工作空间标识符。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateWorkspaceDelegationGrantRequest"
        required: true
        description: 创建工作空间委派授权的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WorkspaceDelegationGrant"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建工作空间委派授权
      description: 创建工作空间委派授权。 请求字段应遵循下方的 Schema。
  /api/v1/workspaces/{target_workspace_id}/delegation-grants/{id}:revoke:
    post:
      tags:
        - WorkspaceService
      operationId: WorkspaceService_RevokeWorkspaceDelegationGrant
      parameters:
        - name: target_workspace_id
          in: path
          required: true
          schema:
            type: string
          description: 目标工作空间标识符。
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RevokeWorkspaceDelegationGrantRequest"
        required: true
        description: 撤销工作空间委派授权的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WorkspaceDelegationGrant"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 撤销工作空间委派授权
      description: 撤销工作空间委派授权。 请求字段应遵循下方的 Schema。
  /api/v1/workspaces/{workspace_id}/agents:
    get:
      tags:
        - WorkspaceService
      operationId: WorkspaceService_ListWorkspaceAgents
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        - name: include_removed
          in: query
          schema:
            type: boolean
          description: 包括已移除。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListWorkspaceAgentsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出工作空间 Agent 绑定
      description: 列出工作空间 Agent 绑定。
    post:
      tags:
        - WorkspaceService
      operationId: WorkspaceService_AddWorkspaceAgent
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AddWorkspaceAgentRequest"
        required: true
        description: 添加工作空间 Agent 绑定的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WorkspaceAgentBinding"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 添加工作空间 Agent 绑定
      description: 添加工作空间 Agent 绑定。 请求字段应遵循下方的 Schema。
  /api/v1/workspaces/{workspace_id}/agents/{id}:remove:
    post:
      tags:
        - WorkspaceService
      operationId: WorkspaceService_RemoveWorkspaceAgent
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RemoveWorkspaceAgentRequest"
        required: true
        description: 移除工作空间 Agent 绑定的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WorkspaceAgentBinding"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 移除工作空间 Agent 绑定
      description: 移除工作空间 Agent 绑定。 请求字段应遵循下方的 Schema。
  /api/v1/workspaces/{workspace_id}/worktrees:
    get:
      tags:
        - WorkspaceService
      operationId: WorkspaceService_ListWorktrees
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        - name: include_closed
          in: query
          schema:
            type: boolean
          description: 包括已关闭。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListWorktreesResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出工作树
      description: 列出工作树。
    post:
      tags:
        - WorkspaceService
      operationId: WorkspaceService_CreateWorktree
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateWorktreeRequest"
        required: true
        description: 创建工作树的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Worktree"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建工作树
      description: 创建工作树。 请求字段应遵循下方的 Schema。
  /api/v1/workspaces/{workspace_id}/worktrees/{id}:
    get:
      tags:
        - WorkspaceService
      operationId: WorkspaceService_GetWorktree
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Worktree"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取工作树
      description: 读取工作树。
  /api/v1/workspaces/{workspace_id}/worktrees/{source_worktree_id}:merge:
    post:
      tags:
        - WorkspaceService
      operationId: WorkspaceService_MergeWorktree
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        - name: source_worktree_id
          in: path
          required: true
          schema:
            type: string
          description: 来源工作树标识符。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MergeWorktreeRequest"
        required: true
        description: 合并工作树的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MergeWorktreeResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 合并工作树
      description: 按声明的目标和冲突选项请求合并工作树。应检查返回的合并状态，不能将请求已受理等同于无冲突地完成合并。
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
  schemas:
    ActivateMemoryIndexRequest:
      type: object
      properties:
        generation_id:
          type: string
          description: 仅当所有有效记录均保留原始词法向量时，空值才会切回原始词法向量。
        expected_state_version:
          type: string
          description: 用于乐观并发控制的预期状态版本。请原样复制当前版本，不要经 JavaScript Number 转换而损失精度。
        idempotency_key:
          type: string
          description: 本次操作的幂等键，仅在重试同一次、同内容的提交时复用。
      description: 激活记忆索引的请求结构。
    AddWorkspaceAgentRequest:
      type: object
      properties:
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        agent_version_id:
          type: string
          description: Agent版本标识符。
        environment_version_id:
          type: string
          description: 执行环境版本标识符。
        role:
          type: string
          description: 角色。
        model_config:
          $ref: "#/components/schemas/ModelInvocationConfig"
          description: 模型配置。
        key:
          type: string
          description: 键。
        default_coordinator:
          type: boolean
          description: 默认协调者。
      description: 添加工作空间 Agent 绑定的请求结构。
    Agent:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        name:
          type: string
          description: 名称。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
        archived_at:
          type: string
          format: date-time
          description: 归档时间，使用 RFC 3339 时间格式。
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
      description: Agent结构。
    AgentEnvironment:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        name:
          type: string
          description: 名称。
        description:
          type: string
          description: 说明。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
        archived_at:
          type: string
          format: date-time
          description: 归档时间，使用 RFC 3339 时间格式。
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
      description: Agent执行环境结构。
    AgentVersion:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        agent_id:
          type: string
          description: Agent标识符。
        version:
          type: integer
          format: int32
          description: 版本。
        instructions:
          type: string
          description: 指令。
        model_profile:
          $ref: "#/components/schemas/ModelProfile"
          description: 模型配置档。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        content_digest:
          type: string
          description: 内容摘要。
        model_policy_ref:
          type: string
          description: 模型策略引用。
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
      description: Agent 版本结构。
    ArchiveAgentRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      description: 归档Agent的请求结构。
    ArchiveEnvironmentRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      description: 归档执行环境的请求结构。
    ArchiveRegistryResourceRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      description: 归档注册表资源的请求结构。
    ArchiveWorkspaceRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      description: 归档工作空间的请求结构。
    AssignMemoryAgentReviewRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        expected_state_version:
          type: string
          description: 用于乐观并发控制的预期状态版本。请原样复制当前版本，不要经 JavaScript Number 转换而损失精度。
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        policy:
          $ref: "#/components/schemas/MemoryAgentReviewPolicy"
          description: 策略。
        allow_publication:
          type: boolean
          description: 明确且持久地同意：本次独立审核通过后，可以发布候选内容。
        idempotency_key:
          type: string
          description: 本次操作的幂等键，仅在重试同一次、同内容的提交时复用。
      description: 分配记忆独立 Agent 审核的请求结构。
    CancelMemoryAgentReviewRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        expected_state_version:
          type: string
          description: 用于乐观并发控制的预期状态版本。请原样复制当前版本，不要经 JavaScript Number 转换而损失精度。
      description: 取消记忆独立 Agent 审核的请求结构。
    CancelMemoryIndexMigrationRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      description: 取消记忆索引迁移的请求结构。
    CreateAgentRequest:
      type: object
      properties:
        name:
          type: string
          description: 名称。
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
      description: 创建Agent的请求结构。
    CreateAgentVersionRequest:
      type: object
      properties:
        agent_id:
          type: string
          description: Agent标识符。
        version:
          type: integer
          format: int32
          description: 版本。
        instructions:
          type: string
          description: 指令。
        model_profile:
          $ref: "#/components/schemas/ModelProfile"
          description: 模型配置档。
        model_policy_ref:
          type: string
          description: 模型策略引用。
      description: 创建Agent 版本的请求结构。
    CreateEnvironmentRequest:
      type: object
      properties:
        name:
          type: string
          description: 名称。
        description:
          type: string
          description: 说明。
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
      description: 创建执行环境的请求结构。
    CreateEnvironmentVersionRequest:
      type: object
      properties:
        agent_environment_id:
          type: string
          description: Agent执行环境标识符。
        version:
          type: string
          description: 版本。
        manifest:
          $ref: "#/components/schemas/EnvironmentManifest"
          description: 清单。
        manifest_yaml:
          type: string
          description: 原始的 orbitspace.dev/v1alpha1 YAML 或 JSON 清单。控制台交付导入使用本字段，便于服务端校验原始协议文件。
      description: 创建执行环境版本的请求结构。
    CreateMemoryIndexMigrationRequest:
      type: object
      properties:
        recipe:
          $ref: "#/components/schemas/MemoryEmbeddingRecipe"
          description: 配方。
        idempotency_key:
          type: string
          description: 本次操作的幂等键，仅在重试同一次、同内容的提交时复用。
      description: 创建记忆索引迁移的请求结构。
    CreateMemoryRequest:
      type: object
      properties:
        memory_id:
          type: string
          description: 记忆标识符。
        scope:
          enum:
            - MEMORY_SCOPE_UNSPECIFIED
            - MEMORY_SCOPE_TENANT
            - MEMORY_SCOPE_AGENT
            - MEMORY_SCOPE_WORKSPACE
            - MEMORY_SCOPE_TASK
          type: string
          format: enum
          description: 权限范围。
          x-enum-descriptions:
            MEMORY_SCOPE_UNSPECIFIED: 未指定
            MEMORY_SCOPE_TENANT: 租户
            MEMORY_SCOPE_AGENT: Agent
            MEMORY_SCOPE_WORKSPACE: 工作空间
            MEMORY_SCOPE_TASK: 任务
        agent_id:
          type: string
          description: Agent标识符。
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        task_id:
          type: string
          description: 任务标识，不能用一次执行的 Run ID 替代。
        kind:
          enum:
            - MEMORY_KIND_UNSPECIFIED
            - MEMORY_KIND_NOTE
            - MEMORY_KIND_EPISODIC
          type: string
          format: enum
          description: 类别。
          x-enum-descriptions:
            MEMORY_KIND_UNSPECIFIED: 未指定
            MEMORY_KIND_NOTE: 笔记
            MEMORY_KIND_EPISODIC: 情景记忆
        content:
          type: string
          description: 内容。
        metadata:
          type: object
          description: 元数据。
        provenance:
          $ref: "#/components/schemas/MemoryProvenance"
          description: 来源证据。
        consent_basis:
          enum:
            - MEMORY_CONSENT_BASIS_UNSPECIFIED
            - MEMORY_CONSENT_BASIS_EXPLICIT
            - MEMORY_CONSENT_BASIS_TASK_EXECUTION
            - MEMORY_CONSENT_BASIS_IMPORTED
          type: string
          format: enum
          description: 授权同意依据。
          x-enum-descriptions:
            MEMORY_CONSENT_BASIS_UNSPECIFIED: 未指定
            MEMORY_CONSENT_BASIS_EXPLICIT: 明确同意
            MEMORY_CONSENT_BASIS_TASK_EXECUTION: 任务执行
            MEMORY_CONSENT_BASIS_IMPORTED: 已导入
        retention_until:
          type: string
          format: date-time
          description: 保留截止时间，使用 RFC 3339 时间格式。
        idempotency_key:
          type: string
          description: 本次操作的幂等键，仅在重试同一次、同内容的提交时复用。
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
        execution:
          $ref: "#/components/schemas/MemoryExecution"
          description: 执行。
      description: 创建共享记忆的请求结构。
    CreateRegistryResourceRequest:
      type: object
      properties:
        kind:
          enum:
            - REGISTRY_KIND_UNSPECIFIED
            - REGISTRY_KIND_KNOWLEDGE
            - REGISTRY_KIND_TOOL
            - REGISTRY_KIND_WORKFLOW
            - REGISTRY_KIND_EVALUATOR
            - REGISTRY_KIND_CAPABILITY
            - REGISTRY_KIND_RUNTIME_PROFILE
            - REGISTRY_KIND_MODEL_PROVIDER
            - REGISTRY_KIND_MODEL_POLICY
            - REGISTRY_KIND_SKILL
            - REGISTRY_KIND_MCP_SERVER
          type: string
          format: enum
          description: 类别。
          x-enum-descriptions:
            REGISTRY_KIND_UNSPECIFIED: 未指定
            REGISTRY_KIND_KNOWLEDGE: 知识
            REGISTRY_KIND_TOOL: 工具
            REGISTRY_KIND_WORKFLOW: 工作流
            REGISTRY_KIND_EVALUATOR: 评估器
            REGISTRY_KIND_CAPABILITY: 能力
            REGISTRY_KIND_RUNTIME_PROFILE: Runtime 配置
            REGISTRY_KIND_MODEL_PROVIDER: 模型服务商
            REGISTRY_KIND_MODEL_POLICY: 模型策略
            REGISTRY_KIND_SKILL: Skill
            REGISTRY_KIND_MCP_SERVER: MCP 服务
        name:
          type: string
          description: 名称。
        description:
          type: string
          description: 说明。
        scope:
          enum:
            - REGISTRY_SCOPE_UNSPECIFIED
            - REGISTRY_SCOPE_TENANT
            - REGISTRY_SCOPE_GLOBAL
          type: string
          format: enum
          description: 权限范围。
          x-enum-descriptions:
            REGISTRY_SCOPE_UNSPECIFIED: 未指定
            REGISTRY_SCOPE_TENANT: 租户
            REGISTRY_SCOPE_GLOBAL: 全局
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
      description: 创建注册表资源的请求结构。
    CreateWorkspaceDelegationGrantRequest:
      type: object
      properties:
        target_workspace_id:
          type: string
          description: 目标工作空间标识符。
        source_workspace_id:
          type: string
          description: 来源工作空间标识符。
        target_workspace_agent_binding_id:
          type: string
          description: 目标工作空间Agent绑定标识符。
        max_depth:
          type: integer
          format: int32
          description: 最大深度。
        token_budget:
          type: string
          description: Token预算。
        cost_budget_microunits:
          type: string
          description: 成本预算微单位。
        compute_budget_ms:
          type: string
          description: 计算预算毫秒。
        expires_at:
          type: string
          format: date-time
          description: 到期时间，使用 RFC 3339 时间格式。
        cost_budget_currency:
          type: string
          description: 成本预算币种。
      description: 创建工作空间委派授权的请求结构。
    CreateWorkspaceRequest:
      type: object
      properties:
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
        name:
          type: string
          description: 名称。
        description:
          type: string
          description: 说明。
      description: 创建工作空间的请求结构。
    CreateWorktreeRequest:
      type: object
      properties:
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        key:
          type: string
          description: 键。
        name:
          type: string
          description: 名称。
        base_worktree_id:
          type: string
          description: 基线工作树标识符。
      description: 创建工作树的请求结构。
    DeleteMemoryResponse:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        deleted_at:
          type: string
          format: date-time
          description: 删除时间，使用 RFC 3339 时间格式。
      description: 删除共享记忆的响应结构。
    EffectiveMemoryRuntimePolicy:
      type: object
      properties:
        task_id:
          type: string
          description: 任务标识，不能用一次执行的 Run ID 替代。
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        agent_id:
          type: string
          description: Agent标识符。
        use_scopes:
          type: array
          items:
            enum:
              - MEMORY_SCOPE_UNSPECIFIED
              - MEMORY_SCOPE_TENANT
              - MEMORY_SCOPE_AGENT
              - MEMORY_SCOPE_WORKSPACE
              - MEMORY_SCOPE_TASK
            type: string
            format: enum
            description: 使用权限范围。
            x-enum-descriptions:
              MEMORY_SCOPE_UNSPECIFIED: 未指定
              MEMORY_SCOPE_TENANT: 租户
              MEMORY_SCOPE_AGENT: Agent
              MEMORY_SCOPE_WORKSPACE: 工作空间
              MEMORY_SCOPE_TASK: 任务
          description: 使用权限范围列表。
        contribute_scopes:
          type: array
          items:
            enum:
              - MEMORY_SCOPE_UNSPECIFIED
              - MEMORY_SCOPE_TENANT
              - MEMORY_SCOPE_AGENT
              - MEMORY_SCOPE_WORKSPACE
              - MEMORY_SCOPE_TASK
            type: string
            format: enum
            description: 贡献权限范围。
            x-enum-descriptions:
              MEMORY_SCOPE_UNSPECIFIED: 未指定
              MEMORY_SCOPE_TENANT: 租户
              MEMORY_SCOPE_AGENT: Agent
              MEMORY_SCOPE_WORKSPACE: 工作空间
              MEMORY_SCOPE_TASK: 任务
          description: 贡献权限范围列表。
        sources:
          type: array
          items:
            $ref: "#/components/schemas/MemoryRuntimePolicy"
          description: 来源列表。
      description: 实际生效的记忆运行策略结构。
    EnvironmentManifest:
      type: object
      properties:
        api_version:
          type: string
          description: API版本。
        domain:
          type: string
          description: 领域。
        instructions:
          type: string
          description: 指令。
        instructions_ref:
          type: string
          description: 指令引用。
        knowledge_refs:
          type: array
          items:
            type: string
          description: 知识引用列表列表。
        tool_bindings:
          type: array
          items:
            type: string
          description: 工具绑定列表。
        runtime:
          $ref: "#/components/schemas/EnvironmentRuntimeSpec"
          description: Runtime 执行配置。
        capability_refs:
          type: array
          items:
            type: string
          description: 能力引用列表列表。
        resource_types:
          type: array
          items:
            type: string
          description: 资源类型列表。
        policy_profile_id:
          type: string
          description: 策略配置档标识符。
        workflow_refs:
          type: array
          items:
            type: string
          description: 工作流引用列表列表。
        evaluator_refs:
          type: array
          items:
            type: string
          description: 评估者引用列表列表。
        workspace_snapshot:
          $ref: "#/components/schemas/WorkspaceSnapshotPolicy"
          description: 工作空间快照。
        secret_refs:
          type: array
          items:
            type: string
          description: Environment 在执行 Run 时允许解析的 Secret 引用；值保持不透明，清单不包含 Secret 原文。
        skill_refs:
          type: array
          items:
            type: string
          description: 固定到精确版本的不可变 Skill 引用，正文和附带资源按需加载。
      description: 执行环境清单结构。
    EnvironmentRuntimeSpec:
      type: object
      properties:
        profile_id:
          type: string
          description: 配置档标识符。
        image:
          type: string
          description: 镜像。
        packages:
          type: array
          items:
            type: string
          description: 包列表。
        constraints:
          type: object
          additionalProperties:
            type: string
          description: 约束映射。
      description: 执行环境Runtime规范结构。
    EnvironmentVersion:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        agent_environment_id:
          type: string
          description: Agent执行环境标识符。
        version:
          type: string
          description: 版本。
        schema_version:
          type: string
          description: Schema版本。
        content_digest:
          type: string
          description: 内容摘要。
        manifest:
          $ref: "#/components/schemas/EnvironmentManifest"
          description: 清单。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        resolution_graph:
          type: array
          items:
            $ref: "#/components/schemas/ResolvedRegistryReference"
          description: 解析依赖图列表。
        aggregate_digest:
          type: string
          description: 聚合摘要。
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
      description: 执行环境版本结构。
    ExecutionEnginePolicy:
      type: object
      properties:
        revision:
          type: string
          description: 修订。
        default_engine:
          type: string
          description: 默认执行引擎。
        enabled_engines:
          type: array
          items:
            type: string
          description: 已启用执行引擎列表。
        content_digest:
          type: string
          description: 内容摘要。
      description: 执行引擎准入策略结构。
    ImportRegistryBundleRequest:
      type: object
      properties:
        bundle_json:
          type: string
          description: 以文本保留原始 JSON，避免签名规范化过程中经过 google.protobuf.Struct 的双精度表示而丢失整数精度。
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
      description: 导入注册表资源包的请求结构。
    ListAgentVersionsResponse:
      type: object
      properties:
        versions:
          type: array
          items:
            $ref: "#/components/schemas/AgentVersion"
          description: 版本列表。
        next_page_token:
          type: string
          description: 下一页的分页令牌；为空表示没有下一页。
      description: 列出Agent 版本的响应结构。
    ListAgentsResponse:
      type: object
      properties:
        agents:
          type: array
          items:
            $ref: "#/components/schemas/Agent"
          description: Agent列表。
        next_page_token:
          type: string
          description: 下一页的分页令牌；为空表示没有下一页。
      description: 列出Agent的响应结构。
    ListEnvironmentVersionsResponse:
      type: object
      properties:
        versions:
          type: array
          items:
            $ref: "#/components/schemas/EnvironmentVersion"
          description: 版本列表。
        next_page_token:
          type: string
          description: 下一页的分页令牌；为空表示没有下一页。
      description: 列出执行环境版本的响应结构。
    ListEnvironmentsResponse:
      type: object
      properties:
        environments:
          type: array
          items:
            $ref: "#/components/schemas/AgentEnvironment"
          description: 执行环境列表。
        next_page_token:
          type: string
          description: 下一页的分页令牌；为空表示没有下一页。
      description: 列出执行环境的响应结构。
    ListMemoriesResponse:
      type: object
      properties:
        memories:
          type: array
          items:
            $ref: "#/components/schemas/Memory"
          description: 记忆列表。
        next_page_token:
          type: string
          description: 下一页的分页令牌；为空表示没有下一页。
      description: 列出共享记忆的响应结构。
    ListMemoryCandidatesResponse:
      type: object
      properties:
        candidates:
          type: array
          items:
            $ref: "#/components/schemas/MemoryCandidate"
          description: 候选列表。
        next_page_token:
          type: string
          description: 下一页的分页令牌；为空表示没有下一页。
      description: 列出记忆候选的响应结构。
    ListMemoryIndexMigrationsResponse:
      type: object
      properties:
        generations:
          type: array
          items:
            $ref: "#/components/schemas/MemoryIndexGeneration"
          description: 代次列表。
        next_page_token:
          type: string
          description: 下一页的分页令牌；为空表示没有下一页。
      description: 列出记忆索引迁移的响应结构。
    ListRegistryResourcesResponse:
      type: object
      properties:
        resources:
          type: array
          items:
            $ref: "#/components/schemas/RegistryResource"
          description: 资源列表。
        next_page_token:
          type: string
          description: 下一页的分页令牌；为空表示没有下一页。
      description: 列出注册表资源的响应结构。
    ListRegistryVersionsResponse:
      type: object
      properties:
        versions:
          type: array
          items:
            $ref: "#/components/schemas/RegistryVersion"
          description: 版本列表。
        next_page_token:
          type: string
          description: 下一页的分页令牌；为空表示没有下一页。
      description: 列出注册表资源版本的响应结构。
    ListWorkspaceAgentsResponse:
      type: object
      properties:
        bindings:
          type: array
          items:
            $ref: "#/components/schemas/WorkspaceAgentBinding"
          description: 绑定列表。
      description: 列出工作空间 Agent 绑定的响应结构。
    ListWorkspaceDelegationGrantsResponse:
      type: object
      properties:
        grants:
          type: array
          items:
            $ref: "#/components/schemas/WorkspaceDelegationGrant"
          description: 授权列表。
      description: 列出工作空间委派授权的响应结构。
    ListWorkspaceDelegationParticipantsResponse:
      type: object
      properties:
        participants:
          type: array
          items:
            $ref: "#/components/schemas/WorkspaceDelegationParticipant"
          description: 参与者列表。
      description: 列出可委派的工作空间参与者的响应结构。
    ListWorkspacesResponse:
      type: object
      properties:
        workspaces:
          type: array
          items:
            $ref: "#/components/schemas/Workspace"
          description: 工作空间列表。
        next_page_token:
          type: string
          description: 下一页的分页令牌；为空表示没有下一页。
      description: 列出工作空间的响应结构。
    ListWorktreesResponse:
      type: object
      properties:
        worktrees:
          type: array
          items:
            $ref: "#/components/schemas/Worktree"
          description: 工作树列表。
      description: 列出工作树的响应结构。
    Memory:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        scope:
          enum:
            - MEMORY_SCOPE_UNSPECIFIED
            - MEMORY_SCOPE_TENANT
            - MEMORY_SCOPE_AGENT
            - MEMORY_SCOPE_WORKSPACE
            - MEMORY_SCOPE_TASK
          type: string
          format: enum
          description: 权限范围。
          x-enum-descriptions:
            MEMORY_SCOPE_UNSPECIFIED: 未指定
            MEMORY_SCOPE_TENANT: 租户
            MEMORY_SCOPE_AGENT: Agent
            MEMORY_SCOPE_WORKSPACE: 工作空间
            MEMORY_SCOPE_TASK: 任务
        agent_id:
          type: string
          description: Agent标识符。
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        task_id:
          type: string
          description: 任务标识，不能用一次执行的 Run ID 替代。
        kind:
          enum:
            - MEMORY_KIND_UNSPECIFIED
            - MEMORY_KIND_NOTE
            - MEMORY_KIND_EPISODIC
          type: string
          format: enum
          description: 类别。
          x-enum-descriptions:
            MEMORY_KIND_UNSPECIFIED: 未指定
            MEMORY_KIND_NOTE: 笔记
            MEMORY_KIND_EPISODIC: 情景记忆
        content:
          type: string
          description: 内容。
        metadata:
          type: object
          description: 元数据。
        provenance:
          $ref: "#/components/schemas/MemoryProvenance"
          description: 来源证据。
        consent_basis:
          enum:
            - MEMORY_CONSENT_BASIS_UNSPECIFIED
            - MEMORY_CONSENT_BASIS_EXPLICIT
            - MEMORY_CONSENT_BASIS_TASK_EXECUTION
            - MEMORY_CONSENT_BASIS_IMPORTED
          type: string
          format: enum
          description: 授权同意依据。
          x-enum-descriptions:
            MEMORY_CONSENT_BASIS_UNSPECIFIED: 未指定
            MEMORY_CONSENT_BASIS_EXPLICIT: 明确同意
            MEMORY_CONSENT_BASIS_TASK_EXECUTION: 任务执行
            MEMORY_CONSENT_BASIS_IMPORTED: 已导入
        safety_status:
          enum:
            - MEMORY_SAFETY_STATUS_UNSPECIFIED
            - MEMORY_SAFETY_STATUS_ACCEPTED
            - MEMORY_SAFETY_STATUS_SUSPICIOUS
          type: string
          format: enum
          description: 安全状态。
          x-enum-descriptions:
            MEMORY_SAFETY_STATUS_UNSPECIFIED: 未指定
            MEMORY_SAFETY_STATUS_ACCEPTED: 已接受
            MEMORY_SAFETY_STATUS_SUSPICIOUS: 可疑
        safety_reasons:
          type: array
          items:
            type: string
          description: 安全原因列表。
        embedding_provider:
          type: string
          description: 向量嵌入服务商。
        embedding_model:
          type: string
          description: 向量嵌入模型。
        retention_until:
          type: string
          format: date-time
          description: 保留截止时间，使用 RFC 3339 时间格式。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
        content_digest:
          type: string
          description: 内容摘要。
        embedding_dimensions:
          type: integer
          format: int32
          description: 向量嵌入维度。
        revision_series_id:
          type: string
          description: 修订系列标识符。
        revision:
          type: string
          description: 修订。
        previous_memory_id:
          type: string
          description: 先前记忆标识符。
        revision_reason:
          type: string
          description: 修订原因。
        superseded_at:
          type: string
          format: date-time
          description: 被取代时间，使用 RFC 3339 时间格式。
      description: 共享记忆结构。
    MemoryAgentReview:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        candidate_id:
          type: string
          description: 候选标识符。
        task_id:
          type: string
          description: 任务标识，不能用一次执行的 Run ID 替代。
        agent_id:
          type: string
          description: Agent标识符。
        authorized_by:
          type: string
          description: 授权操作者。
        status:
          type: string
          description: 状态。
        state_version:
          type: string
          description: 用于乐观并发控制的状态版本，须保留精确的十进制表示。
        allow_publication:
          type: boolean
          description: 允许发布。
        decision:
          type: string
          description: 决定。
        evaluation:
          type: object
          description: 评估。
        usage:
          type: object
          description: 用量。
        error_code:
          type: string
          description: 错误代码。
        deadline_at:
          type: string
          format: date-time
          description: 截止时间时间，使用 RFC 3339 时间格式。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
      description: 记忆独立 Agent 审核结构。
    MemoryAgentReviewPolicy:
      type: object
      properties:
        agent_version_id:
          type: string
          description: Agent版本标识符。
        environment_version_id:
          type: string
          description: 执行环境版本标识符。
        token_budget:
          type: string
          description: Token预算。
        cost_budget_microunits:
          type: string
          description: 成本预算微单位。
        compute_budget_ms:
          type: string
          description: 计算预算毫秒。
        deadline_ms:
          type: string
          description: 截止时间毫秒。
      description: 记忆Agent审核策略结构。
    MemoryCandidate:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        created_by:
          type: string
          description: 创建操作者。
        producer_agent_id:
          type: string
          description: 生产者Agent标识符。
        producer_task_id:
          type: string
          description: 生产者任务标识符。
        operation:
          type: string
          description: 操作。
        status:
          type: string
          description: 状态。
        state_version:
          type: string
          description: 用于乐观并发控制的状态版本，须保留精确的十进制表示。
        target:
          $ref: "#/components/schemas/MemoryCandidateTarget"
          description: 目标。
        sources:
          type: array
          items:
            $ref: "#/components/schemas/MemorySourceReference"
          description: 来源列表。
        content:
          type: string
          description: 内容。
        metadata:
          type: object
          description: 元数据。
        reason:
          type: string
          description: 原因。
        content_digest:
          type: string
          description: 内容摘要。
        output_memory_id:
          type: string
          description: 输出记忆标识符。
        reviewed_by:
          type: string
          description: 审核操作者。
        review_reason:
          type: string
          description: 审核原因。
        reviewed_at:
          type: string
          format: date-time
          description: 审核时间，使用 RFC 3339 时间格式。
        expires_at:
          type: string
          format: date-time
          description: 到期时间，使用 RFC 3339 时间格式。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
        error_code:
          type: string
          description: 错误代码。
        attempts:
          type: integer
          format: int32
          description: 尝试。
        completion_evidence:
          type: object
          description: 由服务生成的来源标识和摘要，不包含来源正文或签名 URL。
        extraction_usage:
          type: object
          description: 字节数和计算时间不等同于 Token 估算；v1 适配器不调用模型。
      description: 等待配置的审核与发布流程的记忆候选，尚不等同于已发布共享记忆。
    MemoryCandidateTarget:
      type: object
      properties:
        scope:
          enum:
            - MEMORY_SCOPE_UNSPECIFIED
            - MEMORY_SCOPE_TENANT
            - MEMORY_SCOPE_AGENT
            - MEMORY_SCOPE_WORKSPACE
            - MEMORY_SCOPE_TASK
          type: string
          format: enum
          description: 权限范围。
          x-enum-descriptions:
            MEMORY_SCOPE_UNSPECIFIED: 未指定
            MEMORY_SCOPE_TENANT: 租户
            MEMORY_SCOPE_AGENT: Agent
            MEMORY_SCOPE_WORKSPACE: 工作空间
            MEMORY_SCOPE_TASK: 任务
        agent_id:
          type: string
          description: Agent标识符。
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        task_id:
          type: string
          description: 任务标识，不能用一次执行的 Run ID 替代。
        kind:
          enum:
            - MEMORY_KIND_UNSPECIFIED
            - MEMORY_KIND_NOTE
            - MEMORY_KIND_EPISODIC
          type: string
          format: enum
          description: 类别。
          x-enum-descriptions:
            MEMORY_KIND_UNSPECIFIED: 未指定
            MEMORY_KIND_NOTE: 笔记
            MEMORY_KIND_EPISODIC: 情景记忆
        series_id:
          type: string
          description: 系列标识符。
        expected_revision:
          type: string
          description: 预期修订。
        retention_until:
          type: string
          format: date-time
          description: 保留截止时间，使用 RFC 3339 时间格式。
      description: 记忆候选目标结构。
    MemoryContentPage:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        content_digest:
          type: string
          description: 内容摘要。
        content:
          type: string
          description: 内容。
        offset_bytes:
          type: string
          description: 偏移字节。
        next_offset_bytes:
          type: string
          description: 下一偏移字节。
        total_bytes:
          type: string
          description: 总计字节。
        eof:
          type: boolean
          description: 已到末尾。
      description: 记忆内容分页结构。
    MemoryEmbeddingRecipe:
      type: object
      properties:
        provider:
          type: string
          description: 服务商。
        model:
          type: string
          description: 模型。
        dimensions:
          type: integer
          format: int32
          description: 维度。
        chunk_recipe:
          type: string
          description: 分块配方。
      description: 记忆向量嵌入配方结构。
    MemoryExecution:
      type: object
      properties:
        run_id:
          type: string
          description: 关联任务的一次执行 Run 的标识。
        worker_id:
          type: string
          description: Worker标识符。
      description: Worker 调用必须对应当前凭据身份持有租约的 Run。这些上下文属于传输层数据，不能由模型通过工具参数选择。
    MemoryIndexEntry:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        content_digest:
          type: string
          description: 内容摘要。
        preview:
          type: string
          description: 预览。
        content_bytes:
          type: string
          description: 内容字节。
        scope:
          enum:
            - MEMORY_SCOPE_UNSPECIFIED
            - MEMORY_SCOPE_TENANT
            - MEMORY_SCOPE_AGENT
            - MEMORY_SCOPE_WORKSPACE
            - MEMORY_SCOPE_TASK
          type: string
          format: enum
          description: 权限范围。
          x-enum-descriptions:
            MEMORY_SCOPE_UNSPECIFIED: 未指定
            MEMORY_SCOPE_TENANT: 租户
            MEMORY_SCOPE_AGENT: Agent
            MEMORY_SCOPE_WORKSPACE: 工作空间
            MEMORY_SCOPE_TASK: 任务
        agent_id:
          type: string
          description: Agent标识符。
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        task_id:
          type: string
          description: 任务标识，不能用一次执行的 Run ID 替代。
        kind:
          enum:
            - MEMORY_KIND_UNSPECIFIED
            - MEMORY_KIND_NOTE
            - MEMORY_KIND_EPISODIC
          type: string
          format: enum
          description: 类别。
          x-enum-descriptions:
            MEMORY_KIND_UNSPECIFIED: 未指定
            MEMORY_KIND_NOTE: 笔记
            MEMORY_KIND_EPISODIC: 情景记忆
        provenance:
          $ref: "#/components/schemas/MemoryProvenance"
          description: 来源证据。
        retention_until:
          type: string
          format: date-time
          description: 保留截止时间，使用 RFC 3339 时间格式。
        embedding_provider:
          type: string
          description: 向量嵌入服务商。
        embedding_model:
          type: string
          description: 向量嵌入模型。
        embedding_dimensions:
          type: integer
          format: int32
          description: 向量嵌入维度。
        score:
          type: number
          format: double
          description: 评分。
        index_generation_id:
          type: string
          description: 索引代次标识符。
        match_offset_bytes:
          type: string
          description: 匹配偏移字节。
        match_end_bytes:
          type: string
          description: 匹配结束字节。
        revision_series_id:
          type: string
          description: 修订系列标识符。
        revision:
          type: string
          description: 修订。
      description: 不可变引用及长度受限的预览。读取完整内容时，必须重新检查当前授权、保留策略和隔离状态。
    MemoryIndexGeneration:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        recipe:
          $ref: "#/components/schemas/MemoryEmbeddingRecipe"
          description: 配方。
        status:
          enum:
            - MEMORY_INDEX_STATUS_UNSPECIFIED
            - MEMORY_INDEX_STATUS_BUILDING
            - MEMORY_INDEX_STATUS_READY
            - MEMORY_INDEX_STATUS_CANCELLED
          type: string
          format: enum
          description: 状态。
          x-enum-descriptions:
            MEMORY_INDEX_STATUS_UNSPECIFIED: 未指定
            MEMORY_INDEX_STATUS_BUILDING: 构建中
            MEMORY_INDEX_STATUS_READY: 就绪
            MEMORY_INDEX_STATUS_CANCELLED: 已取消
        pending:
          type: string
          description: 待处理。
        running:
          type: string
          description: 执行中。
        done:
          type: string
          description: 已完成。
        failed:
          type: string
          description: 失败。
        active:
          type: boolean
          description: 活跃。
        created_by:
          type: string
          description: 创建操作者。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
      description: 记忆索引代次结构。
    MemoryIndexHead:
      type: object
      properties:
        generation_id:
          type: string
          description: 空值选择原始记录命名空间；命名空间切换必须显式执行。
        state_version:
          type: string
          description: 用于乐观并发控制的状态版本，须保留精确的十进制表示。
        active_recipe:
          $ref: "#/components/schemas/MemoryEmbeddingRecipe"
          description: 活跃配方。
        configured_recipe:
          $ref: "#/components/schemas/MemoryEmbeddingRecipe"
          description: 已配置配方。
        original_namespace_conflict:
          type: boolean
          description: 需要显式执行迁移；原始记录混用多种配方时，不返回 active_recipe。
      description: 当前记忆索引版本结构。
    MemoryProvenance:
      type: object
      properties:
        source_kind:
          type: string
          description: 来源类别。
        source_id:
          type: string
          description: 来源标识符。
        source_uri:
          type: string
          description: 来源URI。
        captured_at:
          type: string
          format: date-time
          description: 捕获时间，使用 RFC 3339 时间格式。
      description: 记忆来源证据结构。
    MemoryRuntimePolicy:
      type: object
      properties:
        scope:
          enum:
            - MEMORY_SCOPE_UNSPECIFIED
            - MEMORY_SCOPE_TENANT
            - MEMORY_SCOPE_AGENT
            - MEMORY_SCOPE_WORKSPACE
            - MEMORY_SCOPE_TASK
          type: string
          format: enum
          description: 权限范围。
          x-enum-descriptions:
            MEMORY_SCOPE_UNSPECIFIED: 未指定
            MEMORY_SCOPE_TENANT: 租户
            MEMORY_SCOPE_AGENT: Agent
            MEMORY_SCOPE_WORKSPACE: 工作空间
            MEMORY_SCOPE_TASK: 任务
        resource_id:
          type: string
          description: 资源标识符。
        use_scopes:
          type: array
          items:
            enum:
              - MEMORY_SCOPE_UNSPECIFIED
              - MEMORY_SCOPE_TENANT
              - MEMORY_SCOPE_AGENT
              - MEMORY_SCOPE_WORKSPACE
              - MEMORY_SCOPE_TASK
            type: string
            format: enum
            description: 使用权限范围。
            x-enum-descriptions:
              MEMORY_SCOPE_UNSPECIFIED: 未指定
              MEMORY_SCOPE_TENANT: 租户
              MEMORY_SCOPE_AGENT: Agent
              MEMORY_SCOPE_WORKSPACE: 工作空间
              MEMORY_SCOPE_TASK: 任务
          description: 使用权限范围列表。
        contribute_scopes:
          type: array
          items:
            enum:
              - MEMORY_SCOPE_UNSPECIFIED
              - MEMORY_SCOPE_TENANT
              - MEMORY_SCOPE_AGENT
              - MEMORY_SCOPE_WORKSPACE
              - MEMORY_SCOPE_TASK
            type: string
            format: enum
            description: 贡献权限范围。
            x-enum-descriptions:
              MEMORY_SCOPE_UNSPECIFIED: 未指定
              MEMORY_SCOPE_TENANT: 租户
              MEMORY_SCOPE_AGENT: Agent
              MEMORY_SCOPE_WORKSPACE: 工作空间
              MEMORY_SCOPE_TASK: 任务
          description: 贡献权限范围列表。
        state_version:
          type: string
          description: 用于乐观并发控制的状态版本，须保留精确的十进制表示。
        updated_by:
          type: string
          description: 更新操作者。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
        completion_extraction_enabled:
          type: boolean
          description: 租户默认关闭；已持久化的覆盖设置在不满足要求时也默认拒绝。完成时提取记忆要求每一层有效策略都允许。
        semantic_extraction:
          $ref: "#/components/schemas/MemorySemanticExtractionPolicy"
          description: 语义提取。
      description: 记忆运行策略结构。
    MemorySearchResult:
      type: object
      properties:
        memory:
          $ref: "#/components/schemas/Memory"
          description: 记忆。
        score:
          type: number
          format: double
          description: 评分。
        index_generation_id:
          type: string
          description: 索引代次标识符。
        match_offset_bytes:
          type: string
          description: 匹配偏移字节。
        match_end_bytes:
          type: string
          description: 匹配结束字节。
        index_embedding_provider:
          type: string
          description: 索引向量嵌入服务商。
        index_embedding_model:
          type: string
          description: 索引向量嵌入模型。
        index_embedding_dimensions:
          type: integer
          format: int32
          description: 索引向量嵌入维度。
      description: 记忆搜索结果结构。
    MemorySemanticExtractionPolicy:
      type: object
      properties:
        agent_version_id:
          type: string
          description: Agent版本标识符。
        environment_version_id:
          type: string
          description: 执行环境版本标识符。
        token_budget:
          type: string
          description: Token预算。
        cost_budget_microunits:
          type: string
          description: 成本预算微单位。
        compute_budget_ms:
          type: string
          description: 计算预算毫秒。
        deadline_ms:
          type: string
          description: 截止时间毫秒。
      description: 仅能由租户显式启用；省略时不产生后台模型调用费用。
    MemorySourceReference:
      type: object
      properties:
        memory_id:
          type: string
          description: 记忆标识符。
        content_digest:
          type: string
          description: 内容摘要。
      description: 候选建议在独立管理员明确同意之前保持私有；指定目标系列表示针对精确修订进行合并整理。
    MergeWorktreeRequest:
      type: object
      properties:
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        source_worktree_id:
          type: string
          description: 来源工作树标识符。
        target_worktree_id:
          type: string
          description: 目标工作树标识符。
        expected_source_state_version:
          type: string
          description: 预期来源状态版本。
        expected_target_state_version:
          type: string
          description: 预期目标状态版本。
      description: 合并工作树的请求结构。
    MergeWorktreeResponse:
      type: object
      properties:
        merged:
          type: boolean
          description: 已合并。
        source:
          $ref: "#/components/schemas/Worktree"
          description: 来源。
        target:
          $ref: "#/components/schemas/Worktree"
          description: 目标。
        snapshot:
          $ref: "#/components/schemas/WorkspaceSnapshot"
          description: 快照。
        conflict_paths:
          type: array
          items:
            type: string
          description: 冲突路径列表。
      description: 合并工作树的响应结构。
    ModelCatalog:
      type: object
      properties:
        provider:
          type: string
          description: 服务商。
        provider_name:
          type: string
          description: 服务商名称。
        source:
          type: string
          description: 来源。
        models:
          type: array
          items:
            $ref: "#/components/schemas/ModelCatalogEntry"
          description: 模型列表。
        fetched_at:
          type: string
          format: date-time
          description: 获取时间，使用 RFC 3339 时间格式。
        cache_ttl_seconds:
          type: integer
          format: int32
          description: 缓存有效期秒。
      description: 服务商模型目录结构。
    ModelCatalogEntry:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        display_name:
          type: string
          description: 展示名称。
        description:
          type: string
          description: 说明。
        reasoning_efforts:
          type: array
          items:
            type: string
          description: 思考思考强度列表。
        default_reasoning_effort:
          type: string
          description: 默认思考思考强度。
        reasoning:
          type: boolean
          description: 思考。
        thinking_format:
          type: string
          description: 思考格式。
        thinking_can_disable:
          type: boolean
          description: 思考可停用。
        context_window:
          type: string
          description: 上下文窗口。
        max_output_tokens:
          type: string
          description: 最大输出Token。
        is_default:
          type: boolean
          description: 是否默认。
      description: 模型目录条目结构。
    ModelCompatibilityReport:
      type: object
      properties:
        provider:
          type: string
          description: 服务商。
        provider_name:
          type: string
          description: 服务商名称。
        model:
          type: string
          description: 模型。
        transports:
          type: array
          items:
            $ref: "#/components/schemas/ModelTransportCapability"
          description: 传输列表。
        recommended_response_delivery_mode:
          type: string
          description: 建议响应投递模式。
        provider_stored_state_tested:
          type: boolean
          description: 服务商已保存状态已测试。
        provider_stored_state_supported:
          type: boolean
          description: 服务商已保存状态支持。
        checked_at:
          type: string
          format: date-time
          description: 检查时间，使用 RFC 3339 时间格式。
      description: 模型兼容性报告结构。
    ModelCredentialBinding:
      type: object
      properties:
        secret_ref:
          type: string
          description: 不透明的 Secret 引用，不能填入凭据原文。
        env_name:
          type: string
          description: 环境名称。
        header_name:
          type: string
          description: 头部名称。
        value_prefix:
          type: string
          description: 值前缀。
      description: 模型凭据绑定结构。
    ModelInvocationConfig:
      type: object
      properties:
        model:
          type: string
          description: 模型。
        reasoning_effort:
          type: string
          description: 思考思考强度。
      description: Agent 默认值、Task 覆盖值和实际 Run 快照共用 ModelInvocationConfig。reasoning_effort 使用服务商公布的标识，例如 low、xhigh、max、ultra 或 thinking；OrbitSpace 不用固定的 protobuf 枚举限制服务商持续演进的取值。Task 留空的字段继承 Agent/服务商默认值。
    ModelProfile:
      type: object
      properties:
        engine:
          type: string
          description: 执行引擎。
        provider:
          type: string
          description: 服务商。
        provider_name:
          type: string
          description: 服务商名称。
        base_url:
          type: string
          description: 基线URL。
        wire_api:
          type: string
          description: 接口协议API。
        credentials:
          type: array
          items:
            $ref: "#/components/schemas/ModelCredentialBinding"
          description: 凭据列表。
        request_headers:
          type: array
          items:
            $ref: "#/components/schemas/ModelRequestHeader"
          description: 请求头部列表。
        model_config:
          $ref: "#/components/schemas/ModelInvocationConfig"
          description: 模型配置。
        response_state_mode:
          type: string
          description: response_state_mode 决定 Responses Runtime 如何携带上下文。stateless 重发本地持久化记录，不要求服务商保留响应；provider_stored 显式允许服务商保存响应，并使用 previous_response_id 连接后续轮次。
        response_delivery_mode:
          type: string
          description: response_delivery_mode 决定 Responses API 单轮响应的返回方式。sse 保留增量输出；json 请求一次性完整响应，适用于流式终止事件缺少权威用量统计的网关。
        max_tool_rounds:
          type: integer
          description: max_tool_rounds 是由 Runtime 执行的 Agent 专属轮次预算；零表示继承 Runtime 安全上限。
          format: uint32
      description: ModelProfile 包含不可变的执行路由元数据和实际模型调用配置，不包含凭据原文。每个 secret_ref 均由 Agent Runtime 在启动 AgentEngine 调用前即时解析。
    ModelProviderHealth:
      type: object
      properties:
        registry_version_id:
          type: string
          description: 注册表版本标识符。
        status:
          enum:
            - MODEL_PROVIDER_HEALTH_STATUS_UNSPECIFIED
            - MODEL_PROVIDER_HEALTH_STATUS_UNKNOWN
            - MODEL_PROVIDER_HEALTH_STATUS_HEALTHY
            - MODEL_PROVIDER_HEALTH_STATUS_DEGRADED
            - MODEL_PROVIDER_HEALTH_STATUS_UNHEALTHY
          type: string
          format: enum
          description: 状态。
          x-enum-descriptions:
            MODEL_PROVIDER_HEALTH_STATUS_UNSPECIFIED: 未指定
            MODEL_PROVIDER_HEALTH_STATUS_UNKNOWN: 未知
            MODEL_PROVIDER_HEALTH_STATUS_HEALTHY: 健康
            MODEL_PROVIDER_HEALTH_STATUS_DEGRADED: 已降级
            MODEL_PROVIDER_HEALTH_STATUS_UNHEALTHY: 不健康
        consecutive_successes:
          type: string
          description: 连续成功次数。
        consecutive_failures:
          type: string
          description: 连续失败。
        latency_ms:
          type: string
          description: 延迟毫秒。
        error_code:
          type: string
          description: 错误代码。
        error_message:
          type: string
          description: 错误消息。
        observed_by:
          type: string
          description: 观测操作者。
        last_checked_at:
          type: string
          format: date-time
          description: 最近检查时间，使用 RFC 3339 时间格式。
        last_success_at:
          type: string
          format: date-time
          description: 最近成功时间，使用 RFC 3339 时间格式。
        last_failure_at:
          type: string
          format: date-time
          description: 最近失败时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
      description: 模型服务商健康状态结构。
    ModelRequestHeader:
      type: object
      properties:
        name:
          type: string
          description: 名称。
        value:
          type: string
          description: 值。
      description: 模型请求头部结构。
    ModelTransportCapability:
      type: object
      properties:
        delivery_mode:
          type: string
          description: 投递模式。
        supported:
          type: boolean
          description: 支持。
        usage_reported:
          type: boolean
          description: 用量已报告。
        cache_usage_reported:
          type: boolean
          description: 缓存用量已报告。
        cache_read_reported:
          type: boolean
          description: 缓存读取已报告。
        cache_write_reported:
          type: boolean
          description: 缓存写入已报告。
        latency_ms:
          type: string
          description: 延迟毫秒。
        error_code:
          type: string
          description: 错误代码。
        error_message:
          type: string
          description: 错误消息。
      description: 模型传输能力结构。
    PackageSkillBundleRequest:
      type: object
      properties:
        name:
          type: string
          description: 可选的 Registry 命名空间/名称；最后一段名称必须与 SKILL.md 匹配。
        version:
          type: string
          description: 版本。
        invocation_policy:
          type: string
          description: 调用策略。
        files:
          type: array
          items:
            $ref: "#/components/schemas/SkillPackageFile"
          description: 文件列表。
        license_expression:
          type: string
          description: 许可证表达式。
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
      description: 打包Skill 资源包的请求结构。
    PackageSkillBundleResponse:
      type: object
      properties:
        bundle_json:
          type: string
          description: 资源包JSON。
        reference:
          type: string
          description: 引用。
        description:
          type: string
          description: 说明。
        file_count:
          type: integer
          format: int32
          description: 文件数量。
        total_bytes:
          type: string
          description: 总计字节。
      description: 打包Skill 资源包的响应结构。
    ProbeModelCompatibilityRequest:
      type: object
      properties:
        agent_version_id:
          type: string
          description: Agent版本标识符。
      description: 探测模型兼容性的请求结构。
    ProblemDetails:
      type: object
      description: RFC 9457 Problem Details 错误对象，包含 OrbitSpace 的关联标识扩展字段。
      required:
        - type
        - title
        - status
        - detail
        - request_id
      properties:
        type:
          type: string
          format: uri
          description: 类型。
        title:
          type: string
          description: 标题。
        status:
          type: integer
          minimum: 400
          maximum: 599
          description: 状态。
        detail:
          type: string
          description: 详情。
        instance:
          type: string
          format: uri-reference
          description: 实例。
        code:
          type: string
          pattern: ^[A-Z][A-Z0-9_]*$
          description: 代码。
        request_id:
          type: string
          format: uuid
          description: 请求标识符。
    ProposeMemoryCandidateRequest:
      type: object
      properties:
        sources:
          type: array
          items:
            $ref: "#/components/schemas/MemorySourceReference"
          description: 来源列表。
        target:
          $ref: "#/components/schemas/MemoryCandidateTarget"
          description: 目标。
        content:
          type: string
          description: 内容。
        metadata:
          type: object
          description: 元数据。
        reason:
          type: string
          description: 原因。
        idempotency_key:
          type: string
          description: 本次操作的幂等键，仅在重试同一次、同内容的提交时复用。
        expires_at:
          type: string
          format: date-time
          description: 到期时间，使用 RFC 3339 时间格式。
        execution:
          $ref: "#/components/schemas/MemoryExecution"
          description: 执行。
      description: 提出记忆候选的请求结构。
    PublishRegistryVersionRequest:
      type: object
      properties:
        registry_resource_id:
          type: string
          description: 注册表资源标识符。
        version:
          type: string
          description: 版本。
        schema_version:
          type: string
          description: Schema版本。
        content:
          type: object
          description: 内容。
        license_expression:
          type: string
          description: 许可证表达式。
        compatibility:
          type: array
          items:
            type: string
          description: 兼容性列表。
        provenance:
          $ref: "#/components/schemas/RegistryProvenance"
          description: 来源证据。
        signature:
          $ref: "#/components/schemas/RegistrySignature"
          description: 签名。
      description: 发布注册表资源版本的请求结构。
    RegistryBundleResult:
      type: object
      properties:
        schema_version:
          type: string
          description: Schema版本。
        scope:
          enum:
            - REGISTRY_SCOPE_UNSPECIFIED
            - REGISTRY_SCOPE_TENANT
            - REGISTRY_SCOPE_GLOBAL
          type: string
          format: enum
          description: 权限范围。
          x-enum-descriptions:
            REGISTRY_SCOPE_UNSPECIFIED: 未指定
            REGISTRY_SCOPE_TENANT: 租户
            REGISTRY_SCOPE_GLOBAL: 全局
        resource_count:
          type: integer
          format: int32
          description: 资源数量。
        version_count:
          type: integer
          format: int32
          description: 版本数量。
        references:
          type: array
          items:
            type: string
          description: 引用列表。
      description: 注册表资源包结果结构。
    RegistryProvenance:
      type: object
      properties:
        source_uri:
          type: string
          description: 来源URI。
        revision:
          type: string
          description: 修订。
        builder:
          type: string
          description: 构建器。
        built_at:
          type: string
          format: date-time
          description: 构建时间，使用 RFC 3339 时间格式。
        material_digests:
          type: array
          items:
            type: string
          description: 材料摘要列表。
        sbom_digest:
          type: string
          description: 软件物料清单摘要。
      description: 注册表来源证据结构。
    RegistryResource:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        scope:
          enum:
            - REGISTRY_SCOPE_UNSPECIFIED
            - REGISTRY_SCOPE_TENANT
            - REGISTRY_SCOPE_GLOBAL
          type: string
          format: enum
          description: 权限范围。
          x-enum-descriptions:
            REGISTRY_SCOPE_UNSPECIFIED: 未指定
            REGISTRY_SCOPE_TENANT: 租户
            REGISTRY_SCOPE_GLOBAL: 全局
        kind:
          x-extensible-enum:
            - REGISTRY_KIND_UNSPECIFIED
            - REGISTRY_KIND_KNOWLEDGE
            - REGISTRY_KIND_TOOL
            - REGISTRY_KIND_WORKFLOW
            - REGISTRY_KIND_EVALUATOR
            - REGISTRY_KIND_CAPABILITY
            - REGISTRY_KIND_RUNTIME_PROFILE
            - REGISTRY_KIND_MODEL_PROVIDER
            - REGISTRY_KIND_MODEL_POLICY
            - REGISTRY_KIND_SKILL
            - REGISTRY_KIND_MCP_SERVER
          type: string
          format: enum
          description: 类别。
        name:
          type: string
          description: 名称。
        description:
          type: string
          description: 说明。
        archived_at:
          type: string
          format: date-time
          description: 归档时间，使用 RFC 3339 时间格式。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
        presentation:
          type: object
          description: 最近一次成功发现得到的展示元数据，不属于 Registry 配置，也不改变不可变连接版本。
      description: 注册表资源结构。
    RegistrySignature:
      type: object
      properties:
        algorithm:
          type: string
          description: 算法。
        key_id:
          type: string
          description: 键标识符。
        public_key:
          type: string
          description: 公钥。
        value:
          type: string
          description: 值。
      description: 注册表签名结构。
    RegistryVersion:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        registry_resource_id:
          type: string
          description: 注册表资源标识符。
        scope:
          enum:
            - REGISTRY_SCOPE_UNSPECIFIED
            - REGISTRY_SCOPE_TENANT
            - REGISTRY_SCOPE_GLOBAL
          type: string
          format: enum
          description: 权限范围。
          x-enum-descriptions:
            REGISTRY_SCOPE_UNSPECIFIED: 未指定
            REGISTRY_SCOPE_TENANT: 租户
            REGISTRY_SCOPE_GLOBAL: 全局
        kind:
          x-extensible-enum:
            - REGISTRY_KIND_UNSPECIFIED
            - REGISTRY_KIND_KNOWLEDGE
            - REGISTRY_KIND_TOOL
            - REGISTRY_KIND_WORKFLOW
            - REGISTRY_KIND_EVALUATOR
            - REGISTRY_KIND_CAPABILITY
            - REGISTRY_KIND_RUNTIME_PROFILE
            - REGISTRY_KIND_MODEL_PROVIDER
            - REGISTRY_KIND_MODEL_POLICY
            - REGISTRY_KIND_SKILL
            - REGISTRY_KIND_MCP_SERVER
          type: string
          format: enum
          description: 类别。
        version:
          type: string
          description: 版本。
        schema_version:
          type: string
          description: Schema版本。
        content_digest:
          type: string
          description: 内容摘要。
        envelope_digest:
          type: string
          description: 信封摘要。
        content:
          type: object
          description: 内容。
        license_expression:
          type: string
          description: 许可证表达式。
        compatibility:
          type: array
          items:
            type: string
          description: 兼容性列表。
        provenance:
          $ref: "#/components/schemas/RegistryProvenance"
          description: 来源证据。
        signature:
          $ref: "#/components/schemas/RegistrySignature"
          description: 签名。
        verification_status:
          enum:
            - REGISTRY_VERIFICATION_STATUS_UNSPECIFIED
            - REGISTRY_VERIFICATION_STATUS_UNSIGNED
            - REGISTRY_VERIFICATION_STATUS_VERIFIED
          type: string
          format: enum
          description: 验证状态。
          x-enum-descriptions:
            REGISTRY_VERIFICATION_STATUS_UNSPECIFIED: 未指定
            REGISTRY_VERIFICATION_STATUS_UNSIGNED: 未签名
            REGISTRY_VERIFICATION_STATUS_VERIFIED: 已验证
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
      description: 注册表资源版本结构。
    RemoveWorkspaceAgentRequest:
      type: object
      properties:
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      description: 移除工作空间 Agent 绑定的请求结构。
    ResolveModelPolicyRequest:
      type: object
      properties:
        reference:
          type: string
          description: 引用。
        excluded_provider_registry_version_ids:
          type: array
          items:
            type: string
          description: 已排除服务商注册表版本标识符列表列表。
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
      description: 解析模型策略的请求结构。
    ResolveRegistryReferenceRequest:
      type: object
      properties:
        reference:
          type: string
          description: 引用。
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
      description: 解析注册表引用的请求结构。
    ResolvedModelRoute:
      type: object
      properties:
        policy:
          $ref: "#/components/schemas/ResolvedRegistryReference"
          description: 策略。
        provider:
          $ref: "#/components/schemas/ResolvedRegistryReference"
          description: 服务商。
        model_profile:
          $ref: "#/components/schemas/ModelProfile"
          description: 模型配置档。
        health:
          $ref: "#/components/schemas/ModelProviderHealth"
          description: 健康。
        route_index:
          type: integer
          format: int32
          description: 路由索引。
        priority:
          type: string
          description: 优先级。
        rate_limits:
          type: object
          description: 速率上限。
        pricing:
          type: object
          description: 计价。
        fallback:
          type: object
          description: 回退。
        budget:
          type: object
          description: 预算。
        health_check:
          type: object
          description: 健康检查。
      description: 已解析模型路由结构。
    ResolvedRegistryReference:
      type: object
      properties:
        reference:
          type: string
          description: 引用。
        resolved_reference:
          type: string
          description: 已解析引用。
        registry_resource_id:
          type: string
          description: 注册表资源标识符。
        registry_version_id:
          type: string
          description: 注册表版本标识符。
        scope:
          enum:
            - REGISTRY_SCOPE_UNSPECIFIED
            - REGISTRY_SCOPE_TENANT
            - REGISTRY_SCOPE_GLOBAL
          type: string
          format: enum
          description: 权限范围。
          x-enum-descriptions:
            REGISTRY_SCOPE_UNSPECIFIED: 未指定
            REGISTRY_SCOPE_TENANT: 租户
            REGISTRY_SCOPE_GLOBAL: 全局
        kind:
          x-extensible-enum:
            - REGISTRY_KIND_UNSPECIFIED
            - REGISTRY_KIND_KNOWLEDGE
            - REGISTRY_KIND_TOOL
            - REGISTRY_KIND_WORKFLOW
            - REGISTRY_KIND_EVALUATOR
            - REGISTRY_KIND_CAPABILITY
            - REGISTRY_KIND_RUNTIME_PROFILE
            - REGISTRY_KIND_MODEL_PROVIDER
            - REGISTRY_KIND_MODEL_POLICY
            - REGISTRY_KIND_SKILL
            - REGISTRY_KIND_MCP_SERVER
          type: string
          format: enum
          description: 类别。
        name:
          type: string
          description: 名称。
        version:
          type: string
          description: 版本。
        content_digest:
          type: string
          description: 内容摘要。
        envelope_digest:
          type: string
          description: 信封摘要。
        verification_status:
          enum:
            - REGISTRY_VERIFICATION_STATUS_UNSPECIFIED
            - REGISTRY_VERIFICATION_STATUS_UNSIGNED
            - REGISTRY_VERIFICATION_STATUS_VERIFIED
          type: string
          format: enum
          description: 验证状态。
          x-enum-descriptions:
            REGISTRY_VERIFICATION_STATUS_UNSPECIFIED: 未指定
            REGISTRY_VERIFICATION_STATUS_UNSIGNED: 未签名
            REGISTRY_VERIFICATION_STATUS_VERIFIED: 已验证
        content:
          type: object
          description: 内容。
        license_expression:
          type: string
          description: 许可证表达式。
        compatibility:
          type: array
          items:
            type: string
          description: 兼容性列表。
        provenance:
          $ref: "#/components/schemas/RegistryProvenance"
          description: 来源证据。
        schema_version:
          type: string
          description: Schema版本。
        signature:
          $ref: "#/components/schemas/RegistrySignature"
          description: 签名。
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
      description: 已解析注册表引用结构。
    RestoreAgentRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      description: 恢复Agent的请求结构。
    RestoreEnvironmentRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      description: 恢复执行环境的请求结构。
    RestoreRegistryResourceRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      description: 恢复注册表资源的请求结构。
    RestoreWorkspaceRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      description: 恢复工作空间的请求结构。
    RetryMemoryIndexMigrationRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      description: 重试记忆索引迁移的请求结构。
    ReviewMemoryCandidateRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        expected_state_version:
          type: string
          description: 用于乐观并发控制的预期状态版本。请原样复制当前版本，不要经 JavaScript Number 转换而损失精度。
        approve:
          type: boolean
          description: 批准。
        consent_basis:
          enum:
            - MEMORY_CONSENT_BASIS_UNSPECIFIED
            - MEMORY_CONSENT_BASIS_EXPLICIT
            - MEMORY_CONSENT_BASIS_TASK_EXECUTION
            - MEMORY_CONSENT_BASIS_IMPORTED
          type: string
          format: enum
          description: 授权同意依据。
          x-enum-descriptions:
            MEMORY_CONSENT_BASIS_UNSPECIFIED: 未指定
            MEMORY_CONSENT_BASIS_EXPLICIT: 明确同意
            MEMORY_CONSENT_BASIS_TASK_EXECUTION: 任务执行
            MEMORY_CONSENT_BASIS_IMPORTED: 已导入
        reason:
          type: string
          description: 原因。
        idempotency_key:
          type: string
          description: 本次操作的幂等键，仅在重试同一次、同内容的提交时复用。
      description: 审核记忆候选的请求结构。
    ReviseMemoryRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        expected_revision:
          type: string
          description: 预期修订。
        content:
          type: string
          description: 内容。
        metadata:
          type: object
          description: 元数据。
        provenance:
          $ref: "#/components/schemas/MemoryProvenance"
          description: 来源证据。
        consent_basis:
          enum:
            - MEMORY_CONSENT_BASIS_UNSPECIFIED
            - MEMORY_CONSENT_BASIS_EXPLICIT
            - MEMORY_CONSENT_BASIS_TASK_EXECUTION
            - MEMORY_CONSENT_BASIS_IMPORTED
          type: string
          format: enum
          description: 授权同意依据。
          x-enum-descriptions:
            MEMORY_CONSENT_BASIS_UNSPECIFIED: 未指定
            MEMORY_CONSENT_BASIS_EXPLICIT: 明确同意
            MEMORY_CONSENT_BASIS_TASK_EXECUTION: 任务执行
            MEMORY_CONSENT_BASIS_IMPORTED: 已导入
        reason:
          type: string
          description: 原因。
        idempotency_key:
          type: string
          description: 本次操作的幂等键，仅在重试同一次、同内容的提交时复用。
        execution:
          $ref: "#/components/schemas/MemoryExecution"
          description: 执行。
      description: 修订共享记忆的请求结构。
    RevokeWorkspaceDelegationGrantRequest:
      type: object
      properties:
        target_workspace_id:
          type: string
          description: 目标工作空间标识符。
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        expected_state_version:
          type: string
          description: 用于乐观并发控制的预期状态版本。请原样复制当前版本，不要经 JavaScript Number 转换而损失精度。
      description: 撤销工作空间委派授权的请求结构。
    SearchMemoriesRequest:
      type: object
      properties:
        query:
          type: string
          description: 查询。
        scope:
          enum:
            - MEMORY_SCOPE_UNSPECIFIED
            - MEMORY_SCOPE_TENANT
            - MEMORY_SCOPE_AGENT
            - MEMORY_SCOPE_WORKSPACE
            - MEMORY_SCOPE_TASK
          type: string
          format: enum
          description: 权限范围。
          x-enum-descriptions:
            MEMORY_SCOPE_UNSPECIFIED: 未指定
            MEMORY_SCOPE_TENANT: 租户
            MEMORY_SCOPE_AGENT: Agent
            MEMORY_SCOPE_WORKSPACE: 工作空间
            MEMORY_SCOPE_TASK: 任务
        agent_id:
          type: string
          description: Agent标识符。
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        task_id:
          type: string
          description: 任务标识，不能用一次执行的 Run ID 替代。
        kind:
          enum:
            - MEMORY_KIND_UNSPECIFIED
            - MEMORY_KIND_NOTE
            - MEMORY_KIND_EPISODIC
          type: string
          format: enum
          description: 类别。
          x-enum-descriptions:
            MEMORY_KIND_UNSPECIFIED: 未指定
            MEMORY_KIND_NOTE: 笔记
            MEMORY_KIND_EPISODIC: 情景记忆
        include_suspicious:
          type: boolean
          description: 包括可疑。
        limit:
          type: integer
          format: int32
          description: 上限。
        minimum_score:
          type: number
          format: double
          description: 最低评分。
        execution:
          $ref: "#/components/schemas/MemoryExecution"
          description: 执行。
      description: 搜索共享记忆的请求结构。
    SearchMemoriesResponse:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: "#/components/schemas/MemorySearchResult"
          description: 结果列表。
      description: 搜索共享记忆的响应结构。
    SearchMemoryIndexRequest:
      type: object
      properties:
        query:
          type: string
          description: 查询。
        scope:
          enum:
            - MEMORY_SCOPE_UNSPECIFIED
            - MEMORY_SCOPE_TENANT
            - MEMORY_SCOPE_AGENT
            - MEMORY_SCOPE_WORKSPACE
            - MEMORY_SCOPE_TASK
          type: string
          format: enum
          description: 权限范围。
          x-enum-descriptions:
            MEMORY_SCOPE_UNSPECIFIED: 未指定
            MEMORY_SCOPE_TENANT: 租户
            MEMORY_SCOPE_AGENT: Agent
            MEMORY_SCOPE_WORKSPACE: 工作空间
            MEMORY_SCOPE_TASK: 任务
        agent_id:
          type: string
          description: Agent标识符。
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        task_id:
          type: string
          description: 任务标识，不能用一次执行的 Run ID 替代。
        kind:
          enum:
            - MEMORY_KIND_UNSPECIFIED
            - MEMORY_KIND_NOTE
            - MEMORY_KIND_EPISODIC
          type: string
          format: enum
          description: 类别。
          x-enum-descriptions:
            MEMORY_KIND_UNSPECIFIED: 未指定
            MEMORY_KIND_NOTE: 笔记
            MEMORY_KIND_EPISODIC: 情景记忆
        include_suspicious:
          type: boolean
          description: 包括可疑。
        limit:
          type: integer
          format: int32
          description: 上限。
        minimum_score:
          type: number
          format: double
          description: 最低评分。
        execution:
          $ref: "#/components/schemas/MemoryExecution"
          description: 执行。
      description: 搜索记忆索引的请求结构。
    SearchMemoryIndexResponse:
      type: object
      properties:
        entries:
          type: array
          items:
            $ref: "#/components/schemas/MemoryIndexEntry"
          description: 条目列表。
      description: 搜索记忆索引的响应结构。
    SetMemoryRuntimePolicyRequest:
      type: object
      properties:
        scope:
          enum:
            - MEMORY_SCOPE_UNSPECIFIED
            - MEMORY_SCOPE_TENANT
            - MEMORY_SCOPE_AGENT
            - MEMORY_SCOPE_WORKSPACE
            - MEMORY_SCOPE_TASK
          type: string
          format: enum
          description: 权限范围。
          x-enum-descriptions:
            MEMORY_SCOPE_UNSPECIFIED: 未指定
            MEMORY_SCOPE_TENANT: 租户
            MEMORY_SCOPE_AGENT: Agent
            MEMORY_SCOPE_WORKSPACE: 工作空间
            MEMORY_SCOPE_TASK: 任务
        resource_id:
          type: string
          description: 资源标识符。
        use_scopes:
          type: array
          items:
            enum:
              - MEMORY_SCOPE_UNSPECIFIED
              - MEMORY_SCOPE_TENANT
              - MEMORY_SCOPE_AGENT
              - MEMORY_SCOPE_WORKSPACE
              - MEMORY_SCOPE_TASK
            type: string
            format: enum
            description: 使用权限范围。
            x-enum-descriptions:
              MEMORY_SCOPE_UNSPECIFIED: 未指定
              MEMORY_SCOPE_TENANT: 租户
              MEMORY_SCOPE_AGENT: Agent
              MEMORY_SCOPE_WORKSPACE: 工作空间
              MEMORY_SCOPE_TASK: 任务
          description: 使用权限范围列表。
        contribute_scopes:
          type: array
          items:
            enum:
              - MEMORY_SCOPE_UNSPECIFIED
              - MEMORY_SCOPE_TENANT
              - MEMORY_SCOPE_AGENT
              - MEMORY_SCOPE_WORKSPACE
              - MEMORY_SCOPE_TASK
            type: string
            format: enum
            description: 贡献权限范围。
            x-enum-descriptions:
              MEMORY_SCOPE_UNSPECIFIED: 未指定
              MEMORY_SCOPE_TENANT: 租户
              MEMORY_SCOPE_AGENT: Agent
              MEMORY_SCOPE_WORKSPACE: 工作空间
              MEMORY_SCOPE_TASK: 任务
          description: 贡献权限范围列表。
        expected_state_version:
          type: string
          description: 用于乐观并发控制的预期状态版本。请原样复制当前版本，不要经 JavaScript Number 转换而损失精度。
        completion_extraction_enabled:
          type: boolean
          description: 完成提取已启用。
        semantic_extraction:
          $ref: "#/components/schemas/MemorySemanticExtractionPolicy"
          description: 语义提取。
      description: 设置记忆运行策略的请求结构。
    SkillPackageFile:
      type: object
      properties:
        path:
          type: string
          description: 路径。
        content_base64:
          type: string
          description: 内容Base64。
      description: Skill包文件结构。
    UpdateWorkspaceRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        name:
          type: string
          description: 名称。
        description:
          type: string
          description: 说明。
      description: 更新工作空间的请求结构。
    ValidateRegistryBundleRequest:
      type: object
      properties:
        bundle_json:
          type: string
          description: 以文本保留原始 JSON，避免签名规范化过程中经过 google.protobuf.Struct 的双精度表示而丢失整数精度。
        policy_scope_id:
          type: string
          description: 租户资源包的可选目标项目；全局导入不接受该字段。
      description: 校验注册表资源包的请求结构。
    Workspace:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
        name:
          type: string
          description: 名称。
        description:
          type: string
          description: 说明。
        created_by:
          type: string
          description: 创建操作者。
        current_snapshot_id:
          type: string
          description: 当前快照标识符。
        archived_at:
          type: string
          format: date-time
          description: 归档时间，使用 RFC 3339 时间格式。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
      description: 包含访问策略与资源绑定的持续协作上下文，可关联多个仓库及任务工作树。
    WorkspaceAgentBinding:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        agent_version_id:
          type: string
          description: Agent版本标识符。
        environment_version_id:
          type: string
          description: 执行环境版本标识符。
        role:
          type: string
          description: 角色。
        model_config:
          $ref: "#/components/schemas/ModelInvocationConfig"
          description: 模型配置。
        created_by:
          type: string
          description: 创建操作者。
        archived_at:
          type: string
          format: date-time
          description: 归档时间，使用 RFC 3339 时间格式。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
        key:
          type: string
          description: 键。
        agent_id:
          type: string
          description: Agent标识符。
        agent_environment_id:
          type: string
          description: Agent执行环境标识符。
        default_coordinator:
          type: boolean
          description: 默认协调者。
        state_version:
          type: string
          description: 用于乐观并发控制的状态版本，须保留精确的十进制表示。
      description: 工作空间Agent绑定结构。
    WorkspaceChunk:
      type: object
      properties:
        digest:
          type: string
          description: 摘要。
        size_bytes:
          type: string
          description: 大小字节。
      description: 工作空间分块结构。
    WorkspaceDelegationGrant:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        source_workspace_id:
          type: string
          description: 来源工作空间标识符。
        target_workspace_id:
          type: string
          description: 目标工作空间标识符。
        target_workspace_agent_binding_id:
          type: string
          description: 目标工作空间Agent绑定标识符。
        max_depth:
          type: integer
          format: int32
          description: 最大深度。
        token_budget:
          type: string
          description: Token预算。
        cost_budget_microunits:
          type: string
          description: 成本预算微单位。
        compute_budget_ms:
          type: string
          description: 计算预算毫秒。
        expires_at:
          type: string
          format: date-time
          description: 到期时间，使用 RFC 3339 时间格式。
        status:
          enum:
            - WORKSPACE_DELEGATION_GRANT_STATUS_UNSPECIFIED
            - WORKSPACE_DELEGATION_GRANT_STATUS_ACTIVE
            - WORKSPACE_DELEGATION_GRANT_STATUS_REVOKED
          type: string
          format: enum
          description: 状态。
          x-enum-descriptions:
            WORKSPACE_DELEGATION_GRANT_STATUS_UNSPECIFIED: 未指定
            WORKSPACE_DELEGATION_GRANT_STATUS_ACTIVE: 已启用
            WORKSPACE_DELEGATION_GRANT_STATUS_REVOKED: 已撤销
        state_version:
          type: string
          description: 用于乐观并发控制的状态版本，须保留精确的十进制表示。
        created_by:
          type: string
          description: 创建操作者。
        revoked_by:
          type: string
          description: 撤销操作者。
        revoked_at:
          type: string
          format: date-time
          description: 撤销时间，使用 RFC 3339 时间格式。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
        cost_budget_currency:
          type: string
          description: 按已准入的委派子树分别计量，不是共享委派授权的生命周期余额。
      description: 目标 Workspace 对某个稳定 Agent 绑定的明确授权。预算值为零表示不设限；每个子级委派只能进一步收窄这些边界。
    WorkspaceDelegationParticipant:
      type: object
      properties:
        grant:
          $ref: "#/components/schemas/WorkspaceDelegationGrant"
          description: 授权。
        workspace:
          $ref: "#/components/schemas/Workspace"
          description: 工作空间。
        binding:
          $ref: "#/components/schemas/WorkspaceAgentBinding"
          description: 绑定。
      description: 工作空间委派参与者结构。
    WorkspaceSnapshot:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        task_id:
          type: string
          description: 任务标识，不能用一次执行的 Run ID 替代。
        run_id:
          type: string
          description: 关联任务的一次执行 Run 的标识。
        parent_snapshot_id:
          type: string
          description: 父级快照标识符。
        generation:
          type: string
          description: 代次。
        fence:
          type: string
          description: 隔离栅栏。
        manifest_version:
          type: integer
          format: int32
          description: 清单版本。
        manifest_digest:
          type: string
          description: 清单摘要。
        entries:
          type: array
          items:
            $ref: "#/components/schemas/WorkspaceSnapshotEntry"
          description: 条目列表。
        object_count:
          type: integer
          format: int32
          description: 对象数量。
        total_bytes:
          type: string
          description: 总计字节。
        status:
          enum:
            - WORKSPACE_SNAPSHOT_STATUS_UNSPECIFIED
            - WORKSPACE_SNAPSHOT_STATUS_PENDING
            - WORKSPACE_SNAPSHOT_STATUS_READY
            - WORKSPACE_SNAPSHOT_STATUS_FAILED
          type: string
          format: enum
          description: 状态。
          x-enum-descriptions:
            WORKSPACE_SNAPSHOT_STATUS_UNSPECIFIED: 未指定
            WORKSPACE_SNAPSHOT_STATUS_PENDING: 待处理
            WORKSPACE_SNAPSHOT_STATUS_READY: 就绪
            WORKSPACE_SNAPSHOT_STATUS_FAILED: 失败
        ready_at:
          type: string
          format: date-time
          description: 就绪时间，使用 RFC 3339 时间格式。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        worktree_id:
          type: string
          description: 工作树标识符。
      description: 工作空间快照结构。
    WorkspaceSnapshotEntry:
      type: object
      properties:
        path:
          type: string
          description: 路径。
        type:
          enum:
            - WORKSPACE_ENTRY_TYPE_UNSPECIFIED
            - WORKSPACE_ENTRY_TYPE_DIRECTORY
            - WORKSPACE_ENTRY_TYPE_FILE
            - WORKSPACE_ENTRY_TYPE_SYMLINK
          type: string
          format: enum
          description: 类型。
          x-enum-descriptions:
            WORKSPACE_ENTRY_TYPE_UNSPECIFIED: 未指定
            WORKSPACE_ENTRY_TYPE_DIRECTORY: 目录
            WORKSPACE_ENTRY_TYPE_FILE: 文件
            WORKSPACE_ENTRY_TYPE_SYMLINK: 符号链接
        mode:
          type: integer
          format: uint32
          description: 模式。
        size_bytes:
          type: string
          description: 大小字节。
        chunks:
          type: array
          items:
            $ref: "#/components/schemas/WorkspaceChunk"
          description: 分块列表。
        link_target:
          type: string
          description: 链接目标。
      description: 工作空间快照条目结构。
    WorkspaceSnapshotPolicy:
      type: object
      properties:
        exclude_names:
          type: array
          items:
            type: string
          description: 在 Workspace 所有目录深度排除的目录名或文件名，可用于 target 等可重建缓存及领域构建缓存。
        exclude_paths:
          type: array
          items:
            type: string
          description: 从快照中排除的文件或目录子树，路径相对于 Workspace 根目录。
      description: 工作空间快照策略结构。
    Worktree:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        key:
          type: string
          description: 键。
        name:
          type: string
          description: 名称。
        status:
          enum:
            - WORKTREE_STATUS_UNSPECIFIED
            - WORKTREE_STATUS_ACTIVE
            - WORKTREE_STATUS_MERGED
            - WORKTREE_STATUS_CONFLICTED
            - WORKTREE_STATUS_ARCHIVED
          type: string
          format: enum
          description: 状态。
          x-enum-descriptions:
            WORKTREE_STATUS_UNSPECIFIED: 未指定
            WORKTREE_STATUS_ACTIVE: 使用中
            WORKTREE_STATUS_MERGED: 已合并
            WORKTREE_STATUS_CONFLICTED: 存在冲突
            WORKTREE_STATUS_ARCHIVED: 已归档
        base_worktree_id:
          type: string
          description: 基线工作树标识符。
        base_snapshot_id:
          type: string
          description: 基线快照标识符。
        current_snapshot_id:
          type: string
          description: 当前快照标识符。
        snapshot_generation:
          type: string
          description: 快照代次。
        state_version:
          type: string
          description: 用于乐观并发控制的状态版本，须保留精确的十进制表示。
        created_by:
          type: string
          description: 创建操作者。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
      description: 任务执行使用的独立工作树，后续可按策略处理合并；与工作空间身份不同。
tags:
  - name: AgentService
    x-displayName: Agent
    description: Agent相关操作。
  - name: EnvironmentService
    x-displayName: 执行环境
    description: 执行环境相关操作。
  - name: MemoryService
    x-displayName: 共享记忆
    description: 共享记忆相关操作。
  - name: RegistryService
    x-displayName: 资源注册表
    description: 资源注册表相关操作。
  - name: WorkspaceService
    x-displayName: 工作空间与工作树
    description: 工作空间与工作树相关操作。
