Skip to content

control-plane

Generated reference page for spec/v1/api/control-plane.openapi.yaml.

Metadata

  • Type: OpenAPI
  • Source: spec/v1/api/control-plane.openapi.yaml
  • Raw: View Raw

Summary

  • Title: Agent Service Control Plane API
  • Version: v1
  • Paths: 28
  • Operations: 72
  • Servers: 1

Source

yaml
openapi: 3.1.0
info:
  title: Agent Service Control Plane API
  version: v1
  description: >
    Control Plane 负责资源管理与 run 命令。所有结构化对象优先引用 `schemas/` 下的共享定义。
servers:
  - url: https://api.agent-service.example.com
security:
  - bearerAuth: []
paths:
  /v1/organizations:
    get:
      operationId: listOrganizations
      summary: List organizations
      parameters:
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - name: status
          in: query
          schema:
            $ref: ../schemas/common/enums.json#/$defs/organizationStatus
        - name: keyword
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Organization page
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    type: object
                    required: [total, offset, limit, list]
                    properties:
                      total:
                        type: integer
                      offset:
                        type: integer
                      limit:
                        type: integer
                      list:
                        type: array
                        items:
                          $ref: ../schemas/resources/organization.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    post:
      operationId: createOrganization
      summary: Create organization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/CreateOrganizationCommand
      responses:
        '200':
          description: Created organization
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/organization.json
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/organizations/{orgId}:
    parameters:
      - $ref: '#/components/parameters/orgId'
    get:
      operationId: getOrganization
      summary: Get organization
      responses:
        '200':
          description: Organization detail
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/organization.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    put:
      operationId: updateOrganization
      summary: Update organization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/UpdateOrganizationCommand
      responses:
        '200':
          description: Updated organization
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/organization.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    delete:
      operationId: deleteOrganization
      summary: Delete organization
      responses:
        '200':
          description: Deletion accepted
          content:
            application/json:
              schema:
                $ref: ../schemas/common/envelope.json#/$defs/successEnvelope
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/organizations/{orgId}/agents:
    parameters:
      - $ref: '#/components/parameters/orgId'
    get:
      operationId: listAgentsByOrganization
      summary: List agents in organization
      parameters:
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - name: enabled
          in: query
          schema:
            type: boolean
        - name: keyword
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Agent page
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    type: object
                    required: [total, offset, limit, list]
                    properties:
                      total:
                        type: integer
                      offset:
                        type: integer
                      limit:
                        type: integer
                      list:
                        type: array
                        items:
                          $ref: ../schemas/resources/agent.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    post:
      operationId: createAgent
      summary: Create agent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/CreateAgentCommand
      responses:
        '200':
          description: Created agent
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/agent.json
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/agents/{agentId}:
    parameters:
      - $ref: '#/components/parameters/agentId'
    get:
      operationId: getAgent
      summary: Get agent
      responses:
        '200':
          description: Agent detail
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/agent.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    put:
      operationId: updateAgent
      summary: Update agent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/UpdateAgentCommand
      responses:
        '200':
          description: Updated agent
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/agent.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    delete:
      operationId: deleteAgent
      summary: Delete agent
      responses:
        '200':
          description: Deletion accepted
          content:
            application/json:
              schema:
                $ref: ../schemas/common/envelope.json#/$defs/successEnvelope
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/agents/{agentId}/revisions:
    parameters:
      - $ref: '#/components/parameters/agentId'
    get:
      operationId: listAgentRevisions
      summary: List agent revisions
      parameters:
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Agent revision page
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    type: object
                    required: [total, offset, limit, list]
                    properties:
                      total:
                        type: integer
                      offset:
                        type: integer
                      limit:
                        type: integer
                      list:
                        type: array
                        items:
                          $ref: ../schemas/resources/agent-revision.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    post:
      operationId: createAgentRevision
      summary: Create agent revision
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/CreateAgentRevisionCommand
      responses:
        '200':
          description: Created agent revision
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/agent-revision.json
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/agents/{agentId}/revisions/{agentRevisionId}:
    parameters:
      - $ref: '#/components/parameters/agentId'
      - $ref: '#/components/parameters/agentRevisionId'
    get:
      operationId: getAgentRevision
      summary: Get agent revision
      responses:
        '200':
          description: Agent revision detail
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/agent-revision.json
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/tools:
    get:
      operationId: listTools
      summary: List tools
      parameters:
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - name: orgId
          in: query
          schema:
            $ref: ../schemas/common/identity.json#/$defs/orgId
      responses:
        '200':
          description: Tool page
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    type: object
                    required: [total, offset, limit, list]
                    properties:
                      total:
                        type: integer
                      offset:
                        type: integer
                      limit:
                        type: integer
                      list:
                        type: array
                        items:
                          $ref: ../schemas/resources/tool.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    post:
      operationId: createTool
      summary: Create tool
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/CreateToolCommand
      responses:
        '200':
          description: Created tool
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/tool.json
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/tools/{toolId}:
    parameters:
      - $ref: '#/components/parameters/toolId'
    get:
      operationId: getTool
      summary: Get tool
      responses:
        '200':
          description: Tool detail
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/tool.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    put:
      operationId: updateTool
      summary: Update tool
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/UpdateToolCommand
      responses:
        '200':
          description: Updated tool
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/tool.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    delete:
      operationId: deleteTool
      summary: Delete tool
      responses:
        '200':
          description: Deletion accepted
          content:
            application/json:
              schema:
                $ref: ../schemas/common/envelope.json#/$defs/successEnvelope
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/tools/{toolId}/revisions:
    parameters:
      - $ref: '#/components/parameters/toolId'
    get:
      operationId: listToolRevisions
      summary: List tool revisions
      parameters:
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Tool revision page
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    type: object
                    required: [total, offset, limit, list]
                    properties:
                      total:
                        type: integer
                      offset:
                        type: integer
                      limit:
                        type: integer
                      list:
                        type: array
                        items:
                          $ref: ../schemas/resources/tool-revision.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    post:
      operationId: createToolRevision
      summary: Create tool revision
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/CreateToolRevisionCommand
      responses:
        '200':
          description: Created tool revision
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/tool-revision.json
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/tools/{toolId}/revisions/{toolRevisionId}:
    parameters:
      - $ref: '#/components/parameters/toolId'
      - $ref: '#/components/parameters/toolRevisionId'
    get:
      operationId: getToolRevision
      summary: Get tool revision
      responses:
        '200':
          description: Tool revision detail
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/tool-revision.json
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/organizations/{orgId}/mcp-servers:
    parameters:
      - $ref: '#/components/parameters/orgId'
    get:
      operationId: listMcpServersByOrganization
      summary: List MCP servers in organization
      parameters:
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - name: enabled
          in: query
          schema:
            type: boolean
        - name: keyword
          in: query
          schema:
            type: string
      responses:
        '200':
          description: MCP server page
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    type: object
                    required: [total, offset, limit, list]
                    properties:
                      total:
                        type: integer
                      offset:
                        type: integer
                      limit:
                        type: integer
                      list:
                        type: array
                        items:
                          $ref: ../schemas/resources/mcp-server.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    post:
      operationId: createMcpServer
      summary: Create MCP server
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/CreateMcpServerCommand
      responses:
        '200':
          description: Created MCP server
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/mcp-server.json
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/mcp-servers/{mcpServerId}:
    parameters:
      - $ref: '#/components/parameters/mcpServerId'
    get:
      operationId: getMcpServer
      summary: Get MCP server
      responses:
        '200':
          description: MCP server detail
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/mcp-server.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    put:
      operationId: updateMcpServer
      summary: Update MCP server
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/UpdateMcpServerCommand
      responses:
        '200':
          description: Updated MCP server
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/mcp-server.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    delete:
      operationId: deleteMcpServer
      summary: Delete MCP server
      responses:
        '200':
          description: Deletion accepted
          content:
            application/json:
              schema:
                $ref: ../schemas/common/envelope.json#/$defs/successEnvelope
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/mcp-servers/{mcpServerId}/revisions:
    parameters:
      - $ref: '#/components/parameters/mcpServerId'
    get:
      operationId: listMcpServerRevisions
      summary: List MCP server revisions
      parameters:
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: MCP server revision page
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    type: object
                    required: [total, offset, limit, list]
                    properties:
                      total:
                        type: integer
                      offset:
                        type: integer
                      limit:
                        type: integer
                      list:
                        type: array
                        items:
                          $ref: ../schemas/resources/mcp-server-revision.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    post:
      operationId: createMcpServerRevision
      summary: Create MCP server revision
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/CreateMcpServerRevisionCommand
      responses:
        '200':
          description: Created MCP server revision
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/mcp-server-revision.json
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/mcp-servers/{mcpServerId}/revisions/{mcpServerRevisionId}:
    parameters:
      - $ref: '#/components/parameters/mcpServerId'
      - $ref: '#/components/parameters/mcpServerRevisionId'
    get:
      operationId: getMcpServerRevision
      summary: Get MCP server revision
      responses:
        '200':
          description: MCP server revision detail
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/mcp-server-revision.json
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/release-channels:
    get:
      operationId: listReleaseChannels
      summary: List release channels
      parameters:
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - name: orgId
          in: query
          schema:
            $ref: ../schemas/common/identity.json#/$defs/orgId
        - name: resourceType
          in: query
          schema:
            $ref: ../schemas/common/enums.json#/$defs/taskResourceType
      responses:
        '200':
          description: Release channel page
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    type: object
                    required: [total, offset, limit, list]
                    properties:
                      total:
                        type: integer
                      offset:
                        type: integer
                      limit:
                        type: integer
                      list:
                        type: array
                        items:
                          $ref: ../schemas/resources/release-channel.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    post:
      operationId: createReleaseChannel
      summary: Create release channel
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/CreateReleaseChannelCommand
      responses:
        '200':
          description: Created release channel
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/release-channel.json
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/release-channels/{channelId}:
    parameters:
      - $ref: '#/components/parameters/channelId'
    get:
      operationId: getReleaseChannel
      summary: Get release channel
      responses:
        '200':
          description: Release channel detail
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/release-channel.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    put:
      operationId: updateReleaseChannel
      summary: Update release channel
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/UpdateReleaseChannelCommand
      responses:
        '200':
          description: Updated release channel
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/release-channel.json
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/protocol-bindings:
    get:
      operationId: listProtocolBindings
      summary: List protocol bindings
      parameters:
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - name: orgId
          in: query
          schema:
            $ref: ../schemas/common/identity.json#/$defs/orgId
        - name: protocol
          in: query
          schema:
            $ref: ../schemas/common/enums.json#/$defs/protocolName
      responses:
        '200':
          description: Protocol binding page
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    type: object
                    required: [total, offset, limit, list]
                    properties:
                      total:
                        type: integer
                      offset:
                        type: integer
                      limit:
                        type: integer
                      list:
                        type: array
                        items:
                          $ref: ../schemas/resources/protocol-binding.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    post:
      operationId: createProtocolBinding
      summary: Create protocol binding
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/CreateProtocolBindingCommand
      responses:
        '200':
          description: Created protocol binding
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/protocol-binding.json
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/protocol-bindings/{bindingId}:
    parameters:
      - $ref: '#/components/parameters/bindingId'
    get:
      operationId: getProtocolBinding
      summary: Get protocol binding
      responses:
        '200':
          description: Protocol binding detail
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/protocol-binding.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    put:
      operationId: updateProtocolBinding
      summary: Update protocol binding
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/UpdateProtocolBindingCommand
      responses:
        '200':
          description: Updated protocol binding
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/protocol-binding.json
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/callable-grants:
    get:
      operationId: listCallableGrants
      summary: List callable grants
      parameters:
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - name: providerOrgId
          in: query
          schema:
            $ref: ../schemas/common/identity.json#/$defs/orgId
        - name: consumerOrgId
          in: query
          schema:
            $ref: ../schemas/common/identity.json#/$defs/orgId
        - name: resourceType
          in: query
          schema:
            $ref: ../schemas/common/enums.json#/$defs/taskResourceType
        - name: enabled
          in: query
          schema:
            type: boolean
      responses:
        '200':
          description: Callable grant page
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    type: object
                    required: [total, offset, limit, list]
                    properties:
                      total:
                        type: integer
                      offset:
                        type: integer
                      limit:
                        type: integer
                      list:
                        type: array
                        items:
                          $ref: ../schemas/resources/callable-grant.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    post:
      operationId: createCallableGrant
      summary: Create callable grant
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/CreateCallableGrantCommand
      responses:
        '200':
          description: Created callable grant
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/callable-grant.json
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/callable-grants/{grantId}:
    parameters:
      - $ref: '#/components/parameters/grantId'
    get:
      operationId: getCallableGrant
      summary: Get callable grant
      responses:
        '200':
          description: Callable grant detail
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/callable-grant.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    put:
      operationId: updateCallableGrant
      summary: Update callable grant
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/UpdateCallableGrantCommand
      responses:
        '200':
          description: Updated callable grant
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/callable-grant.json
        default:
          $ref: '#/components/responses/ErrorResponse'
    delete:
      operationId: deleteCallableGrant
      summary: Delete callable grant
      responses:
        '200':
          description: Deletion accepted
          content:
            application/json:
              schema:
                $ref: ../schemas/common/envelope.json#/$defs/successEnvelope
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/runs:
    post:
      operationId: createRun
      summary: Create run
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/CreateRunCommand
      responses:
        '200':
          description: Created run
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/run.json
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/runs/{runId}:continue:
    parameters:
      - $ref: '#/components/parameters/runId'
    post:
      operationId: continueRun
      summary: Continue run with canonical follow-up input
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/ContinueRunCommand
      responses:
        '200':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: ../schemas/common/envelope.json#/$defs/successEnvelope
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/runs/{runId}:notify:
    parameters:
      - $ref: '#/components/parameters/runId'
    post:
      operationId: notifyRun
      summary: Send notify event to run
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/NotifyRunCommand
      responses:
        '200':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: ../schemas/common/envelope.json#/$defs/successEnvelope
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/runs/{runId}:cancel:
    parameters:
      - $ref: '#/components/parameters/runId'
    post:
      operationId: cancelRun
      summary: Cancel run
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/CancelRunCommand
      responses:
        '200':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: ../schemas/common/envelope.json#/$defs/successEnvelope
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/runs/{runId}:fail:
    parameters:
      - $ref: '#/components/parameters/runId'
    post:
      operationId: failRun
      summary: Force fail run
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/FailRunCommand
      responses:
        '200':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: ../schemas/common/envelope.json#/$defs/successEnvelope
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/runs/{runId}/interactions/{interactionId}:respond:
    parameters:
      - $ref: '#/components/parameters/runId'
      - $ref: '#/components/parameters/interactionId'
    post:
      operationId: respondRunInteraction
      summary: Respond to interaction request
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/RespondInteractionCommand
      responses:
        '200':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: ../schemas/common/envelope.json#/$defs/successEnvelope
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/runs/{runId}/checkpoints:save:
    parameters:
      - $ref: '#/components/parameters/runId'
    post:
      operationId: saveCheckpoint
      summary: Save checkpoint for run
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/SaveCheckpointCommand
      responses:
        '200':
          description: Checkpoint creation accepted
          content:
            application/json:
              schema:
                type: object
                required: [code, message, data]
                properties:
                  code:
                    type: integer
                    const: 0
                  message:
                    type: string
                  data:
                    $ref: ../schemas/resources/checkpoint.json
        default:
          $ref: '#/components/responses/ErrorResponse'
  /v1/runs/{runId}/checkpoints:load:
    parameters:
      - $ref: '#/components/parameters/runId'
    post:
      operationId: loadCheckpoint
      summary: Load checkpoint into run
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: ../schemas/commands/control-plane.json#/$defs/LoadCheckpointCommand
      responses:
        '200':
          description: Load accepted
          content:
            application/json:
              schema:
                $ref: ../schemas/common/envelope.json#/$defs/successEnvelope
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
  parameters:
    offset:
      name: offset
      in: query
      schema:
        type: integer
        minimum: 0
        default: 0
    limit:
      name: limit
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 200
        default: 20
    orgId:
      name: orgId
      in: path
      required: true
      schema:
        $ref: ../schemas/common/identity.json#/$defs/orgId
    agentId:
      name: agentId
      in: path
      required: true
      schema:
        $ref: ../schemas/common/identity.json#/$defs/agentId
    agentRevisionId:
      name: agentRevisionId
      in: path
      required: true
      schema:
        $ref: ../schemas/common/identity.json#/$defs/agentRevisionId
    toolId:
      name: toolId
      in: path
      required: true
      schema:
        $ref: ../schemas/common/identity.json#/$defs/toolId
    toolRevisionId:
      name: toolRevisionId
      in: path
      required: true
      schema:
        $ref: ../schemas/common/identity.json#/$defs/toolRevisionId
    mcpServerId:
      name: mcpServerId
      in: path
      required: true
      schema:
        $ref: ../schemas/common/identity.json#/$defs/mcpServerId
    mcpServerRevisionId:
      name: mcpServerRevisionId
      in: path
      required: true
      schema:
        $ref: ../schemas/common/identity.json#/$defs/mcpServerRevisionId
    channelId:
      name: channelId
      in: path
      required: true
      schema:
        $ref: ../schemas/common/identity.json#/$defs/releaseChannelId
    bindingId:
      name: bindingId
      in: path
      required: true
      schema:
        $ref: ../schemas/common/identity.json#/$defs/protocolBindingId
    grantId:
      name: grantId
      in: path
      required: true
      schema:
        $ref: ../schemas/common/identity.json#/$defs/callableGrantId
    runId:
      name: runId
      in: path
      required: true
      schema:
        $ref: ../schemas/common/identity.json#/$defs/runId
    interactionId:
      name: interactionId
      in: path
      required: true
      schema:
        $ref: ../schemas/common/identity.json#/$defs/interactionId
  responses:
    ErrorResponse:
      description: Error response
      content:
        application/json:
          schema:
            $ref: ../schemas/errors/error-envelope.json

白皮书与规范内容以仓库真源为准。